Skip to content

Commit

Permalink
Merge pull request #882 from ojaswichopra/playing_cards
Browse files Browse the repository at this point in the history
Playing cards Image Classification
  • Loading branch information
abhisheks008 authored Aug 3, 2024
2 parents 9708031 + 617a135 commit 5280ad4
Show file tree
Hide file tree
Showing 13 changed files with 2,359 additions and 0 deletions.
1 change: 1 addition & 0 deletions Playing Cards Image Classification/Dataset/README.md
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.
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.
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.

Large diffs are not rendered by default.

63 changes: 63 additions & 0 deletions Playing Cards Image Classification/Model/README.md
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)
7 changes: 7 additions & 0 deletions Playing Cards Image Classification/Model/requirements.txt
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

0 comments on commit 5280ad4

Please sign in to comment.