This project involves building a machine learning model to classify images of cats and dogs using a convolutional neural network (CNN). The dataset used for training and testing the model is from the Kaggle Dogs vs. Cats competition.
cats_vs_dogs.ipynb
: Jupyter notebook containing the code for data loading, preprocessing, model building, training, and evaluation.dogs-vs-cats/
: Directory containing the dataset files.
- Python 3.x
- Libraries:
- numpy
- pandas
- keras
- sklearn
- matplotlib
- google.colab (for file uploads in Google Colab)
You can install the required libraries using pip
:
pip install numpy pandas keras scikit-learn matplotlib
The dataset can be downloaded from the Kaggle Dogs vs. Cats competition. Make sure to place the dataset files in the dogs-vs-cats/ directory.
git clone https://github.com/yourusername/cats_vs_dogs.git
cd cats_vs_dogs
jupyter notebook cats_vs_dogs.ipynb
- Import necessary libraries.
- Upload and prepare the dataset.
- Define image properties.
- Build and train the CNN model.
- Evaluate the model performance.
The model achieves an accuracy of approximately 98% on the test set.
Kaggle for providing the dataset.
Google Colab for providing a free and convenient platform for running Jupyter notebooks.