hpc203 / YOLOP-opencv-dnn

使用OpenCV部署全景驾驶感知网络YOLOP,可同时处理交通目标检测、可驾驶区域分割、车道线检测,三项视觉感知任务,包含C++和Python两种版本的程序实现。本套程序只依赖opencv库就可以运行, 从而彻底摆脱对任何深度学习框架的依赖。

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OpenCV 4.5.5.62无法加载网络

Qian-at-DNV opened this issue · comments

[ERROR:0@0.300] global D:\a\opencv-python\opencv-python\opencv\modules\dnn\src\onnx\onnx_importer.cpp (909) cv::dnn::dnn4_v20211220::ONNXImporter::handleNode DNN/ONNX: ERROR during processing node with 3 inputs and 1 outputs: [Clip]:(598) from domain='ai.onnx'
Traceback (most recent call last):
File "C:\Users\QIAWEI\OneDrive - DNV\Projects\YOLOP-opencv-dnn\main.py", line 150, in
yolonet = yolop(confThreshold=args.confThreshold, nmsThreshold=args.nmsThreshold, objThreshold=args.objThreshold)
File "C:\Users\QIAWEI\OneDrive - DNV\Projects\YOLOP-opencv-dnn\main.py", line 19, in init
self.net = cv2.dnn.readNet('yolop.onnx')
cv2.error: OpenCV(4.5.5) D:\a\opencv-python\opencv-python\opencv\modules\dnn\src\onnx\onnx_importer.cpp:928: error: (-2:Unspecified error) in function 'cv::dnn::dnn4_v20211220::ONNXImporter::handleNode'

Node [Clip@ai.onnx]:(598) parse error: OpenCV(4.5.5) D:\a\opencv-python\opencv-python\opencv\modules\dnn\src\onnx\onnx_importer.cpp:1613: error: (-2:Unspecified error) in function 'void __cdecl cv::dnn::dnn4_v20211220::ONNXImporter::parseClip(class cv::dnn::dnn4_v20211220::LayerParams &,const class opencv_onnx::NodeProto &)'

(expected: 'node_proto.input_size() == 1'), where
'node_proto.input_size()' is 3
must be equal to
'1' is 1

Solved by installing opencv version 4.5.3.56.