This project showcases my expertise in computer vision, Arduino programming, and Python integration, addressing the critical need for safety measures during the COVID-19 pandemic.
The primary objective of this project was to create a model for face mask detection using Python. Leveraging the power of OpenCV and TensorFlow, I trained a custom model to accurately detect whether individuals are wearing face masks. The model combines image processing techniques and machine learning algorithms to provide real-time detection and classification of faces with or without masks.
To ensure seamless communication between the Python application and Arduino, I implemented Pyfirmata, a Python library for interfacing with Arduino boards. Pyfirmata enabled smooth coordination between the face mask detection model and the physical components controlled by Arduino. To demonstrate the practical application of the face mask detection system, I integrated a door lock mechanism using servos controlled by Arduino. When a person without a mask is detected, the system triggers the servo motors to secure the door, preventing access. Conversely, when a person wearing a mask is identified, the servos unlock the door, allowing entry.
By combining face mask detection algorithms with Arduino-controlled servos, this system offers a reliable and efficient approach to enforcing mask-wearing policies in various settings. It can be easily deployed in entrances, access points, or any location requiring automated monitoring and control. This project represents a significant achievement in leveraging emerging technologies to ensure the well-being of individuals and communities.
Before you begin, ensure you have met the following requirements:
- You have a Windows machine.
- You have installed the latest version of Python and Arduino IDE.
- You have basic knowledge of Python and Arduino programming.
To install Face Mask Detection, follow these steps:
- Clone the repo:
git clone https://github.com/roshanyadav29/Face-Mask-Detection.git
- Navigate into the project directory:
cd Face-Mask-Detection
- Install the required dependencies:
pip install -r requirements.txt
To use Face Mask Detection, follow these steps:
- Open the Arduino IDE and upload the Arduino code to your Arduino board.
- Run the Python script:
python DetecMask.py
The system works by first capturing video frames and then processing these frames using a trained machine learning model. The model has been trained to detect faces and determine whether a mask is being worn or not. If a face is detected without a mask, the system sends a signal to the Arduino board, which can then perform a specific action, such as sounding an alarm.
To contribute to Face Mask Detection, follow these steps:
- Fork the repository.
- Create a new branch:
git checkout -b <branch_name>
. - Make your changes and commit them:
git commit -m '<commit_message>'
- Push to the original branch:
git push origin <project_name>/<location>
- Create the pull request.
Alternatively, see the GitHub documentation on creating a pull request.
If you want to contact me, you can reach me at 30005500@iitb.ac.in
.
This project uses the following license: <MIT License>
.