This project implements a Convolutional Neural Network (CNN) to classify images of dogs and cats. The model is trained on a dataset containing 8000 images for training and 2000 images for testing.
The objective of this project is to build and train a CNN that can accurately classify images as either dogs or cats. The model is trained on a labeled dataset consisting of 8000 training images and evaluated on a separate test set of 2000 images.
Make sure you have the following dependencies installed:
- Python 3.x
- TensorFlow
- Keras
- Other dependencies (you can install them using
pip install -r requirements.txt
)
-
Clone the repository:
git clone git@github.com:basantashah/dog_cat_CNN-AI.git
-
Navigate to the project directory:
cd dog-cat-image-classifier
-
Install the dependencies:
pip install -r requirements.txt
-
Train the model:
python train_model.py
-
Evaluate the model:
python evaluate_model.py
-
Make predictions:
python predict.py path/to/your/image.jpg
'''└───Resources
├───single_prediction
├───test_set
│ ├───cats
│ └───dogs
└───training_set
├───cats
└───dogs'''
- data/: Contains the training and testing datasets.
- models/: Stores the trained CNN model.
- train_model.py: Script for training the CNN.
- evaluate_model.py: Script for evaluating the model on the test set.
- predict.py: Script for making predictions on new images.
- README.md: Project documentation.
The trained model achieved an accuracy of X% on the test set. Here are some sample predictions:
- Image 1: Dog
- Image 2: Cat
- ...
Feel free to explore the project, experiment with different architectures, and contribute to its improvement.
I have developed for my learning purpose, anyone can pull and help improve the code as per their requirement