-
-
Notifications
You must be signed in to change notification settings - Fork 355
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Image Classification using DL Methods Version 2
- Loading branch information
Showing
45 changed files
with
2,032 additions
and
0 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
...e Classification using DL Methods Version 2/Datasets/CIFAR-10 Dataset/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
## CIFAR-10 Dataset | ||
|
||
### Overview | ||
The CIFAR-10 dataset is a collection of images commonly used for training machine learning and computer vision algorithms. It consists of 60,000 32x32 color images in 10 different classes, with 6,000 images per class. The dataset is divided into 50,000 training images and 10,000 test images. | ||
|
||
### Classes | ||
The 10 classes in the CIFAR-10 dataset are: | ||
1. Airplane | ||
2. Automobile | ||
3. Bird | ||
4. Cat | ||
5. Deer | ||
6. Dog | ||
7. Frog | ||
8. Horse | ||
9. Ship | ||
10. Truck | ||
|
||
### Files | ||
- `data_batch_1.bin` to `data_batch_5.bin`: Training data batches. | ||
- `test_batch.bin`: Test data batch. | ||
- `batches.meta.txt`: Contains label names. | ||
|
||
### Download | ||
The CIFAR-10 dataset can be downloaded from the following URL: [CIFAR-10 Dataset](https://www.cs.toronto.edu/~kriz/cifar.html) | ||
|
||
### References | ||
- [CIFAR-10 Dataset Page](https://www.cs.toronto.edu/~kriz/cifar.html) | ||
- Krizhevsky, A., & Hinton, G. (2009). Learning multiple layers of features from tiny images. |
17 changes: 17 additions & 0 deletions
17
Image Classification using DL Methods Version 2/Datasets/MNIST_Dataset/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
## MNIST Dataset | ||
|
||
### Overview | ||
The MNIST dataset is a large collection of handwritten digits commonly used for training various image processing systems. It contains 70,000 grayscale images of handwritten digits, each 28x28 pixels in size, divided into a training set of 60,000 images and a test set of 10,000 images. | ||
|
||
### Files | ||
- `train-images-idx3-ubyte.gz`: Training set images. | ||
- `train-labels-idx1-ubyte.gz`: Training set labels. | ||
- `t10k-images-idx3-ubyte.gz`: Test set images. | ||
- `t10k-labels-idx1-ubyte.gz`: Test set labels. | ||
|
||
### Download | ||
The MNIST dataset can be downloaded from the following URL: [MNIST Dataset](http://yann.lecun.com/exdb/mnist/) | ||
|
||
### References | ||
- [MNIST Dataset Page](http://yann.lecun.com/exdb/mnist/) | ||
- LeCun, Y., Bottou, L., Bengio, Y., & Haffner, P. (1998). Gradient-based learning applied to document recognition. Proceedings of the IEEE. |
Binary file added
BIN
+44.6 KB
...s Version 2/Images/EDA/CIFAR-10/Box Plots of Pixel Intensities for CIFAR-10.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+67.9 KB
...sing DL Methods Version 2/Images/EDA/CIFAR-10/Class Comparison for CIFAR-10.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+24.4 KB
...using DL Methods Version 2/Images/EDA/CIFAR-10/Class Histogram for CIFAR-10.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+34 KB
...L Methods Version 2/Images/EDA/CIFAR-10/PCA Visualization for CIFAR-10 (2D).JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+40.2 KB
...ing DL Methods Version 2/Images/EDA/CIFAR-10/PCA Visualization for CIFAR-10.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+41.5 KB
...s Version 2/Images/EDA/CIFAR-10/Scatter plot of PCA Components for CIFAR-10.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+30.4 KB
... Methods Version 2/Images/EDA/CIFAR-10/UMAP Visualization for CIFAR-10 (2D).JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+30.1 KB
... 2/Images/EDA/CIFAR-10/UMAP Visualization for CIFAR-10 (Components 0, 2, 1).JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+29.7 KB
... 2/Images/EDA/CIFAR-10/UMAP Visualization for CIFAR-10 (Components 1, 2, 0).JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+32.4 KB
...ng DL Methods Version 2/Images/EDA/CIFAR-10/UMAP Visualization for CIFAR-10.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+53.5 KB
...ersion 2/Images/EDA/CIFAR-10/Violin Plots of Pixel Intensities for CIFAR-10.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+40.9 KB
...Methods Version 2/Images/EDA/MNIST/Box Plots of Pixel Intensities for MNIST.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+60.7 KB
...tion using DL Methods Version 2/Images/EDA/MNIST/Class Comparison for MNIST.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+24.4 KB
...ation using DL Methods Version 2/Images/EDA/MNIST/Class Histogram for MNIST.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+35.7 KB
...sing DL Methods Version 2/Images/EDA/MNIST/PCA Visualization for MNIST (2D).JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+34.9 KB
...ion using DL Methods Version 2/Images/EDA/MNIST/PCA Visualization for MNIST.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+42.8 KB
...Methods Version 2/Images/EDA/MNIST/Scatter plot of PCA Components for MNIST.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+23.9 KB
...ing DL Methods Version 2/Images/EDA/MNIST/UMAP Visualization for MNIST (2D).JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+34.9 KB
...on using DL Methods Version 2/Images/EDA/MNIST/UMAP Visualization for MNIST.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+49.6 KB
...hods Version 2/Images/EDA/MNIST/Violin Plots of Pixel Intensities for MNIST.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+46 KB
...assification using DL Methods Version 2/Images/Models/CIFAR-10/LeNet5_Model.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+45.4 KB
...ification using DL Methods Version 2/Images/Models/CIFAR-10/MobileNet_Model.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+46.8 KB
...sification using DL Methods Version 2/Images/Models/CIFAR-10/ResNet50_Model.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+42.9 KB
...fication using DL Methods Version 2/Images/Models/CIFAR-10/Simple_CNN_Model.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+44 KB
...lassification using DL Methods Version 2/Images/Models/CIFAR-10/VGG16_Model.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+42.7 KB
... Classification using DL Methods Version 2/Images/Models/MNIST/LeNet5_Model.jpg
Oops, something went wrong.
Binary file added
BIN
+44.5 KB
...assification using DL Methods Version 2/Images/Models/MNIST/MobileNet_Model.jpg
Oops, something went wrong.
Binary file added
BIN
+52.6 KB
...lassification using DL Methods Version 2/Images/Models/MNIST/ResNet50_Model.jpg
Oops, something went wrong.
Binary file added
BIN
+40.7 KB
...ssification using DL Methods Version 2/Images/Models/MNIST/Simple_CNN_Model.jpg
Oops, something went wrong.
Binary file added
BIN
+44.5 KB
...e Classification using DL Methods Version 2/Images/Models/MNIST/VGG16_Model.jpg
Oops, something went wrong.
674 changes: 674 additions & 0 deletions
674
Image Classification using DL Methods Version 2/Models/EDA.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
Image Classification using DL Methods Version 2/Models/LeNet5_Model/LeNet5_Model.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
138 changes: 138 additions & 0 deletions
138
Image Classification using DL Methods Version 2/Models/LeNet5_Model/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
# 🖼️ LeNet-5 Model for Image Classification | ||
|
||
## 📝 Overview | ||
This project implements a LeNet-5 Convolutional Neural Network (CNN) for image classification using the CIFAR-10 and MNIST datasets. The notebook `LeNet5_model.ipynb` contains the entire workflow from data loading and preprocessing to model training, evaluation, and visualization. | ||
|
||
## ⚙️ Installation | ||
To run this project, you'll need to install the required libraries. You can do this by running: | ||
|
||
```bash | ||
pip install -r requirements.txt | ||
``` | ||
|
||
## 🚀 Usage | ||
|
||
1. **Clone the repository**: | ||
```bash | ||
git clone https://github.com/UTSAVS26/Image-Classification-using-Convolutional-Neural-Networks.git | ||
cd Image-Classification-using-Convolutional-Neural-Networks/Models/LeNet5_Model/ | ||
``` | ||
|
||
2. **Install the required packages**: | ||
```bash | ||
pip install -r requirements.txt | ||
``` | ||
|
||
3. **Run the Jupyter Notebook**: | ||
```bash | ||
jupyter notebook LeNet5_model.ipynb | ||
``` | ||
|
||
## 📦 Dataset | ||
|
||
### CIFAR-10 | ||
- **Description**: The CIFAR-10 dataset consists of 60,000 32x32 color images in 10 different classes. | ||
- **Classes**: 🛩️ Airplane, 🚗 Automobile, 🐦 Bird, 🐱 Cat, 🦌 Deer, 🐶 Dog, 🐸 Frog, 🐴 Horse, 🚢 Ship, 🚚 Truck. | ||
|
||
### MNIST | ||
- **Description**: The MNIST dataset consists of 70,000 28x28 grayscale images of handwritten digits. | ||
- **Classes**: Digits 0 through 9. | ||
|
||
## 🏗️ Model Architecture | ||
|
||
The LeNet-5 model for CIFAR-10 and MNIST has the following architecture: | ||
|
||
```python | ||
def create_lenet5(input_shape, num_classes): | ||
model = tf.keras.Sequential([ | ||
Conv2D(6, kernel_size=(5, 5), activation='relu', input_shape=input_shape), | ||
MaxPooling2D(pool_size=(2, 2)), | ||
Conv2D(16, kernel_size=(5, 5), activation='relu'), | ||
MaxPooling2D(pool_size=(2, 2)), | ||
Flatten(), | ||
Dense(120, activation='relu'), | ||
Dense(84, activation='relu'), | ||
Dense(num_classes, activation='softmax') | ||
]) | ||
model.compile(optimizer='adam', loss='categorical_crossentropy', metrics=['accuracy']) | ||
return model | ||
``` | ||
|
||
## 📝 Steps | ||
|
||
### 1. Data Loading and Preprocessing | ||
- Load the CIFAR-10 and MNIST datasets. | ||
- Normalize the pixel values to the range [0, 1]. | ||
- Convert class labels to categorical format. | ||
|
||
### 2. Model Training | ||
- Train the LeNet-5 model on both CIFAR-10 and MNIST datasets. | ||
- Record the training and validation accuracy and loss over epochs. | ||
|
||
### 3. Model Evaluation | ||
- Evaluate the trained model on the test data. | ||
- Calculate accuracy and precision. | ||
- Generate a detailed classification report. | ||
|
||
### 4. Visualization | ||
- Plot training and validation accuracy and loss for each epoch. | ||
- Display class distribution and exploratory data analysis (EDA) plots. | ||
|
||
## 📊 Results | ||
|
||
### CIFAR-10 | ||
- **Accuracy**: Achieved accuracy on the CIFAR-10 test set - `0.5802000000` | ||
- **Precision**: Achieved precision on the CIFAR-10 test set - `0.5827235484` | ||
- **Classification Report**: Detailed classification report for CIFAR-10. | ||
|
||
| Class | Precision | Recall | F1-Score | Support | | ||
|-------------|-----------|--------|----------|---------| | ||
| Airplane | 0.71 | 0.58 | 0.64 | 1000 | | ||
| Automobile | 0.57 | 0.83 | 0.68 | 1000 | | ||
| Bird | 0.51 | 0.41 | 0.45 | 1000 | | ||
| Cat | 0.49 | 0.25 | 0.34 | 1000 | | ||
| Deer | 0.65 | 0.37 | 0.48 | 1000 | | ||
| Dog | 0.50 | 0.51 | 0.51 | 1000 | | ||
| Frog | 0.55 | 0.76 | 0.64 | 1000 | | ||
| Horse | 0.57 | 0.73 | 0.64 | 1000 | | ||
| Ship | 0.72 | 0.70 | 0.71 | 1000 | | ||
| Truck | 0.55 | 0.65 | 0.60 | 1000 | | ||
| **Accuracy**| | | 0.58 | 10000 | | ||
| **Macro Avg** | 0.58 | 0.58 | 0.57 | 10000 | | ||
| **Weighted Avg** | 0.58 | 0.58 | 0.57 | 10000 | | ||
|
||
### MNIST | ||
- **Accuracy**: Achieved accuracy on the MNIST test set - `0.9862000000` | ||
- **Precision**: Achieved precision on the MNIST test set - `0.9862803962` | ||
- **Classification Report**: Detailed classification report for MNIST. | ||
|
||
| Class | Precision | Recall | F1-Score | Support | | ||
|-------|-----------|--------|----------|---------| | ||
| 0 | 0.99 | 0.99 | 0.99 | 980 | | ||
| 1 | 0.99 | 1.00 | 0.99 | 1135 | | ||
| 2 | 0.99 | 0.99 | 0.99 | 1032 | | ||
| 3 | 0.97 | 0.99 | 0.98 | 1010 | | ||
| 4 | 0.99 | 0.99 | 0.99 | 982 | | ||
| 5 | 0.97 | 0.99 | 0.98 | 892 | | ||
| 6 | 0.99 | 0.99 | 0.99 | 958 | | ||
| 7 | 0.99 | 0.98 | 0.98 | 1028 | | ||
| 8 | 1.00 | 0.97 | 0.98 | 974 | | ||
| 9 | 0.99 | 0.97 | 0.98 | 1009 | | ||
| **Accuracy** | | | 0.99 | 10000 | | ||
| **Macro Avg** | 0.99 | 0.99 | 0.99 | 10000 | | ||
| **Weighted Avg** | 0.99 | 0.99 | 0.99 | 10000 | | ||
|
||
## 📈 Visualizations | ||
|
||
### CIFAR-10 | ||
- **Training and Validation Accuracy**: Line plot of training and validation accuracy per epoch. | ||
- **Training and Validation Loss**: Line plot of training and validation loss per epoch. | ||
- ![image](https://github.com/UTSAVS26/Image-Classification-using-Convolutional-Neural-Networks/assets/119779889/0850e3db-cfe2-43ea-9fa2-fbdee733e612) | ||
|
||
### MNIST | ||
- **Training and Validation Accuracy**: Line plot of training and validation accuracy per epoch. | ||
- **Training and Validation Loss**: Line plot of training and validation loss per epoch. | ||
![image](https://github.com/UTSAVS26/Image-Classification-using-Convolutional-Neural-Networks/assets/119779889/cb3c8a92-f909-4cdc-8209-280dca76a7de) | ||
|
||
## 🎉 Conclusion | ||
This notebook demonstrates the implementation of a LeNet-5 model for image classification on the CIFAR-10 and MNIST datasets. The models achieve high accuracy and precision, indicating the effectiveness of LeNet-5 for image classification tasks. |
1 change: 1 addition & 0 deletions
1
Image Classification using DL Methods Version 2/Models/MobileNet_Model/MobileNet_Model.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
150 changes: 150 additions & 0 deletions
150
Image Classification using DL Methods Version 2/Models/MobileNet_Model/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
# 📱 MobileNet Model for Image Classification | ||
|
||
## 📝 Overview | ||
This project implements a MobileNet Convolutional Neural Network (CNN) for image classification using the CIFAR-10 and MNIST datasets. The notebook `MobileNet_model.ipynb` contains the entire workflow from data loading and preprocessing to model training, evaluation, and visualization. | ||
|
||
## ⚙️ Installation | ||
To run this project, you'll need to install the required libraries. You can do this by running: | ||
|
||
```bash | ||
pip install -r requirements.txt | ||
``` | ||
|
||
## 🚀 Usage | ||
|
||
1. **Clone the repository**: | ||
```bash | ||
git clone https://github.com/UTSAVS26/Image-Classification-using-Convolutional-Neural-Networks.git | ||
cd Image-Classification-using-Convolutional-Neural-Networks/Models/MobileNet_Model/ | ||
``` | ||
|
||
2. **Install the required packages**: | ||
```bash | ||
pip install -r requirements.txt | ||
``` | ||
|
||
3. **Run the Jupyter Notebook**: | ||
```bash | ||
jupyter notebook MobileNet_model.ipynb | ||
``` | ||
|
||
## 📦 Dataset | ||
|
||
### CIFAR-10 | ||
- **Description**: The CIFAR-10 dataset consists of 60,000 32x32 color images in 10 different classes. | ||
- **Classes**: 🛩️ Airplane, 🚗 Automobile, 🐦 Bird, 🐱 Cat, 🦌 Deer, 🐶 Dog, 🐸 Frog, 🐴 Horse, 🚢 Ship, 🚚 Truck. | ||
|
||
### MNIST | ||
- **Description**: The MNIST dataset consists of 70,000 28x28 grayscale images of handwritten digits. | ||
- **Classes**: Digits 0 through 9. | ||
|
||
## 🏗️ Model Architecture | ||
|
||
The MobileNet model for CIFAR-10 has the following architecture: | ||
```python | ||
def create_mobilenet_cifar10(input_shape, num_classes): | ||
base_model = tf.keras.applications.MobileNet(weights=None, include_top=False, input_shape=input_shape) | ||
x = base_model.output | ||
x = GlobalAveragePooling2D()(x) | ||
x = Dense(1024, activation='relu')(x) | ||
x = Dropout(0.5)(x) | ||
predictions = Dense(num_classes, activation='softmax')(x) | ||
model = Model(inputs=base_model.input, outputs=predictions) | ||
model.compile(optimizer='adam', loss='categorical_crossentropy', metrics=['accuracy']) | ||
return model | ||
``` | ||
|
||
The MobileNet model for MNIST has the following architecture: | ||
```python | ||
def create_mobilenet_mnist(input_shape, num_classes): | ||
base_model = tf.keras.applications.MobileNet(weights=None, include_top=False, input_shape=input_shape) | ||
x = base_model.output | ||
x = GlobalAveragePooling2D()(x) | ||
x = Dense(1024, activation='relu')(x) | ||
x = Dropout(0.5)(x) | ||
predictions = Dense(num_classes, activation='softmax')(x) | ||
model = Model(inputs=base_model.input, outputs=predictions) | ||
model.compile(optimizer='adam', loss='categorical_crossentropy', metrics=['accuracy']) | ||
return model | ||
``` | ||
|
||
## 📝 Steps | ||
|
||
### 1. Data Loading and Preprocessing | ||
- Load the CIFAR-10 and MNIST datasets. | ||
- Normalize the pixel values to the range [0, 1]. | ||
- Convert class labels to categorical format. | ||
|
||
### 2. Model Training | ||
- Train the MobileNet model on both CIFAR-10 and MNIST datasets. | ||
- Record the training and validation accuracy and loss over epochs. | ||
|
||
### 3. Model Evaluation | ||
- Evaluate the trained model on the test data. | ||
- Calculate accuracy and precision. | ||
- Generate a detailed classification report. | ||
|
||
### 4. Visualization | ||
- Plot training and validation accuracy and loss for each epoch. | ||
- Display class distribution and exploratory data analysis (EDA) plots. | ||
|
||
## 📊 Results | ||
|
||
### CIFAR-10 | ||
- **Accuracy**: Achieved accuracy on the CIFAR-10 test set - `0.5521000000` | ||
- **Precision**: Achieved precision on the CIFAR-10 test set - `0.5592675699` | ||
- **Classification Report**: Detailed classification report for CIFAR-10. | ||
|
||
| Class | Precision | Recall | F1-Score | Support | | ||
|-------------|-----------|--------|----------|---------| | ||
| Airplane | 0.57 | 0.63 | 0.60 | 1000 | | ||
| Automobile | 0.78 | 0.56 | 0.65 | 1000 | | ||
| Bird | 0.47 | 0.33 | 0.39 | 1000 | | ||
| Cat | 0.33 | 0.11 | 0.17 | 1000 | | ||
| Deer | 0.48 | 0.46 | 0.47 | 1000 | | ||
| Dog | 0.39 | 0.70 | 0.50 | 1000 | | ||
| Frog | 0.72 | 0.59 | 0.65 | 1000 | | ||
| Horse | 0.51 | 0.72 | 0.60 | 1000 | | ||
| Ship | 0.73 | 0.68 | 0.71 | 1000 | | ||
| Truck | 0.61 | 0.72 | 0.66 | 1000 | | ||
| **Accuracy**| | | 0.55 | 10000 | | ||
| **Macro Avg** | 0.56 | 0.55 | 0.54 | 10000 | | ||
| **Weighted Avg** | 0.56 | 0.55 | 0.54 | 10000 | | ||
|
||
### MNIST | ||
- **Accuracy**: Achieved accuracy on the MNIST test set - `0.9843000000` | ||
- **Precision**: Achieved precision on the MNIST test set - `0.9844091197` | ||
- **Classification Report**: Detailed classification report for MNIST. | ||
|
||
| Class | Precision | Recall | F1-Score | Support | | ||
|-------|-----------|--------|----------|---------| | ||
| 0 | 0.98 | 1.00 | 0.99 | 980 | | ||
| 1 | 1.00 | 0.99 | 1.00 | 1135 | | ||
| 2 | 0.97 | 1.00 | 0.99 | 1032 | | ||
| 3 | 0.98 | 1.00 | 0.99 | 1010 | | ||
| 4 | 1.00 | 0.98 | 0.99 | 982 | | ||
| 5 | 0.98 | 0.99 | 0.98 | 892 | | ||
| 6 | 0.99 | 0.98 | 0.99 | 958 | | ||
| 7 | 0.98 | 0.98 | 0.98 | 1028 | | ||
| 8 | 0.98 | 0.97 | 0.97 | 974 | | ||
| 9 | 0.99 | 0.96 | 0.97 | 1009 | | ||
| **Accuracy** | | | 0.98 | 10000 | | ||
| **Macro Avg** | 0.98 | 0.98 | 0.98 | 10000 | | ||
| **Weighted Avg** | 0.98 | 0.98 | 0.98 | 10000 | | ||
|
||
## 📈 Visualizations | ||
|
||
### CIFAR-10 | ||
- **Training and Validation Accuracy**: Line plot of training and validation accuracy per epoch. | ||
- **Training and Validation Loss**: Line plot of training and validation loss per epoch. | ||
![image](https://github.com/UTSAVS26/Image-Classification-using-Convolutional-Neural-Networks/assets/119779889/94c43184-43ee-4c05-b99e-6809103857ec) | ||
|
||
|
||
### MNIST | ||
- **Training and Validation Accuracy**: Line plot of training and validation accuracy per epoch. | ||
- **Training and Validation Loss**: Line plot of training and validation loss per epoch. | ||
![image](https://github.com/UTSAVS26/Image-Classification-using-Convolutional-Neural-Networks/assets/119779889/6655a5d9-313e-4bab-a624-0ed1ca07a001) | ||
|
||
|
||
## 🎉 Conclusion | ||
This notebook demonstrates the implementation of a MobileNet model for image classification on the CIFAR-10 and MNIST datasets. The models achieve good accuracy and precision, showcasing the effectiveness of deep learning architectures like MobileNet for image classification tasks. |
Oops, something went wrong.