Skip to content

[ERROR:0@0.171] global onnx_importer.cpp:1054 cv::dnn::dnn4_v20221220::ONNXImporter::handleNode DNN/ONNX: ERROR during processing node with 2 inputs and 1 outputs: [Mod]:(onnx_node!/net/decoder/b4/attn/Mod) from domain='ai.onnx' #23174

@GGS92carmnad

Description

@GGS92carmnad

Describe the feature and motivation

System information:
OpenCV 4.7.0-dev
Windows 10 x64
C++

Description:
I have trained a PyTorch model that is based on the UNetFormer architecture, and I have exported it to ONNX opset 11:
https://drive.google.com/file/d/1x5XVQ8lfm4tBacCTZaU3uP-A_3MyYuRr/view?usp=sharing

The cv::Exception message:

OpenCV(4.7.0-dev) opencv-4.x\modules\dnn\src\onnx\onnx_importer.cpp:1073: error: (-2:Unspecified error) in function 'cv::dnn::dnn4_v20221220::ONNXImporter::handleNode'
Node [Mod@ai.onnx]:(onnx_node!/net/decoder/b4/attn/Mod) parse error: OpenCV(4.7.0-dev) opencv-4.x\modules\dnn\src\onnx\onnx_importer.cpp:375: error: (-215:Assertion failed) (bool)layer in function 'cv::dnn::dnn4_v20221220::runLayer'

Code to reproduce:
dnn::Net net = dnn::readNet("unetformer.onnx");

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions