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
[ERROR:0@0.392] global D:\a\opencv-python\opencv-python\opencv\modules\dnn\src\onnx\onnx_importer.cpp (1053) cv::dnn::dnn4_v20220524::ONNXImporter::handleNode DNN/ONNX: ERROR during processing node with 2 inputs and 2 outputs: [TopK]:(onnx_node!p2o.TopK.0) from domain='ai.onnx'
Traceback (most recent call last):
File "d:\Local\devel\Python\OpenCV\dnn_segmentation_paddle_pointrend_voc\inference.py", line 131, in <module>
model = cv2.dnn.readNet(model_path)
cv2.error: OpenCV(4.6.0-dev) D:\a\opencv-python\opencv-python\opencv\modules\dnn\src\onnx\onnx_importer.cpp:1072: error: (-2:Unspecified error) in function 'cv::dnn::dnn4_v20220524::ONNXImporter::handleNode'
> Node [TopK@ai.onnx]:(onnx_node!p2o.TopK.0) parse error: OpenCV(4.6.0-dev) d:\a\opencv-python\opencv-python\opencv\modules\dnn\src\net_impl.hpp:107: error: (-2:Unspecified error) Can't create layer "onnx_node!p2o.TopK.0" of type "TopK" in function 'cv::dnn::dnn4_v20220524::Net::Impl::getLayerInstance'
This model contains two kinds of TopK operators, one of which has a constant input K, but the other of which does not. We can only add the support for the former case in the current DNN engine. However, as I looked into the model, I found at least two more problems:
Range operators with non-constant inputs cannot be supported by the current DNN engine.
global onnx_importer.cpp:1051 handleNode DNN/ONNX: ERROR during processing node with 2 inputs and 2 outputs: [TopK]:(onnx_node!/TopK) from domain='ai.onnx'
System Information
OpenCV => Python opencv-python-rolling 4.6.0.20221112 (no update available)
Operating System / Platform Windows 10 64 bit
Python =>3.10.4
Detailed description
I converted the PointRend from PaddleSeg to ONNX:
https://github.com/PaddlePaddle/PaddleSeg/tree/release/2.7/configs/pointrend
This fails to load in OpenCV 4.6 pre-release:
Same result with the model after onnx simplify.
Steps to reproduce
Find the ONNX file here: https://drive.google.com/file/d/1rKcUtoncMvorMtk6LdC6_QK2PSRS_pee/view?usp=sharing
Issue submission checklist
The text was updated successfully, but these errors were encountered: