Machine Learning with Applications (Dec 2023)
Detecting face masks through embedded machine learning algorithms: A transfer learning approach for affordable microcontrollers
Abstract
The adoption of face masks to halt the spread of airborne diseases has been recognized as an effective measure, being a significant resource to reduce new infections of different types of virus that affect the respiratory system. In this sense, the enforcement of the use of masks in crowded areas has been a recurrent concern of governments, which has fostered the development of camera-based approaches to automatically detect people without face masks. In order to tackle this problem, this article proposes a low-cost approach based on the use of affordable and energy-efficient microcontrollers to quickly process images and detect when people are not wearing face masks, performing local decisions. For this on-the-edge processing, reduced Machine Learning models were created and evaluated through different techniques. As a result, a complete processing pipeline was designed to perform a transfer learning process taking as reference the MobileNet model supported by the Edge Impulse platform, achieving an innovative TinyML solution for quick decisions on resource-constrained Internet of Things units. Additionally, we performed a series of experiments on the Arduino Nano 33 board attached to an OV7675 camera module, evaluating the practical application of the proposed solution after proper training using public image datasets. Working as a soft-sensor unit that is reproducible and ready to be used, the defined trainable model and the performed evaluation results represent a significant contribution towards real-world deployment of face masks detection systems.