Open ouening opened 4 years ago
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.
What's more, there is a same question in "gen_Rnet_train_data.py" and "gen_Onet_train_data.py". Deal it in the same way.
In .mat file of wilder_face , Number of bounding box: x1, y1, w, h, blur, expression, illumination, invalid, occlusion, pose
not x1 y1 x2 y2 so you should fix it
like:
for box in boxes:
# box (x_left, y_top, x_right, y_bottom)
x1, y1, w, h = box
# w = x2 - x1 + 1
# h = y2 - y1 + 1
x2 = x1 + w - 1
y2 = y1 + h - 1
@Z-Jeff why are we not generating landmark data for pnet and rnet ?
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
@LiYunJamesPhD ,I also encountered the same problem. Have you solved it?
@DantesDawn Hi, no, I could not solve this issue.
@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?