Skip to content

Deep learning model for classifying wildlife species from camera trap images using transfer learning and data augmentation techniques.

License

Notifications You must be signed in to change notification settings

Vidit-Kushwaha/Wildlife-Species-Classification-Model

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Wildlife Species Classification

Overview

This project aims to classify images of various wildlife species using a deep learning model. The model leverages TensorFlow and Keras to build and train a custom image classifier based on the MobileNetV2 architecture.

Features

  • Data Augmentation: Applied to improve model generalization.
  • Pre-trained Model: Uses MobileNetV2 as a feature extractor.
  • Training & Validation: Includes scripts for training and evaluating the model.
  • Model Saving & Loading: Save and reload the model for future use.
  • TensorFlow.js Conversion: Convert the model to TensorFlow.js for use in web applications.

Installation

  1. Clone the Repository:
git clone https://github.com/Vidit-Kushwaha/Wildlife-Species-Classification-Model.git
cd wildlife-species-classification
  1. Google Colab Setup:

If using Google Colab, mount your Google Drive and install TensorFlow Hub:

from google.colab import drive
drive.mount('/content/drive')

!pip install tensorflow_hub

Usage

  1. Prepare Your Data:

Place your images in a directory structure like this:

Copy code
data/
  train/
    class1/
      img1.jpg
      img2.jpg
    class2/
      img1.jpg
      img2.jpg
  val/
    class1/
      img1.jpg
      img2.jpg
    class2/
      img1.jpg
      img2.jpg
  1. Run Training:

Open the Jupyter notebook or Python script and execute the cells to train the model. The script includes data augmentation, model training, and evaluation.

  1. Evaluate and Save the Model:

After training, the model’s performance will be evaluated, and the model will be saved as wildlife_classifier.h5.

  1. Convert to TensorFlow.js:

To use the model in a web application, convert it using TensorFlow.js:

Copy code
pip install tensorflowjs
tensorflowjs_converter --input_format=tf_saved_model --output_format=tfjs_graph_model --weight_shard_size_bytes=4194304 path/to/saved_model tfjsmodel/
  1. Example To run inference on a new image, use the provided code snippets or functions in the Jupyter notebook.

Contributing

Feel free to fork the repository and submit pull requests for improvements. Please follow the standard GitHub workflow for contributions.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgements

TensorFlow and Keras for providing robust tools for deep learning. TensorFlow Hub for pre-trained models. Google Colab for providing an accessible platform for training and experimentation.

About

Deep learning model for classifying wildlife species from camera trap images using transfer learning and data augmentation techniques.

Topics

Resources

License

Stars

Watchers

Forks