Skip to content

"A deep learning model built with TensorFlow and Keras to classify images as either cats or dogs. This project includes scripts for training the model from scratch and for predicting new images."

Notifications You must be signed in to change notification settings

SpringZiee/image_classifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿพ Cat & Dog Image Classifier

A deep learning model built with TensorFlow and Keras to classify images as either cats or dogs. This project includes scripts for training the model from scratch and for predicting new images.

๐ŸŒŸ Features

  • A simple Convolutional Neural Network (CNN) architecture.
  • Uses OpenCV for image preprocessing.
  • Achieves over 85% accuracy on validation data.
  • Includes a script to predict single images and display the result.

โš™๏ธ Setup and Installation

  1. Clone the repository:

    git clone [https://github.com/your-username/cat-dog-image-classifier.git](https://github.com/your-username/cat-dog-image-classifier.git)
    cd cat-dog-image-classifier
  2. Create and activate a virtual environment:

    python -m venv venv
    .\venv\Scripts\activate
  3. Install the required packages:

    pip install -r requirements.txt
  4. Download the dataset from Kaggle and place the train folder in the root directory. Kaggle Dogs vs. Cats Dataset


๐Ÿš€ How to Use

  1. Train the model:

    python train_model.py

    This will generate the cat_dog_model.h5 or cat_dog_model.keras file.

  2. Run a prediction on a new image:

    python predict_image.py --image test_images/my_cat_photo.jpg # Or my_dog_photo.jpg

About

"A deep learning model built with TensorFlow and Keras to classify images as either cats or dogs. This project includes scripts for training the model from scratch and for predicting new images."

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages