hpc203 / yolov5-dnn-cpp-python-v2

用opencv的dnn模块做yolov5目标检测,包含C++和Python两个版本的程序,优化后的
115 stars 30 forks source link

模型是yolov5哪个版本跑出的 ultralytics / yolov5 #8

Open zkailinzhang opened 3 years ago

zkailinzhang commented 3 years ago

你好,你的代码跑通了,模型是yolov5哪个版本。 ultralytics/yolov5-5.0的模型能跑吗,需要改代码吗

JiaPai12138 commented 2 years ago

4.0

WuJiang1996 commented 2 years ago

不是的把?我用v4.0的权重转成onna,然后推理,就报下面的错 Traceback (most recent call last): File ".\main_yolov5.py", line 119, in dets = yolonet.detect(srcimg) File ".\main_yolov5.py", line 101, in detect outs[row_ind:row_ind+length, 0:2] = (outs[row_ind:row_ind+length, 0:2] 2. - 0.5 + np.tile(self.grid[i],(self.na, 1))) int(self.stride[i]) ValueError: operands could not be broadcast together with shapes (1,2,80,80,85) (19200,2)

hpc203 commented 2 years ago

这个仓库的代码有些旧了,最近我发布了使用opencv部署yolov5-v6.1的程序,源码地址是: https://github.com/hpc203/yolov5-v6.1-opencv-onnxrun 可以用这个新的,里面讲解了如何转换生成onnx文件