yolov5-dnn-cpp-python icon indicating copy to clipboard operation
yolov5-dnn-cpp-python copied to clipboard

用opencv的dnn模块做yolov5目标检测,包含C++和Python两个版本的程序

Results 25 yolov5-dnn-cpp-python issues
Sort by recently updated
recently updated
newest added

/media/yzl/C4A8E8FBE4769FDE/sr/cpp/opencv-4.2.0/modules/dnn/src/onnx/onnx_importer.cpp:327: error: (-215:Assertion failed) model_proto.has_graph() in function 'populateNet' 为什么会报这样的错误?

C++版本的 boxes.size()是0,检测不到任何物体是怎么回事呢?

1.修改,因为提示参数不多,返回的只有三个参数 #bs, _, ny, nx = outs[i].shape # x(bs,255,20,20) to x(bs,3,20,20,85) bs, ny, nx = outs[i].shape # x(bs,255,20,20) to x(bs,3,20,20,85) 修改参数之后,包这个错误: ValueError: cannot reshape array of size 151200 into shape...

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

OpenCV(4.1.2) /usr/local/src/opencv/modules/dnn/include/opencv2/dnn/dnn.inl.hpp:349: error: (-204:Requested object was not found) Required argument "starts" not found into dictionary in function 'get' 完全按照大佬说的做的,但是加载失败。

看了您的博文,明白了要想将导出的onnx模型供cv2.dnn调用,需要改写官方源码。但作为小白,怎么改写还是不太懂。能将这个详细过程再讲一遍吗?十分感谢。

Traceback (most recent call last): File "C:/Users/xtuye/yolov5-dnn-cpp-python/main_yolov5.py", line 114, in dets = yolonet.detect(srcimg) File "C:/Users/xtuye/yolov5-dnn-cpp-python/main_yolov5.py", line 90, in detect outs[i] = outs[i].reshape(bs, self.na, self.no, ny, nx).transpose(0, 1, 3, 4, 2)...

Greetings! First off this is great work and I'm happy to maybe finally find a solution to my problem. Does your code work for own weights as well, which I've...

cmake .. make 都没报错 opencv4.5.0 ./opencv_test_project: symbol lookup error: ./opencv_test_project: undefined symbol: _ZN2cv3dnn14dnn4_v202009083Net7forwardERKNS_12_OutputArrayERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISC_EE

pytorch1.7.1 cv2 4.3.0 win10 I download the yolov5s.pth then I run the convert_onnx.py,the onnx file ran normally,but in the end of convert_onnx.py dnnnet = cv2.dnn.readNet(output_onnx) failed:error: (-212:Parsing error) Input node...