-
Notifications
You must be signed in to change notification settings - Fork 38
Description
Команда для инференса 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 меньше.
Аналогичные результаты для других картинок, сконвертированная модель дает первому варианту гораздо меньшую вероятность