计算机工程与应用 ›› 2023, Vol. 59 ›› Issue (11): 188-194.DOI: 10.3778/j.issn.1002-8331.2203-0048

• 图形图像处理 • 上一篇    下一篇

改进FCOS的复杂场景口罩佩戴检测算法

魏驰宇,刘蓉,刘明,张心月   

  1. 1.华中师范大学 物理科学与技术学院,武汉 430079
    2.华中师范大学 计算机学院,武汉 430079
  • 出版日期:2023-06-01 发布日期:2023-06-01

Improved Algorithm of FCOS for Complex Scene Mask Wear Detection

WEI Chiyu, LIU Rong, LIU Ming, ZHANG Xinyue   

  1. 1.College of Physical Science and Technology, Central China Normal University, Wuhan 430079, China
    2.College of Computer, Central China Normal University, Wuhan 430079, China
  • Online:2023-06-01 Published:2023-06-01

摘要: 针对在复杂场景口罩佩戴检测中存在的多尺度、多角度和遮挡等问题,提出一种基于改进FCOS的复杂场景口罩佩戴检测算法。在算法的骨干网络中引入Res2Net的分组残差连接结构,提高网络对不同尺度口罩的特征提取能力,并在其中集成可变形卷积,拓展其对未知形状物体的建模能力;设计一种集成注意力机制的特征金字塔,为不同的特征通道赋予不同的权重,抑制无用的特征信息;根据目标口罩的相关统计特征自动地划分正负样本,提高不同尺度口罩的样本质量,并引入Generalized Focal Loss联合训练样本的分类分数和定位质量分数,提升算法性能。实验结果表明,在复杂场景下的口罩佩戴检测中,该改进算法的mAP相比于原始FCOS提高6.7个百分点,同时与一些主流的目标检测算法相比,该改进算法也具有更好的效果和鲁棒性。

关键词: 多尺度, 可变形卷积, 标签分配策略, Generalized Focal Loss

Abstract: Aiming at the problems of multi-scale, multi angle and occlusion in mask wearing detection in complex scenes, a mask wearing detection algorithm in complex scenes based on improved FCOS is proposed in this paper. Firstly, in order to improve the feature extraction ability of the network for masks with different scales, the packet residual connection structure of Res2Net is introduced into the backbone network of the algorithm, and the deformable convolution is integrated to expand its modeling ability for objects with unknown shapes. Then, a feature pyramid integrating attention mechanism is designed to give different weights to feature channels and suppress useless feature information. Finally, according to the relevant statistical characteristics of the target mask, the positive and negative samples are automatically divided to improve the sample quality of masks with different scales, and Generalized Focal Loss is introduced to jointly train the classification score and positioning quality score of samples so as to improve the performance of the algorithm. The experimental results show that the mAP of improved algorithm in this paper improves 6.7 percentage points compared with the original FCOS in the detection of mask wearing in complex scenes. Meanwhile, compared with some mainstream target detection algorithms, the improved algorithm in this paper also has better effect and robustness.

Key words: multi-scale, deformable convolution, label assignment strategy, Generalized Focal Loss