albumentations-team / autoalbument

AutoML for image augmentation. AutoAlbument uses the Faster AutoAugment algorithm to find optimal augmentation policies. Documentation - https://albumentations.ai/docs/autoalbument/
https://albumentations.ai/docs/autoalbument/
MIT License
198 stars 20 forks source link

Exclude certain augmentations #22

Closed LSnyd closed 3 years ago

LSnyd commented 3 years ago

Hi there, is there a way to exclude certain augmentations? Vertical flipping for instance does not make sense for the domain I am working with, so I would like to exclude it from the beginning. Thank you in advance!

creafz commented 3 years ago

Hey @LSnyd

In the latest version of AutoAlbument (0.4.0), you can pass a list of operations you want to use through the policy_model.operations key.

Here is an example config that uses all available operations - https://gist.github.com/creafz/41f5c9021623bd3c15b35c50aa93992d#file-search-yaml-L50. Just remove the unneeded ones such as - _target_: autoalbument.faster_autoaugment.models.policy_operations.VerticalFlip.

LSnyd commented 3 years ago

Hi @creafz, adding the operations manually worked great, thank you!

When using these operations, I still won't be able to hand over the range of values for the RandomContrast for instance, right? With the standard settings, I end up with white and black images, unfortunately.

LSnyd commented 3 years ago

My bad I didn't divide the input image (float32) by 255. Now it works for me and I don't end up with black images.