Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Cat-vs.-Dog-Classification-with-Convolutional-Neural-Networks-CNNs-

This project implements a CNN-based image classification model to distinguish between cats and dogs using TensorFlow and TensorFlow Datasets (TFDS).

cat dog (1) (2) (2)

Project Overview

This project explores the fundamentals of computer vision and deep learning by building a model to classify images as cats or dogs. The model leverages the power of CNNs to extract features from images and perform classification tasks.

Key Components

Data Preparation:

  • Utilizes TFDS for efficient access to a labeled dataset of cat and dog images.
  • Implements ImageDataGenerator for data augmentation:
  • Rotates images for viewpoint variation.
  • Shifts images horizontally and vertically for robustness.
  • Applies random shearing for distortion tolerance.
  • Zooms in and out for scale invariance.
  • Performs horizontal flips to increase data diversity.

Model Architecture:

  • Constructs a CNN model in Keras with sequential layers:
  • Convolutional layers (Conv2D) to extract features from the images.
  • MaxPooling layers (MaxPool2D) for downsampling and reducing computational cost.
  • Employs Flatten and Dense layers for classification:
  • Flattens the extracted features into a one-dimensional vector.
  • Uses Dense layers with activation functions for classification.
  • Integrates Dropout layers for regularization to prevent overfitting.

Training and Validation:

  • Splits the dataset into training and validation sets.
  • Trains the model on the training data.
  • Evaluates the model's performance on the validation set.

Getting Started

This project requires the following libraries:

  • TensorFlow (tensorflow)
  • TensorFlow Datasets (tensorflow_datasets)
  • Pandas (pandas)
  • NumPy (numpy)
  • Matplotlib (matplotlib.pyplot)
  • Keras (keras from TensorFlow)

To run the project:

  1. Clone this repository.
  2. Install the required libraries (pip install <library_name> for each library).
  3. Download the cat and dog image dataset (refer to the dataset documentation for download instructions).
  4. Update the file paths in the code to point to your downloaded dataset location.
  5. Run the Python script (main.py or equivalent).

Contributing

We welcome contributions to this project! Feel free to submit pull requests with improvements or extensions to the model or functionalities.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages