cifar10 / README.md
Shilpaj's picture
Update README.md
863c556 verified

A newer version of the Gradio SDK is available: 5.13.1

Upgrade
metadata
title: Cifar10
emoji: 🔥
colorFrom: purple
colorTo: indigo
sdk: gradio
sdk_version: 4.38.1
app_file: app.py
fullWidth: true
models:
  - >-
    https://huggingface.co/spaces/Shilpaj/cifar10/blob/main/epoch%3D23-step%3D2112.ckpt
datasets:
  - CIFAR10
pinned: false
license: mit

Model Trained for CIFAR10

  • This Application demonstrate the inference side of the model trained on the CIFAR dataset
  • David C's model architecture is recreated and trained on CIFAR10 dataset to achieve the accuracy of 90+% within 24 epochs
  • Once Cycle Policy is used to speed up the training process
  • The model is coded using PyTorch Lightning. Mentioned below is the link for Training Repository where you can check the code for model training and tracked metrics
Training Repo Link
  • After the Training, model checkpoint is stored on the system and uploaded to Gradio Spaces. Attached below is the link to download model file

    Download Model File
  • This app has four features in four tabs:

  • GradCam:

    • To visualize which portion of the image model is actually looking at while inferencing on the image
    • Using this, we can come up with an augmentation strategy that can improve the model accuracy
  • Misclassified Image:

    • While training the model, though the test accuracy was 90+%, there were still 10% images which were misclassified
    • The feature helps to visualize those images with their respective correct and incorrect labels
    • This can be used to come up with a strategy to improve accuracy for a particular class
  • Feature Map Visualization:

    • There are 6 block in this model
    • Each block has 2 or 3 convolutional layers
    • The output of specific kernel are visualized for first convolutional layer of all 6 blocks
  • Kernel Visualization:

    • In the first layer of each of the six blocks, there are kernels which are creating the feature maps
    • Some of those kernels are visualized in this section

Dependencies:

  • Python Version: 3.x
  • PyTorch Lightning: 2.0.6

Usage:

GradCam

  • Upload an image or select from example
  • Select how much percentage of original image should be overlapped on what actually model is looking at in the image
  • Select the number of top classes you want to see
  • Select the block number for which first convolutional layer's activation you want to see
  • Click on the Submit button to see the results

GradCam

Misclassified Images

  • Select the number of misclassified images you want to see
  • Click on Display Misclassified Images to show the images in the center and their respective correct and misclassified labels in the sequence

Misclassified Images

Feature Map Visualization

  • Upload an image
  • Select the kernel number
  • Click on Visualize FeatureMaps to see the feature maps created by the kernel number for first convolutional layer in each of the six blocks

Feature Maps

Kernel Visualization

  • Select the block number from which first convolutional layer's kernel to be visualized
  • Click on Visualize Kernels to see the kernels

Kernel