-
-
Notifications
You must be signed in to change notification settings - Fork 213
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
anwar
authored and
anwar
committed
Jan 8, 2024
1 parent
3f61a84
commit 496f7db
Showing
21 changed files
with
127 additions
and
0 deletions.
There are no files selected for viewing
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 @@ | ||
Dataset link: https://www.kaggle.com/datasets/jutrera/stanford-car-dataset-by-classes-folder |
Binary file added
BIN
+39.7 KB
Stanford Car Image Classification/Images/Accuracy of data augmented resnet34.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions
3
...d Car Image Classification/Images/Accuracy of data augmented resnet34.png:Zone.Identifier
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,3 @@ | ||
[ZoneTransfer] | ||
LastWriterPackageFamilyName=Microsoft.ScreenSketch_8wekyb3d8bbwe | ||
ZoneId=3 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions
3
Stanford Car Image Classification/Images/Accuracy of resnet34.png:Zone.Identifier
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,3 @@ | ||
[ZoneTransfer] | ||
LastWriterPackageFamilyName=Microsoft.ScreenSketch_8wekyb3d8bbwe | ||
ZoneId=3 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions
3
Stanford Car Image Classification/Images/cnn1 accuracy.png:Zone.Identifier
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,3 @@ | ||
[ZoneTransfer] | ||
LastWriterPackageFamilyName=Microsoft.ScreenSketch_8wekyb3d8bbwe | ||
ZoneId=3 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions
3
Stanford Car Image Classification/Images/cnn1 loss.png:Zone.Identifier
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,3 @@ | ||
[ZoneTransfer] | ||
LastWriterPackageFamilyName=Microsoft.ScreenSketch_8wekyb3d8bbwe | ||
ZoneId=3 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions
3
Stanford Car Image Classification/Images/cnn2 accuracy.png:Zone.Identifier
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,3 @@ | ||
[ZoneTransfer] | ||
LastWriterPackageFamilyName=Microsoft.ScreenSketch_8wekyb3d8bbwe | ||
ZoneId=3 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions
3
Stanford Car Image Classification/Images/cnn2 loss.png:Zone.Identifier
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,3 @@ | ||
[ZoneTransfer] | ||
LastWriterPackageFamilyName=Microsoft.ScreenSketch_8wekyb3d8bbwe | ||
ZoneId=3 |
Binary file added
BIN
+46.9 KB
Stanford Car Image Classification/Images/losses of data augmented resnet34.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions
3
...ord Car Image Classification/Images/losses of data augmented resnet34.png:Zone.Identifier
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,3 @@ | ||
[ZoneTransfer] | ||
LastWriterPackageFamilyName=Microsoft.ScreenSketch_8wekyb3d8bbwe | ||
ZoneId=3 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions
3
Stanford Car Image Classification/Images/losses of resnet34.png:Zone.Identifier
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,3 @@ | ||
[ZoneTransfer] | ||
LastWriterPackageFamilyName=Microsoft.ScreenSketch_8wekyb3d8bbwe | ||
ZoneId=3 |
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,91 @@ | ||
**Stanford Car Image Classification** | ||
|
||
**GOAL** | ||
|
||
This project aims at using the stanford cars data set to build a model that can recognize the type of the car given a picture of it. | ||
|
||
**DATASET** | ||
|
||
https://www.kaggle.com/datasets/jutrera/stanford-car-dataset-by-classes-folder | ||
|
||
**DESCRIPTION** | ||
|
||
The project starts with understanding the data and then proceeds to build and evaluate different image classification models. | ||
|
||
**WHAT I HAD DONE** | ||
|
||
- Importing neccesary libraries | ||
|
||
- Reading and understanding the data | ||
|
||
- Data transformations | ||
|
||
- Creating a validation set | ||
|
||
- Training a convolutional neural network model | ||
|
||
- Adding Addtional layers and Batch Normalization and Dropout layers to the CNN model | ||
|
||
- Fine-tuning resnet34 model | ||
|
||
- used data augmentation to imporove the accuracy of the pretrained model | ||
|
||
**MODELS USED** | ||
|
||
1. Convolutional Neural Network: The state-of-the-art model for image recognition tasks | ||
|
||
2. ResNet34: ResNet34 is favored for image classification due to its ability to train very deep networks effectively, mitigating vanishing gradient issues with skip connections, resulting in improved generalization, parameter efficiency, and state-of-the-art performance. | ||
|
||
|
||
**LIBRARIES NEEDED** | ||
|
||
- Pytorch | ||
|
||
- Matplotlib | ||
|
||
**VISUALIZATION** | ||
|
||
|
||
Accuracy of CNN model: | ||
<img src="../Images/cnn1 accuracy.png" alt="Accuracy of CNN model" style="width:100%"> | ||
|
||
Losses of CNN model: | ||
<img src="../Images/cnn2 loss.png" alt="Losses of CNN model" style="width:100%"> | ||
|
||
Accuracy of CNN model after adding more layers and batch normalization and dropout layers: | ||
<img src="../Images/cnn2 accuracy.png" alt="Accuracy of CNN model after adding more layers and batch normalization and dropout layers" style="width:100%"> | ||
|
||
Losses of CNN model after adding more layers and batch normalization and dropout layers: | ||
<img src="../Images/cnn2 loss.png" alt="Losses of CNN model after adding more layers and batch normalization and dropout layers" style="width:100%"> | ||
|
||
Accuracy of fine-tuned ResNet34 model: | ||
<img src="../Images/Accuracy of resnet34.png" alt="Accuracy of fine-tuned ResNet34 model" style="width:100%"> | ||
|
||
Losses of fine-tuned ResNet34 model: | ||
<img src="../Images/losses of resnet34.png" alt="Losses of fine-tuned ResNet34 model" style="width:100%"> | ||
|
||
Accuracy of fine-tuned ResNet34 model After data augmentation: | ||
<img src="../Images/Accuracy of data augmented resnet34.png" alt="Accuracy of fine-tuned ResNet34 model After data augmentation" style="width:100%"> | ||
|
||
Losses of fine-tuned ResNet34 model After data augmentation: | ||
<img src="../Images/losses of data augmented resnet34.png" alt="Losses of fine-tuned ResNet34 model After data augmentation" style="width:100%"> | ||
|
||
|
||
**ACCURACIES** | ||
|
||
1. CNN Model: 0.5% | ||
|
||
2. CNN model after adding more layers: 0.8% | ||
|
||
3. ResNet34: 35% | ||
|
||
4. ResNet34 after data augmentation: 69% | ||
|
||
**CONCLUSION** | ||
|
||
The data augmented ResNet34 is the best model for our project | ||
|
||
**Contribution by** | ||
|
||
[Ahmed Anwar](https://www.linkedin.com/in/ahmed-anwar-637ab3225/) |
3 changes: 3 additions & 0 deletions
3
...ar Image Classification/Model/stanford-car-image-classification (1).ipynb:Zone.Identifier
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,3 @@ | ||
[ZoneTransfer] | ||
ZoneId=3 | ||
HostUrl=https://www.kaggle.com/ |
1 change: 1 addition & 0 deletions
1
Stanford Car Image Classification/Model/stanford-car-image-classification.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
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,7 @@ | ||
- pytorch | ||
|
||
- torch vision | ||
|
||
- matplotlib | ||
|
||
- a GPU (CPU could be used but the code will take much longer to run) |