inging550 / YOLOV1-pytorch

主干网络替换为了改进的ResNet50
19 stars 4 forks source link

The question about predict.py 's Coordinate transformation #2

Closed xiazhi1 closed 8 months ago

xiazhi1 commented 8 months ago

Hi, @inging550 Thanks for awesomer work Noticed that in this row code https://github.com/inging550/YOLOV1-pytorch/blob/52875569e98fa7aea33af3a6071008b2cc00f85b/predict.py#L49 You enlarged the xy coordinate of the bbox 64 times, why is it 64 and not the hw of the image? Any suggestions are welcomed! Looking forword to your reply!

inging550 commented 8 months ago

To put it simply, 7×64=448 The input size of net should be 448×448×3 and the output size is 7×7×30. At the 34 line of the code in predict.py, the img is already resize to 448×448,and the bbox(7×7) should plot on the img,so it should be multiply by 64

xiazhi1 commented 8 months ago

Thanks a lot , I get it . Happy chinese new year!