Skip to content

Leveraging the power of EfficientNetB0, I built a binary classification system capable of identifying individuals wearing masks in images. This project, developed in Python and Keras, contributes to public health and safety initiatives by providing a readily deployable solution for mask detection in real-world settings.

Notifications You must be signed in to change notification settings

Yohanes213/Spot-the-mask

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mask Detection with EfficientNetB0

This project utilizes the EfficientNetB0 model for accurate mask detection in images.

Image description

Data

The data be found here

Installation

` Install required libraries:

pip install -r requirements.txt

Download the EfficientNetB0 weights:

wget https://github.com/google/efficientnet/releases/download/v0.0/efficientnetb0_weights_tf_dim_ordering_tf_kernels_notop.h5

Clone this repository:

git clone https://github.com/Yohanes213/Spot-the-mask.git

Usage

  1. Download the dataset containing masked and unmasked individuals.

  2. Modify the train_labels.csv file with the corresponding filenames and labels (0 for mask, 1 for no mask).

  3. Run the train.py script to train the model:

    python ./src/models/train.py

Model

Model can found here

Results

The trained model achieves an accuracy of 97.3% on the test set and a loss of 0.080. The confusion matrix shows:

Predicted Label Mask No Mask

  • Mask 134 4
  • No Mask 3 121

These results demonstrate the model's effectiveness in identifying people with and without masks.

Contributing

Feel free to contribute to this project by submitting pull requests with improvements, bug fixes, or new features.

About

Leveraging the power of EfficientNetB0, I built a binary classification system capable of identifying individuals wearing masks in images. This project, developed in Python and Keras, contributes to public health and safety initiatives by providing a readily deployable solution for mask detection in real-world settings.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published