- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I'm actually following this tutorial to use a custom model trained by Tensorflow in OpenVino environnement with Intel Neural Compute Stick 2:
I'm using OpenVino 2019 R.2 with Tensorflow 1.13 on Linux Ubuntu 18.04. I succesfully converted the Tensorflow custom trained model to the IR model (.bin and . xml)
I tried to use Python script "classification_sample.py" in Inference Engine to deploy the converted model on an image. I use the following command:
python3 classification_sample.py -i /opt/sncf/NCS/2019_R2/openvino_2019.2.242/deployment_tools/model_optimizer/KHL_exemples/pathfinder.jpg -m /opt/sncf/NCS/2019_R2/openvino_2019.2.242/deployment_tools/model_optimizer/KHL_exemples/frozen_inference_graph_cartes_v2.xml --labels /opt/sncf/NCS/2019_R2/openvino_2019.2.242/deployment_tools/model_optimizer/KHL_exemples/frozen_inference_graph_cartes_v2.mapping -d MYRIAD
With "frozen_inference_graph_cartes_v2.xml" and "frozen_inference_graph_cartes_v2.mapping" are the converted models. I used MYRIAD because I use the Neural Compute Stick 2.
But I always get the following error message:
det_label = labels_map[id] if labels_map else "{}".format(id)
TypeError: only integer scalar arrays can be converted to a scalar index
I think there are problems with the mapping file, but I don't know how to solve the problem. Can you help me?
Thank you,
Kim Hung LE
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For more details, when I converted the Tensorflow 1.13 custom trained model to IR model, I use the following command in Mode_Optimizer:
python3 mo_tf.py --input_model <inference_graph_dir>/frozen_inference_graph.pb --tensorflow_use_custom_operations_config /opt/sncf/NCS/2019_R2/openvino_2019.2.242/deployment_tools/model_optimizer/extensions/front/tf/faster_rcnn_support_api_v1.13.json --tensorflow_object_detection_api_pipeline_config <inference_graph_dir>/pipeline.config --data_type FP16
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Kim Hung LE
Thank you for using OpenVino 2019R2 . Your issue is that you cannot use "classification_sample.py" for a faster_rcnn (object detection) model. Instead try running this sample:
object_detection_demo_ssd_async.py
Also the C++ version:
object_detection_demo_ssd_async under demos and
object_detection_sample_ssd under samples
Hopefully this previous IDZ forum post should help you.
Thanks,
Shubha
![](/skins/images/7B0AB6865064EAE32B30EC9A4E94B48A/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page