This project is focused on the classification of cat and dog images using TensorFlow, a powerful open-source software library for machine learning. Below, you'll find an overview of the project, including the methodology and results.

Methodology

The project follows these steps:

  1. Data Collection: We collected a dataset of cat and dog images from the internet.
  2. Preprocessing: We preprocessed the images by resizing, normalizing, and augmenting them to increase the model's robustness.
  3. Model Building: We used a Convolutional Neural Network (CNN) architecture for image classification.
  4. Training: We trained the model using the preprocessed dataset.
  5. Evaluation: We evaluated the model's performance using metrics like accuracy and loss.

Results

The model achieved an accuracy of 98% on the test set, which is a promising result for a cat-dog classification task.

Tools and Libraries Used

  • TensorFlow
  • Keras
  • NumPy
  • Pandas
  • Matplotlib

Code Example

Here's a snippet of the TensorFlow code used to build the model:

import tensorflow as tf
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Conv2D, MaxPooling2D, Flatten, Dense

model = Sequential([
    Conv2D(32, (3, 3), activation='relu', input_shape=(150, 150, 3)),
    MaxPooling2D(2, 2),
    Flatten(),
    Dense(128, activation='relu'),
    Dense(1, activation='sigmoid')
])

model.compile(optimizer='adam', loss='binary_crossentropy', metrics=['accuracy'])

More Resources

For more information on TensorFlow and CNNs, check out our TensorFlow Tutorials.


Here's an example of a cat and dog image from our dataset:

Cat

And a dog image:

Dog