- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I customized a YOLO v2 Model and it's work using Python code for inference.
Now, I want to use the same model with OpenVino and NCS v1.
I converted with success the Model to IR FP16 files.
When I run the IR FP16 .xml with OpenVino ./object_detection_demo_yolov3_async and NCS v1 I have the following error:
OpenVino 2019 R3.1
cosma@UP1:~/inference_engine_demos_build/intel64/Release$ ./object_detection_demo_yolov3_async -i "cam" -m ~/TF_Models/IR_FP16/yolo_Test_1.xml -d MYRIAD
InferenceEngine:
API version ............ 2.1
Build .................. custom_releases/2019/R3_ac8584cb714a697a12f1f30b7a3b78a5b9ac5e05
Description ....... API
[ INFO ] Parsing input parameters
[ INFO ] Reading input
[ INFO ] Loading Inference Engine
[ INFO ] Device info:
MYRIAD
myriadPlugin version ......... 2.1
Build ........... 32974
[ INFO ] Loading network files
[ INFO ] Batch size is forced to 1.
[ INFO ] Checking that the inputs are as the demo expects
[ INFO ] Checking that the outputs are as the demo expects
[ ERROR ] Size of dims(2) and format(NCHW) are inconsistent.
I tried also -d CPU and I have the same error.
Please, do you have a suggestion?
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sahira, Hi Jesus,
I have the pleasure to inform you that I solved the problem and I perfectly converted YOLO v3 customized model using transfer learning and a custom dataset.
I converted .weights to .pb using tensorflow-yolo-v3 tool and then converted the .pb to IR files using model_optimizer.
Finally, I used OpenVino with NCS for the inference.
FYI, I trained data testing the TF 12, 14 & 15 versions and all work fine.
Best Regards
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Can you please attach your model so I can try to reproduce this issue?
If you would like to send your model over a private message, let me know and I can start a thread.
Best,
Sahira
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I have sent you a private message.
Thank you,
Sahira
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sahira,
Thanks for your replay
Where is the private link?
Anyway, for the moment, attached the .pb file.
Please, let me know your opinion
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
The model you are using is actually for YoloV2, but the sample is YoloV3. Check this one out from the NCAPPZOO: https://github.com/movidius/ncappzoo/tree/master/networks/tiny_yolo_v2
You will need to make some modifications to the sample to match your model: num_classes and anchor_boxes.
Please let me know if this works.
Sincerely,
Sahira
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sahira,
I already applied these steps to customize Yolo v2 with my dataset following the following instructions:
https://github.com/thtrieu/darkflow
The Inference results run properly using Python application with OpenCV.
Now, I want to use OpenVino and I applied the following instruction to convert the customized YOLO Model to IR:
And it works, I have created the IR files.
Unfortunately, I found only the "object_detection_demo_yolov3_async" application to run the customized YOLO with OpenVino.
Please, let me know if you have other tools to run YOLO with OpenVino.
Or, is only supported YOLO v3 ?
Thank you
Cosma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Cosma,
Sounds like you have trained your YOLOv2 model and successfully converted to IR format! The sample code you are trying to use is only for the YOLOv3 architecture. As Sahira suggested, we have another sample application that can be used with YOLOv2 models. However, the sample application is written to work with the original YOLOv2. Since you have a custom trained model, you will need to update the variables for number of classes and anchors_boxes. Otherwise, the inference results will be inaccurate.
See the following python sample code for YOLOv2 on OpenVINO:
https://github.com/movidius/ncappzoo/blob/master/networks/tiny_yolo_v2/tiny_yolo_v2.py
Regards,
Jesus
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sahira, Hi Jesus,
ok!
I'll work in this direction.
Many thanks for your suggestions!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sahira, Hi Jesus,
I have the pleasure to inform you that I solved the problem and I perfectly converted YOLO v3 customized model using transfer learning and a custom dataset.
I converted .weights to .pb using tensorflow-yolo-v3 tool and then converted the .pb to IR files using model_optimizer.
Finally, I used OpenVino with NCS for the inference.
FYI, I trained data testing the TF 12, 14 & 15 versions and all work fine.
Best Regards

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page