Skip to content

DNN/ONNX: Gather layer with 4 indices is not supported #19957

@JimXu1989

Description

@JimXu1989

Hi,
I use opencv 4.5.2 on my ubuntu 20.04 desktop, when I load the onnx model provided by onnx officially, for example yolov4(https://github.com/onnx/models/tree/master/vision/object_detection_segmentation/yolov4) :

[ERROR:0] global /home/jim/opencv/opencv4.5.2/opencv-4.5.2/modules/dnn/src/onnx/onnx_importer.cpp (2108) handleNode DNN/ONNX: ERROR during processing node with 1 inputs and 1 outputs: [Log]:(StatefulPartitionedCall/model/lambda/Log:0)
Traceback (most recent call last):
  File "/home/jim/DL4CV_lesson/cv2 blobFromImage/read_onnx.py", line 16, in <module>
    model = cv2.dnn.readNetFromONNX('yolov4.onnx')
cv2.error: OpenCV(4.5.2) /home/jim/opencv/opencv4.5.2/opencv-4.5.2/modules/dnn/src/onnx/onnx_importer.cpp:2129: error: (-2:Unspecified error) in function 'handleNode'
> Node [Log]:(StatefulPartitionedCall/model/lambda/Log:0) parse error: OpenCV(4.5.2) /home/jim/opencv/opencv4.5.2/opencv-4.5.2/modules/dnn/src/dnn.cpp:621: error: (-2:Unspecified error) Can't create layer "StatefulPartitionedCall/model/lambda/Log:0" of type "Log" in function 'getLayerInstance'
> 

Thanks a lot !!!

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions