Skip to content

This GitHub repository hosts a machine learning project aimed at classifying images of cats and dogs. The project includes code for data preprocessing, building a convolutional neural network (CNN) model using PyTorch

Notifications You must be signed in to change notification settings

theRomansky/cat-dog-classification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Sure, here's a sample README file for your project:


Cat and Dog Image Classification

This project aims to classify images of cats and dogs using deep learning techniques. The dataset used in this project is obtained from Kaggle and can be found here.

Overview

The task of classifying images of cats and dogs is a classic problem in computer vision and serves as a fundamental example for beginners in deep learning. In this project, we explore two approaches:

  1. Custom CNN Model: We design and train a custom convolutional neural network (CNN) architecture to classify cat and dog images.
  2. Pretrained Model: We utilize a pretrained ResNet18 model available in PyTorch's torchvision library and fine-tune it on our dataset.

Code Overview

  • Data Preprocessing: The dataset is preprocessed to resize images, convert them to tensors, and normalize pixel values.
  • Model Architectures:
    • Custom CNN: A simple CNN architecture is defined with convolutional and pooling layers followed by fully connected layers.
    • Pretrained Model: The ResNet18 model is loaded and modified to adapt the output layer for binary classification.
  • Training and Evaluation: Training loops are implemented for both models along with functions to evaluate their performance on validation and test sets.
  • Results Analysis: The accuracy and loss curves are plotted to visualize the training process, and classification reports are generated to assess the models' performance.

Usage

  1. Data Preparation: Download the dataset from the provided link and place it in the appropriate directory.
  2. Environment Setup: Ensure all necessary dependencies are installed. You may use the requirements.txt file provided.
  3. Model Training: Execute the training scripts for the custom CNN model and the pretrained ResNet18 model.
  4. Evaluation: Evaluate the trained models on the test dataset to assess their performance.
  5. Results Analysis: Analyze the accuracy, loss curves, and classification reports to understand the models' performance.

Conclusion

In conclusion, I explore two different approaches to tackle the task of classifying cat and dog images. I demonstrate the effectiveness of both a custom CNN model and a pretrained ResNet18 model, achieving competitive performance on the test dataset.


Feel free to customize the README file further based on your specific implementation details and results.

About

This GitHub repository hosts a machine learning project aimed at classifying images of cats and dogs. The project includes code for data preprocessing, building a convolutional neural network (CNN) model using PyTorch

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published