Skip to content

Can't Create layer of type "Less" in function cv::dnn::dnn4_v20201117::LayerData::getLayerInstance - OpenCV 4.5.1 (4.5.2 as well) #19977

@tyeso

Description

@tyeso
System information (version)
  • OpenCV => Tried on 4.5.1 and 4.5.2
  • Operating System / Platform => Windows 64 Bit
  • Compiler => Visual Studio 2019
Detailed description

Hi, I'm currently working on image sequence classification deep learning model on python, and trying to convert tensorflow keras model to onnx, in order to use them in c++ environments. For that, I would like to load my model by using 'cv2.dnn.readNetFromONNX'.
To briefly introduce the model, it is consisted of TimeDistributedLayer, followed by GRU, and Dense Layers. It takes 5 consecutive images (numpy array) as an input image sequence, and makes an inference on classification. The model works perfectly fine on python environments.

Takes an input numpy array, size of (1, 5, 224, 224, 3), and has an output value of float tensor, size of (1, 2).

image

According to the visualization of the model, I am guessing the problematic 'Less' layer should be the one in following picture.

image

I have tried with different opsets, including 9, 12, 13, etc, but the results were same.

Please feel free to leave an advice.
Thanks in advance for advices!

Will attach an ONNX model with random weights, "model_weights.onnx"
model_weights.onnx.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    category: dnncategory: dnn (onnx)ONNX suport issues in DNN moduleeffort: few weeksContribution / porting of a new/existed algorithm. With samples / tests / docs / tutorialsfeature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions