PumaGuard#
This repository contains a machine learning project aimed at classifying images into two categories: containing a mountain lion or not. The core of this project is a Jupyter notebook, Mountain_Lions.ipynb, that outlines the process of training a model for this binary classification task.
Version: v24.1-53-g3be18d2
Project Overview#
The goal of this project is to accurately classify images based on the presence of mountain lions. This can have applications in wildlife monitoring, research, and conservation efforts. The model is trained on a labeled dataset and validated using a separate set of images.
Fig. 1 Proposed targeted mitigation approach workflow.#
The proposed targeted mitigation workflow is shown in Fig. 1.
Installing PumaGuard#
The most recent version of PumaGuard is available on PyPi. In order to install PumaGuard,
sudo apt install --no-install-recommends pipx
pipx install pumaguard
Getting Started (Developer Version)#
The easiest place to start is to run the project in Google Colab.
This approach does not require any local resources.
Alternately, to run the project locally, follow these steps:
Clone this repository to your local machine.
git clone https://github.com/PEEC-Nature-Youth-Group/pumaguard.git
Ensure you have Jupyter Notebook installed. On Ubuntu, Jupyter can be installed with
sudo apt install --no-install-recommends jupyter
Install required Python packages:
pip install -r requirements.txt
Open the Mountain_Lions.ipynb notebook and follow the instructions therein.
Model Training#
The notebook walks you through the data preparation, model training, and model validation steps. It utilizes a pre-defined Convolutional Neural Network (CNN) architecture optimized for image classification tasks. The training process includes data augmentation techniques to improve model generalization.
All data used here can be found in the data folder.
All models (weights) are published in the models repository.
Leaderboard#
Below is the leaderboard showing the performance of various model iterations based on the validation dataset. The models are ranked by validation accuracy.
Name |
Model |
Number Images |
Training Accuracy |
Validation Accuracy |
Training Loss |
Validation Loss |
Resolution |
|---|---|---|---|---|---|---|---|
PEECYG |
1 |
847 |
63% |
60% |
0.62 |
0.67 |
128 x 128 |
PEECYG |
1 |
847 |
68% |
65% |
0.59 |
0.62 |
256 x 256 |
PEECYG |
2 |
847 |
55% |
47% |
0.65 |
0.65 |
256 x 256 |
PEECYG |
3 |
200 |
100% |
80% |
0.03 |
1.28 |
128 x 128 |
PEECYG |
3 |
847 |
100% |
88% |
0.03 |
0.60 |
128 x 128 |
PEECYG |
3 |
1302 |
99% |
91% |
0.08 |
0.32 |
512 x 512 |
The models used (see the Mountain_Lions.ipynb notebook for details) are
light
light augmented
pre-trained