Intel® Distribution of OpenVINO™ Toolkit
Community support and discussions about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all things computer vision-related on Intel® platforms.

Incorrect conversion from Tensorflow model


Hi everyone,
I have next problem: I had trained model that had h5 format using keras. Then I converted this model to tensorflow pb model. And after conversion tensorflow model using model optimizer, I get incorrect inference output result. I'm using OpenVINO toolkit R4.
Commands were used for conversion model: 

1. python3 --input_model tf_model.pb -b 1
2. python3 --input_model tf_model.pb -b 1 --reverse_input_channels
3. python3 --input_model tf_model.pb -b 1 --reverse_input_channels --scale_values [255,255,255]
4. python3 --input_model tf_model.pb -b 1 --reverse_input_channels --mean_values [255,255,255]
5. python3 --input_model tf_model.pb -b 1 --reverse_input_channels --scale_values [255,255,255] --mean_values [255,255,255]
6. python3 --input_model tf_model.pb -b 1 --disable_nhwc_to_nchw

All these commands weren't work for me.
And one more thing: my original tf model had shape [1, 224, 224, 3], but after conversion it shape had [1, 3, 224, 224]. Is it OK?
In archive: pb model, bin and xml files of IR model, demo that demontrate inference output of models. And requirements.txt for dependencies. Command for running:
For tensorflow model inference:

python3 tf test_img1.jpg

For IR model inference:

python3 ir test_img1.jpg

Thanks for your help and I'm sorry for my english. 

0 Kudos
1 Reply
You'd better use R5 and "".