Coder Social home page Coder Social logo

ruban2205 / face-mask-detector Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 143.07 MB

This repository contains code and resources for a real-time face mask detection system using deep learning techniques. The system can identify whether a person is wearing a face mask or not, making it useful for applications in public safety, healthcare, and security.

License: MIT License

Python 100.00%
tensorflow machine-learning face-detection keras python-programming

face-mask-detector's Introduction

πŸ’‘ Face-Mask-Detector

A Face Mask detector is a python project developed with some Machine Learning libraries.

Given the trained COVID-19 face mask detector, we’ll proceed to implement two more additional Python scripts used to:

  • Detect COVID-19 face masks in images
  • Detect face masks in real-time video streams

This repository contains code and resources for a face mask detection system. This system is built using deep learning techniques and is capable of detecting whether a person is wearing a face marsk or not in real-time.

The Face Mask Detector is a computer vision system that can identify whether a person is wearing a facemask or not. It utilizes deep learning techniques to process images and make predictions in real-time. The system can be useful in various applications such as public safety, healthcare, and security.

This repository provides the code and resources necessary to train and deploy the facemask detection system.

Project Structure

The dataset/ directory contains the data described in the β€œOur COVID-19 face mask detection dataset” section. Three image examples/ are provided so that you can test the static image face mask detector.

Three python scripts are:

  • train_mask_detector.py: Accepts our input dataset and fine-tunes MobileNetV2 upon it to create our mask_detector.model. A training history plot.png containing accuracy/loss curves is also produced
  • detect_mask_image.py: Performs face mask detection in static images
  • detect_mask_video.py: Using your webcam, this script applies face mask detection to every frame in the stream

✨ Features

  • Real-time face mask detection
  • High accurace and performance
  • Easy to use and integrate into existing systems
  • Supports both image and video input

πŸ“‹ Requirements

To run the face mask detector, you need to have the following dependencies installed:

Python OpenCV TensorFlow Keras

πŸš€ Installation

  1. Clone this repository:
git clone https://github.com/Ruban2205/Face-Mask-Detector.git
  1. Change into the project directory:
cd Face-Mask-Detector
  1. Install the required dependencies:
pip install -r requirements.txt

🎯 Usage

To use the face mask detector, Follow these steps:

  1. Run the detection script:
python detect_mask.py

This will start the face mask detection system using your webcam as the input source.

  1. The system will display the live video feed with bounding boxes around detected faces. It will also label each face as "With Mask" or "Without Mask" based on the prediction.

  2. Press 'q' to quit the system.

πŸ“– Training

If you want to tran the face mask detection model on your own dataset, you can follow these steps:

  1. Prepare your dataset with two classes: "With Mask" and "Without Mask". The dataset should be organized into separate directories for each class.

  2. Update the config.py file to specify the paths to your dataset and other configuration settings.

  3. Run the training script: python train_mask_detector.py This will train the face mask detection model using the specified dataset and save the trained model to the disk.

  4. Once training is complete, you can use the trained model for face mask detection by running the detect_mask.py script.

πŸ“‚ Dataset

The dataset used to train the face mask detection model is not included in this repository. You can use your own dataset or find suitable datasets from public sources. Ensure that your dataset contains a sufficient nuber of images for both "With Mask" and "Without Mask" classes to achieve good performance.

🧠 Model

The face mask detection model is based on a deep neural network architecture. It is trained using the TensorFlow and Keras frameworks. The model takes an input image and predicts whether the person in the image is wearing a face mask or not.

πŸ“Š Results

The face mask detection system achieves high accuracy on the test dataset. The performance may vary depending on the quality and diversity of the training dataset. It is recommended to train the model on the large and representative dataset for optimal results.

🀝 Contributing

Contributions to the Face Mask Detetor project are welcome and encouraged. If you want to contribute, please follow these steps:

  1. Fork the repository and create your own branch.
  2. Make the desired changes and additions.
  3. Test your changes thoroughly.
  4. Submit a pull request describing the changes you made.

Please ensure that your contributions align with the project's codeing standards, maintain code quality, and provide clear documentation when necessary.

πŸ“„ Licence

The Face Mask Detector project is licensed under the MIT License. You are free to use, modify, and distribute the code for personal and commerical purposes. See the LICENSE file for more details.

☎️ Contact

If you have any questions, suggestions, or concerns about the Face Mask Detector project, please feel free to reach out to me.

You can Contact me at:

Website Mail LinkedIn

I appreciate your feedback and contributions!


Star ⭐ this repository for Future use :)

Click below to gift 🎁 a book to me.

BuyMeABook

Thank You!!


face-mask-detector's People

Contributors

ruban2205 avatar

Stargazers

Kerston anto singh avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.