Code Monkey home page Code Monkey logo

cnn.modeldeployment's Introduction

Bird Classification Model

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.

Whole Project Structure

Traning: Deep Learning Model Training Toolkit

Model Deployment: CNN Model Deployment

Mobile Application: Django Bird Classifier

Requirements

  • 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

Setting up the Environment

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
  1. Activate the virtual environment:

    • Windows:
      .\env\Scripts\activate
    • Linux:
      source env/bin/activate
  2. Install the required packages:

    pip install -r requirements.txt

Download the Model

Download the bird classification model bird_classification_model.h5 from Google Drive. Place the model file inside birdwatch/imageclassification/.

Model Capabilities

The model can predict the following bird classes:

  1. Malacocincla abbotti
  2. Dupetor flavicollis
  3. Alcedo meninting
  4. Pitta nipalensis
  5. Tickellia hodgsoni
  6. Catreus wallichii
  7. Lonchura atricapilla
  8. Aegypius monachus
  9. Stachyris chrysaea
  10. Brachypteryx stellata
  11. Botaurus stellaris
  12. Buceros bicornis
  13. Mulleripicus pulverulentus
  14. Ibidorhyncha struthersii
  15. Cursorius coromandelicus
  16. Grаminicolа bengalensis
  17. Caprimulgus asiaticus
  18. Sarkidiornis melanotos
  19. Anas acuta
  20. Mycteria leucocephala
  21. Cochoa purpurea
  22. Harpactes erythrocephalus
  23. Sarcogyps calvus
  24. Falco chicquera
  25. Anthreptes singalensis
  26. Actinodura egertoni
  27. Falco cherrug
  28. Leiothrix argentauris
  29. Rallina eurizonoides
  30. Bubo nipalensis
  31. Melanochlora sultanea
  32. Francolinus gularis
  33. Dumetia hyperythra
  34. Treron curvirostra
  35. Alophoixus flaveolus
  36. Saxicola insignis
  37. Indicator xanthonotus
  38. Phylloscopus cantator

Note: For optimal results, it's suggested to use somewhat cropped images when providing input to the model.

Running the Application

  1. Run the Django server locally:

    python manage.py runserver
  2. To access the application in your local network, find your IPv4 address using ipconfig (Windows) or ifconfig (Linux).

  3. 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
  4. 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.

To Test Model's Prediction

  1. Go to
    http://localhost:8000/classify_image

Happy bird watching! 🐦🔍

Extras

cnn.modeldeployment's People

Contributors

centaurusgod avatar

Watchers

Kostas Georgiou avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.