Community
cancel
Showing results for 
Search instead for 
Did you mean: 
FSern
Beginner
354 Views

Yolo custom model to IR

Hello,

I want to convert a model which is based on yolov3 tiny into IR to use it with a movidius. its an ocr for license plates

I followed the guide provided in the docs with the pre-trained weights of the example and it worked,

however the model I want (the custom yolo ocr) gives me an error trying when I try to convert it to tf. the input shape on the cfg is 80 and 240 and the script provided receives squared shapes.

Is there something I can do to convert this custom yolo model into IR to be able to use it with openvino? or Am I doing something wrong?

Thanks.

 

0 Kudos
4 Replies
SuryaPSC_Intel
Employee
354 Views

Hi Felipe,

You can try changing the input placeholder code for converting weights to pb as per your model input shape. Also, you may have to make changes to the yolo_v3_tiny.json as per your custom model.

Best Regards,

Surya

FSern
Beginner
354 Views

Hi, Thanks for answering!

Turns out the model was based on yolo v2 tiny not v3, so I downloaded darkflow and was able to convert it to tensorflow. Tested it and looks fine.

However I have a new problem: I converted the .pb to openvino and everything looked fine in the conversion, but when I try to test the model doesn'y detect right.

I used this sample to test:

it https://github.com/opencv/open_model_zoo/blob/master/demos/python_demos/object_detection_demo_yolov3...

I though maybe the sample doesn't work with yolov2 but haven't been able to find a yolov2 openvino sample

I'm a bit lost, I dont know if its the sample or I converted wrong the model from tf to openvino

Thanks

Vladimir_Dudnik
Employee
354 Views

Hi Felipe,

OMZ python object_detection_demo_yolov3_async has been tested with yolo models available in Open Model Zoo. They are:

yolo-v2-ava-0001

yolo-v2-ava-sparse-35-0001

yolo-v2-ava-sparse-70-0001

yolo-v2-tiny-ava-0001

yolo-v2-tiny-ava-sparse-30-0001

yolo-v2-tiny-ava-sparse-60-0001

yolo-v1-tiny-tf

yolo-v2-tf

yolo-v2-tiny-tf

yolo-v3-tf

It might be your model has some specific or difference in output?

Regards,
  Vladimir
 

Alim_S_
Beginner
320 Views

why, then?

object_detection_demo_yolov3_async -i cam -m C:\openvino\data\FP32\yolo-v2-tiny-ava-0001.xml

[ INFO ] Device info:
CPU
MKLDNNPlugin version ......... 2.1
Build ........... 2020.4.0-359-21e092122f4-releases/2020/4
[ INFO ] Loading network files
[ 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.

Reply