Skip to content

This project explores image classification using PyTorch on the CIFAR10 dataset. The model has been trained using Convolutional Neural Network.

Notifications You must be signed in to change notification settings

Arushi04/ImageClassification

Repository files navigation

Image Classification using Pytorch on CIFAR10

Description :

Image classification is the process of labeling images according to predefined categories. An image classification model is fed a set of images within a specific category. Based on this set, the algorithm learns which class the test images belong to, and can then predict the correct class of future image inputs, and can even measure how accurate the predictions are. In this project, we have trained our model using Convolutional Neural Network on CIFAR10 dataset.

Dataset:

CIFAR10 dataset has been loaded from PyTorch. This dataset consists of 60000 32x32 colour images in 10 classes, with 6000 images per class. There are 50000 training images and 10000 test images. The dataset is divided into five training batches and one test batch, each with 10000 images. The test batch contains exactly 1000 randomly-selected images from each class. The training batches contain the remaining images in random order, but some training batches may contain more images from one class than another. Between them, the training batches contain exactly 5000 images from each class.

Relevant Files:

The project is broken down into 4 files:

  1. dataset.py : Loading and pre-processing the dataset using Data Loader
  2. models.py : Defining the layers of the CNN network classifier
  3. main.py : Training the training dataset using the defined model and predicting classes for test images. Visualizing traing and test loss and accuracy on test datasets
  4. utils.py : Additional functions are defined for plotting images.

Architecture

  • Convolution Neural Network

Requirements

  • Python 3.6.10
  • Numpy 1.18.4
  • Tensorboard 2.0.0
  • Pytorch 1.5.0
  • Torchvision 0.6.0
  • Matplotlib 3.2.1
  • Scikit-learn 0.23.1

Command to Run:

python main.py --dataset CIFAR10 --outdir output/ --epochlen 10

Results and Visualization

  • CIFAR10 :

Train : Orange. Test : Blue.

About

This project explores image classification using PyTorch on the CIFAR10 dataset. The model has been trained using Convolutional Neural Network.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published