Skip to content

ONNX implementation does not support slice layer with steps != 1 #18920

@wwzh2015

Description

@wwzh2015
System information (version)
Detailed description

The onnx from yolov5

if Net net = readNetFromONNX() by opencv4.5

OpenCV(4.5.0) Error: Unspecified error (> Node [Slice]:(519) parse error: OpenCV(4.5.0) D:\opencv450\opencv-4.5.0\modules\dnn\src\onnx\onnx_importer.cpp:697: error: (-2:Unspecified error) in function 'void __cdecl cv::dnn::dnn4_v20200908::ONNXImporter::handleNode(const class opencv_onnx::NodeProto &)'

Slice layer only supports steps = 1 (expected: 'countNonZero(step_blob != 1) == 0'), where
'countNonZero(step_blob != 1)' is 1
must be equal to
'0' is 0
) in cv::dnn::dnn4_v20200908::ONNXImporter::handleNode, file D:\opencv450\opencv-4.5.0\modules\dnn\src\onnx\onnx_importer.cpp, line 1797

the onnx model:
link:https://pan.baidu.com/s/1HhTtIJKaOHcbmgK_lKKeAg
code:jti9

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions