0

I'm trying to convert a custom yolov4 into a .pb file knowing that the height and the width are different but the converting script has just the size parameter expecting the height to be equal to the width.

In my case:

width=1280
height=352

Example: python3 convert_weights_pb.py --class_names coco.names --data_format NHWC --weights_file yolov_608.weights --size 608

So I'm wondering if I could keep the model and do the conversion or I should retrain the model with height equal to width.

Sadmi
  • 311
  • 2
  • 15

1 Answers1

0

Please retrain the model with a height equal to the width. As you mentioned, the converting script has the size parameter expecting the height to be equal to the width.

Rommel_Intel
  • 1,369
  • 1
  • 4
  • 8
  • I edited the script to allow width!=height, but I'm still wondering if openvino supports that, as in the yolov3 demo in samples there is a restriction that width and height should be equal – Sadmi Jan 12 '21 at 12:09
  • Have to say it really depends on the demos themselves. If you execute the Object Detection Yolo demo prior to the 2021.2 release, the layout and height should be equal to the width. Failure to do so will result in errors during the inference process. Having said that, the demo in the 2021.2 release able to execute the model. Please note the performance and accuracy are not certain for the model with such configuration. – Rommel_Intel Jan 22 '21 at 04:40