Detecting mask usage and social distancing using an Xbox Kinect.
This project was the Microsoft Grand Prize Winner for Ohio State University's 2020 Hack OHI/O. Note that the code is unchanged from the hackathon, so things may seem all over the place.
Our team "Hugs not Bugs" consisted of:
- Aiko Zhao
- Alex Vandenbusche
- Robert Wetzler
We delagated the project into two parts:
- Detecting mask usage
- Aiko
- Alex
- Detecting Social Distancing
- Robert
To detect when someone is wearing a mask, we trained a model using a dataset of images of people with/without masks. Then, in real time, the model detects if a face in frame is wearing a mask, drawing a green or red box around them accordingly.
For every frame:
- Our program detects all people in the Kinect's camera. To do this, we used a YOLO object detection model to find all people in frame (yolo.h5 file not included in repo).
- For each detected person, our program reads their distance from the camera using the Kinect's IR image frame.
- Using an equation based on the Kinect's FOV and the detected distances, the screenspace coordinate + distance of each person is converted to a worldspace coordinate.
- The distance between each person is calculated. If the distance is less than 6 feet, the message "MOVE 6 FEET APART!" is printed.
Credit to Devon Brandt (right), Robert's roommate, for helping test and present our project.