Skip to content

Latest commit

 

History

History
33 lines (25 loc) · 1.92 KB

File metadata and controls

33 lines (25 loc) · 1.92 KB

Face Mask Detection Real Time / Computer Vision / Object Detection


Detecting whether a person is wearing a mask or not in real-time using Python, Keras, OpenCV, TensorFlow, NumPy, etc. The folder consists of 1900 masked images and unmasked images.

Project Walkthrough -

Data Preprocessing

  1. Created 2 lists – data [] and labels []
  2. In data [], arrays of all the images will be appended and in labels [], arrays of “with_mask” and “without_mask” which is converted using LabelBinarizer from the scikit learn library is appended
  3. All the images are listed using load_img function from Keras library, and then attached corresponding labels to it
  4. The target size is set to 224*224(width and height) so that model is perfect
  5. Using img_to_array from Keras, all the images are converted to arrays.
  6. MobileNet is applied so preprocess_input is used.
  7. Train Test split is done.

Building the network

image

Train the Model -

The below graph summarizes the training image
There is a reduction in loss as the number of epochs increases

Face Detection using Camera (Real-Time)

Using deploy .prototxt and res10_300x300_ssd_iter_140000.caffemodel face is detected and using our deep learning model mask is detected. Please refer to the “Detect Mask Video.ipynb” for the code.


Email - [email protected]
LinkedIn - https://www.linkedin.com/in/tejas-ta/
Blogs - https://tejasta.medium.com/