|
| 1 | + |
| 2 | +<!-- PROJECT --> |
| 3 | +# Image Classification with Transfer Learning |
| 4 | + |
| 5 | +<!-- ABOUT THE PROJECT --> |
| 6 | + |
| 7 | +## About The Project |
| 8 | +This repository, "ImgClassTF" focuses on exploring the effectiveness of transfer learning in image classification tasks. By leveraging pre-trained models, specifically VGG networks, the goal was to utilize pretrained ConvNet models using transfer learning, which significantly improved the classification accuracy with minimal computational resources compared to training models from scratch. Though the accuracy achieved was 53.09% |
| 9 | + |
| 10 | +In my study, I used the VGG model with pretrained weights on [IMAGENET](https://www.image-net.org) and used a modified version of it to train on [CINIC-10](https://arxiv.org/abs/1810.03505). I experimented with various configurations of the VGG model to classify images across multiple categories. The findings, detailed in my research [paper]() and [code](), highlight the power of transfer learning in achieving high accuracy rates in image classification tasks. |
| 11 | + |
| 12 | + Below are some of the results from the paper. |
| 13 | +<p align="center"> |
| 14 | + <img src="RP_Docs/model_4_combined_training_curves.png" alt="Training curves" width="80%" /> |
| 15 | +</p> |
| 16 | + |
| 17 | +<!-- OVERVIEW --> |
| 18 | +## Overview |
| 19 | +<br> Transfer Learning Efficiency: Utilizing VGG pre-trained models allows for considerable improvements in accuracy. |
| 20 | +<br> Model Comparison: Analysis of different VGG configurations to determine the most effective setup for our classification task. |
| 21 | +<br> Performance Metrics: Evaluation of models based on accuracy, precision, and recall metrics. |
| 22 | + |
| 23 | +<!-- FLOWCHART --> |
| 24 | +## General Flowchart for the project |
| 25 | +<p align="center"> |
| 26 | + <img src="RP_Docs/CNN.png" width="400"> |
| 27 | +</p> |
| 28 | + |
| 29 | +<!-- REIMPLEMENTATION --> |
| 30 | +## Implementing |
| 31 | +The project is implemented using a jupyter notebook, so its fairly straightforward to download it directly to retest. [Notebook]() |
| 32 | +I used 4 versions of the models |
| 33 | +1. VGG16 model with untrainable Convolutional layers and replacing the classifier with a flatten layer, dense layer with Relu activation and output layer with Softmax activation function |
| 34 | +<img src="RP_Docs/m1.png" width="400"> |
| 35 | + |
| 36 | +2. The configuration is the same as model 1, in addition to that we introduce data augmentation for training the model |
| 37 | +<img src="RP_Docs/m2.png" width="400"> |
| 38 | + |
| 39 | +3. The configuration is the same as model 1, in addition to that we introduce data augmentation for training and regularization methods such as Batch Normalization and Dropout Layer |
| 40 | +<img src="RP_Docs/m3.png" width="400"> |
| 41 | + |
| 42 | +4. VGG16 model with fully trainable weights and replacing the classifier with a flatten layer, dense layer with Relu activation and output layer with Softmax activation function. |
| 43 | +<img src="RP_Docs/m4.png" width="400"> |
| 44 | + |
| 45 | + |
| 46 | +<!-- Dependencies --> |
| 47 | +## Dependencies |
| 48 | + |
| 49 | +The code utilizes the python packages as such |
| 50 | +* matplotlib, |
| 51 | +* VisualKeras, |
| 52 | +* pickle, |
| 53 | +* numpy, |
| 54 | +* scikit-learn, |
| 55 | +* Tensorflow. |
| 56 | + |
| 57 | +<!-- LICENSE --> |
| 58 | +## License |
| 59 | +Distributed under the MIT License. See `LICENSE` for more information. |
| 60 | + |
| 61 | +<!-- Authors --> |
| 62 | +## Authors |
| 63 | +Project Link:[Project]() |
| 64 | +<br>~~Kaggle Notebook:[]()~~ |
| 65 | +<br>~~Collab Notebook:[]()~~ |
| 66 | + |
| 67 | +## Thank you |
| 68 | + |
| 69 | +<picture> |
| 70 | + <source media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/25423296/163456776-7f95b81a-f1ed-45f7-b7ab-8fa810d529fa.png"> |
| 71 | + <source media="(prefers-color-scheme: light)" srcset="https://user-images.githubusercontent.com/25423296/163456779-a8556205-d0a5-45e2-ac17-42d089e3c3f8.png"> |
| 72 | + <img alt="Shows an illustrated sun in light mode and a moon with stars in dark mode." src="https://user-images.githubusercontent.com/25423296/163456779-a8556205-d0a5-45e2-ac17-42d089e3c3f8.png"> |
| 73 | +</picture> |
| 74 | + |
| 75 | +> [!NOTE] |
| 76 | +> This is part of the Assignment of COMP SCI 7318 - Deep Learning Fundamentals, University of adelaide, ~~which had the worst Teaching assistants imo :vomiting_face:~~. |
| 77 | +> I did not conduct hyperparameter tuning of the model, which is an essential step for achieving good accuracy. |
0 commit comments