Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TFlite] Несовпадение результатов вывода tflite и openvino #456

Open
IgorKonovalovAleks opened this issue Nov 29, 2023 · 2 comments

Comments

@IgorKonovalovAleks
Copy link
Contributor

Команда для инференса openvino:
python .\src\inference\inference_openvino_sync_mode.py -t classification -i .\im\apple.jpg -m .\public\googlenet-v1-tf\FP32\googlenet-v1-tf.xml -w .\public\googlenet-v1-tf\FP32\googlenet-v1-tf.bin -
-labels .\src\inference\labels\image_net_synset_first_class_base.txt
результаты работы:
[ INFO ] 0.8873319 Granny Smith
[ INFO ] 0.0083221 lemon
[ INFO ] 0.0073108 piggy bank, penny bank
[ INFO ] 0.0063511 pomegranate
[ INFO ] 0.0033214 banana

Команда для конвертации модели:
python .\src\model_converters\tf2tflite\tflite_converter.py --model-path .\public\googlenet-v1-tf\inception_v1.frozen.pb --input-names input --input-shapes [1,224,224,3] --output-names InceptionV1/L
ogits/Predictions/Softmax --source-framework tf

Команда для инференса tflite:
python .\src\inference\inference_tensorflowlite.py -t classification -i .\im\apple.jpg -m .\public\googlenet-v1-tf\inception_v1.frozen.tflite --input_names input --output_names InceptionV1/Logits/Pr
edictions/Softmax --mean [127.5,127.5,127.5] --labels .\src\inference\labels\image_net_synset_first_class_base.txt --input_scale input[127.5]
результат работы:
[ INFO ] 0.6735930 Granny Smith
[ INFO ] 0.0737855 piggy bank, penny bank
[ INFO ] 0.0155380 vase
[ INFO ] 0.0154004 pitcher, ewer
[ INFO ] 0.0136552 saltshaker, salt shaker

Первый результат совпадает и корректен, но у tflite вероятность более чем на 20 меньше.
apple

Аналогичные результаты для других картинок, сконвертированная модель дает первому варианту гораздо меньшую вероятность

@FenixFly
Copy link
Contributor

@IgorKonovalovAleks добавьте пожалуйста версии библиотек

@IgorKonovalovAleks
Copy link
Contributor Author

Name: tflite
Version: 2.10.0
Name: tensorflow
Version: 2.14.1
Name: openvino
Version: 2023.2.0
Name: tensorflow-probability
Version: 0.22.0
Name: tensorflow-addons
Version: 0.21.0

@valentina-kustikova valentina-kustikova changed the title Несовпадение результатов вывода tflite и openvino [TFlite] Несовпадение результатов вывода tflite и openvino Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants