File size: 1,879 Bytes
f2d1eb2
 
 
 
 
 
 
 
 
 
 
 
 
d02110f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
86110f7
 
 
 
 
 
 
d02110f
 
 
 
 
 
 
 
 
 
 
86110f7
 
 
0b650ee
 
 
 
77658f6
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
---
title: Erav2s13demo
emoji: 👀
colorFrom: green
colorTo: indigo
sdk: gradio
sdk_version: 4.29.0
app_file: app.py
pinned: false
license: mit
---

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

# This project is regarding ERA V2 Assignment 13 where we have used CIFAR10 Dataset and further applied GRAD-CAM on it

cifar10_saved_model.pth -  is the saved model file

resnet.py - is the resnet 18 model architecture. In this we have used Pytorch LightningModule to faster up our coding implementation. Total parameter count is 11.2 M

The requirements for this project is given below. We have mentioned the required libraries in requirements.txt file
  1. pytorch-lightning
  2. torch
  3. torchvision
  4. torch-lr-finder
  5. grad-cam
  6. pillow
  7. numpy

Our main aim of the project was to 

1. ask the user whether he/she wants to see GradCAM images and how many, and from which layer, allow opacity change as well
2. ask whether he/she wants to view misclassified images, and how many
3. allow users to upload new images, as well as provide 10 example images
4. ask how many top classes are to be shown (make sure the user cannot enter more than 10)

We have uploaded some sample images to test our application. The sample images are "cat.jpg", "dog.jpg", "bird_1.jpg", "cat_1.jpg", "cat_2.jpg", "dog_1.jpg", "dog_2.jpg", "dog_3.jpg","ship_1.jpg","ship_2.jpg"

![Image 1](cat.jpg)
![Image 2](dog.jpg)
![Image 3](bird_1.jpg)
![Image 4](cat_1.jpg)
![Image 5](cat_2.jpg)
![Image 6](dog_1.jpg)
![Image 7](dog_2.jpg)
![Image 8](dog_3.jpg)
![Image 9](ship_1.jpg)
![Image 10](ship_2.jpg)

app.py is the main application file

Below is the validation accuracy screenshot. Our maximum validation accuracy is 71%
![Validation Accuracy](validation_accuracy.png)

Below is the tensorboard logs
![Tensorboard Logs](logs_photo.png)