RaviNaik / ERA-SESSION12

ERA-SESSION12 - PyTorch Lightning & Gradio

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ERA-SESSION12 PyTorch Lightning & Gradio

HF Link: https://huggingface.co/spaces/RaviNaik/ERA-Session12

Tasks:

  1. ✔️ Move your S10 assignment to Lightning first and then to Spaces such that:
  • (You have retrained your model on Lightning)
  • You are using Gradio
  1. ✔️ Your spaces app has these features:
  • ask the user whether he/she wants to see GradCAM images and how many, and from which layer, allow opacity change as well
  • ask whether he/she wants to view misclassified images, and how many
  • allow users to upload new images, as well as provide 10 example images
  • ask how many top classes are to be shown (make sure the user cannot enter more than 10)
  • Add the full details on what your App is doing to Spaces README
  1. ✔️ Then:
  • Submit the Spaces App Link
  • Submit the Spaces README link (Space must not have a training code)
  • Submit the GitHub Link where Lightning Code can be found along with detailed README with log, loss function graphs, and 10 misclassified images

Model Summary

  | Name     | Type               | Params
------------------------------------------------
0 | prep     | Sequential         | 1.9 K 
1 | layer1   | Sequential         | 369 K 
2 | layer2   | Sequential         | 295 K 
3 | layer3   | Sequential         | 5.9 M 
4 | pool     | MaxPool2d          | 0     
5 | fc       | Linear             | 5.1 K 
6 | softmax  | Softmax            | 0     
7 | accuracy | MulticlassAccuracy | 0     
------------------------------------------------
6.6 M     Trainable params
0         Non-trainable params
6.6 M     Total params
26.292    Total estimated model params size (MB)

LR Finder

image

Accuracy

image

Test Accuracy

image

Tensorboard Plots

image image

image image

Misclassified Images

image

GradCAM Images

image

HuggingFace Interface

image image image

About

ERA-SESSION12 - PyTorch Lightning & Gradio


Languages

Language:Jupyter Notebook 87.8%Language:Python 12.2%