Skip to content

Disable Tests for Unsupported ONNX Models in Caffe removal  #25314

@WanliZhong

Description

@WanliZhong

This issue is used to identify which onnx models can't be inferenced or need to be converted manually for Caffe removal. The related tests will be disabled temporarily until the following models can be supported.

SSD (opset 10, 12)

  • resolved

  • Source: https://github.com/onnx/models/tree/main/validated/vision/object_detection_segmentation/ssd/model

  • Failure:
    opset-10

    [ INFO:0@0.530] global onnx_importer.cpp:3297 parseCustomLayer DNN/ONNX: unknown node type, try using custom handler for node with 5 inputs and 1 outputs: [NonMaxSuppression]:(onnx_node!NonMaxSuppression_683)
    [ INFO:0@0.530] global onnx_importer.cpp:1036 handleNode     Input[0] = 'Concat_659'
    [ INFO:0@0.530] global onnx_importer.cpp:1036 handleNode     Input[1] = 'Slice_676'
    [ INFO:0@0.530] global onnx_importer.cpp:1036 handleNode     Input[2] = 'ConstantOfShape_678'
    [ INFO:0@0.530] global onnx_importer.cpp:1036 handleNode     Input[3] = 'ConstantOfShape_680'
    [ INFO:0@0.530] global onnx_importer.cpp:1036 handleNode     Input[4] = 'ConstantOfShape_682'
    [ INFO:0@0.530] global onnx_importer.cpp:1040 handleNode     Output[0] = 'NonMaxSuppression_683'
    OpenCV(5.0.0-pre) Error: Unspecified error (Can't create layer "onnx_node!NonMaxSuppression_683" of type "NonMaxSuppression") in getLayerInstance, file /Users/wanli/Desktop/OpenCV_China/opencv/modules/dnn/src/net_impl.hpp, line 106
    [ERROR:0@0.530] global onnx_importer.cpp:1032 handleNode DNN/ONNX: ERROR during processing node with 5 inputs and 1 outputs: [NonMaxSuppression]:(onnx_node!NonMaxSuppression_683) from domain='ai.onnx'
    OpenCV(5.0.0-pre) Error: Unspecified error (> Node [NonMaxSuppression@ai.onnx]:(onnx_node!NonMaxSuppression_683) parse error: OpenCV(5.0.0-pre) /Users/wanli/Desktop/OpenCV_China/opencv/modules/dnn/src/net_impl.hpp:106: error: (-2:Unspecified error) Can't create layer "onnx_node!NonMaxSuppression_683" of type "NonMaxSuppression" in function 'getLayerInstance'
    > ) in handleNode, file /Users/wanli/Desktop/OpenCV_China/opencv/modules/dnn/src/onnx/onnx_importer.cpp, line 1051
  • opset-12

    OpenCV(5.0.0-pre) Error: Unspecified error (Can't create layer "onnx_node!NonMaxSuppression_683" of type "NonMaxSuppression") in getLayerInstance, file /Users/wanli/Desktop/OpenCV_China/opencv/modules/dnn/src/net_impl.hpp, line 106
    [ERROR:0@0.233] global onnx_importer.cpp:1032 handleNode DNN/ONNX: ERROR during processing node with 5 inputs and 1 outputs: [NonMaxSuppression]:(onnx_node!NonMaxSuppression_683) from domain='ai.onnx'
    [ INFO:0@0.233] global onnx_importer.cpp:1036 handleNode     Input[0] = 'Concat_659'
    OpenCV(5.0.0-pre) Error: Unspecified error (> Node [NonMaxSuppression@ai.onnx]:(onnx_node!NonMaxSuppression_683) parse error: OpenCV(5.0.0-pre) /Users/wanli/Desktop/OpenCV_China/opencv/modules/dnn/src/net_impl.hpp:106: error: (-2:Unspecified error) Can't create layer "onnx_node!NonMaxSuppression_683" of type "NonMaxSuppression" in function 'getLayerInstance'
    [ INFO:0@0.233] global onnx_importer.cpp:1036 handleNode     Input[1] = 'Slice_676'
    > ) in handleNode, file /Users/wanli/Desktop/OpenCV_China/opencv/modules/dnn/src/onnx/onnx_importer.cpp, line 1051
    [ INFO:0@0.233] global onnx_importer.cpp:1036 handleNode     Input[2] = 'ConstantOfShape_678'
    [ INFO:0@0.233] global onnx_importer.cpp:1036 handleNode     Input[3] = 'ConstantOfShape_680'
    [ INFO:0@0.233] global onnx_importer.cpp:1036 handleNode     Input[4] = 'ConstantOfShape_682'
    [ INFO:0@0.233] global onnx_importer.cpp:1040 handleNode     Output[0] = 'NonMaxSuppression_683'
  • Test: perf_net.cpp -> DNNTestNetwork, SSD

MobileNet_SSD (opset 10, 12)

  • resolved

  • Source: https://github.com/onnx/models/tree/main/validated/vision/object_detection_segmentation/ssd-mobilenetv1/model

  • Failure:

    opset-10

    [ INFO:0@0.126] global onnx_importer.cpp:803 populateNet DNN/ONNX: loading ONNX v5 model produced by 'tf2onnx':1.7.0. Number of nodes = 350, initializers = 340, inputs = 1, outputs = 4
    [ INFO:0@0.126] global onnx_importer.cpp:696 parseOperatorSet DNN/ONNX: ONNX opset version = 10
    OpenCV(5.0.0-pre) Error: Unsupported format or combination of formats (Unsupported data type: BOOL) in getMatFromTensor, file /Users/wanli/Desktop/OpenCV_China/opencv/modules/dnn/src/onnx/onnx_graph_simplifier.cpp, line 1754
    /Users/wanli/Desktop/OpenCV_China/opencv/modules/ts/src/ts_perf.cpp:1974: Failure

    opset-12

    [ INFO:0@0.159] global onnx_importer.cpp:803 populateNet DNN/ONNX: loading ONNX v7 model produced by 'tf2onnx':1.9.1. Number of nodes = 361, initializers = 346, inputs = 1, outputs = 4
    [ INFO:0@0.159] global onnx_importer.cpp:696 parseOperatorSet DNN/ONNX: ONNX opset version = 12
    [ INFO:0@0.268] global onnx_importer.cpp:974 handleNode DNN/ONNX: processing node with 1 inputs and 1 outputs: [Cast]:(onnx_node!ToFloat) from domain='ai.onnx'
    [ INFO:0@0.269] global onnx_importer.cpp:974 handleNode DNN/ONNX: processing node with 1 inputs and 1 outputs: [Shape]:(onnx_node!Preprocessor/map/Shape) from domain='ai.onnx'
    [ INFO:0@0.270] global onnx_importer.cpp:1036 handleNode     Input[0] = 'ToFloat:0'
    [ INFO:0@0.270] global onnx_importer.cpp:1040 handleNode     Output[0] = 'Preprocessor/map/Shape:0'
    [ERROR:0@0.269] global onnx_importer.cpp:2426 parseShape DNN/ONNX(Shape): dynamic 'zero' shapes are not supported, input ToFloat:0 [ 0 0 0 3 ]
    OpenCV(5.0.0-pre) Error: Assertion failed (!isDynamicShape) in parseShape, file /Users/wanli/Desktop/OpenCV_China/opencv/modules/dnn/src/onnx/onnx_importer.cpp, line 2427
    [ERROR:0@0.270] global onnx_importer.cpp:1032 handleNode DNN/ONNX: ERROR during processing node with 1 inputs and 1 outputs: [Shape]:(onnx_node!Preprocessor/map/Shape) from domain='ai.onnx'
    OpenCV(5.0.0-pre) Error: Unspecified error (> Node [Shape@ai.onnx]:(onnx_node!Preprocessor/map/Shape) parse error: OpenCV(5.0.0-pre) /Users/wanli/Desktop/OpenCV_China/opencv/modules/dnn/src/onnx/onnx_importer.cpp:2427: error: (-215:Assertion failed) !isDynamicShape in function 'parseShape'
    > ) in handleNode, file /Users/wanli/Desktop/OpenCV_China/opencv/modules/dnn/src/onnx/onnx_importer.cpp, line 1051
  • Test: perf_net.cpp -> DNNTestNetwork, MobileNet_SSD_v1_ONNX

OpenCV Face Detector

GOTURN

  • resolved
  • The GOTURN model will take 388 MB of traffic for each download if converted to onnx. If the user wants to use the tracking method, we can recommend they use Vit or dasimRPN, which have better performance.
  • use VIT Tracker instead
  • related PR:

OpenPose (mpi, coco)

fcn8s-heavy-pascal

faster_rcnn (zf, vgg16)

R-FCN

Classic models

layer_convolution and other many single layer tests

hed_pretrained_bsds

digit_lenet

Colorization

FlowNet

wechat QR code

  • resolved
  • will be updated by WeChat qBar team

wechat super resolution

  • resolved
  • will be removed or updated by WeChat qBar team

TextBox & dictnet_vgg

  • resolved
  • remove / convert to onnx / use other model?
  • opencv_contrib/modules/text

3D triplet

  • Ignored
  • convert to onnx / use other model?
  • seems this module don't use OpenCV Caffe importer. Only use official Caffe libary.
  • opencv_contrib/modules/cnn_3dobj

Metadata

Metadata

Assignees

No one assigned

    Labels

    OpenCV5category: dnncategory: dnn (onnx)ONNX suport issues in DNN modulecleanupCode cleanup (e.g, drop legacy C-API, legacy unmaintained code)

    Type

    No type

    Projects

    Status

    In Progress

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions