Closed imchwan closed 3 years ago
default setting use rectangle inference.
Thanks for the reply.
As I know, --img 640 means using 640 x 640 as a size of input image. So I thought it is only using square image for inference.
How can I use rectangle image as an inference? For example, I want to use 640 x 480 as an input image size.
default setting use letterbox (https://github.com/WongKinYiu/ScaledYOLOv4/blob/yolov4-large/utils/datasets.py#L137) which means long side is 640, if your image is 640:480, then 640x480 is used. or you can change letterbox to resize to force resize image to the size as you want.
Hi. First of all, thank you for sharing your great work.
It looks like your code only deals with square inference. (Reshaping input image of model to square). As mentioned in https://github.com/ultralytics/yolov3/issues/232#issue-435736281, Rectangular inference reduces inference time proportionally to the amount of letterboxed area padded onto a square image vs a 32-minimum multiple rectangular image.
Do you have any plan to support rectangular inference as well? Did anybody try this before? Sharing any experience might be useful.
Thank you.