Mask Detection using Python | Face Mask detection in Keras and OpenCV | Python tutorial DL Program




About this tutorial:

Video duration: 00:21:23
Hello Everyone,
iamhemant and today in this video we will watch how to make an face mask detector in python using deep learning neural network.(OpenCV and Keras)
we will use RES10 model for face recognition .
i will give Special thanks to PYIMAGESEARCH foe this project.
first we will detect face then recognize mask in facer using webcam.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dataset link:

Dataset is created by Prajna Bhandary…

Post Author: OfficeTutes.com

Apple lover, ICT and LEAN consultant, MS Office lecturer My other website with video tutorials - Tutorials, guides and news for iPhones and iPads

20 thoughts on “Mask Detection using Python | Face Mask detection in Keras and OpenCV | Python tutorial DL Program

    Bhavesh Dhage

    (September 6, 2020 - 11:39 am)

    Can we have more additional steps after detecting the face mask, process like, the person's name and any more different data which we have to take from the user(ONLY AFTER DETECTING THE FACE MASK ON THE FACE)

    Aradhy Mishra

    (September 6, 2020 - 11:39 am)

    Ye software konsa hai jispr python codin hai

    Sonali Sharma

    (September 6, 2020 - 11:39 am)

    when am installing tensorflow i got this error –
    'pip' is not recognized as an internal or external command,

    operable program or batch file.

    pls hlp me.

    Karan Parekh

    (September 6, 2020 - 11:39 am)

    CAN I GET THE PYTHON CODINGS

    Bilal Ahmed

    (September 6, 2020 - 11:39 am)

    File "FacemaskDetectTrain.py", line 79, in <module>

    model.compile(loss="binary_crosssentropy", optimizer=otp,

    NameError: name 'model' is not defined

    another problem plz again help me

    Bilal Ahmed

    (September 6, 2020 - 11:39 am)

    File "FacemaskDetectTrain.py", line 34, in <module>

    label = imagePath,split(os.path.sep)[-2]

    NameError: name 'split' is not defined

    Plz Help me in this Error

    Om Chaudhari Mr. WhiteHat

    (September 6, 2020 - 11:39 am)

    tensorflow is not installing

    ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none)
    ERROR: No matching distribution found for tensorflow

    Padmini Mansingh

    (September 6, 2020 - 11:39 am)

    May I have ur mail id sir

    Margam India

    (September 6, 2020 - 11:39 am)

    Microsoft Windows [Mixxcrosoft Windows [Version 10.0.18362.900]

    (c) 2019 Microsoft Corporation. All rights reserved.

    D:Python newMaskDetector-master>python detect_maskInVideo.py

    Traceback (most recent call last):

    File "C:UsersBikashAppDataRoamingPythonPython38site-packagestensorflowpythonpywrap_tensorflow.py", line 18, in swig_import_helper

    fp, pathname, description = imp.find_module('_pywrap_tensorflow', [dirname(__file__)])

    File "C:Program Files (x86)Python38-32libimp.py", line 296, in find_module

    raise ImportError(_ERR_MSG.format(name), name=name)

    ImportError: No module named '_pywrap_tensorflow'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):

    File "C:UsersBikashAppDataRoamingPythonPython38site-packagestensorflowpython__init__.py", line 66, in <module>

    from tensorflow.python import pywrap_tensorflow

    File "C:UsersBikashAppDataRoamingPythonPython38site-packagestensorflowpythonpywrap_tensorflow.py", line 28, in <module>

    _pywrap_tensorflow = swig_import_helper()

    File "C:UsersBikashAppDataRoamingPythonPython38site-packagestensorflowpythonpywrap_tensorflow.py", line 20, in swig_import_helper

    import _pywrap_tensorflow

    ModuleNotFoundError: No module named '_pywrap_tensorflow'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):

    File "detect_maskInVideo.py", line 1, in <module>

    from tensorflow.keras.applications.mobilenet_v2 import preprocess_input

    File "C:UsersBikashAppDataRoamingPythonPython38site-packagestensorflow__init__.py", line 24, in <module>

    from tensorflow.python import *

    File "C:UsersBikashAppDataRoamingPythonPython38site-packagestensorflowpython__init__.py", line 72, in <module>

    raise ImportError(msg)

    ImportError: Traceback (most recent call last):

    File "C:UsersBikashAppDataRoamingPythonPython38site-packagestensorflowpythonpywrap_tensorflow.py", line 18, in swig_import_helper

    fp, pathname, description = imp.find_module('_pywrap_tensorflow', [dirname(__file__)])

    File "C:Program Files (x86)Python38-32libimp.py", line 296, in find_module

    raise ImportError(_ERR_MSG.format(name), name=name)

    ImportError: No module named '_pywrap_tensorflow'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):

    File "C:UsersBikashAppDataRoamingPythonPython38site-packagestensorflowpython__init__.py", line 66, in <module>

    from tensorflow.python import pywrap_tensorflow

    File "C:UsersBikashAppDataRoamingPythonPython38site-packagestensorflowpythonpywrap_tensorflow.py", line 28, in <module>

    _pywrap_tensorflow = swig_import_helper()

    File "C:UsersBikashAppDataRoamingPythonPython38site-packagestensorflowpythonpywrap_tensorflow.py", line 20, in swig_import_helper

    import _pywrap_tensorflow

    ModuleNotFoundError: No module named '_pywrap_tensorflow'

    Failed to load the native TensorFlow runtime.

    See https://github.com/tensorflow/tensorflow/blob/master/tensorflow/g3doc/get_started/os_setup.md#import_error

    for some common reasons and solutions. Include the entire stack trace

    above this error message when asking for help.

    D:Python newMaskDetector-master>Version 10.0.18362.900]

    (c) 2019 Microsoft Corporation. All rights reserved.

    D:Python newMaskDetector-master>python detect_maskInVideo.py

    Traceback (most recent call last):

    File "C:UsersBikashAppDataRoamingPythonPython38site-packagestensorflowpythonpywrap_tensorflow.py", line 18, in swig_import_helper

    fp, pathname, description = imp.find_module('_pywrap_tensorflow', [dirname(__file__)])

    File "C:Program Files (x86)Python38-32libimp.py", line 296, in find_module

    raise ImportError(_ERR_MSG.format(name), name=name)

    ImportError: No module named '_pywrap_tensorflow'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):

    File "C:UsersBikashAppDataRoamingPythonPython38site-packagestensorflowpython__init__.py", line 66, in <module>

    from tensorflow.python import pywrap_tensorflow

    File "C:UsersBikashAppDataRoamingPythonPython38site-packagestensorflowpythonpywrap_tensorflow.py", line 28, in <module>

    _pywrap_tensorflow = swig_import_helper()

    File "C:UsersBikashAppDataRoamingPythonPython38site-packagestensorflowpythonpywrap_tensorflow.py", line 20, in swig_import_helper

    import _pywrap_tensorflow

    ModuleNotFoundError: No module named '_pywrap_tensorflow'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):

    File "detect_maskInVideo.py", line 1, in <module>

    from tensorflow.keras.applications.mobilenet_v2 import preprocess_input

    File "C:UsersBikashAppDataRoamingPythonPython38site-packagestensorflow__init__.py", line 24, in <module>

    from tensorflow.python import *

    File "C:UsersBikashAppDataRoamingPythonPython38site-packagestensorflowpython__init__.py", line 72, in <module>

    raise ImportError(msg)

    ImportError: Traceback (most recent call last):

    File "C:UsersBikashAppDataRoamingPythonPython38site-packagestensorflowpythonpywrap_tensorflow.py", line 18, in swig_import_helper

    fp, pathname, description = imp.find_module('_pywrap_tensorflow', [dirname(__file__)])

    File "C:Program Files (x86)Python38-32libimp.py", line 296, in find_module

    raise ImportError(_ERR_MSG.format(name), name=name)

    ImportError: No module named '_pywrap_tensorflow'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):

    File "C:UsersBikashAppDataRoamingPythonPython38site-packagestensorflowpython__init__.py", line 66, in <module>

    from tensorflow.python import pywrap_tensorflow

    File "C:UsersBikashAppDataRoamingPythonPython38site-packagestensorflowpythonpywrap_tensorflow.py", line 28, in <module>

    _pywrap_tensorflow = swig_import_helper()

    File "C:UsersBikashAppDataRoamingPythonPython38site-packagestensorflowpythonpywrap_tensorflow.py", line 20, in swig_import_helper

    import _pywrap_tensorflow

    ModuleNotFoundError: No module named '_pywrap_tensorflow'

    Failed to load the native TensorFlow runtime.

    See https://github.com/tensorflow/tensorflow/blob/master/tensorflow/g3doc/get_started/os_setup.md#import_error

    for some common reasons and solutions. Include the entire stack trace

    above this error message when asking for help.

    D:Python newMaskDetector-master>

    Margam India

    (September 6, 2020 - 11:39 am)

    vs code me python nehi chal raha he plz help me.

    Mehul Pathak

    (September 6, 2020 - 11:39 am)

    Bhai I am thinking that make program in python in which we can control smartlight with python by saying that on or off
    And changing the colour with voice commands please make it

    DEBASMITA DUTTA

    (September 6, 2020 - 11:39 am)

    I got an error while loading the dataset into mask_detector.model …. It's showing NameError : name 'module' is not defined . The error is showing in line 78 of trainFaceMaskDetect.py file , where you have written model.compile(loss="binary_crossentropy", optimizer=opt, metrics=["accuracy"])

    Shilpa prusty

    (September 6, 2020 - 11:39 am)

    nice job , how did u get the prototxt file and the caffe model? how were they generated and the importance ? plz explain

    bishan singh

    (September 6, 2020 - 11:39 am)

    U r great bhaiya ….Keep it up

    ShreyasBhuyan

    (September 6, 2020 - 11:39 am)

    Can you write what things to install using pip

    gold_heart_writer_

    (September 6, 2020 - 11:39 am)

    Jarvis m wake up word kaise add kre

    C 4 Code

    (September 6, 2020 - 11:39 am)

    Keep it up 👍

    Hridyansh Bhadauria

    (September 6, 2020 - 11:39 am)

    Good work can you tell me how to use keras directly in it

    diks TV

    (September 6, 2020 - 11:39 am)

    extraordinary bro. thanks your tutorial. keep spirit for youtube channel

    Manish AB

    (September 6, 2020 - 11:39 am)

    Keep it up bro❣️

Leave a Reply

Your email address will not be published. Required fields are marked *