https://github.com/naveenkumar48/imageclassification
CNN-based image classifier for dogs and cats using TensorFlow and Keras, trained on the Kaggle dataset with automated preprocessing, training, and prediction.
https://github.com/naveenkumar48/imageclassification
cnn computer-vision deep-learning keras tensorflow
Last synced: 2 months ago
JSON representation
CNN-based image classifier for dogs and cats using TensorFlow and Keras, trained on the Kaggle dataset with automated preprocessing, training, and prediction.
- Host: GitHub
- URL: https://github.com/naveenkumar48/imageclassification
- Owner: Naveenkumar48
- Created: 2025-07-05T03:05:24.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-07-05T04:11:34.000Z (about 1 year ago)
- Last Synced: 2025-07-05T04:24:05.110Z (about 1 year ago)
- Topics: cnn, computer-vision, deep-learning, keras, tensorflow
- Language: Jupyter Notebook
- Homepage: https://www.kaggle.com/datasets/salader/dogs-vs-cats
- Size: 172 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# πΆπ± Dog vs Cat Image Classifier using CNN
A deep learning project to automatically classify images of dogs and cats using a Convolutional Neural Network (CNN) built with TensorFlow and Keras.
---
## Project Overview
This project demonstrates an end-to-end workflow of:
- Downloading and preparing image data (from Kaggle).
- Building and training a CNN for binary classification.
- Evaluating performance with loss and accuracy metrics.
- Predicting and visualizing the classification of new images.
---
##Key Features
β
Download dataset automatically via Kaggle API
β
Preprocess and normalize images
β
Build a custom CNN with multiple convolutional and dense layers
β
Visualize training and validation metrics
β
Predict on custom test images
---
## Model Architecture
- **Input:** 256x256 RGB images
- **Layers:**
- 3 Γ Conv2D layers with ReLU activation
- MaxPooling and BatchNormalization after each Conv2D
- Flatten + Dense layers with Dropout regularization
- Sigmoid output for binary classification
- **Optimizer:** Adam
- **Loss Function:** Binary Crossentropy
- **Metrics:** Accuracy
---
## π οΈ Technologies Used
- Python 3
- TensorFlow
- Keras
- OpenCV
- Matplotlib
- Kaggle API
- Jupyter Notebook / Google Colab
## π Training & Evaluation
The model is trained over **5 epochs** on the Kaggle "Dogs vs Cats" dataset.
### Sample Training Results:
- **Training Accuracy:** ~85% (depending on epochs and dataset splits)
- **Validation Accuracy:** ~80%
### Loss and Accuracy Graphs:


## πΌοΈ Example Prediction
Test image loaded with OpenCV:

Model output: **Dog**