Skip to content

This repository consists of my work on the CIFAR-10 Dataset with Pytorch Framework for Image Classification using various interesting Deep Learning Architectures (Starting with LeNet and ResNet).

Notifications You must be signed in to change notification settings

rushil00/CIFAR-10_image_classifier

Repository files navigation

CIFAR-10 Classifier

This repository consists of my work on the CIFAR-10 Dataset with Pytorch Framework for Image Classification using various interesting Deep Learning Architectures (Starting with LeNet and ResNet).

  • I have previously worked with TensorFlow in my introductory coursework, but this was a thrilling experience because it challenged my intellect and really captured my interest in the Pytorch framework, hence I am motivated to explore this further.
  • This has also been a nice opportunity for me to revise the Deep Learning and ML concepts that I am familiar with. Moreover, I also came across some interesting papers while making this project which I will definitely find time to read.
  • LeNet.py is a LeNet model designed using pytorch from SCRATCH and used throughout the project. The pytorch-provided ResNet-18 Model is also used for comparison of metrics.
  • This project aims to develop my foundational understanding of Deep Learning in Computer Vision.
  • This Project is Deployed on EC2 instance with the live link of Jupyter Notebooks given in the below section.

    How to Navigate this project?


    There are two ways in which you can make use of this project:

      STRUCTURE

          ./cifar.ipynb ==> Main code notebook, where all the models are implemented and their performances are compared.
          ./pruning.ipynb ==> A notebook to get a better understanding of regularization of deep learning model
          ./models/ ==> A directory where all the models (pruned and not-pruned are saved as .pth files)
          ./test.ipynb ==> Jupyter Notebook for TESTING on random test images by classifying them and then comparing with the true label.
      

    1. Run and Edit it as you want on the following link: CLICK HERE
      This is a hosted & Deployed Docker image on AWS EC2 instance

    2. Run it locally, meaning we have to clone this git repo and then run the Dockerfile present in the working directory, as follows:
      • git clone https://github.com/rushil00/CIFAR-10_image_classifier/
        cd path/to/cloned/repo/CIFAR-10_image_classifier
        docker run -d -p 8888:8888 cifar-10_classifier:latest
        

      • For Installation and Setup of Docker, refer to its documentation: Here

    Following deliverables are provided through this project:-

    • Python Model training (with and without Pruning) in a Jupyter Notebook, while also providing the model ".pth" files for future uses.
    • Trained Model Files in the "./models/" folder ["modelLeNet.pth" , "modelResNet.pth"].
    • Pruned Model Files in the "./models" folder ["prunedLeNetModel.pth" , "prunedResNetModel.pth"].
    • A report ("./SummaryReport.pdf") summarizing the results, including the accuracy achieved by the original model, the pruning ratio chosen, the accuracy achieved by the pruned model, and the reduction in model size.

    Deployment Process and Testing (EC2, etc.)

    • The Docker image was first publicly built and uploaded via local, to docker-hub as well as ECR (Elastic Container Registry) - An AWS Platform to manage Containerization
    • Then, an EC2 instance was launched, and I set the security groups to allow traffic on 8888 port of the instance because that is usually associated with Jupyter Notebooks
    • After EC2 instance was set, the Docker Image was pulled from the ECR with the following command (after I made sure that I have logged in with the aws CLI):
          docker pull public.ecr.aws/s3q3e2f3/cifar-10-classifier:latest
      
    • Post the docker setup and deployment on EC2 instance, I ran with the [`docker run`] command stated before
    • For unit testing, I wrote the code and implemented unittesting.py
    • Further GOAL:

      Given some more time, I would like to use my ELK Stack Skills and configure the Analytics and Results for this model too. I am a keen learner and problem solver, given an opportunity, I would not disappoint

    Link to the Report based on this project:-

    1. This is a Google Document. Feel Free to comment.
  • About

    This repository consists of my work on the CIFAR-10 Dataset with Pytorch Framework for Image Classification using various interesting Deep Learning Architectures (Starting with LeNet and ResNet).

    Resources

    Stars

    Watchers

    Forks

    Releases

    No releases published

    Packages

    No packages published

    Languages