-
Notifications
You must be signed in to change notification settings - Fork 209
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
Showing
37 changed files
with
15,339 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
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 : https://www.kaggle.com/datasets/shiekhburhan/face-mask-dataset |
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.
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 @@ | ||
images |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,37 @@ | ||
# Face mask detection using ConvNet, InceptionV3, MobileNet, DenseNet and VGG19 | ||
|
||
COVID-19 has been an inspiration for many software and data engineers during the last months. | ||
This project demonstrates how a Depp learming models can detect if a person in a picture is wearing a face mask or not. | ||
As you can easily understand the applications of this method may be very helpful for the prevention and the control of COVID-19 as it could be used in public places like airports, shopping malls etc. | ||
|
||
## Defining the problem | ||
Detecting if an image contains a person wearing a mask or not is a simple **classification problem**. | ||
We have to classify the images between **2 discrete classes**: The ones that contain a face mask and the ones that do not. | ||
|
||
## The dataset | ||
https://www.kaggle.com/datasets/shiekhburhan/face-mask-dataset | ||
|
||
![image](https://github.com/ranodeepbanerjee/DL-Simplified/assets/63450189/c0322919-0452-412a-9216-fbc75de3c17a) | ||
|
||
|
||
|
||
## Models used | ||
|
||
* Covnet - ConvNet, short for Convolutional Neural Network, is a type of deep learning model commonly used in image classification and object recognition tasks. It consists of multiple layers of convolutional and pooling operations that extract features from the input image. | ||
|
||
* InceptionV3 - InceptionV3 is an advanced version of the Inception architecture, which is designed to improve the accuracy and efficiency of image classification models. It uses a combination of convolutions with different kernel sizes and pooling operations to capture multi-scale features. | ||
|
||
* MobileNet - MobileNet is a lightweight neural network designed for mobile and embedded devices with limited computational resources. It uses depthwise separable convolutions to significantly reduce the number of parameters and computation required while maintaining high accuracy. | ||
|
||
* DenseNet - DenseNet is a densely connected neural network that allows each layer to have direct access to the feature maps of all preceding layers. This results in better feature reuse and gradient flow, leading to improved accuracy and reduced overfitting. | ||
|
||
* VGG19 - VGG19 is a deep neural network with 19 layers specifically designed for image recognition tasks. It uses small convolutional filters with a fixed size of 3x3 across all layers and max-pooling operations to extract and learn hierarchical features from images. | ||
|
||
## Distribution of classes | ||
|
||
![image](https://github.com/ranodeepbanerjee/DL-Simplified/assets/63450189/4392ebd7-5aa2-4fd3-88e3-d90c17dfee14) | ||
|
||
|
||
## Evaluation | ||
|
||
![image](https://github.com/ranodeepbanerjee/DL-Simplified/assets/63450189/eef19273-71e7-4284-8156-3db09f7051c1) |
1,043 changes: 1,043 additions & 0 deletions
1,043
Deep_Learning/Face Mask Detection/Model/detecting-face-masks-with-5-models.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,8 @@ | ||
torch==1.9.0 | ||
numpy==1.19.5 | ||
pandas==1.3.0 | ||
opencv-python-headless==4.5.3.56 | ||
seaborn==0.11.1 | ||
matplotlib==3.4.2 | ||
keras==2.6.0 | ||
tensorflow==2.6.0 |
51 changes: 51 additions & 0 deletions
51
Deep_Learning/MNIST Digit Classification using Neural Networks/README.md
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,51 @@ | ||
# MNIST Digit Classification using Neural Networks | ||
|
||
# GOAL | ||
This project aims to create neural networks to successfully classify images provided by the MNIST dataset into 10 predefined classes. | ||
|
||
# DATASET | ||
https://www.kaggle.com/c/digit-recognizer | ||
|
||
# DESCRIPTION | ||
|
||
The project focuses on leveraging neural networks to achieve accurate image classification using the MNIST dataset. The dataset comprises handwritten digits, and the objective is to develop a robust model capable of categorizing these digits into ten predefined classes. By harnessing advanced deep learning techniques, the neural networks will learn intricate patterns and features within the images, facilitating precise classification. This endeavor not only emphasizes the application of cutting-edge technology but also contributes to the broader field of machine learning, with potential implications for diverse domains, including pattern recognition, digitization, and artificial intelligence. | ||
|
||
# WHAT I HAD DONE | ||
|
||
I have created 2 different nueral network models to correctly classify digits into 10 classes. One model is built using artificial neural networks and the other is built using convolutional neural networks. In both the models EDA has been done along with hyperparameter tuning to achieve high accuracy | ||
|
||
# MODELS USED | ||
|
||
<ul> | ||
<li>Artificial neural networks</li> | ||
<li>Convolutional neural networks</li> | ||
</ul> | ||
Neural networks have been used to solve the problem at hand as they tend to perform better than regular machine learning algorithms as they can capture more information and non-linear features. Convolutional neural network is a special type of neural network that is made to perfrom better on images and videos | ||
|
||
# LIBRARIES NEEDED | ||
|
||
<ul> | ||
<li>tensorflow </li> | ||
<li>matplotlib</li> | ||
<li>seaborn</li> | ||
<li>numpy</li> | ||
<li>pandas</li> | ||
<li>keras</li> | ||
</ul> | ||
|
||
# VISUALIZATION | ||
![bar graph to visualize class imbalance](<bar graph.png>) | ||
![pie chart to visualize class imbalance](<pie chart.png>) | ||
![histogram plot to visualize frequency distribution in each class](histogram.png) | ||
![input visualization](<input visualisation.png>) | ||
|
||
# ACCURACIES | ||
|
||
<ul> | ||
<li>Artifical Neural Network - Accuracy: 97.7699%</li> | ||
<li>Convolutional Neural Network - Accuracy: 99.1199%</li> | ||
</ul> | ||
|
||
# CONCLUSION | ||
|
||
Convolutional Neural Networks (CNNs) demonstrate superiority over traditional Artificial Neural Networks (ANNs) in image-related tasks due to their specialized architecture. CNNs excel in capturing spatial hierarchies and local patterns within images through convolutional layers, which employ filters to detect features like edges and textures. This enables CNNs to preserve spatial relationships, making them highly effective for tasks like image classification and object recognition. In contrast, ANNs lack the inherent capacity to recognize spatial patterns efficiently, making them less adept at handling image data. The hierarchical and localized learning of CNNs makes them particularly well-suited for computer vision applications, outperforming ANNs in tasks that demand nuanced understanding of visual content. It is clearly observable from the scores that CNNs perform better than ANNs. |
Binary file added
BIN
+38.6 KB
Deep_Learning/MNIST Digit Classification using Neural Networks/bar graph.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
Deep_Learning/MNIST Digit Classification using Neural Networks/dataset/readme.md
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 @@ | ||
<!-- Link to the dataset --> | ||
|
||
https://www.kaggle.com/c/digit-recognizer |
Binary file added
BIN
+62.3 KB
Deep_Learning/MNIST Digit Classification using Neural Networks/histogram.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
+38.6 KB
..._Learning/MNIST Digit Classification using Neural Networks/images/bar graph.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
+93 KB
...ng/MNIST Digit Classification using Neural Networks/images/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.
Binary file added
BIN
+62.3 KB
..._Learning/MNIST Digit Classification using Neural Networks/images/histogram.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
+38.9 KB
...MNIST Digit Classification using Neural Networks/images/input visualisation.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
+59.1 KB
..._Learning/MNIST Digit Classification using Neural Networks/images/pie chart.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
+63.1 KB
...rning/MNIST Digit Classification using Neural Networks/images/training loss.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
+38.9 KB
...arning/MNIST Digit Classification using Neural Networks/input visualisation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
828 changes: 828 additions & 0 deletions
828
...git Classification using Neural Networks/model/ANN_Handwritten_Digit_Classification.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
660 changes: 660 additions & 0 deletions
660
...T Digit Classification using Neural Networks/model/CNN_handwritten_digit_recogniser.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file added
BIN
+59.1 KB
Deep_Learning/MNIST Digit Classification using Neural Networks/pie chart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions
6
Deep_Learning/MNIST Digit Classification using Neural Networks/requirement.txt
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,6 @@ | ||
numpy == 1.24.3 | ||
pandas==1.5.0 | ||
matplotlib==3.6.0 | ||
tensorflow==2.6.0 | ||
Keras | ||
seaborn == 0.13.0 |
Oops, something went wrong.