hpc203 / yolov5-face-landmarks-opencv-v2

更新的yolov5检测人脸和关键点,只依赖opencv库就可以运行,程序包含C++和Python两个版本的

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cv2.dnn.readNet fail

Xuagent opened this issue · comments

cv2.error: OpenCV(4.4.0) C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-1hg9yufe\opencv\modules\dnn\src\onnx\onnx_importer.cpp:1410: error: (-2:Unspecified error) in function
'void __cdecl cv::dnn::dnn4_v20200609::ONNXImporter::populateNet(class cv::dnn::dnn4_v20200609::Net)'

(expected: 'shapes.depth() == CV_32S'), where
'shapes.depth()' is 5 (CV_32FC1)
must be equal to
'CV_32S' is 4 (CV_32SC1)

What could be the reason for this? and how to fix it?
my opencv-python==4.4.0.40
Thanks

cv2.error: OpenCV(4.4.0) C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-1hg9yufe\opencv\modules\dnn\src\onnx\onnx_importer.cpp:1410: error: (-2:Unspecified error) in function
'void __cdecl cv::dnn::dnn4_v20200609::ONNXImporter::populateNet(class cv::dnn::dnn4_v20200609::Net)'

(expected: 'shapes.depth() == CV_32S'), where
'shapes.depth()' is 5 (CV_32FC1)
must be equal to
'CV_32S' is 4 (CV_32SC1)

What could be the reason for this? and how to fix it?
my opencv-python==4.4.0.40
Thanks

你是用的opencv版本低了,升级opencv到最新版本再运行程序试试

opencv-pyhton==4.5.2
多谢,解决