Pre-build CAD Model: Additional bricklets (IR temperature sensor and US distance sensor) Webcam plugged into Odroid.
Pre-build CAD Model: Full assembly
Pre-build CAD Model: Odroid XU3 SOC; Tinkerforge Stepper Driver Brick; Stepper-driven lead screw that dispenses masks
Close-up of motor and corkscrew used for dispensing masks
Entire sensing suite and mask-deployment mechanism mounted to wall of dorm room
Demonstration of machine learning mask-wearing identification
Positive cases are popping up across campus like Covid spreads through the respiratory system. Dorms ineffectively enforce masking, with unsafe students exhaling dangerous droplets into communal hallways and bathrooms. In the best technology school in the world, why are we not harnessing the magic of engineering and computation to promote safe masking protocols?
What it does
Mask Up mounts at the top of a doorframe, with an extended camera on the door itself. It harnesses computer vision, cameras, and infrared sensors to detect the presence of an individual coming through the door, and determines if they are wearing a mask. Keeping dorms safe requires students to leave their rooms with masks on, delivery drivers to enter the dorm with masks on, and for people walking through common areas to be wearing masks. Therefore, if Mask Up determines that an individual is not masked, it drops one towards the individual's face, preventing the possible spread of COVID.
How we built it
Machine Learning Backend To trigger a mask drop, we use images from a webcam to detect a) when a person walks toward the door, and b) whether that person is wearing a mask. We use a computer vision algorithm based on deep convolutional neural networks for both face and mask detection. We adapted a pre-trained YOLO (You Only Look Once) model available on GitHub. It was trained on a combination of the WIDER FACE and MAFA (Masked Faces) datasets.
YOLO is a real-time object detection model that predicts both bounding boxes and class probabilities using a single neural network. Feature maps produced by DarkNet, a deep convolutional neural network backbone, are segmented into subregions which are independently evaluated for the presence of faces. This is framed as a regression problem, where the model aims to predict classification scores associated with masked and unmasked faces, as well as bounding boxes for the faces. We can mathematically estimate the person’s distance from the door from the predicted size of the associated bounding box.
Embedded System The system captures RGB images using a standard monocular webcam mounted at eye level. After capture, the images are processed using a computer vision algorithm to detect the presence of unmasked faces. If an unmasked face is detected in the frame, the system drops a mask. Additionally, an infrared sensor mounted at eye level measures the temperature of the target using emitted infrared. This allows the system to determine whether the subject may have a fever, and if a fever is detected, the system texts the user to alert them.
To command the stepper motors to drop the mask, we use the Tinkerforge Python API to communicate with the stepper motor driver via serial through USB. We also use the Tinkerforge API to retrieve infrared temperature data. After retrieval, we preprocess RGB and temperature images with OpenCV and NumPy, and postprocess detections with logic written in Python. We leveraged the Twillio API to send texts over IP for real-time temperature alerts. The system alerts the user with their exact temperature within seconds of fever detection.
Mechanical Design Due to high shipping prices of lumber and delays in shipping certain sensors, we had to adapt the mechanical design of our product. Nonetheless, we were able to create an affordable, sustainable, DIY-style mask dispenser using readily available materials. In order to mount our sensors and actuators, we used double sided tape (command strips) to stick them to the wall in a way that was sturdy but easily removable. Additionally, wires were routed using cable ties to prevent them from being snagged, caught in the door, or interfering with the cameras’ fields of view.
While we had originally planned to resin-print the mask-dispensing corkscrew, we recognized that this is a costly manufacturing method and is not feasible for most individuals who may want to implement our system in their homes or dorms. Thus, we replaced the 3D-printed corkscrew with a wire coat hanger that was wound into a coil with five revolutions, allowing the user to store five masks on the device. The corkscrew was formed by wrapping the hanger around a bottle, which can easily be done by anyone who would want to replicate our system, and was attached to the stepper motor using superglue. The stepper motor that was used was a NEMA 11, which was chosen due to its low mass, low cost, and low power
Challenges we ran into
It was no surprise that early in the pandemic the U.S. domestic shipping system stretched, strained, and eventually, snapped. We all celebrated Amazon purchases arriving two weeks late, and lamented birthday gifts being delivered months late. Even a year later, the tax on shipping couriers still permeates online purchases. Although we expended MakeMIT’s funds paying for expedited shipping, due to circumstances beyond our abilities, many of our items simply did not arrive on time. Instead of tearing down our project and sidelining our ambitious goals, we interpreted this tragedy as an opportunity to transform our project into a more sustainable, accessible, and cost-effective version of itself.
We spent the weekend improvising, calling upon both our engineering skills and hidden depths of creativity. We adapted to the lack of an ultrasonic sensor by devising an algorithm to determine distance between an individual and webcam from an image. We overcame the missing computational hardware by using our personal computers as controllers. We circumvented the lack of wooden planks and power tools for creating the frame to mount hardware to by harnessing Command Strips, painter’s tape, hot glue, CA, string, and a good bit of luck. We scribbled down quick stress-strain calculations of electrical tape, evaluated weight distributions, and cobbled together a robust, high-performing system that effectively performed tasks at about 20% of its proposed cost.
Accomplishments that we're proud of
As is the paradigm of quarantine life, adaptation is key to success. In our case, the lack of access to labs and machine shops, inability to acquire raw materials, and delays in shipping of vital parts drove us to heights of improvisation and creativity. We were able to accomplish our desired goals with about $120, only 20% of our initial proposed budget. This further increased the accessibility and feasibility of our product, enabling it to be used by a wider market and be implemented on a larger scale.
In addition, our final product, Mask Up!, displayed reliable mask deployment and temperature detection with minimal customization. We were able to test our product on diverse demographics of individuals, and all the different input cases devised worked as intended. Our device successfully detected and provided masks to maskless individuals such that the mask dropped into their hands, measured fevers and sent text notifications to alert about the situation, did not inappropriately flag individuals who were wearing masks, and worked across heights, genders, and ethnicities.
The computer vision and machine learning modules leveraged state-of-the-art algorithms to differentiate even edge cases, such as an individual holding a hand across their nose, or the individual approaching the door from an oblique angle. The IoT system consistently sent timely text messages when a fever was detected. In addition, the mechanical systems repeatedly dropped a single mask cleanly and clearly when a maskless individual was detected.
Finally, our team grew closer over the hackathon, both as engineers and as friends. We were able to tackle a pervasive problem in our dorm, while learning from each other's strengths and areas of expertise. We forged deeper friendships while elevating public health, and thanks to MakeMIT, the judging panels, and everyone involved this weekend for the wonderful opportunity to create Mask Up!
What we learned
From our experience building our product, we learned that building a functional product requires being adaptable, and does not always require a large budget or a polished exterior. In particular, when building prototypes, it is most important to show that the key features of the device work than it is to make every part of the device as slick as possible.
We also learned that it is possible to leverage existing machine learning models and datasets to build high accuracy and high throughput deep learning models without wasting one’s time collecting data or training models from scratch. In particular, we were able to effectively adapt existing computer vision algorithms to detect the presence of unmasked faces using only the computational power of a personal laptop. We also leveraged existing APIs to enable our product to interface with sophisticated hardware, and to text a user’s cell phone when their temperature is elevated.
What's next for Mask Up!
Now that we have demonstrated the robustness and efficacy of Mask Up!, as well as its new low-price point, we are confident and excited about moving forward.
Our goals for the next week are to refine the mounting system, calibrate the mask detection and dropping speeds, and pitch the product to various MIT boards. Within our team, we have members who are part of the Undergraduate Association Health and Wellness committee, which recently began a pilot program to provide free menstrual products in all dorm and campus bathrooms. In addition, we have a member who is the campus-wide elected representative for the MIT Medical Consumers’ Advisory Committee, which is responsible for addressing the changing medical and health needs of the MIT community. Therefore, we possess the policymaking and executive abilities to not only bring Mask Up! to the attention of governing boards at MIT, but to also draft, publish, and pass legislation to direct funding and personnel towards implementing Mask Up! throughout campus. Our team members are skilled at implementing campus-wide health policies and programs.
In three weeks, we expect to have published a petition to all undergraduate students to raise support and public desire for Mask Up! to be implemented in dorms. We also expect to have passed preliminary budget policy for the funding of a pilot program, and to begin the pilot in our own dorm: Next House.
Upon the clear success of the Next House pilot program, in the sixth week from launch, we will push for MIT to implement Mask Up! in all doorways of major wings in undergraduate dorms. The large-scale purchases by MIT will further reduce product costs, increasing accessibility of the system. We also expect to begin pitching the system to nearby Boston-area universities who are undoubtedly struggling with enforcing COVID regulations themselves.
In nine weeks, we hope for all MIT dormitory doorways to contain a Mask Up! system. We anticipate at least one contract from another Boston-area university, as well as the beginning of Mask Up! to step into new industries and markets. We see Mask Up! being implemented in hospitals, nursing homes, toxic materials sites, construction areas, and more. Buoyed by our success in university settings, we will spread our wings in diverse settings and enable a safer future for all.