objectDetector_Yolo only accepts square networks

Hi, I noticed that there’s an assertion regarding the width and height of yolo networks in the /sources/objectDetector_Yolo when running my custom yolov2 model with different (of course multiples of 32) width and height sizes.
This of course is a huge limitation, because most streams come in sizes where width is greater than width (for example for a 1920x1080 stream the width is 1.7 times the height).

Is there any ways to circumvent this limitation?
Thanks!

Hi,

noticed that there’s an assertion regarding the width and height of yolo networks

Yes, the sample is expected to support open sourced models like yolov2, yolov2-tiny, yolov3 and yolov3-tiny. If you are trying to run a custom model you can make the corresponding changes in “createYoloNetwork()” function accordingly.

Regarding,

because most streams come in sizes where width is greater than width (for example for a 1920x1080 stream the width is 1.7 times the height).

The video stream size and network input size are independent. Incoming frames are resized to network input size before performing inference. You can choose to maintain aspect ratio for the resize or not using nvinfer plugin property “maintain-aspect-ratio”