File size: 1,456 Bytes
b80383e
 
 
 
 
 
 
 
 
 
 
 
15d28c6
 
 
9baa62c
15d28c6
 
 
 
 
9baa62c
 
 
 
 
15d28c6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9baa62c
15d28c6
9baa62c
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
---
title: ERA S12
emoji: 🌖
colorFrom: green
colorTo: purple
sdk: gradio
sdk_version: 3.39.0
app_file: app.py
pinned: false
license: mit
---

# CustomResNet with GradCAM - Interactive Interface
    
### Implimented a simple Gradio interface to infer on CustomResNet model and get GradCAM results

## Task : 

Classification on CIFAR10 dataset using Custom ResNet model by using pytorch lightning. 

## Files :

-> requirements.txt file contains necessary packages to install.

-> custom_resnet.py file contains model architecture.

-> CustomResNet.pth contains trained model checkpoints (weights).

-> examples folder : 10 example images like cat.jpg, car.jpg,..

--> app.py contains gradio code. By using gradio here implemented by selecting input images or examples output display the gradcam image and prediction and top k classes. 

--> misclassified_images folder :  10 misclassified images 

## Implimentation : 

First loaded the model by using model weights .pth file.

### By using GRADIO we created these features :

-> Asking the user they want to see GradCAM images if yes then how many images, from which layer and also allow opacity change.

-> Providing the option to user they want to view misclassified images, and how many images. If they want to apply grad cam for misclassified images.

--> Option to upload new images, as well as select from 10 example images.

--> Providing one more option how many top classes they want to see.