-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
OpenCV cannot import ONNX model: Can't create layer "..." of type "Tile" #22789
Copy link
Copy link
Closed
Labels
Milestone
Description
System Information
OpenCV => Python opencv-python-rolling 4.6.0.20221022
Operating System / Platform Windows 10 64 bit
Python =>3.10.4
Detailed description
I converted the DANets from PaddleSeg to ONNX:
https://github.com/PaddlePaddle/PaddleSeg/tree/release/2.6/configs/danet
This fails to load in OpenCV 4.6 pre-release:
[ERROR:0@0.494] global D:\a\opencv-python\opencv-python\opencv\modules\dnn\src\onnx\onnx_importer.cpp (1050) cv::dnn::dnn4_v20220524::ONNXImporter::handleNode DNN/ONNX: ERROR during processing node with 2 inputs and 1 outputs: [Tile]:(onnx_node!p2o.Tile.0) from domain='ai.onnx'
Traceback (most recent call last):
File "d:\Local\devel\Python\OpenCV\dnn_segmentation_paddle_danet_resnet50_os8_voc12aug\inference.py", line 123, 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:1069: error: (-2:Unspecified error) in function 'cv::dnn::dnn4_v20220524::ONNXImporter::handleNode'
> Node [Tile@ai.onnx]:(onnx_node!p2o.Tile.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.Tile.0" of type "Tile" in function 'cv::dnn::dnn4_v20220524::Net::Impl::getLayerInstance'
Steps to reproduce
model = cv2.dnn.readNet(model_path)
Find one of the models here:
https://drive.google.com/file/d/1ajtfuQ9pCsirxxb6JPJJv9N29gayTLvk/view?usp=sharing
Issue submission checklist
- I report the issue, it's not a question
- I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- I updated to the latest OpenCV version and the issue is still there
- There is reproducer code and related data files (videos, images, onnx, etc)
Reactions are currently unavailable