File size: 1,710 Bytes
b80383e
 
 
 
 
 
 
 
 
 
 
 
15d28c6
 
f51a11d
9baa62c
15d28c6
 
f51a11d
15d28c6
 
9baa62c
f51a11d
 
 
 
 
 
9baa62c
f51a11d
9baa62c
f51a11d
15d28c6
f51a11d
 
 
 
15d28c6
f51a11d
9baa62c
f51a11d
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
---
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
    
This project Impliments a simple Gradio interface to perform inference on CustomResNet model and generate the GradCAM visualization results.

## Task : 

The task involves performing classification on the CIFAR-10 dataset using the Custom ResNet model built with PyTorch and PyTorch Lightning. 

## Files :

1. `requirements.txt`: Contains the necessary packages required for installation.
2. `custom_resnet.py`: Contains the CustomResNet model architecture.
3. `CustomResNet.pth`: Trained model checkpoint file containing model weights.
4. `examples/`: Folder containing example images (e.g., cat.jpg, car.jpg, etc.).
5. `app.py`: Contains the Gradio code for the interactive interface. Users can select input images or examples and view GradCAM images, predictions, and top-k classes.
6. `misclassified_images/`: Folder containing misclassified images.

## Implementation

The following features are implemented using Gradio:

1. **GradCAM Images:** Users are prompted to choose whether they want to view GradCAM images. They can specify the number of images, the target layer, and adjust opacity.
2. **Misclassified Images:** Users have the option to view misclassified images and apply GradCAM visualization to them.
3. **Upload and Select Images:** Users can upload new images or select from a set of 10 example images.
4. **Top Classes:** Users can choose how many top classes they want to see in the prediction results.

## Usage

1. Run the `app.py` script to launch the interactive Gradio interface.