ayooshkathuria / YOLO_v3_tutorial_from_scratch

Accompanying code for Paperspace tutorial series "How to Implement YOLO v3 Object Detector from Scratch"
https://blog.paperspace.com/how-to-implement-a-yolo-object-detector-in-pytorch/
2.32k stars 724 forks source link

the problem of function "predict_transform" #64

Open jzh9830 opened 4 years ago

jzh9830 commented 4 years ago

stride = inp_dim // prediction.size(2) grid_size = inp_dim // stride when inp_dim was not exactly divided by prediction.size(2), it may occur a error in prediction.view. Considering the grid_size equaling to the size of feature map, could we change it to "grid_size = prediction.size(2)" directly?

samutamm commented 4 years ago

The model seems to expect image of different size, which causes the problem. This https://github.com/ayooshkathuria/YOLO_v3_tutorial_from_scratch/issues/40#issuecomment-516392022 fixed it for me