Real-Time Face Mask Detection OpenCV Python With Source Code

Real-Time Face Mask Detection OpenCV Python With Source Code

The Real-Time Face Mask Detection OpenCV Python was developed using Python Detection OpenCV, During Pandemic COVID-19, WHO has made wearing masks compulsory to protect against this deadly virus. In this tutorial we will develop a machine learning project – Real-time Face Mask Detector with Python.

A Face Mask Detection We will build a real-time system to detect whether the person on the webcam is wearing a mask or not. We will train the face mask detector model using OpenCV. This is a nice project for beginners to implement their learnings and gain expertise.

Watch the video here to see the full running source code of the Real-Time Face Mask Detection OpenCV Python with Source Code

This Face Mask Detection In Python also includes a downloadable Python Project With Source Code for free, just find the downloadable source code below and click to start downloading.

By the way if you are new to python programming and you don’t know what would be the the Python IDE to use, I have here a list of Best Python IDE for Windows, Linux, Mac OS that will suit for you. I also have here How to Download and Install Latest Version of Python on Windows.

To start executing a Real-Time Face Mask Detection OpenCV Python With Source Code, make sure that you have installed Python in your computer.

Real-Time Face Mask Detection OpenCV Python With Source Code : Steps on how to run the project

Time needed: 5 minutes.

These are the steps on how to run Real-Time Face Mask Detection OpenCV Python With Source Code

  • Step 1: Download the given source code below.

    First, download the given source code below and unzip the source code.
    face mask Detection download source code

  • Step 2: Import the project to your PyCharm IDE.

    Next, import the source code you’ve download to your PyCharm IDE.
    face mask Detection open project

  • Step 3: Run the project.

    last, run the project with the command “py main.py”
    face mask Detection run project

Installed Libraries

Complete Source Code

Output

With Mask

Without Mask

Run Quick Virus Scan for secure Download

Run Quick Scan for secure Download

Download Source Code below

Summary

In this project, we have developed a deep learning model for face mask detection using Python, Keras, and OpenCV. We developed the face mask detector model for detecting whether person is wearing a mask or not. We have trained the model using Keras with network architecture. Training the model is the first part of this project and testing using webcam using OpenCV is the second part.

Related Articles

Inquiries

If you have any questions or suggestions about Real-Time Face Mask Detection OpenCV Python With Source Code, please feel free to leave a comment below.

3 thoughts on “Real-Time Face Mask Detection OpenCV Python With Source Code”

  1. Hello po, I’m Mary Angel from Cebu..I’m a follower of your projects po. Would like to ask the GPU of your desktop pc or laptop po? To build that machine/deep learning project. Looking forward for your response po. Thank you. ☺

    Reply

Leave a Comment