摘要
公共场合佩戴口罩已经成为重要的防疫措施。现有口罩检测方法通常只检测是否佩戴口罩,忽略检测未规范佩戴口罩这一极易发生交叉感染的场景,目前的口罩数据集缺少未规范佩戴口罩数据。针对以上问题,在现有口罩数据集的基础上,通过线下采集和从互联网收集更多未规范佩戴口罩图像,并根据佩戴口罩的人脸图像特点,改进Mosaic数据增强算法扩充数据,改进后Mosaic数据增强算法能够将基准网络YOLOv4的平均精度均值(mAP)提升2.08%;针对扩增后数据集出现的类别不平衡问题,提出动态加权平衡损失函数,在重加权二分类交叉熵损失(weight binary cross entropy loss)基础上,以有效样本数量的倒数作为辅助类别权重,并对训练的每一个批次进行动态调整,解决直接使用重加权方法稳定性弱、检测精度震荡和效果不理想的问题。实验表明,改进后模型mAP达到91.25%,未规范佩戴口罩平均精度(AP)达到91.69%,与单阶段方法RetinaNet,Centernet,Effcientdet和两阶段方法YOLOv3-MobileNetV2,YOLOv4-MobileNetV2相比,改进后算法具有更高的检测精度和速度。
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.
作者
陈昭俊
储珺
曾伦杰
CHEN Zhao-jun;CHU Jun;ZENG Lun-jie(School of Software Engineering,Nanchang Hangkong University,Nanchang Jiangxi 330063,China)
出处
《图学学报》
CSCD
北大核心
2022年第4期590-598,共9页
Journal of Graphics
基金
国家自然科学基金项目(62162045)
江西省重点研发计划项目(20192BBE50073)。