-
-
Notifications
You must be signed in to change notification settings - Fork 359
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #882 from ojaswichopra/playing_cards
Playing cards Image Classification
- Loading branch information
Showing
13 changed files
with
2,359 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 @@ | ||
You can download the dataset from [Kaggle](https://www.kaggle.com/datasets/gpiosenka/cards-image-datasetclassification). |
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.8 KB
Playing Cards Image Classification/Images/AlexNet Confusion Matrix.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
+27 KB
Playing Cards Image Classification/Images/Distribution of Card Types.png
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
+36 KB
Playing Cards Image Classification/Images/Distribution of Dataset Splits.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2,288 changes: 2,288 additions & 0 deletions
2,288
Playing Cards Image Classification/Model/Playing-Cards-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,63 @@ | ||
## **Playing Cards Image Classification** | ||
|
||
### 🎯 **Goal** | ||
|
||
The main goal of this project is to classify different playing cards using deep learning models. This involves building and evaluating models to identify various card types from images with high accuracy. | ||
|
||
### 🧵 **Dataset** | ||
|
||
The dataset used for this project is sourced from [Kaggle](https://www.kaggle.com/datasets/gpiosenka/cards-image-datasetclassification). It consists of images of playing cards with labels corresponding to different card types. The dataset includes training, validation, and test splits. | ||
|
||
### 🧾 **Description** | ||
|
||
This project aims to implement and compare several deep learning models to classify playing cards. It involves preprocessing image data, applying data augmentation techniques, training models such as basic CNNs, AlexNet and EfficientNet and evaluating their performance using accuracy metrics. | ||
|
||
### 🧮 **What I have done!** | ||
|
||
- Preprocessed the image data by resizing and normalizing images. | ||
- Applied data augmentation techniques to enhance dataset diversity. | ||
- Implemented three models: | ||
- **Basic CNN**: A simple convolutional neural network with custom architecture. | ||
- **AlexNet**: A deep convolutional network known for its success in image classification tasks. | ||
- **EfficientNet**: A family of convolutional neural networks (CNNs) designed for image classification tasks. | ||
- Conducted exploratory data analysis (EDA) to understand the dataset's characteristics. | ||
- Evaluated model performance using accuracy scores. | ||
|
||
### 🚀 **Models Implemented** | ||
|
||
- **Basic CNN**: A custom convolutional neural network designed for image classification tasks. | ||
- **AlexNet**: A well-known deep learning model with a AlexNet architecture adapted for playing card classification. | ||
- **EfficientNetB0**: Base model of EfficientNet known for its efficiency in terms of both computational resources and accuracy. | ||
|
||
### 📚 **Libraries Needed** | ||
|
||
- numpy==1.21.2 | ||
- pandas==1.3.3 | ||
- tensorflow==2.7.0 | ||
- matplotlib==3.4.3 | ||
- seaborn==0.11.2 | ||
- scikit-learn==0.24.2 | ||
|
||
### 📊 **Exploratory Data Analysis Results** | ||
|
||
![Dataset Visualization](<../Images/Dataset Visualization.png>) | ||
![Distribution of Card Types](<../Images/Distribution of Card Types.png>) | ||
![Distribution of Dataset Splits](<../Images/Distribution of Dataset Splits.png>) | ||
![Distribution of Labels](<../Images/Distribution of Labels.png>) | ||
|
||
### 📈 **Performance of the Models based on Accuracy Scores** | ||
|
||
- **Basic CNN**: Accuracy - 74% | ||
- **AlexNet**: Accuracy - 71% | ||
- **EfficientNet**: Accuracy - 95% | ||
|
||
### 📢 **Conclusion** | ||
|
||
Based on the evaluation results, all of the models performed fairly well. Efficient net outperformed CNN and AlexNet with an accuracy of 95%. Further fine-tuning and experimentation with other models or techniques may provide additional insights. | ||
|
||
### ✒️ **Your Signature** | ||
|
||
Ojaswi Chopra | ||
--- | ||
|
||
Connect with me on [LinkedIn](https://www.linkedin.com/ojaswichopra) | [GitHub](https://github.com/ojaswichopra) |
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 @@ | ||
numpy==1.21.2 | ||
pandas==1.3.3 | ||
Pillow==8.4.0 | ||
scikit-learn==0.24.2 | ||
matplotlib==3.4.3 | ||
seaborn==0.11.2 | ||
tensorflow==2.7.0 |