You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last): File "mtcnn/data_preprocess/gen_Pnet_train_data.py", line 94, in <module> delta_x = np.random.randint(max(-size, -x1), w) File "mtrand.pyx", line 630, in numpy.random.mtrand.RandomState.randint File "bounded_integers.pyx", line 1228, in numpy.random.bounded_integers._rand_int64 ValueError: low >= high
#13
Open
ouening opened this issue
Dec 30, 2019
· 9 comments
Hi, when I generate the Pnet train data, some errors happend:
12880 pics in total
/media/gaoya/disk/Applications/pytorch/目标检测/人脸检测/dataset/WIDER_FACE/WIDER_train/images/0--Parade/0_Parade_marchingband_1_849.jpg
/media/gaoya/disk/Applications/pytorch/目标检测/人脸检测/dataset/WIDER_FACE/WIDER_train/images/0--Parade/0_Parade_Parade_0_904.jpg
Traceback (most recent call last):
File "mtcnn/data_preprocess/gen_Pnet_train_data.py", line 94, in <module>
delta_x = np.random.randint(max(-size, -x1), w)
File "mtrand.pyx", line 630, in numpy.random.mtrand.RandomState.randint
File "bounded_integers.pyx", line 1228, in numpy.random.bounded_integers._rand_int64
ValueError: low >= high
How can I solve it?
The text was updated successfully, but these errors were encountered:
There is a bug in "mtcnn/data_preprocess/gen_Pnet_train_data.py".
'boxes' should be the form of [x1, y1, x2, y2], while the data in "./anno_store/anno_train.txt" is [x1, x2, dx, dy].
So, correct the form of 'boxes' can solve the problem.
Here is my solution:
for box in boxes:
box[2] = box[0] + box[2]
box[3] = box[1] + box[3]
Add these lines between line 48 and 49.
Then the error disappears.
When I ran mtcnn/data_preprocess/gen_Pnet_train_data.py, I received an error from this implementation. How did I resolve this issue? Thanks.
Traceback (most recent call last):
File "mtcnn/data_preprocess/gen_Pnet_train_data.py", line 162, in
delta_x = np.random.randint(-w * 0.2, w * 0.2)
File "mtrand.pyx", line 743, in numpy.random.mtrand.RandomState.randint
File "_bounded_integers.pyx", line 1260, in numpy.random._bounded_integers._rand_int64
ValueError: low >= high
@LiYunJamesPhD , Thank you for your reply. I have solved this problem. The simplest method is to delete the error data 5-29. Another method is that I see that the warehouse provides the annotation file conversion tool code for x, y, w, h and x1, y1, x2, y2. I think I can try. Well, the third method should be to modify the error code, but I haven't read the code in detail.
@DantesDawn Sounds great! I have not touched this code for a while because I was done with my internship (this code is part of my internship works). It is still good to know the solutions for that issue. Thanks.
Hi, when I generate the Pnet train data, some errors happend:
How can I solve it?
The text was updated successfully, but these errors were encountered: