File size: 1,880 Bytes
79acef0
541501b
 
 
b426c59
541501b
b426c59
541501b
 
79acef0
541501b
8850972
541501b
8850972
541501b
8850972
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Explainable ML Project 🐬

This project was created by [Ilyesse](https://github.com/ilyii) and [Gabriel](https://github.com/Gabriel9753) as part of the Explainable Machine Learning module at the [University of Applied Sciences Karlsruhe](https://www.h-ka.de/).

The dataset used in this project is the [Animal Image Dataset](https://www.kaggle.com/datasets/iamsouravbanerjee/animal-image-dataset-90-different-animals) from Kaggle, comprising 90 different animal species that needed to be classified. To add a little more animals to the data, we added an additional 21 unique classes, so we were now working with our own 111-animals dataset. We also added approx. 1000 AI generated images for all classes to get a more diverse dataset and also improve the performance of the model.

The employed model is ResNet18, which was trained on the dataset using transfer learning techniques.
Translation of animal names by [deep-translator](https://pypi.org/project/deep-translator/).

## Usage 🦎

**Predict:** In the "Predict" tab, the model can be applied to the uploaded image to obtain a prediction. This is also interessting to get the animal for the following explaination.

**Explain Image:** Under the "Explain Image" tab, you can get an explanation of the prediction in the form of a generated heatmap. We are using [this](https://github.com/jacobgil/pytorch-grad-cam) cool implementation of Grad-CAM to generate the heatmaps!

**Explain Video**: The same as above, but for short videos. The video is split into frames and the model is applied to each frame. The resulting heatmaps are then combined to a video again.

**Example Images:** The "Example Images" section allows users to view sample images from the dataset and another sources. Some of the images and videos are from [1](https://www.pexels.com/), [2](https://pixabay.com/) and [3](https://www.bing.com/create).