ML Katas

Custom Data Augmentation Pipeline

medium (<30 mins) custom data augmentation transforms pipeline
this month by E

Create a custom data augmentation pipeline using PyTorch's transforms. For a given dataset (e.g., a custom image dataset), implement a series of transformations like random rotation, flipping, color jitter, and cropping. Use torchvision.transforms.Compose to chain them together. Then, create a torch.utils.data.Dataset subclass that applies these transforms during the __getitem__ call.

Verification: Visualize a single image from the dataset, and then visualize several versions of the same image after applying the augmentation pipeline. The images should show clear signs of the transformations you applied (e.g., rotated, flipped).