-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
DNN/TF(EfficientNet): add Fill layer, ONNX: add Split layer default axis + const-propagation #19696
Description
System information (version)
- OpenCV => 4.5.1
- Operating System / Platform => Mac OS
- Compiler => Xcode
Detailed description
Using efficient lite model trained in Keras, then exported through tf crashes upon load using DNN. I've tried several different avenues. tf1 / tf2/ onnx. None seem to work. I've included 2 attempts through tensor flow. Both have different crashes.
Attempt 1.
.1/modules/dnn/src/tensorflow/tf_importer.cpp:591: error: (-2:Unspecified error) Input [batch_normalization_1/cond/ones_like] for node [batch_normalization_1/cond/FusedBatchNorm] not found in function 'getConstBlob'
Empty model can be accessed here.
https://www.dropbox.com/s/jfpisyrqokqxagl/frozen_graph.pb?dl=0
Attempt 2.
/opencv/opencv-4.5.1/modules/dnn/src/dnn.cpp:614: error: (-2:Unspecified error) Can't create layer "model_2/global_max_pooling2d_1/Max" of type "Max" in function 'getLayerInstance'
Empty model can be accessed here.
https://www.dropbox.com/s/rxl1ng4h6gcn0y0/frozen_graph2.pb?dl=0
Attempt 3.
This was done using tf2Onnx. So converting directly from Keras to Onnx.
[ERROR:0] global /opencv/opencv-4.5.1/modules/dnn/src/onnx/onnx_importer.cpp (1878) handleNode DNN/ONNX: ERROR during processing node with 3 inputs and 1 outputs: [Conv]:(model_2/efficientnet-b2/stem_bn/FusedBatchNormV3:0)
libc++abi.dylib: terminating with uncaught exception of type cv::Exception: OpenCV(4.5.1) opencv/opencv-4.5.1/modules/dnn/src/onnx/onnx_importer.cpp:1887: error: (-2:Unspecified error) in function 'handleNode'
> Node [Conv]:(model_2/efficientnet-b2/stem_bn/FusedBatchNormV3:0) parse error: OpenCV(4.5.1) opencv/opencv-4.5.1/modules/dnn/src/layers/convolution_layer.cpp:96: error: (-213:The function/feature is not implemented) Unsupported asymmetric padding in convolution layer in function 'BaseConvolutionLayerImpl'
>
terminating with uncaught exception of type cv::Exception: OpenCV(4.5.1) opencv/opencv-4.5.1/modules/dnn/src/onnx/onnx_importer.cpp:1887: error: (-2:Unspecified error) in function 'handleNode'
> Node [Conv]:(model_2/efficientnet-b2/stem_bn/FusedBatchNormV3:0) parse error: OpenCV(4.5.1) /opencv/opencv-4.5.1/modules/dnn/src/layers/convolution_layer.cpp:96: error: (-213:The function/feature is not implemented) Unsupported asymmetric padding in convolution layer in function 'BaseConvolutionLayerImpl'
>
Empty model can be accessed here.
https://www.dropbox.com/s/03l9myisk15zfye/model.onnx?dl=0