Git Product home page Git Product logo

cat-dog-classifier's Introduction

Cats vs. Dogs Image Classifier

Project Overview

This project develops a machine learning model capable of classifying images as either cats or dogs. Utilizing TensorFlow and Keras, I've constructed a Convolutional Neural Network (CNN) that has been trained, validated, and tested on a dataset comprising images of cats and dogs. The goal is to accurately identify an image as belonging to one of the two categories, showcasing the power of deep learning in image classification tasks.

Dataset

The dataset used in this project is the "Cats and Dogs" dataset, which is publicly available and consists of 3 sets:

  • Training set: 2,000 images (1,000 cats, 1,000 dogs)
  • Validation set: 1,000 images (500 cats, 500 dogs)
  • Test set: 50 images

The images were preprocessed and augmented to improve the robustness and performance of the model. This included rescaling, rotation, width and height shifts, shear transformations, zoom, and horizontal flipping.

Model Architecture

The CNN model was designed with the following layers:

  • Convolutional layers with ReLU activation functions, followed by max-pooling layers
  • Dropout layer to reduce overfitting
  • A Flatten layer to convert the 2D matrix data to a vector
  • Dense layers, including an output layer with a sigmoid activation function to achieve binary classification

The model was compiled with the Adam optimizer and binary cross-entropy loss function, aiming for high accuracy in distinguishing between cats and dogs.

Training and Results

The model underwent training for 15 epochs with early stopping implemented to prevent overfitting. We achieved promising results, demonstrating the model's ability to learn and differentiate between cats and dogs with a high degree of accuracy.

  • Training Accuracy: Reached up to approximately 73.77%
  • Validation Accuracy: Peaked around 72.32%

Conclusion and Future Work

This project highlights the effectiveness of CNNs in image classification tasks. Future work could explore more sophisticated models, further data augmentation techniques, or the use of transfer learning to enhance performance and accuracy.

cat-dog-classifier's People

Contributors

carson-evans avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.