Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Sanchez__Ricardo
Beginner
114 Views

Converting yolov3 to IR for openvino missing anchors

Hi everyone, 

My goal is to convert DeepSort coded in PyTorch (https://github.com/ZQPei/deep_sort_pytorch) to OpenVino. DeepSort uses Yolov3 as detector.

I successfully converted yolov3 to IR following this guide.

Running the pytorch model of yolo [

  • output = self.net(img)

outputs a dictionary with three keys (3 scales) and each dictionary is composed of 3 elements [x, a, n], prediction, anchors and number of anchors.

However, running the openvino model of yolo:

  • input_blob = next(iter(exec_net.inputs))
  • result = exec_net.infer({input_blob: image})

outputs a dictionary with three keys (3 scales) where each dictionary contains only the numpy array. Therefore, "a" and "n" (anchors and number of anchors) are missing. Therefore, I am unable to retreieve the detections...

Does anyone know how I can tackle this?

Thank you in advance!

 

0 Kudos
1 Reply
Munesh_Intel
Moderator
114 Views

Hi Ricardo,

Greetings to you.

OpenVINO supports certain PyTorch models via ONNX conversion, and DeepSort with PyTorch is not one of the officially supported models.

More information regarding supported PyTorch models can be obtained at the following page:

https://docs.openvinotoolkit.org/2020.3/_docs_MO_DG_prepare_model_convert_model_Convert_Model_From_O...

 

Having said that, moving on to your question on how to tackle missing anchors, try optimizing your model by implementing decomposition for ReduceL2 layer.

More information about decomposition techniques is available at the following pages :

https://docs.openvinotoolkit.org/2020.3/_docs_MO_DG_prepare_model_Model_Optimization_Techniques.html...

https://docs.openvinotoolkit.org/2020.3/_docs_IE_DG_supported_plugins_VPU.html#decomposition_rules

 

Additionally, detailed information of model conversion process for Faster R-CNN topologies is available at the following page:

https://docs.openvinotoolkit.org/2020.3/_docs_MO_DG_prepare_model_convert_model_tf_specific_Convert_...

 

Regards,

Munesh

Reply