ext_portrait_segmentation icon indicating copy to clipboard operation
ext_portrait_segmentation copied to clipboard

ValueError: low >= high

Open dengfenglai321 opened this issue 4 years ago • 6 comments

when i train or test command, there are the same error: File "/media/cendelian/7CCAEC82CAEC39D2/CV/Project/人像分割/portrait_segmentation/etc/help_function.py", line 25, in val_edge rand_pick = np.random.randint(0, len(val_loader)) File "mtrand.pyx", line 747, in numpy.random.mtrand.RandomState.randint File "_bounded_integers.pyx", line 1270, in numpy.random._bounded_integers._rand_int64 ValueError: low >= high

could you help me

dengfenglai321 avatar Jan 07 '20 15:01 dengfenglai321

That is the error about validation parts. Check the validation and there is not validation data. in that cases np.random.randint(0,0) has syntax error.

freaad avatar Jan 07 '20 19:01 freaad

thanks and could you tell me what the Portraint dir contain? just train.txt?

dengfenglai321 avatar Jan 08 '20 03:01 dengfenglai321

I do not know also. I am not ans author. What I assume is that, Portrait folder is original folder. aug file is extra. What I have done was remove validation parts and change some parts in dataloader.py and main parts. However the reason what I try to use this code is apply my own network. So I use my own train in the end. Most of the issue will happen the log parts. Just remove the log and checkpoint part. It will work ok. Thank you.

freaad avatar Jan 08 '20 20:01 freaad

Hello, First, the line 25 rand_pick is not necessary for training. This randomly picks one of result from validation set for visualization with visdom

HYOJINPARK avatar Jan 08 '20 23:01 HYOJINPARK

please refer one of my answer

https://github.com/clovaai/ext_portrait_segmentation/issues/1#issuecomment-572840600

HYOJINPARK avatar Jan 10 '20 02:01 HYOJINPARK

Hello, First, the line 25 rand_pick is not necessary for training. This randomly picks one of result from validation set for visualization with visdom

what if data is imbalanced

Atyab-Alam avatar Sep 17 '20 16:09 Atyab-Alam