https://github.com/yahiazakaria445/image-classification-using-vgg-16
computer vision model for 10 classes classification
https://github.com/yahiazakaria445/image-classification-using-vgg-16
matplotlib numpy opencv pandas sklearn tensorflow
Last synced: 3 months ago
JSON representation
computer vision model for 10 classes classification
- Host: GitHub
- URL: https://github.com/yahiazakaria445/image-classification-using-vgg-16
- Owner: yahiazakaria445
- Created: 2025-03-16T15:30:20.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-16T16:07:11.000Z (over 1 year ago)
- Last Synced: 2025-03-16T17:20:53.964Z (over 1 year ago)
- Topics: matplotlib, numpy, opencv, pandas, sklearn, tensorflow
- Language: Jupyter Notebook
- Homepage:
- Size: 5.21 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Overview
This project implements an image classification model using the VGG-16 architecture to classify images into 10 different animal categories.
The dataset can be downloaded from [kaggle](https://www.kaggle.com/datasets/alessiocorrado99/animals10)

# Libraries used
- Os
- Numpy
- Pandas
- Matplotlib
- Seaborn
- Cv2
- Datetime
- Tensorflow
- sklearn
# Data loading workflow
- A DataFrame consisting of two columns (filename, representing the image path, and class, representing the image label) was created, with each row corresponding to an image.
- The data was then split into training, validation, and test sets using the sklearn library with shuffling enabled.
- Each resulting DataFrame was passed to Keras’ ImageDataGenerator for reading images from disk in batches and applying real-time transformations.
# Model architecture
VGG-16 is a convolutional neural network that is 16 layers deep and a pretrained version of the network trained on more than a million images from the ImageNet database.

# Used Callbacks
1. **ModelCheckpoint** :
This function of keras callbacks is used to save the model after every epoch.
2. **EarlyStopping** :
This function of Keras callbacks is used to stop the model training in between, used to stop the model as soon as it gets overfitted.
3. **Learning Rate Reduction** :
This is a very simple function of callback that can be used to tweak the learning rate over a while, This gives us the desired output based on the respective epoch.
# Model explainability
1- __Saliency maps__ : is an image that highlights the region on which people's eyes focus first.

2- __Grad-CAM__ (Gradient-weighted Class Activation Mapping).

# Results
- __train loss and validation loss__

- __train and validation accuracy__

- __Classification Accuracy__

- __Confusion Matrix__

- __Classification report__
