Skip to main content

A deep learning package for dog and cat image classification using CNN

Project description

Dog-Cat Classifier

A deep learning-based image classification project that distinguishes between dogs and cats using a VGG16-based CNN architecture.

Project Overview

This project implements an end-to-end deep learning solution for binary classification of dog and cat images. It uses a transfer learning approach with VGG16 as the base model, fine-tuned for the specific task of dog-cat classification.

Features

  • Transfer learning using VGG16 pre-trained model
  • Data augmentation for improved model robustness
  • Binary classification with softmax activation
  • Comprehensive logging system
  • Modular pipeline architecture
  • Model evaluation and metrics tracking

Installation

  1. Clone the repository:
git clone https://github.com/nishantbadhautiya100/dog-cat-classifier.git
cd dog-cat-classifier
  1. Create a virtual environment (recommended):
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt

Usage

  1. Prepare your dataset:

    • Place your dog and cat images in the appropriate directories
    • The structure should be:
      training_data/
      ├── dogs/
      └── cats/
      
  2. Run the training pipeline:

python main.py

The pipeline will:

  • Prepare the base model (VGG16)
  • Train the model on your dataset
  • Evaluate the model performance
  • Save the trained model

Model Architecture

  • Base Model: VGG16 (pre-trained on ImageNet)
  • Transfer Learning: Fine-tuning approach
  • Output Layer: Dense layer with softmax activation
  • Loss Function: Categorical Crossentropy
  • Optimizer: Adam

Configuration

The project can be configured through:

  • params.yaml: Model parameters and training settings
  • config/config.yaml: Pipeline configuration

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • VGG16 model architecture
  • TensorFlow and Keras
  • ImageNet dataset for pre-training

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dog_cat_cnn_classifier-0.1.0.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dog_cat_cnn_classifier-0.1.0-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

Details for the file dog_cat_cnn_classifier-0.1.0.tar.gz.

File metadata

  • Download URL: dog_cat_cnn_classifier-0.1.0.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.25.1 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.12

File hashes

Hashes for dog_cat_cnn_classifier-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8b4402a4d6c4add8d9fed6b683ac0e03fc7c8184355392ed7b3056c22c9b168f
MD5 edf1873f877338e480e10231e6b3c802
BLAKE2b-256 e84c5137c4a107f2b9de1a8dd2a46ec658fd6f7ec9361eecb2ae7024a48614a3

See more details on using hashes here.

File details

Details for the file dog_cat_cnn_classifier-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: dog_cat_cnn_classifier-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.25.1 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.12

File hashes

Hashes for dog_cat_cnn_classifier-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 89a60a1b87f470d4e221d5e799c5c8e333f84bda54a2bbda59c5f278932a032d
MD5 ee0091ebd301ef272e4d6d153f449736
BLAKE2b-256 546b2fa06735ba45d3f51760849685e1bf8996d812cd18f1b0a07288b13e11bc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page