clovaai / ext_portrait_segmentation

MIT License
239 stars 67 forks source link

ValueError: low >= high #8

Open dengfenglai321 opened 4 years ago

dengfenglai321 commented 4 years ago

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

freaad commented 4 years ago

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.

dengfenglai321 commented 4 years ago

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

freaad commented 4 years ago

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.

HYOJINPARK commented 4 years ago

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 commented 4 years ago

please refer one of my answer

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

Atyab-Alam commented 3 years ago

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