Description
Add augmentations from Disentangling the Effects of Data Augmentation and Format Transform in Self-Supervised Learning of Image Representations.
Todo
- Add RFFT2 transform #1657
- Add IRFFT2 transform #1656
- Add AmplitudeRescale transform #1658
- Add PhaseShift transform #1659
- Add RandomFrequenceMask transform #1660
- Add GaussianMixtureMask transform #1661
- Add FDATransform #1726
Please create one PR per transform.
The following hyperparameters should be implemented:
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.