/CNN-pytorch

Collection of CNN models and implementations

Primary LanguagePythonMIT LicenseMIT

CNN-pytorch

Collection of CNN models and implementations

Fashion-MNIST

CNN implementation for predicting items of clothing

Summary

Using a relatively simple CNN model for image classicification.

MNIST data can be found here or in this case from torchvision

Findings

Classification results of CNN model trained on 15 epochs, final test accuracy of 88.84%

CIFAR-10

CNN implementation for predicting objects/animals

Summary

Using a larger CNN model with batch normalisation for image classicification.

Data augmentation of the image was necessary for training, see here for more information.

Example of data Augmentation used in final model

transformer_train = torchvision.transforms.Compose([
   transforms.RandomCrop(32, padding=4),
   torchvision.transforms.RandomHorizontalFlip(p=0.5),
   torchvision.transforms.RandomAffine(0, translate=(0.1, 0.1)),
   transforms.ToTensor(),                                            
   ])

CIFAR data can be found here or in this case from torchvision

Findings

Classification results of CNN model trained on 30 epochs, final test accuracy of 84.96%

Food-5k

CNN implementation for predicting whether the image is food

Summary

Using transfer learning with a VGG model, modified for image classification.

Data augmentation of the image was also used, see here for more information.

Food-5k data can be found here

Findings

Classification results of the VGG model trained on 5 epochs, final test accuracy of 98.40%