Skip to content

Add Fourier Domain Augmentations #1646

Closed
@guarin

Description

@guarin

Add augmentations from Disentangling the Effects of Data Augmentation and Format Transform in Self-Supervised Learning of Image Representations.

Todo

Please create one PR per transform.

The following hyperparameters should be implemented:
Screenshot 2024-10-02 at 10 04 55

The augmentations are explained in more detail in Section 4 of the paper. All augmentations should take a tensor as input and return a tensor again. Tensors must have shape (C, H, W). See https://github.com/lightly-ai/lightly/blob/master/lightly/transforms/rotation.py for an example implementation of a transform.

For unit tests please just assert that the expected shape of the output is correct. We don't require more tests because testing transforms is tricky. Ideally you can also create some example images where the transform was applied (take an image, load it with PIL, convert it to a tensor with ToTensor transform from torchvision, apply the newly implemented transform, covert back to image using ToPILImage and upload the final image). Best vary the hyperparameters a bit to see how they affect the final images.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions