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

Magnitude normalization for posterize and solarize #27

Closed
marksibrahim opened this issue Feb 24, 2021 · 1 comment
Closed

Magnitude normalization for posterize and solarize #27

marksibrahim opened this issue Feb 24, 2021 · 1 comment

Comments

@marksibrahim
Copy link

Magnitudes are in range [1-10], but based on https://pillow.readthedocs.io/en/3.0.x/reference/ImageOps.html#PIL.ImageOps.posterize

solarize: range is [0, 256]
posterize: range is [1, 8]

Shouldn't the magnitudes be normalized in https://github.com/DeepVoltaire/AutoAugment/blob/master/autoaugment.py#L210 ? For example, line 211 would be

"solarize": lambda img, magnitude: ImageOps.solarize(img, 256.0 / magnitude)

@marksibrahim
Copy link
Author

All set, this is taken care of in ranges: https://github.com/DeepVoltaire/AutoAugment/blob/master/autoaugment.py#L173

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

1 participant