Skip to content

Loading Yolox model - Assertion failed) idx <= dims.size() in function 'parseUnsqueeze' #22625

@sainivedh19pt

Description

@sainivedh19pt

System Information

OpenCV python version: opencv-python-rolling-4.6.0.20221008
Operating System / Platform: Pop OS 22.04 LTS
Python version: 3.8.13

Detailed description

Facing the following error when trying to read yolox_tiny onnx converted model via mmdeploy.

Initially faced #22361 but resolved by upgrading cv2 to the above mentioned dev version

cv2.error: OpenCV(4.6.0-dev) /io/opencv/modules/dnn/src/onnx/onnx_importer.cpp:1038: error: (-2:Unspecified error) in function 'handleNode'
> Node [Unsqueeze@ai.onnx]:(onnx_node!Unsqueeze_367) parse error: OpenCV(4.6.0-dev) /io/opencv/modules/dnn/src/onnx/onnx_importer.cpp:2317: error: (-215:Assertion failed) idx <= dims.size() in function 'parseUnsqueeze'

Steps to reproduce

net = cv2.dnn.readNet("/deploy/work_dir/end2end.onnx")

Attaching model onnx file for your reference
yolox_tiny_onnx.zip

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)

Metadata

Metadata

Assignees

Labels

bugcategory: dnn (onnx)ONNX suport issues in DNN moduleconfirmedThere is stable reproducer / investigation complete

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions