This project aims to detect whether a person is wearing a face mask or not using computer vision techniques. It utilizes a deep learning model based on the MobileNetV2 architecture to classify images as either "with mask" or "without mask".
The purpose of this project is to provide a tool for automatically detecting face masks in images or real-time video streams. It can be used in various applications, including:
- Public safety: Monitoring compliance with face mask regulations in public spaces, such as airports, train stations, and shopping malls.
- Healthcare: Assisting healthcare professionals in identifying individuals who are not wearing masks in hospitals or clinics.
- Security: Enhancing security systems by identifying individuals who are not complying with mask-wearing policies.
- Face mask detection: The model can accurately classify whether a person is wearing a face mask or not.
- Real-time detection: The trained model can be applied to real-time video streams for live mask detection.
- Easy integration: The code provided can be easily integrated into other projects or systems.
To get started with this project, follow the instructions below.
Before running the project on your local system, make sure you have the following prerequisites:
- Python 3: Install Python 3.x from the official Python website (https://www.python.org).
- TensorFlow: Install TensorFlow using 'pip install tensorflow'.
- Keras: Install Keras using 'pip install keras'.
- OpenCV: Install OpenCV using 'pip install opencv-python'.
- Numpy: Install Numpy using 'pip install numpy'.
- Matplotlib: Install Matplotlib using 'pip install matplotlib'.
- scikit-learn: Install scikit-learn using 'pip install scikit-learn'.
- imutils: Install imutils using 'pip install imutils'.
To run the project locally, follow these steps:
- Clone the repository to your local machine.
- Install the required dependencies mentioned in the prerequisites.
- Open the terminal or command prompt and navigate to the project directory.
- Execute the following command to start the face mask detection:
python face_mask_detection.py
This will run the script and perform face mask detection on the provided images or real-time video stream.
The face mask detection script can be used to detect face masks in the following ways:
- Images: Provide the path to an image in the code to detect face masks in that image.
- Real-time video stream: The script can capture video from your webcam and perform real-time face mask detection.
Contributions to this project are welcome. If you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request.
For any feedback or support regarding this project, please contact at https://pranav-programmer.github.io/Contact-Form/. We appreciate your input and will be happy to assist you with any questions or concerns you may have.