Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/benitomartin/birds-classification
Computer Vision (Pytorch) Birds Classification
https://github.com/benitomartin/birds-classification
efficientnet gradio jupyter-notebook python pytorch
Last synced: about 2 months ago
JSON representation
Computer Vision (Pytorch) Birds Classification
- Host: GitHub
- URL: https://github.com/benitomartin/birds-classification
- Owner: benitomartin
- Created: 2023-10-07T16:21:15.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-20T18:04:29.000Z (10 months ago)
- Last Synced: 2024-11-08T10:10:02.898Z (3 months ago)
- Topics: efficientnet, gradio, jupyter-notebook, python, pytorch
- Language: Jupyter Notebook
- Homepage: https://huggingface.co/spaces/bmartinc80/birds_pytorch
- Size: 5.67 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# BIRDS CLASSIFICATION ðĶ
![]()
This repository hosts a notebook featuring an in-depth analysis of 2 **Pytorch EfficientNet** models, along with an app deployment using Gradio. The following models were meticulously evaluated:
- EffNetB0
- EffNetB2The dataset used has been downloaded from [Kaggle](https://www.kaggle.com/datasets/gpiosenka/100-bird-species) and contains a set of 525 bird species. 84635 training images, 2625 test images(5 images per species) and 2625 validation images(5 images per species).
The app can be tested in **Hugging Face** (.py files hosted there) following this [link](https://huggingface.co/spaces/bmartinc80/birds_pytorch). Feel free to â and clone this repo ð
## ðĻâðŧ **Tech Stack**








## ðŠķ Set Up
In the first stage, a set of helper functions was created in order to easily perform the modeling and prediction
- **Set seed**: Set random seeds for PyTorch operations, both on the CPU and the GPU
- **DataLoaders**: Create data loaders for training and testing datasets using PyTorch's DataLoader class
- **Writer**: SummaryWriter object for logging experiments and metrics in TensorBoard
- **Training and Testing**: Several functions for training and testing a PyTorch model
- **Plots**: Several plots including loss curve, predictions, and images## ðģ Modelling
The first approach was to train 2 Pytorch EfficientNet models (EffNetB0, EffNetB2) with **5 and 10 epochs** using the pre-trained model weights of EffNetB0 for the DataLoaders in order to establish a baseline. The **EffNetB2 with 10 epochs** showed the best performance above **93%** on the test set.
![]()
![]()
## âïļ Model Improvement
Then the EffNetB2 with 10 epochs was trained again but this time using the pretrained model weights of EffNetB2 for the DataLoaders. This time an accuracy above **95%** on the **test set** and above **93%** on the **validation set** was achieved.
![]()
## ð App Deployment
The last step was to deploy an app hosted in Hugging Face using Gradio. This app can be tested with available sample images or with your own ones.
![]()