Welcome to Journal of Graphics share: 

Journal of Graphics ›› 2022, Vol. 43 ›› Issue (4): 590-598.DOI: 10.11996/JG.j.2095-302X.2022040590

• Image Processing and Computer Vision • Previous Articles     Next Articles

Multi category mask wearing detection based on dynamic weighted category balance loss

  

  1. School of Software Engineering, Nanchang Hangkong University, Nanchang Jiangxi 330063, China
  • Online:2022-08-31 Published:2022-08-15
  • Contact: CHU Jun (1967), professor, Ph.D. Her main research interests conver object detection and tracking in complex scenes
  • About author:CHEN Zhao-jun (1996), master student. His main research interests conver deep learning and object detection
  • Supported by:
    National Natural Science Foundation of China (62162045); Research and Development Projects of Jiangxi Province (20192BBE50073)

Abstract:

 Mask wearing in public has become an important measure to control the spread of Coronavirus Disease 2019 (COVID-19). With the prolonged development of the COVID-19 epidemic, the public’s awareness of self-protection has been gradually declining, leading to the increasing tendency of wearing masks incorrectly in public. The existing mask wearing detection methods usually only detect whether the mask is worn, without the detection of non-standard mask wearing scenarios, which is likely to cause cross infection. The current mask datasets lack the image data of non-standard mask wearing. To solve the above problems, on the basis of the existing mask datasets, more non-standard mask wearing images were collected through the Internet and offline, and the Mosaic data enhancement algorithm was improved to expand the data according to the features of face images in the cases of wearing masks. The improved Mosaic data enhancement algorithm could improve the mean average precision (mAP) of the benchmark network YOLOv4 by 2.08%. To address the problem of category imbalance in the dataset after data enhancement, the dynamic weighted balance loss function was proposed. Based on the weight binary cross entropy loss function, the reciprocal of the number of effective samples served as the auxiliary category weight, and dynamic adjustment was performed in each batch under training, thus solving the problems of weak stability, precision oscillation, and unsatisfactory effect when the re-weighting method was directly put to use. The experiment showed that mAP of the improved model reached 91.25%, and the average precision (AP) of non-standard mask wearing reached 91.69%. Compared with such single-stage methods as RetinaNet, Centernet, and Effcientdet, and such two-stage methods as YOLOv3-MobileNetV2 and YOLOv4-MobileNetV2, the improved algorithm exhibits higher detection accuracy and speed.

Key words: mask detection, category imbalance, Mosaic data enhancement, YOLOv4, re-weight

CLC Number: