Is there a specific reason for the possible aspect ratios used in bucketing? #987
Answered
by
d8ahazard
minienglish1
asked this question in
Q&A
Replies: 2 comments 5 replies
-
Mostly just to help with increasing the possible number of images per
bucket. The logic was that most "real-world" images should fall closely
under one of the provided aspect ratios, especially at smaller resolutions
where the 64 pixel step became closer to whatever we were using as inputs
anyway. And, if you use larger input images, then the minor difference in
pixels between images cropped in various programs becomes more a hindrance
than a benefit.
At least, that was my train of thought when I changed it. I'm open to
discussing a Pull Request to add "more" aspect ratios if it helps things,
but I think as you demonstrated, at some point, it doesn't make a huge
difference. ;)
…On Wed, Mar 1, 2023 at 8:39 PM minienglish1 ***@***.***> wrote:
Not a complaint or a request. Just trying to learn.
Is there a specific reason for the possible aspect ratios used in
bucketing?
The code has: aspect_ratios = [(16, 9), (5, 4), (4, 3), (3, 2), (2, 1),
(1, 1)]
With the requirement that the short dimension be divisible by 64, there
should be lots more possible aspect ratios.
Since I'm training at 1024, to get potentially, better image cropping via
bucketing, I added more aspect ratios:
aspect_ratios = [(16, 15), (8, 7), (16, 13), (16, 11), (8, 5), (16, 7),
(8, 3), (16, 5), (4, 1), (16, 9), (4, 3), (3, 2), (2, 1), (1, 1)]
Nothing seemed to break, but my images only additionally used the (1, 4)
aspect ratio.
Maybe none of my images fit the other aspect ratios or maybe there is
something I don't understand about the code that limits possible aspect
ratios.
—
Reply to this email directly, view it on GitHub
<#987>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMO4NDVXW73S5MUASV3GITW2AB53ANCNFSM6AAAAAAVMZ2F3A>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
5 replies
Answer selected by
minienglish1
-
Yes, there is. The number of iterations per bucket is tracked and balanced.
…On Wed, Mar 1, 2023, 10:51 PM cerega66 ***@***.***> wrote:
d8ahazard <https://github.com/d8ahazard> is there any compensation
algorithm for images of different resolutions? After all, images of
different resolutions require a different number of steps (epochs) of
training due to different sizes of matrices. If I train 1024 and I get 2
images, one 1024x1024 and the second 1024x512, then for the first I need to
go through 2 times more epochs than for the second. And if there are too
many such moments, it can lead to the fact that some images will be
overtrained and others undertrained.
—
Reply to this email directly, view it on GitHub
<#987 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMO4NANBY4NZB5EZ7QL2I3W2ARNFANCNFSM6AAAAAAVMZ2F3A>
.
You are receiving this because you commented.Message ID:
<d8ahazard/sd_dreambooth_extension/repo-discussions/987/comments/5174646@
github.com>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Not a complaint or a request. Just trying to learn.
Is there a specific reason for the possible aspect ratios used in bucketing?
The code has: aspect_ratios = [(16, 9), (5, 4), (4, 3), (3, 2), (2, 1), (1, 1)]
With the requirement that the short dimension be divisible by 64, there should be lots more possible aspect ratios.
Since I'm training at 1024, to get potentially, better image cropping via bucketing, I added more aspect ratios:
aspect_ratios = [(16, 15), (8, 7), (16, 13), (16, 11), (8, 5), (16, 7), (8, 3), (16, 5), (4, 1), (16, 9), (4, 3), (3, 2), (2, 1), (1, 1)]
Nothing seemed to break, but my images only additionally used the (1, 4) aspect ratio.
Maybe none of my images fit the other aspect ratios or maybe there is something I don't understand about the code that limits possible aspect ratios.
Beta Was this translation helpful? Give feedback.
All reactions