Skip to content

Animal Classification: A CNN-based image recognition model.

License

Notifications You must be signed in to change notification settings

ragul-rofi/AnimalClassificationML

Repository files navigation

Animal Classification Project

Project Overview

This project shows deep learning to classify animals in images. The model is trained using a dataset of labeled images and is implemented using TensorFlow/Keras. The dataset is split into training, validation, and test sets for training, model evaluation, and testing the performance of the trained model.

Table of Contents

  1. Project Overview
  2. Dataset
  3. Training the Model
  4. Evaluating the Model
  5. File Structure
  6. License

Dependencies

To run this project, ensure you have Python installed along with the following libraries:

  • TensorFlow (for training and evaluating the model)
  • Keras (for model building)
  • scikit-learn (for dataset splitting)

Dataset

The dataset used in this project contains images of various animals. The images are split into the following categories:

  • Training Data: 80% of the total dataset used for training the model.

  • Validation Data: 10% used for model validation during training.

  • Test Data: 10% used for evaluating the final model.

The prepared dataset structure should look like this:

processed_dataset/
├── train/
├── validation/
└── test/

Training the Model

To train the model, run the following command:

python main.py

Hyperparameters:

  • Epochs: Set to 10 (You can modify this value in the code).

  • Batch Size: 32 (Also adjustable).

  • Model: A CNN built with multiple convolutional layers, max pooling, and dense layers.

The process will:

  • Load and preprocess the data.

  • Build the CNN model.

  • Train the model and save the best model using checkpoints.

You can adjust training parameters such as epochs and batch size in the code.

Evaluating the Model

After training the model, evaluate it using the following command:

python evaluate_model.py

This will:

  • Load the best-trained model.

  • Evaluate its performance on the test data.

  • Print the accuracy and loss of the model on the test dataset.

License

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

Notes:

  • Git LFS: For large files like the .keras model file, use Git Large File Storage (LFS). Follow the instructions in the Git LFS documentation to set it up.

  • Data Privacy: Make sure you have the appropriate rights and permissions to share or use the dataset if it contains sensitive information.

  • Dataset Download: If you need to download an existing dataset, refer to the dataset page or use any other public animal classification dataset.

About

Animal Classification: A CNN-based image recognition model.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages