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

[OpenVINO R3] After converted model, openvino result is different with tensorflow



I follow Intel tutorial( to convert inception_v3 model to .xml & .bin,

but top_1~top_5 scores with OpenVINO are different to scores with tensorflow
(reference: "classify_openvino_imagenet_r3.csv", "classify_tf_imagenet.csv" and test images are in

Tensorflow step:

    The classification by inception_v3 on tensorflow I refer as following:

    And inference code you can refer the annex : (in )
    command: $ python3

OpenVINO R3 step:

    1. I use (
       to generate pb file.
    2. freeze model
       $ python3 /usr/local/lib/python3.5/dist-packages/tensorflow/python/tools/ \
            --input_graph inception_v3_inf_graph.pb \
            --input_binary \
            --input_checkpoint inception_v3.ckpt \
            --output_node_names InceptionV3/Predictions/Reshape_1 \
            --output_graph /home/admin/frozen_inception_v3.pb
    3. convert .xml & .bin
       $ cd <INSTALL_DIR>/deployment_tools/model_optimizer
       $ python3 \
        --input_model /home/admin/frozen_inception_v3.pb \
        --input_shape [1,299,299,3] \
        --input input \
        --model_name imagenet_classify_r3 \
        --output_dir /home/admin

    The classification of openvino code :
    command: $ python3 (in

The results are not the same, do you have any idea?

Thanks for your help.

0 Kudos
1 Reply

Hi, Steven,

I've checked/tested your code, I found 1 problem. Within your you use the tf model called "object_graph.pb" the topology is different from inception V3, so the different result should be expected. Could you try to use the same model for testing? Also for R4, the classification model in Slim has better way to convert and inject the mean/scale values, so you don't need to do the multiply and subtraction within the python code. Please refer to document in R4 called "Converting Tensorflow-Slim Image Classification Model Library Models"

0 Kudos