utils.py
#140开始 去掉float的内容
cv2.rectangle(img, (x1,y1), (c3[0], c3[1]), rgb, -1)
img = cv2.putText(img, msg, (c1[0], (c1[1] - 2)), cv2.FONT_HERSHEY_SIMPLEX,0.7, (0,0,0), bbox_thick//2,lineType=cv2.LINE_AA)
cfg中use darknet设置为false
模型要下载darknet的yolov4.weights
有点坑了这个作者
GitHub - Tianxiaomo/pytorch-YOLOv4: PyTorch ,ONNX and TensorRT implementation of YOLOv4