yolo2-pytorch
yolo2-pytorch copied to clipboard
yolo_to_bbox function discards bounding boxes
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 ?
Same issue here ... any solution?
Try to change This
W, H = cfg.multi_scale_out_size[size_index]
To that
W, H = cfg.out_size