Skip to content

Why onnx model reading is failing? #18253

@eLtronicsVilla

Description

@eLtronicsVilla
System information (version)
  • OpenCV => 4.4.0
  • Operating System / Platform => windows 10 ,
  • System => NVIDIA GTX 1050 Ti,
  • Compiler => Visual Studio 2017
Detailed description

I'm working on model inference using opencv cuda dnn module. While reading my onnx file using cv::dnn:: readNetFromONNX, I'm getting below message.

Opencv(4.4.0-dev) Error: Unspecified error (> (expected: 'shape.depth() == CV_32S') where 'shapes.depth()' is 5 (CV_32FC1) must be equal to 'CV_32S' is 4 (CV_32SC1) in void_cdecl cv::dnn::dnn4_v20200609::ONNXImporter::populateNet(class cv::dnn::dnn4_v20200609::Net), file D:\opencv_test\newbuild\opencv-master\modules\dnn\src\onnx\innx_importer.cpp, line 1442

What could be the reason for this? If someone faced the similar issue and find any solution, please let me know. Thanks in advance.

Issue submission checklist
  • [ ✓] I checked the problem with documentation, FAQ, open issues,
    answers.opencv.org, Stack Overflow, etc and have not found solution
  • I updated to latest OpenCV version and the issue is still there
  • There is reproducer code and related data files: videos, images, onnx, etc

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