Pages


<aside>

Home | Model Architechture | Model Training | Datasets | Data Preprocessing | Libraries | Training Analysis | Full Code Breakdown

</aside>


DATA PREPROCESSING USED


<aside>

There is a total of 500 images in train folder and 100 images in test folder. For this experiment, we have 5 different classes, which means each class will have 100 train images and 10 test images.

All the images have been resized to 128x128 to save time and resources.

Below is the processing for the train model:

transform = transforms.Compose([
    transforms.RandomHorizontalFlip(),
    transforms.RandomAffine(30, fill=0),  
    transforms.RandomVerticalFlip(),
    transforms.RandomRotation(30),
    transforms.ColorJitter(brightness=0.3, contrast=0.3, saturation=0.3, hue=0.2),
    transforms.GaussianBlur(kernel_size=(5, 5), sigma=(0.1, 2.0)),
    transforms.RandomGrayscale(p=0.2),
    transforms.ToTensor(),
    transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))
])

Below is the processing for the test model:

transform_test = transforms.Compose([
    transforms.ToTensor(),
    transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))
])

</aside>

EXPLAINATION


<aside>

RandomHorizontalFlip()

RandomAffine()

RandomVerticalFlip()

RandomRotation()

ColorJitter()

GaussianBlur()

RandomGrayscale()

ToTensor()

Normalize()