yolo2-pytorch icon indicating copy to clipboard operation
yolo2-pytorch copied to clipboard

yolo_to_bbox function discards bounding boxes

Open aelnouby opened this issue 7 years ago • 2 comments

Hi,

When I try the demo I always get Traceback (most recent call last): File "demo.py", line 63, in <module> bbox_pred, iou_pred, prob_pred, image.shape, cfg, thresh) File "/export/mlrg/aelnouby/projects/3rdParty/yolo2-pytorch/utils/yolo.py", line 108, in postprocess num_classes = cfg.num_classes IndexError: index 571 is out of bounds for axis 0 with size 500

When I started debugging I found that yolo_to_bbox function call discards bounding boxes, while the input shape is (1, 165, 5, 4) , the output shape is (1, 100, 5, 4), which causes an out of index error as shown above. How to fix this issue ?

aelnouby avatar Jan 22 '18 18:01 aelnouby

Same issue here ... any solution?

hadikazemi avatar Feb 06 '18 16:02 hadikazemi

Try to change This W, H = cfg.multi_scale_out_size[size_index]

To that W, H = cfg.out_size

aelnouby avatar Feb 06 '18 17:02 aelnouby