NCS2 Sample codes in Python (Yolo V3 with Custom Dataset)

NCS2 Sample codes in Python (Yolo V3 with Custom Dataset)


Can someone guide me how to use my model (Yolo V3, Object Detection) which i trained using custom dataset in Python for NCS2?

I successfully converted the model to IR (Keras -> ONNX -> IR -> .bin and .xml).

I already tried PINTO0309 and modified some codes but still no luck.

Any help would be appreciated....

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hi Jhon,

Have you tried using your model with our Object Detection YOLOv3 Demo? If not, could you try it and let me know the outcome.

Also, which OpenVINO version are you using and what command did you use with the model optimizer to convert to IR?



Hi Jesus,

Thank you for your respond. I'm using openvino_2019.3.379. We (me and my team) developed a Yolo V3 model using Keras and produced an .h5 file. I tried to convert the .h5 file to IR using convertion script (Keras to TF and TF to IR) but always failed. Then i tried to convert .h5 file to ONNX and by using i finally succeeded converting ONNX file to IR.

Using sample codes from OpenVINO-YoloV3 i use .bin & .xml files but always failed. Latest error message is: 

height = math.exp(output_blob[box_index + 3 * side_square]) * anchors[anchor_offset + 2 * n + 1]
OverflowError: math range error

 It' will be fantastic if you can guide me from the beginning -> recommended script for training Yolo V3 using own dataset and sample python codes to infere and to test the model using NCS2.

To make more easier to us, i already refactored sample codes from OpenVINO-YoloV3 and top issues that i'm facing now are:

  • Model input shape (i have different height & weight, but will try to develop a new Yolo V3 model using input size = 416)
  • NHWC vs NCHW(currently i have an NHWC model)

Btw, the model that i want to convert to IR is already tested and run successfully using GPU.


Jhon R Putra 

Leave a Comment

Please sign in to add a comment. Not a member? Join today