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.
6404 Discussions

Custom Tensorflow model accuracy drops when converted to IR Model

SaadSaeed
Beginner
675 Views

Hello everyone I trained MobileNet_SSD_v2 on custom dataset. I run the frozen_inference_graph.pb file on my pc got after training the model . The frozen_inference_graph.pb is working good it is detecting multiple person and the detection rate is quite good but when i convert .pb file into IR the results are very poor it is not detecting multiple person and detecting other objects as person class.

 

Libraries version while training MobileNet_SSD_v2 :
TensorFlow Version : 1.15.2

 

.pb file to IR conversion software version:

openvino : 2020.4

NCS2

TensorFlow Version : 1.15.2

 

Code to convert frozen graph to IR :

sudo python3 mo_tf.py --input_model ~/Downloads/fine_tuned_model/frozen_inference_graph.pb  --tensorflow_use_custom_operations_config /opt/intel/openvino_2020.4.287/deployment_tools/model_optimizer/extensions/front/tf/ssd_support.json --tensorflow_object_detection_api_pipeline_config ~/Downloads/fine_tuned_model/pipeline.config

 

Results got from frozen_inference_graph.pb :

frozen_results.png

 

Results got after conversion to IR :

out.jpg

 

I am using the code available in /opt/intel/openvino_2020.4.287/deployment_tools/inference_engine/samples/python/object_detection_sample_ssd/object_detection_sample_ssd.py for testing the IR convrted .xml and .bin file

Please help me out I am stuck at this point Thankyou !

 

0 Kudos
1 Reply
IntelSupport
Community Manager
638 Views

 

Hi SaadSaeed,

Thanks for reaching out.

From what we can see, you need to modify your model optimizer conversion command as follows :

 

 https://docs.openvinotoolkit.org/2020.4/openvino_docs_MO_DG_prepare_model_convert_model_Converting_Model_General.html#when_to_reverse_input_channels

 

Regards,

Aznie

 

0 Kudos
Reply