scrfd-opencv icon indicating copy to clipboard operation
scrfd-opencv copied to clipboard

采用dnn加载onnx模型失败

Open yangjian1218 opened this issue 2 years ago • 2 comments

File "d:\AI\Face\Face_detect\SCRFD\scrfd-opencv\main.py", line 12, in init self.net = cv2.dnn.readNet(onnxmodel) #加载失败 cv2.error: OpenCV(4.2.0) C:\projects\opencv-python\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 'cv::dnn::dnn4_v20191202::Dict::get'

我试了其他scrfd的onnx模型,加载都是各种报错.不懂你有没有出现这种问题. onnxruntime 加载是正常的

yangjian1218 avatar Feb 23 '22 09:02 yangjian1218

升级opencv版本,再试一下

---原始邮件--- 发件人: @.> 发送时间: 2022年2月23日(周三) 下午5:27 收件人: @.>; 抄送: @.***>; 主题: [hpc203/scrfd-opencv] 采用dnn加载onnx模型失败 (Issue #2)

File "d:\AI\Face\Face_detect\SCRFD\scrfd-opencv\main.py", line 12, in init self.net = cv2.dnn.readNet(onnxmodel) #加载失败 cv2.error: OpenCV(4.2.0) C:\projects\opencv-python\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 'cv::dnn::dnn4_v20191202::Dict::get'

我试了其他scrfd的onnx模型,加载都是各种报错.不懂你有没有出现这种问题. onnxruntime 加载是正常的

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you are subscribed to this thread.Message ID: @.***>

hpc203 avatar Feb 24 '22 06:02 hpc203

我已经升级opencv到4.5.5, 在mac电脑上仍然报错,请问接下来如何修改呢?

ixNeo avatar Feb 24 '22 08:02 ixNeo