Tianxiaomo / pytorch-YOLOv4

PyTorch ,ONNX and TensorRT implementation of YOLOv4
Apache License 2.0
4.46k stars 1.49k forks source link

"python models.py 80 "./checkpoints/yolov4.pth" "./data/dog.jpg" 576 768" Error #549

Open duys3416 opened 1 year ago

duys3416 commented 1 year ago

File "models.py", line 509, in plot_boxes_cv2(img, boxes[0], 'predictions.jpg', class_names) File "/home/duys/workspace/pytorch-YOLOv4/tool/utils.py", line 140, in plot_boxes_cv2 cv2.rectangle(img, (x1,y1), (np.float32(c3[0]), np.float32(c3[1])), rgb, -1) cv2.error: OpenCV(4.6.0) :-1: error: (-5:Bad argument) in function 'rectangle'

Overload resolution failed:

  • Can't parse 'pt2'. Sequence item with index 0 has a wrong type
  • Can't parse 'pt2'. 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
duys3416 commented 1 year ago

Solutions: https://github.com/hunglc007/tensorflow-yolov4-tflite/issues/368