Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RECTANGULAR INFERENCE? #226

Closed
imchwan opened this issue Apr 22, 2021 · 3 comments
Closed

RECTANGULAR INFERENCE? #226

imchwan opened this issue Apr 22, 2021 · 3 comments

Comments

@imchwan
Copy link

imchwan commented Apr 22, 2021

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 ultralytics/yolov3#232 (comment),
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.

@WongKinYiu
Copy link
Owner

default setting use rectangle inference.

@imchwan
Copy link
Author

imchwan commented May 14, 2021

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.

@WongKinYiu
Copy link
Owner

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.

@imchwan imchwan closed this as completed May 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants