Welcome to the Bird Classification Model project! This project leverages a Convolutional Neural Network (CNN) to accurately classify bird images. Below are the details on setting up the project and utilizing the model.
Traning: Deep Learning Model Training Toolkit
Model Deployment: CNN Model Deployment
Mobile Application: Django Bird Classifier
- Python 3.8.18
- Pip 23.3.1
- Django 4.2.9
- Django Rest Framework 3.14.0
- MySQL Connector Python 8.3.0
- Numpy 1.20.3
- Matplotlib 3.7.0
- Scikit-learn 1.3.2
- Scipy 1.10.1
- TensorFlow 2.10.0
Note that you need to change settings.py to use different database like inbuilt sqllite database provided by django. The following is what database part in my settings.py looks like. Ask chatgpt and modify to default django sqlllite if needed. The API to get bird detail is already made but commented just to return scientific name of the image provided by any devices. One can modify the code accordingly and use as per their use. Go to birdwatch/mlapi/views.py to get more insights. One might also need to make some database migrations to make this code functional. Refer to ChatGPT for that.
DATABASES = {
'default': {
'ENGINE': 'mysql.connector.django',
'NAME': 'birdwatch', # Your MySQL database name
'USER': 'root', # Your MySQL username
'PASSWORD': '', # Your MySQL password
'HOST': 'localhost',
'PORT': '3306', # Default MySQL port
}
}
1. Create a virtual environment with Python 3.8.0:
```bash
python3.8 -m venv env
-
Activate the virtual environment:
- Windows:
.\env\Scripts\activate
- Linux:
source env/bin/activate
- Windows:
-
Install the required packages:
pip install -r requirements.txt
Download the bird classification model bird_classification_model.h5
from Google Drive. Place the model file inside birdwatch/imageclassification/
.
The model can predict the following bird classes:
- Malacocincla abbotti
- Dupetor flavicollis
- Alcedo meninting
- Pitta nipalensis
- Tickellia hodgsoni
- Catreus wallichii
- Lonchura atricapilla
- Aegypius monachus
- Stachyris chrysaea
- Brachypteryx stellata
- Botaurus stellaris
- Buceros bicornis
- Mulleripicus pulverulentus
- Ibidorhyncha struthersii
- Cursorius coromandelicus
- Grаminicolа bengalensis
- Caprimulgus asiaticus
- Sarkidiornis melanotos
- Anas acuta
- Mycteria leucocephala
- Cochoa purpurea
- Harpactes erythrocephalus
- Sarcogyps calvus
- Falco chicquera
- Anthreptes singalensis
- Actinodura egertoni
- Falco cherrug
- Leiothrix argentauris
- Rallina eurizonoides
- Bubo nipalensis
- Melanochlora sultanea
- Francolinus gularis
- Dumetia hyperythra
- Treron curvirostra
- Alophoixus flaveolus
- Saxicola insignis
- Indicator xanthonotus
- Phylloscopus cantator
Note: For optimal results, it's suggested to use somewhat cropped images when providing input to the model.
-
Run the Django server locally:
python manage.py runserver
-
To access the application in your local network, find your IPv4 address using
ipconfig
(Windows) orifconfig
(Linux). -
Run the server on your local network:
- Windows:
python manage.py runserver your_ip_address:8000
- Linux:
python manage.py runserver your_ip_address:8000
- Windows:
-
Access the application from any device on the local network using the provided IP address. Remember to update the API requests in HTML files and JavaScript to use the relevant IP address instead of localhost.
- Go to
http://localhost:8000/classify_image
Happy bird watching! 🐦🔍