Skip to content

Facial mask detection using TensorFlow and OpenCV. The repo is still in development, please change the branch from master to development to view the complete code and instructions.

Notifications You must be signed in to change notification settings

zeeeshanazad/Facial-Mask-Detection

Repository files navigation

Facial-Mask-Detection

Instructions to run the Demo File:

BASE : GOOGLE DRIVE MOUNT STEP = Run this block when working on google colab and want to mount the directory from gdrive

  1. Block-1 : Import Necessary Modules = Run the cell to load the necessary modules required for functioning of this Demo file
  2. Block-2 : Import all Module .py files = Run this cell to load the user made module .py files which contains all the necessary functions used for detection
  3. Block-3 : Dataset Path and Hyper Parameters = Run this cell to set dataset path and hyper parameters
  4. Block-4 : Load Dataset = Run this block to load Train and Test dataset
  5. Block-5 : Sample from Dataset = Run this block to see a sample image from our loaded dataset
  6. Block-6 : Load Model(if applicable) = Run this cell if you already have a pre-trained model saved and want to directly start predicting
  7. Block-7 : Build Model(if not loaded already) = Run this cell if you didnot already have a pre-trained model and wanna create a model
  8. Block-8 : Train Model = Run this cell to trian the newly created model on the training dataset provided the hyper parameters as arguements
  9. Block-9 : Model Training History = Run this block to plot newly trained model accuracy as well as loss history on train and validation datasets
  10. Block-10 : Evaluate Model = Run this block to evaluate pre-trained or newly created model using precision, recall AUC and ROC curve
  11. Block-11 : Sample Detections = Run this cell to perform face mask detection on some sample images
  12. Block-12 : Difficult Sample Detection = Run this cell to perform face mask detection on a more complex and difficult sample image
  13. Block-13 : Google Colab Webcam Integration = Run this cell if you are using Google Colab and this code will run your webcam and take a picture to do prediction upon
  14. Block-14 : Google Colab Webcam Image Prediction = Run this cell to do pediction on the image taken using webcam when working on Goolge Colab
  15. Block-15 : Webcam Live Results Demo = Run this cell if you are working on a local machine and this code will start a Webcam stream and show you face mask predictions in real-time. Press the key 'q' if you want to stop the execution

Thank you for reading the execution instructions :)

About

Facial mask detection using TensorFlow and OpenCV. The repo is still in development, please change the branch from master to development to view the complete code and instructions.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages