《电子技术应用》
您所在的位置:首页 > 其他 > 设计应用 > 复杂环境下轻量化口罩佩戴检测算法研究
复杂环境下轻量化口罩佩戴检测算法研究
2023年电子技术应用第8期
段高峰,单剑锋,刘哲
(南京邮电大学 电子与光学工程学院、柔性电子(未来技术)学院, 江苏 南京 210023)
摘要: 针对目前YOLOv4算法巨大的运算量难以满足实时性要求高的口罩佩戴检测系统,提出了一种轻量化检测算法(Light-YOLOv4)。将融合ECA注意力机制的GhostNet网络替换YOLOv4的主干网络减少参数量;借鉴空洞卷积和SPPF提出了ASPPFCSPC结构有效增大感受野;针对目标过于密集而产生重叠问题,增加了RepBox损失函数,使不同目标的预测框相互远离从而减少漏检。实验表明,Light-YOLOv4算法mAP为94.2%,FPS为46.3帧,模型大小为95 MB,相较于YOLOv4的mAP值仅降低了1.1%,检测速率提高了51.8%,参数量减少了70.0%,模型大小减少了61.1%,对低性能检测设备很友好。
中图分类号:TP391 文献标志码:A DOI: 10.16157/j.issn.0258-7998.223582
中文引用格式: 段高峰,单剑锋,刘哲. 复杂环境下轻量化口罩佩戴检测算法研究[J]. 电子技术应用,2023,49(8):108-113.
英文引用格式: Duan Gaofeng,Shan Jianfeng,Liu Zhe. Research on lightweight detection algorithm of wearing mask in complex environment[J]. Application of Electronic Technique,2023,49(8):108-113.
Research on lightweight detection algorithm of wearing mask in complex environment
Duan Gaofeng,Shan Jianfeng,Liu Zhe
(College of Electronic and Optical Engineering & College of Flexible Electronics (Future Technology), Nanjing University of Posts and Telecommunications, Nanjing 210023,China)
Abstract: In view of the huge computational load of the current YOLOv4 algorithm, it is difficult to meet the real-time requirements of the mask wearing detection system, a lightweight detection algorithm (Light-YOLOv4) was proposed. The GhostNet network structure integrating ECA attention mechanism was replaced by the backbone network of YOLOv4 to reduce the number of parameters. Using dilated convolution and SPPF for reference, ASPPFCSPC structure is proposed to replace SPP effectively to increase the receptive field. In order to solve the overlapping problem caused by too dense targets, the RepBox loss function is added on the basis of the original, so that the prediction boxes of different targets are far away from each other to reduce the missed detection. The experiment shows that the mAP value of the Light-YOLOv4 algorithm is 94.2%, FPS is 46.3 frames, and the model size is 95 MB. Compared with the mAP value of YOLOv4 algorithm, the detection rate is only reduced by 1.1%, the detection rate is increased by 51.8%, the number of parameters is reduced by 70.0%, and the model size is reduced by 61.1%, friendly to low performance detection equipment.
Key words : YOLOv4;GhostNet;efficient channel attention;RepBox loss

0 引言

自2020年初新冠疫情爆发以来,人们的健康、工作、生活、出行等受到很大程度影响。佩戴口罩是避免新冠病毒传播的有效措施,有助于疫情防控,因此在公共场合佩戴口罩至关重要[1]。车站、学校、医院、商场等人员密集的地方人员流量大,仅仅靠人工检查督促佩戴口罩会加大人工成本,并且会增加新冠病毒传播的几率。研究能够实时检测是否佩戴口罩的系统来防范疫情的传播,降低感染新冠病毒的风险具有重大的现实意义。

检测口罩佩戴的任务使用的方法是目标检测,根据检测流程可以进一步分为两类:Two-stage和One-stage。Two-stage算法是将检测步骤分为两部分:先生成候选框,再根据候选框进行特征提取和分类,比较典型的算法有RCNN、Fast-RCNN等。YOLO[2-5]系列和SSD[6]算法是经典的One-stage算法,对图片直接进行特征提取、回归和预测。YOLOv4[5]经过四代的发展克服了很多缺陷,检测速度也有很大的提高,应用范围也十分广泛,例如医学病变检测[7]、船舶检测[8]和缺陷检测[9]等方面。检测口罩佩戴系统大多数是性能比较低的嵌入式设备,复杂的网络结构很难满足实时性要求,使用轻量级的GhostNet[10]网络结构替换YOLOv4的主干网络,大量减少参数量和运算量,对低性能的图形处理器比较友好,但是准确性也下降很多。本文提出的轻量化结构(Light-YOLOv4),在GhostNet中的BottleNeck结构中融入了ECA(Efficient Channel Attention)注意力机制[11]来改进GhostNet结构、在SPPCSPC[12]结构的基础上借鉴了SPPF(Spatial Pyramid Pooling Faster)和空洞卷积提出了ASPPFCSPC替换SPP(Spatial Pyramid Pooling)结构进一步优化网络。

口罩佩戴检测算法方面的研究已经很多[13-15],但在公共场所等复杂环境下,人员密集导致检测的目标发生重叠对准确率有一定影响的问题很少有研究。为了解决目标遮挡而加大识别难度的问题,参考行人密集检测的文献,对损失函数进行优化改进,在原有损失函数上增加了RepBox损失函数改善目标重叠的问题。



本文详细内容请下载:https://www.chinaaet.com/resource/share/2000005483




作者信息:

段高峰,单剑锋,刘哲

(南京邮电大学 电子与光学工程学院、柔性电子(未来技术)学院, 江苏 南京 210023)

微信图片_20210517164139.jpg

此内容为AET网站原创,未经授权禁止转载。