yolo2-pytorch
yolo2-pytorch copied to clipboard
Question about im_process
Hi,
When I read the code, I found something hard to understand:
- In the code train.py, you randomly chose a scale index for training image every cfg.disp_interval. (https://github.com/longcw/yolo2-pytorch/blob/master/train.py#L120)
- But in the code imdb.py, you used such index for generating bounding-box information for whole images in the epoch (https://github.com/longcw/yolo2-pytorch/blob/master/datasets/imdb.py#L68). Then in every iteration in such epoch, you used the updated index for resizing training images (line 57).
I think procedure 1 and 2 are incompatible, which leads to mismatch between images and bounding-boxes. Another interesting thing is during training, more and more errors reported from darknet.py line116 occur. I think this is abnormal and may caused by 'bugs' I mentioned before. If someone has any ideas, please let me know.
Thanks a lot!
Hello. I am not coming for this question. I just want to ask what's your MAP after training 160 epochs on PASCAL VOC 20017&2012 trainval set. My MAP is very low. I don't modify any codes. BTW, there are more and more errors reported. I want to ask this question too.
You are right. I modified the codes and reshaped the groundtruth boxes according to the input image shapes. There were not any errors reported and the MAP are improved a lot. I tested the model on PASCAL VOC test 2007 with the input shape (512, 512) or (544, 544) and got the MAP 72.5%, which is the highest among all the input shapes.
Hi @Kenneth-Wong , I have modified the code and the results on my side is 72.1% with 416*416 input (trained with voc07+12).
I found mAP blows up during training if the code has not been modified.
You are right, this bug is introduced in commit https://github.com/longcw/yolo2-pytorch/commit/7fa25e1653eaf2dc84c0bd50804a1530f88501ac. Thank you for pointing this out.