Computer Engineering and Applications ›› 2024, Vol. 60 ›› Issue (17): 203-215.DOI: 10.3778/j.issn.1002-8331.2402-0226

• Graphics and Image Processing • Previous Articles     Next Articles

FLM-YOLOv8:Lightweight Mask Wearing Detection Algorithm

GAO Min, CHEN Gaohua, GU Jiaxin, ZHANG Chunmei   

  1. 1.School of Electronic Information Engineering, Taiyuan University of Science and Technology, Taiyuan 030024, China
    2.Shanxi Provincial Key Laboratory of Advanced Control and Equipment Intelligence, Taiyuan 030024, China
  • Online:2024-09-01 Published:2024-08-30

FLM-YOLOv8:一种轻量级的口罩佩戴检测算法

高民,陈高华,古佳欣,张春美   

  1. 1.太原科技大学 电子信息工程学院,太原 030024
    2.先进控制与装备智能化山西省重点实验室,太原 030024

Abstract: Aiming at the problems that the existing mask wearing detection model can’t balance the detection accuracy and speed well, the parameters are large, and the rate of missed and false detection is high, a lightweight mask wearing detection algorithm FLM-YOLOv8 is proposed. Firstly, the lightweight FasterNet is used to replace the backbone feature extraction network of YOLOv8n to improve the network detection speed. Secondly, the C2f module is improved by combining FasterNet Block to reduce the computational complexity of the model. Then, the structure of SPPF-LSKA is proposed to enhance the feature expression ability and perception ability of the model and improve the network detection accuracy. Finally, the Inner-MPDIoU bounding box regression loss function is designed to improve the regression prediction accuracy and accelerate the convergence speed. In addition, a mask wearing data set marked with a complex and diverse scene is created and enhanced with mosaic data to improve the network generalization ability. The experimental results show that the mAP@0.5 of the algorithm on the targets wearing masks correctly, not wearing masks correctly and not wearing masks reaches 91.3%, and the FPS reaches 143.6, which realizes more real-time and accurate mask wearing detection.

Key words: mask wearing detection, YOLOv8, FasterNet, lightweight, loss function

摘要: 针对现有的口罩佩戴检测模型无法较好平衡检测精度与速度,参数量较大,漏检和误检率高等问题,提出了一种轻量级的口罩佩戴检测算法FLM-YOLOv8。使用轻量级FasterNet替换YOLOv8n的主干特征提取网络,提升网络检测速度;融合FasterNet Block改进C2f模块,降低模型计算复杂度;提出SPPF-LSKA结构,增强模型的特征表达能力和感知能力,提高网络检测精度;设计Inner-MPDIoU边界框回归损失函数,提高回归预测精度,加快收敛速度。创建标注了一个复杂多元场景下的口罩佩戴数据集,并使用马赛克数据增强,以提高网络泛化能力。实验结果表明,该算法在正确佩戴口罩、未正确佩戴口罩和未佩戴口罩目标上的mAP@0.5达到了91.3%,FPS达到了143.6,实现了更加实时准确的口罩佩戴检测。

关键词: 口罩佩戴检测, YOLOv8, FasterNet, 轻量级, 损失函数