Spaces:
Runtime error
Runtime error
Update README.md
Browse files
README.md
CHANGED
@@ -11,3 +11,54 @@ license: mit
|
|
11 |
---
|
12 |
|
13 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
---
|
12 |
|
13 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
14 |
+
|
15 |
+
# CIFAR10 Image classification using a Custom ResNet Model
|
16 |
+
|
17 |
+
## What is the app about?
|
18 |
+
|
19 |
+
[This app](https://huggingface.co/spaces/nviraj/ERA-V1-Assignment12) built using [Gradio](https://www.gradio.app/) provides an interface to run inferences for CIFAR10 image classification using a custom ResNet model trained using PyTorch and Lightning with \>90% accuracy.
|
20 |
+
|
21 |
+
### What input does it require?
|
22 |
+
|
23 |
+
- **Example Input**
|
24 |
+
- Please note that example inputs have been provided for you to test the app below the Submit button. Please select one of the examples and hit Submit to see the app in action
|
25 |
+
- **Inference Related**
|
26 |
+
- Image
|
27 |
+
- Any image for the following 10 CIFAR10 classes [airplanes, cars, birds, cats, deer, dogs, frogs, horses, ships, and trucks]
|
28 |
+
- It accepts any resolution and image type
|
29 |
+
- How many top classes to predict?
|
30 |
+
- Max of 10 classes
|
31 |
+
- Do you want to show the GradCAM image?
|
32 |
+
- This shows you features deemed important by the model in making the prediction
|
33 |
+
- Which layer of the model do you want to generate GradCAM for?
|
34 |
+
- 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.
|
35 |
+
- By what factor do you want to overlay the original image on GradCAM?
|
36 |
+
- Smaller the factor more prominent is GradCAM Hotspot.
|
37 |
+
- As you increase the factor the original image becomes more opaque and prominent over the heatmap
|
38 |
+
- **Diagnostics Related**
|
39 |
+
- Do you want to show Misclassified Images and how many?
|
40 |
+
- This comes in handy to see where the model fails to predict accurate classes
|
41 |
+
- Do you want to see GradCAM for Misclassified Images and how many?
|
42 |
+
- This is useful to see what parts of the image led to incorrect classification
|
43 |
+
|
44 |
+
### What is the output?
|
45 |
+
|
46 |
+
- Predictions for top number of classes chosen as well as the predicted class
|
47 |
+
- Either the original image or image + GradCAM heatmap based on input chosen
|
48 |
+
- Misclassified Images by the model
|
49 |
+
- GradCAM for Misclassified Images by the model
|
50 |
+
|
51 |
+
### How was the model built?
|
52 |
+
|
53 |
+
- Model was trained using a custom ResNet model trained for just 24 epochs with 91.4% validation accuracy
|
54 |
+
- The code can be found here
|
55 |
+
- [Notebook](https://github.com/nviraj/era-v1/blob/main/Session%2012/Submission/ERA%20V1%20-%20Viraj%20-%20Assignment%2012.ipynb)
|
56 |
+
- [Modules](https://github.com/nviraj/era-v1/tree/main/Session%2012/Submission/modules)
|
57 |
+
- [Model](https://github.com/nviraj/era-v1/tree/main/Session%2012/Submission/models)
|
58 |
+
|
59 |
+
### Links
|
60 |
+
|
61 |
+
- [GradCAM?](https://arxiv.org/abs/1610.02391)
|
62 |
+
- [Pytorch](https://pytorch.org/)
|
63 |
+
- [Pytorch Lightning](https://www.pytorchlightning.ai/index.html)
|
64 |
+
- [ResNet](https://arxiv.org/pdf/1512.03385.pdf)
|