Abstract
During the COVID-19 pandemic, the reuse of surgical masks became common despite recommendations for single-use. However, users lack objective tools to determine when a mask's filtration efficiency has degraded. This paper introduces the "Face Mask Assistant," a system combining a smartphone-mounted micro-lens with machine learning to categorize a mask's service stage. By analyzing microscopic textures using Gray Level Co-occurrence Matrix (GLCM) and K-Nearest Neighbor (KNN) classification, the system achieves a macro precision of 82.87%, offering a portable solution for personal mask quality assessment.
Introduction
The global necessity of face masks during the COVID-19 pandemic led to widespread reuse, often in low-risk environments, due to supply shortages or convenience. While surgical masks are designed for single use, their actual filtration lifespan varies based on activity and environment. Currently, there is no accessible method for individuals to evaluate whether a mask's pores are clogged or its fibers degraded. This research addresses this gap by developing a mobile-based tool that moves mask quality assessment from specialized labs to the palm of a user's hand.
Methodology
Hardware Integration
The core of the detection system is the "TIPSCOPE," a compact, detachable microscope lens that attaches to a standard smartphone camera. This hardware modification enables the capture of high-magnification "micro-photos" of the mask's inner surface, revealing details invisible to the naked eye, such as accumulated droplets and fiber degradation.
Feature Extraction and Classification
The system processes these micro-images through a classic machine learning pipeline. Instead of raw pixel analysis, the researchers utilized Gray Level Co-occurrence Matrix (GLCM) to quantify surface texture. Four key metrics were extracted: Contrast, Correlation, Energy, and Homogeneity. These features serve as proxies for mask wear; for instance, Contrast and Correlation typically increase as debris accumulates and fibers fray, while Energy and Homogeneity decrease as the surface becomes less uniform.
Classification is performed using the K-Nearest Neighbor (KNN) algorithm. The model categorizes masks into three stages based on usage duration:
- Type I (Normal Use): Day 0–1.
- Type II (Early Warning): Day 2–3.
- Type III (Not Recommended): Day 4–5.
The system is deployed via a WeChat Applet, where users upload images to a back-end server for real-time analysis.
Dataset and Experimental Setup
The researchers compiled a custom dataset of 87 micro-images. Masks were worn during various real-world activities, such as running, shopping, and speaking. To ensure accuracy and mitigate local noise or anomalies, three photos (left, middle, and right sides) were taken for each assessment, and their features were averaged before classification.
Results and Discussion
The "Face Mask Assistant" demonstrated strong performance in distinguishing between the three service stages, proving that texture is a viable proxy for mask wear.
Classification Accuracy
The system achieved a Macro Precision of 82.87% ± 8.50%. When the task was simplified to a binary classification (Safe vs. Not Recommended), the accuracy improved to 88.51%. Empirical testing identified K=6 as the optimal hyperparameter for the KNN model, balancing sensitivity and robustness.
The Necessity of Microscopic Imaging
A critical finding of the study is that standard smartphone photography is insufficient for this task. Without the TIPSCOPE lens, the textural changes indicative of mask degradation are not captured, rendering the GLCM analysis ineffective. Micro-photos reveal a "landscape" of accumulated particles and fiber wear that provides the necessary data for reliable classification.
Limitations and Future Work
The current study focused exclusively on surgical masks. Future iterations will need to incorporate N95 respirators and cloth masks, which possess distinct material properties. Additionally, the researchers aim to expand the dataset to improve robustness against variations in lighting and different smartphone camera sensors. Environmental factors, such as moisture or facial lint, also present challenges for future algorithmic refinement.
Summary updated