Skip to content

Issue in OpenCV DNN when reading network with Upsample2D with interpolation "bilinear" #22195

@Tigran1983

Description

@Tigran1983
System information (version)
  • OpenCV => 4.6:
  • Operating System / Platform => Ubuntu 21.04:
  • Compiler => ❔
Detailed description

Dear Team, I have a model in keras, which converted to ONNX then I am getting en error, when loading ONNX by Opencv DNN.
I opened an issue on OpenCVForUnity, they tested, and reported issue:

dnn::readNet_12() : OpenCV(4.6.0-dev) C:\Users\satoo\Desktop\opencv\modules\dnn\src\onnx\onnx_importer.cpp:1040: error: (-2:Unspecified error) in function 'cv::dnn::dnn4_v20220524::ONNXImporter::handleNode'

Node [Upsample@ai.onnx]:(onnx_node!Upsample__81) parse error: OpenCV(4.6.0-dev) C:\Users\satoo\Desktop\opencv\modules\dnn\src\layers\resize_layer.cpp:48: error: (-2:Unspecified error) in function '__cdecl cv::dnn::ResizeLayerImpl::ResizeLayerImpl(const class cv::dnn::dnn4_v20220524::LayerParams &)'

:
'interpolation == "nearest" || interpolation == "opencv_linear" || interpolation == "bilinear"'
where
'interpolation' is linear

I asked on Opencv Forum, because as I can see, Opencv Dnn supports Upsample2D with interpolation="bilinear", people couldn't help with. So as I guess, maybe there are a problem in UpSampling2D.
I am attached my model in H5 and ONNX. Please check and let me know what is a problem in my network.
Best Regards,
Tigran

Steps to reproduce

Attached is
model_ONNX.zip
model_H5.zip

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions