This is an individual assignment for WIX3001 Soft Computing, where soft computing technique can be apply to COVID-19.
The system developed able to perform face mask detection with 99% accuracy based on the classification report.
-
To identify whether people are masked or unmasked through images captured in real life.
-
To evaluate the accuracy of each classification.
Example of Set Up (Project Directory)
The entire project is written in Python. Several packages are used.
- keras
- matplotlib
- numpy
- OpenCV
- os
- random
- sklearn
- tensorflow
The dataset is not included in this github repository due to large file. See the ways below.
The dataset directory need to be set up in the way that it consists of another two directories called Masked and Unmasked directory. The Masked directory consists of 5883 masked face images, while the Unmasked directory consists of 5909 unmasked face images.
Noted:
If you are downloading the dataset from this link, you need to combine the image folder, where three sets (Test, Train and Validation) of WithMask images and WithoutMask images are combined to become one set. All images from WithMask directory put into the Masked folder, while all images from WithoutMask directory put into the Unmasked folder.
Download the zip file from this link. Then unzip locally.
Set up the structure of the project that consists several important folder. The folders needed are:
-
dataset
Masked
Unmasked
-
input (Empty folder)
-
model (Empty folder)
-
OpenCV DNN (consists of two file, you can check the folder.)
-
output (Empty folder)
-
plot (Empty folder)
You need to copy the google colab before training. Please make sure to set up the file path correctly.
You can put images into the input folder. The output can be viewed inside the output folder.
Input (face without mask)
Output (face without mask)
Input (face with mask)
Output (face with mask)
For this project, I use the image dataset called "Face Mask Detection ~ 12K Images Dataset"