Skip to content

This project showcases a cats vs dogs image classification model using image augmentation and Keras. It employs deep learning and convolutional neural networks (CNNs) to accurately classify images of cats and dogs.

Notifications You must be signed in to change notification settings

GvHemanth/CNN-Cats-vs-Dogs-Image-Augmentation-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Cats vs Dogs Classification using Image Augmentation and Keras

This project demonstrates the classification of images into two categories: cats and dogs, using image augmentation techniques and the Keras library. The goal is to build a convolutional neural network (CNN) model that can accurately classify images of cats and dogs.

Dataset

The dataset used for this project consists of a large number of labeled images of cats and dogs. The dataset is sourced from the Microsoft Cats vs Dogs dataset, which can be downloaded from here. After downloading and extracting the dataset, the images are organized into separate directories for cats and dogs.

Image Augmentation and Data Preparation

Image augmentation techniques are applied to the training dataset using the Keras ImageDataGenerator class. This helps to artificially expand the training dataset and improve the model's ability to generalize to new images. The augmented images are then split into training and validation sets using a specified split size.

Model Architecture

The model architecture used for this project is a CNN implemented in Keras. It consists of multiple convolutional layers with batch normalization, max pooling, and dropout layers to prevent overfitting. The model is compiled with the RMSprop optimizer and binary cross-entropy loss function.

Training and Evaluation

The model is trained on the augmented training dataset using the fit method in Keras. The training process is run for a specified number of epochs, and the training and validation accuracy and loss are recorded. The model's performance is evaluated on the validation dataset to assess its accuracy and generalization capability.

Results and Visualization

The training and validation accuracy and loss are plotted for each epoch to visualize the model's training progress. This helps to analyze the model's performance and identify overfitting or underfitting issues.

Prediction

Once the model is trained and evaluated, it can be used to make predictions on new images of cats or dogs. The predict.py script is provided, which takes the path to an image as input and outputs the predicted class label.

Conclusion

This project demonstrates the implementation of a cats vs dogs image classification model using image augmentation techniques and the Keras library. By leveraging image augmentation and a well-designed CNN architecture, the model achieves good accuracy in distinguishing between cats and dogs. Feel free to explore and modify the code to further enhance the model's performance or apply it to different image classification tasks.

About

This project showcases a cats vs dogs image classification model using image augmentation and Keras. It employs deep learning and convolutional neural networks (CNNs) to accurately classify images of cats and dogs.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published