Mask or Non-Mask? Robust Face Mask Detector via Triplet-Consistency Representation Learning

Chun Wei Yang, Thanh Hai Phung, Hong Han Shuai, Wen Huang Cheng

Research output: Contribution to journalArticlepeer-review

6 Scopus citations


In the absence of vaccines or medicines to stop COVID-19, one of the effective methods to slow the spread of the coronavirus and reduce the overloading of healthcare is to wear a face mask. Nevertheless, to mandate the use of face masks or coverings in public areas, additional human resources are required, which is tedious and attention-intensive. To automate the monitoring process, one of the promising solutions is to leverage existing object detection models to detect the faces with or without masks. As such, security officers do not have to stare at the monitoring devices or crowds, and only have to deal with the alerts triggered by the detection of faces without masks. Existing object detection models usually focus on designing the CNN-based network architectures for extracting discriminative features. However, the size of training datasets of face mask detection is small, while the difference between faces with and without masks is subtle. Therefore, in this article, we propose a face mask detection framework that uses the context attention module to enable the effective attention of the feed-forward convolution neural network by adapting their attention maps' feature refinement. Moreover, we further propose an anchor-free detector with Triplet-Consistency Representation Learning by integrating the consistency loss and the triplet loss to deal with the small-scale training data and the similarity between masks and occlusions. Extensive experimental results show that our method outperforms the other state-of-the-art methods. The source code is released as a public download to improve public health at

Original languageEnglish
Article number42
JournalACM Transactions on Multimedia Computing, Communications and Applications
Issue number1s
StatePublished - Feb 2022


  • Deep learning
  • Face detection
  • Face occlusion
  • Object detection


Dive into the research topics of 'Mask or Non-Mask? Robust Face Mask Detector via Triplet-Consistency Representation Learning'. Together they form a unique fingerprint.

Cite this