You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I have been playing round with the model examples provided and face_detection_yunet and human_segmentation_pphumanseg worked quite well.
I am using an up-to-date version of the opencv_zoo and OpenCV4.5.5 installed via pip on Windows
When running the demo.py example for image_classification_mobilenet I get the following error for all models, however
[ERROR:0@0.089] global D:\a\opencv-python\opencv-python\opencv\modules\dnn\src\o
nnx\onnx_importer.cpp (909) cv::dnn::dnn4_v20211220::ONNXImporter::handleNode DN
N/ONNX: ERROR during processing node with 3 inputs and 1 outputs: [Clip]:(317) f
rom domain='ai.onnx'
Traceback (most recent call last):
File "D:\Local\devel\Python\OpenCV\image_classification_mobilenet\demo.py", li
ne 41, in
'v2': MobileNetV2(modelPath='./image_classification_mobilenetv2_2022apr.onnx
', labelPath=args.label, backendId=args.backend, targetId=args.target),
File "D:\Local\devel\Python\OpenCV\image_classification_mobilenet\mobilenet_v2
.py", line 11, in init
self.model = cv.dnn.readNet(self.model_path)
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]:(317) parse error: OpenCV(4.5.5) D:\a\opencv-python\opencv
-python\opencv\modules\dnn\src\onnx\onnx_importer.cpp:1613: error: (-2:Unspecifi
ed error) in function 'void __cdecl cv::dnn::dnn4_v20211220::ONNXImporter::parse
Clip(class cv::dnn::dnn4_v20211220::LayerParams &,const class opencv_onnx::NodeP
roto &)'
(expected: 'node_proto.input_size() == 1'), where
'node_proto.input_size()' is 3
must be equal to
'1' is 1
Can anybody point me to a solution, please?
The text was updated successfully, but these errors were encountered:
Hi @fengyuentau, I managed to re-write the example to use OpenCV for image preparation and onnx runtime for model execution. That works quiet well. The model is not the problem, but the reading by OpenCV. I will submit a new bug there.
Hi, I have been playing round with the model examples provided and face_detection_yunet and human_segmentation_pphumanseg worked quite well.
I am using an up-to-date version of the opencv_zoo and OpenCV4.5.5 installed via pip on Windows
When running the demo.py example for image_classification_mobilenet I get the following error for all models, however
[ERROR:0@0.089] global D:\a\opencv-python\opencv-python\opencv\modules\dnn\src\o
nnx\onnx_importer.cpp (909) cv::dnn::dnn4_v20211220::ONNXImporter::handleNode DN
N/ONNX: ERROR during processing node with 3 inputs and 1 outputs: [Clip]:(317) f
rom domain='ai.onnx'
Traceback (most recent call last):
File "D:\Local\devel\Python\OpenCV\image_classification_mobilenet\demo.py", li
ne 41, in
'v2': MobileNetV2(modelPath='./image_classification_mobilenetv2_2022apr.onnx
', labelPath=args.label, backendId=args.backend, targetId=args.target),
File "D:\Local\devel\Python\OpenCV\image_classification_mobilenet\mobilenet_v2
.py", line 11, in init
self.model = cv.dnn.readNet(self.model_path)
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'
Can anybody point me to a solution, please?
The text was updated successfully, but these errors were encountered: