hpc203 / dbnet-opencv-cpp-python

使用opencv部署DBNet文字检测,包含C++和Python两种版本的实现
32 stars 8 forks source link

opencv4.2.0版本运行出错 #1

Open viviayi opened 3 years ago

viviayi commented 3 years ago

感谢分享,最近也想通过opencv调用DB模型,但是在使用您提供的模型以后出现以下报错,请问这个是opencv版本问题吗? Traceback (most recent call last): File "main.py", line 145, in net = dbnet(binaryThreshold=args.binaryThreshold, polygonThreshold=args.polygonThreshold, unclipRatio=args.unclipRatio, maxCandidates=args.maxCandidates) File "main.py", line 115, in init self.model = cv2.dnn.readNet('DB_TD500_resnet50.onnx') cv2.error: OpenCV(4.2.0) /tmp/opencv-4.2.0/modules/dnn/src/layers/pooling_layer.cpp:1174: error: (-215:Assertion failed) (outShape[2 + i] - 1) * strides[i] < inpShape[i] + pads_end[i] in function 'getMemoryShapes'

hpc203 commented 3 years ago

升级opencv再试试

---原始邮件--- 发件人: @.> 发送时间: 2021年4月9日(周五) 下午3:46 收件人: @.>; 抄送: @.***>; 主题: [hpc203/dbnet-opencv-cpp-python] opencv4.2.0版本运行出错 (#1)

感谢分享,最近也想通过opencv调用DB模型,但是在使用您提供的模型以后出现以下报错,请问这个是opencv版本问题吗? Traceback (most recent call last): File "main.py", line 145, in net = dbnet(binaryThreshold=args.binaryThreshold, polygonThreshold=args.polygonThreshold, unclipRatio=args.unclipRatio, maxCandidates=args.maxCandidates) File "main.py", line 115, in init self.model = cv2.dnn.readNet('DB_TD500_resnet50.onnx') cv2.error: OpenCV(4.2.0) /tmp/opencv-4.2.0/modules/dnn/src/layers/pooling_layer.cpp:1174: error: (-215:Assertion failed) (outShape[2 + i] - 1) * strides[i] < inpShape[i] + pads_end[i] in function 'getMemoryShapes'

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.