Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chocolate Classification using DL #572

Merged
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

Binary file not shown.
31 changes: 23 additions & 8 deletions Chocolate Classification using DL/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
### Chocolate Classification using DL

## 🎯 Goal
The objective is to categorize the chocolate depicted in the image as either **normal** chocolate or **white** chocolate.
The objective is to categorize the chocolate depicted in the image as either **dark** chocolate or **white** chocolate.

## 🧵 DATASET
Here is the link to the dataset utilized in this project👇:<br>
Expand All @@ -12,15 +12,16 @@ This project is designed to discern the subtle differences between white chocola

## 🧮 WHAT I HAD DONE
1. **Data collection:** Initially, data was collected from the provided dataset link to ensure a diverse range of samples for analysis.<br>
2. **Data preprocessing:** Images underwent preprocessing to standardize dimensions, ensuring uniformity across the dataset.<br>
3. **Model selection:** Traditional CNNs were combined with advanced architectures such as VGG16 and ResNet50 to capitalize on their effectiveness in image detection.<br>
2. **Data preprocessing:** Images underwent preprocessing to standardize dimensions, ensuring uniformity across the dataset. Labels were checked for appropriate extensions and then Label Encoded from categorical to numerical counterparts.<br>
3. **Model selection:** Traditional CNNs were combined with advanced architectures such as VGG16 and ResNet50 to capitalize on their effectiveness in image detection. CNN with Attention was also implemented by adding probability distribution into the training process.<br>
4. **Comparative analysis:** Models were evaluated based on accuracy scores, facilitating a nuanced understanding of their performance for informed decision-making.

## 🚀 **Models Implemented**
The following models have been incorporated in developing this project:
1. **CNN**<br>
2. **VGG16**<br>
3. **ResNet50**
3. **ResNet50**<br>
4. **CNN with Attention**

## 📚 LIBRARIES NEEDED
The following libraries are necessary to execute this project:
Expand All @@ -30,10 +31,19 @@ The following libraries are necessary to execute this project:
4. tensorflow==2.6.0

## 🖼️ VISUALIZATION

### CNN
<img src="https://github.com/abhisheks008/DL-Simplified/blob/main/Chocolate%20Classification%20using%20DL/Images/acc_cnn.jpg" alt="Image1" >
<img src="https://github.com/abhisheks008/DL-Simplified/blob/main/Chocolate%20Classification%20using%20DL/Images/acc_cnn.jpg" alt="Image2">

### RESNET50
<img src="https://github.com/abhisheks008/DL-Simplified/blob/main/Chocolate%20Classification%20using%20DL/Images/acc_resnet50.jpg" alt="Image2">

### VGG16
<img src="https://github.com/abhisheks008/DL-Simplified/blob/main/Chocolate%20Classification%20using%20DL/Images/acc_vgg16.jpg" alt="Image3" >

### CNN with Attention
<img src="" alt="Image4" >

## 📋 EVALUATION METRICS
The evaluation metrics that have been used to assess the models are:
- Accuracy<br>
Expand All @@ -46,9 +56,14 @@ Results on dataset is as follows:
| CNN | 0.861 | 0.218 |
| VGG16 | 0.722 | 1.341 |
| ResNet50 | 0.917 | 0.251 |

| CNN (Attention) | 0.97 | 0.388 |

## 📢CONCLUSION
1. The CNN model achieved the highest accuracy **(0.861**) and relatively low loss **(0.218)**, demonstrating *strong performance* in distinguishing between images of dark and white chocolate.
1. The CNN model achieved a higher accuracy **(0.861)** and relatively low loss **(0.218)**, demonstrating *strong performance* in distinguishing between images of dark and white chocolate.
2. VGG16 exhibited lower accuracy **(0.722)** compared to CNN, indicating it *might not* be the most suitable model for this particular chocolate detection task. Nonetheless, it still showed predictive capability.
3. ResNet50 demonstrated the highest accuracy **(0.917)** among the models, highlighting its *effectiveness* in differentiating between dark and white chocolate images. Furthermore, it displayed a low loss value **(0.251)**, indicating *robust convergence* during training.
3. ResNet50 demonstrated a higher accuracy **(0.917)** among the models, highlighting its *effectiveness* in differentiating between dark and white chocolate images. Furthermore, it displayed a low loss value **(0.251)**, indicating *robust convergence* during training.
4. The CNN model with Attention mechanism achieved the highest accuracy **(0.97)** and relatively low loss **(0.388)**, demonstrating *strong performance* and indicated *robust convergence* in distinguishing between images of dark and white chocolate.

## Your Signature
README enhanced by: Mahi Singh [https://github.com/mahi13singh2004]
Model and README enhanced by: Arihant Bhandari [https://github.com/Arihant-Bhandari]