cv2.error: OpenCV(4.9.0) 👎 error: (-5:Bad argument) in function 'rectangle' #257
Unanswered
topherbuckley
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Getting the following error on calls to
results.save()
where results is an instance of <class 'yolov5.models.common.Detections'>yolov5-pip:
-> results.save()
(Pdb) n
cv2.error: OpenCV(4.9.0) 👎 error: (-5:Bad argument) in function 'rectangle'
To reproduce:
pip install yolov5
python model_evaluate.py best.pt ./dataset/test/_annotations.coco.json
wheremodel_evaluate.py
is given below and best.pt is a local copy of a finetuned model:I note I don't see this when using the code directly from the yolov5 git repo (as opposed to this pip package).
Original yolov5 repo:
Steps to reproduce:
3.
pip uninstall yolov5
4. Swap the following code below and run
PYTHONPATH=/home/bo/git/yolov5 python model_evaluate.py best.pt ./dataset/test/_annotations.coco.json
:Beta Was this translation helpful? Give feedback.
All reactions