Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.
6403 Discussions

EfficientDet-D0 with OpenVINO 2021.1

kes
Novice
2,023 Views

Hello all. I converted a PyTorch version of an EfficientDet-D0 model to ONNX then to OpenVINO's IR representation. The model optimizer says that it successfully converted the model (with warnings) but I'm not sure that it's correct. I ran the EXACT input data that I forwarded through the PyTorch model through OpenVINO's inference engine but the output is wildly off. I don't expect the exact same values but I expect something close. I've converted models in the past and the output was just approximately 0.05 off on average. I'm not confident in the Model Optimizer's output since it couldn't convert the same model when I used version 2020.3. Can anyone provide some insight? Should I just upgrade to version 2021.2? Please advise

Thanks in advance.

0 Kudos
10 Replies
Munesh_Intel
Moderator
2,006 Views

Hi Kester,

Thanks for reaching out to us. EfficientDet-D0 using PyTorch is not officially supported and has not been validated officially by OpenVINO.

 

Details about supported PyTorch models are available at the following link:

https://docs.openvinotoolkit.org/2021.2/openvino_docs_MO_DG_prepare_model_convert_model_Convert_Model_From_ONNX.html#supported_pytorch_models_via_onnx_conversion

 

Having said that, we would also like to mention that we have supported Efficientdet-D0 TensorFlow version.

https://docs.openvinotoolkit.org/2021.2/omz_models_public_efficientdet_d0_tf_efficientdet_d0_tf.html


The conversion parameters to be used for Model Optimizer conversion using Efficientdet-D0 TensorFlow version are available at the following link:

https://github.com/openvinotoolkit/open_model_zoo/blob/master/models/public/efficientdet-d0-tf/model.yml#L113


You could try applying similar arguments to convert your model as well. And yes, upgrading to OpenVINO 2021.2 is strongly encouraged.

 

Regards,

Munesh


kes
Novice
1,999 Views

Hello @Munesh_Intel . The PyTorch model was first converted to ONNX to then be converted to IR by the model optimizer. Is this process flow (i.e. PyTorch --> ONNX --> IR) not supported as well? The model optimizer reports a successful conversion but the inference results are way off. Please clarify.

Thanks in advance.

0 Kudos
Munesh_Intel
Moderator
1,970 Views

Hi Kester,

The process flow is supported; however, the topology is not officially supported, and the model have not been tested. Therefore, we cannot guarantee that it will work.

Having said that, we can suggest two things to try at your end. Firstly, upgrading to the latest OpenVINO 2021.2. Secondly, you can try converting your model using input shape and other relevant arguments of the Efficientdet-D0 TensorFlow version, which is the version that OpenVINO supports currently.

 

Regards,

Munesh


kes
Novice
1,966 Views

Thanks @Munesh_Intel. I will try that and report my findings.

0 Kudos
Munesh_Intel
Moderator
1,928 Views

Hi Kester,

This thread will no longer be monitored since we have provided references and suggestions. If you need any additional information from Intel, please submit a new question.


Regards,

Munesh


0 Kudos
kes
Novice
1,923 Views

Hello @Munesh_Intel . Thanks for you suggestions. This problem was holding me up for far too long so I worked around it. I'll try converting and testing with OpenVINO 2021.2 today. If it goes well that'll be great but if not, I'll use another framework. Thanks again.

0 Kudos
kes
Novice
1,915 Views

Hello @Munesh_Intel. I tried all of your suggestions and I see no improvement. The results are still very incorrect. I upgraded to 2021.2 and tried to imitate the model optimizer options used for the TensorFlow version but I get the same results. It's just bugging me that the TensorFlow version works but an ONNX (opset 11) version doesn't. 

0 Kudos
kes
Novice
1,906 Views

Eventually, I was able to get the model to work with 2021.2. There was an issue with the memory layout that I fixed which allowed me to get better inference values. Thanks for your guidance @Munesh_Intel. You can close this thread now.

0 Kudos
Munesh_Intel
Moderator
1,884 Views

Hi Kester,

Glad to know that your problem is resolved and everything is going well. Please open a new thread if you have any further issues and we'll be happy to help you.

 

Regards,

Munesh

0 Kudos
Vladimir_Dudnik
Employee
1,860 Views

you may also note that EfficientDet-D0 and EfficientDet-D1 Tensorflow models added to OpenVINO 2021.2 Open Model Zoo and you may see how they work with object_detection_demo.

Reply