Closed bryanbocao closed 1 year ago
python3 run_ssd_example.py mb2-ssd-lite models/mb2-ssd-lite-mp-0_686.pth models/voc-model-labels.txt coco.jpg Inference time: 0.025010347366333008 Traceback (most recent call last): File "run_ssd_example.py", line 60, in <module> cv2.rectangle(orig_image, (box[0], box[1]), (box[2], box[3]), (255, 255, 0), 4) cv2.error: OpenCV(4.5.5) :-1: error: (-5:Bad argument) in function 'rectangle' > Overload resolution failed: > - Can't parse 'pt1'. Sequence item with index 0 has a wrong type > - Can't parse 'pt1'. Sequence item with index 0 has a wrong type > - Can't parse 'rec'. Expected sequence length 4, got 2 > - Can't parse 'rec'. Expected sequence length 4, got 2
Fixed by casting box type to int: 9a20fb6b3ef1f7a5709fcd160ebb18c236d60e54 https://github.com/qfgaohao/pytorch-ssd/pull/189/commits