-
-
Notifications
You must be signed in to change notification settings - Fork 939
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
[Bug] RandomJPEG does fails if sides are not divisible by 16 #2845
Comments
@ternaus thanks to rise this issue. @ChristophReich1996 is this a bug or a limitation of the algorithm ? |
Hi @ternaus & @edgarriba JPEG performs coding based on 8 x 8 patches. As we downsample the chroma by a factor of two this corresponds to a patch size of 16 x 16 w.r.t. the original image. So the input image dimensions must be devisable by 16. I would consider padding the image, performing JPEG coding, and clipping the image again. @edgarriba we could also add this to the differentiable JPEG implementation if you like. |
@ChristophReich1996 sure, feel free to add the patch |
Describe the bug
RandomJPEG does fails if sides are not divisible by 16
Reproduction steps
Additional context
No response
The text was updated successfully, but these errors were encountered: