This project implements a convolutional neural network (CNN) to classify images of cats and dogs. The model is trained on the Kaggle Cats vs Dogs dataset.
The goal of this project is to build a machine learning model that can accurately classify whether an input image contains a cat or a dog. The model architecture is a CNN built using TensorFlow and Keras.
The dataset used for training and testing the model is the Kaggle Cats vs Dogs dataset, which consists of thousands of images of cats and dogs. The dataset is divided into training and test sets, with a balanced number of images for each class.
The CNN model is trained using the training set of images. The training process involves feeding the images through the model, computing the loss function, and updating the model's weights using backpropagation. Training progress is monitored using metrics such as loss and accuracy.
After training, the model is evaluated using the test set of images to assess its performance on unseen data. Evaluation metrics such as accuracy are used to measure the model's performance.
-
Clone the repository:
git clone https://github.com/SyedFahad7/Image-Classifier
-
Install the required dependencies:
pip install -r requirements.txt
-
Download the Kaggle Cats vs Dogs dataset and organize it in the appropriate directory structure.
-
link to the Kaggle Dataset : https://www.kaggle.com/datasets/karakaggle/kaggle-cat-vs-dog-dataset
-
Train the model:
python train.py
-
Test the model:
python test.py
-
Deploy the model (optional):
You can deploy the trained model for inference in your own applications.
train.py
: Script for training the CNN model.test.py
: Script for testing the trained model on new images.my_cnn_model.Keras
: Trained CNN model saved in HDF5 format.README.md
: This file providing an overview of the project.
I'm a full stack Web & App Developer and an undergrad Data Science Student ๐จโ๐ป๐