-
Notifications
You must be signed in to change notification settings - Fork 18.7k
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
Aspect keeping resize in convert_imageset #1178
Conversation
At<>`s changed to pointers for speed.
@ducha-aiki see #1070 |
@sguada nice PR! But it doesn`t cover aspect keeping resiz, so I will remove already merged stuff from my PR and make new one. |
I think when people maintain the aspect ratio they don't resize it to make it square with black padding. I think it is more common to resize such that the minimum size is a fix number, i.e. 256, and the other dimension is resized appropriately to keep the aspect ratio. |
@ducha-aiki see #1239 |
I have experimented with different setups and found that black padding often works best. Of course, depending on type of data you use. -----Початкове повідомлення----- I think when people maintain the aspect ratio they don't resize it to make it square with black padding. I think it is more common to resize such that the minimum size is a fix number, i.e. 256, and the other dimension is resized appropriately to keep the aspect ratio. |
@sguada That is how I do it. Is a square with black padding "aspect preserving" somehow? |
Besides, the padding should be a choice. An image will white background needs white padding, more complex images may need reflection or repetition based padding. |
Replaced with #1550 |
Three changes: