https://github.com/denatajp/animal-cnn-classifier
A Convolutional Neural Network (CNN) project that classifies images of animals (cat, dog, and tiger). Built with TensorFlow and Keras, the model uses image augmentation to improve accuracy. The dataset consists of labeled animal images, and the model can predict the correct animal class.
https://github.com/denatajp/animal-cnn-classifier
keras python tensorflow
Last synced: 2 months ago
JSON representation
A Convolutional Neural Network (CNN) project that classifies images of animals (cat, dog, and tiger). Built with TensorFlow and Keras, the model uses image augmentation to improve accuracy. The dataset consists of labeled animal images, and the model can predict the correct animal class.
- Host: GitHub
- URL: https://github.com/denatajp/animal-cnn-classifier
- Owner: denatajp
- Created: 2024-09-05T09:05:45.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-09-06T04:13:55.000Z (9 months ago)
- Last Synced: 2025-04-04T05:19:10.555Z (2 months ago)
- Topics: keras, python, tensorflow
- Language: Python
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

# Animal Image Classification using CNN
This project implements a Convolutional Neural Network (CNN) to classify images of three animal categories: cat, dog, and tiger. The model is built using TensorFlow and Keras and utilizes image augmentation techniques to enhance its performance.
# Features
- Classifies images into three classes: cat, dog, and tiger.
- Uses CNN architecture with Conv2D, MaxPooling2D, Flatten, and Dense layers.
- Image augmentation techniques like zooming, shearing, and flipping to improve generalization.# Dataset
The dataset contains images of cats, dogs, and tigers organized into separate directories for training and testing. The dataset can be downloaded from [this link](https://drive.google.com/file/d/1a_oH1olkINKoJjhngNe8aMeEi3-xSqUp/view?usp=sharing).# Model Architecture
- **Convolutional Layers**: Extract features from images.
- **MaxPooling**: Reduces the dimensionality of feature maps.
- **Flatten**: Converts 2D matrices to a 1D vector for fully connected layers.
- **Fully Connected Layers**: Dense layers for final classification.# Requirements
To run this project, the following packages are required:
- Python 3.5 or higher
- TensorFlow
- Keras
- NumPy
- MatplotlibYou can install the required libraries using:
```bash
pip install tensorflow keras numpy matplotlib
```# How to Run
1. Clone this repository:
```bash
git clone https://github.com/2denata/Animal-Image-Classification-CNN.git
```
2. Download the dataset and place it in a datasets/ folder with the following structure:
```markdown
datasets/
training_set/
cats/
dogs/
tigers/
test_set/
cats/
dogs/
tigers/
```3. Run the CNN script:
```bash
python CNN.py
```
The script will train the model using the provided dataset, and once trained, it will classify images from the test set.# Model Training
The model is trained for 25 epochs with a batch size of 32. After training, the model is evaluated on the test set. The script also includes code for testing individual images for classification.# Example Prediction
Once trained, the model can predict the class of a given image. For example, you can classify a new image of a cat, dog, or tiger by running the prediction section of the code.


