ERA-V1-Assignment12 / README.md
nviraj's picture
Update README.md
4cc4589

A newer version of the Gradio SDK is available: 4.43.0

Upgrade
metadata
title: Era Week12 Lightning.resnet
emoji: 🐠
colorFrom: green
colorTo: green
sdk: gradio
sdk_version: 3.39.0
app_file: app.py
pinned: false
license: mit

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference

CIFAR10 Image classification using a Custom ResNet Model

What is the app about?

This app built using Gradio provides an interface to run inferences for CIFAR10 image classification using a custom ResNet model trained using PyTorch and Lightning with >90% accuracy.

What input does it require?

  • Example Input
    • Please note that example inputs have been provided for you to test the app below the Submit button. Please select one of the examples to see the app in action
  • Inference Related
    • Image
      • Any image for the following 10 CIFAR10 classes [airplanes, cars, birds, cats, deer, dogs, frogs, horses, ships, and trucks]
      • It accepts any resolution and image type
    • How many top classes to predict?
      • Max of 10 classes
    • Do you want to show the GradCAM image?
      • This shows you features deemed important by the model in making the prediction
    • Which layer of the model do you want to generate GradCAM for?
      • A network has multiple layers and it is sequentially shown as a drop down. Every layer incrementally identifies bigger parts of the image. Have fun generating the visualization for different layers.
    • By what factor do you want to overlay the original image on GradCAM?
      • Smaller the factor more prominent is GradCAM Hotspot.
      • As you increase the factor the original image becomes more opaque and prominent over the heatmap
  • Diagnostics Related
    • Do you want to show Misclassified Images and how many?
      • This comes in handy to see where the model fails to predict accurate classes
    • Do you want to see GradCAM for Misclassified Images and how many?
      • This is useful to see what parts of the image led to incorrect classification

What is the output?

  • Predictions for top number of classes chosen as well as the predicted class
  • Either the original image or image + GradCAM heatmap based on input chosen
  • Misclassified Images by the model
  • GradCAM for Misclassified Images by the model

How was the model built?

  • Model was trained using a custom ResNet model trained for just 24 epochs with 91.4% validation accuracy
  • The code can be found here

Links