吉林大学学报(工学版) ›› 2026, Vol. 56 ›› Issue (9): 2476-2488.doi: 10.13229/j.cnki.jdxbgxb.20250284

• 计算机科学与技术 • 上一篇    

双分流多尺度注意力与单层输出的密集行人检测算法

金静(),韩子阳,翟凤文   

  1. 兰州交通大学 电子与信息工程学院,兰州 730070
  • 收稿日期:2025-04-03 出版日期:2026-09-01 发布日期:2026-09-07
  • 作者简介:金静(1982-),女,副教授,博士. 研究方向:模式识别,图像处理. E-mail:28089092@qq.com
  • 基金资助:
    甘肃省高校教师创新基金项目(2025B-060);宁夏自然科学基金项目(2023AAC03741);甘肃省科技计划项目重点研发计划项目-工业类(23YFGA0047)

Dense pedestrian detection algorithm with dual-branch multi-scale attention and single-layer output

Jing JIN(),Zi-yang HAN,Feng-wen ZHAI   

  1. School of Electronic and Information Engineering,Lanzhou Jiaotong University,Lanzhou 730070,China
  • Received:2025-04-03 Online:2026-09-01 Published:2026-09-07

摘要:

针对密集行人检测因遮挡和小尺度目标导致的漏检与误检问题,提出了一种基于双分流多尺度注意力与单层输出的密集行人检测算法DSS R-CNN。首先,设计了一种双分流多尺度注意力模块(DBMAB),将其嵌入CloFormer主干网络中以增强特征提取能力,使模型更关注重要信息,从而提升检测精度;其次,针对特征金字塔网络多层输出对Sparse R-CNN贡献有限的问题,提出了一种基于特征调制模块(FMB)的单层输出颈(SLON),在保持检测精度的同时提高了推理速度;最后,采用Focal-EIoU损失函数进一步优化模型训练。在CrowdHuman数据集上的实验结果表明,本文算法达到了90.4%的AP、96.2%的Recall和44.1%的MR-2,检测速度保持在46 f/s,优于现有密集行人场景下的检测算法。

关键词: 密集行人检测, Sparse R-CNN, CloFormer, 多尺度注意力, 单层输出颈

Abstract:

Aiming at the problem of missed detection and false detection caused by occlusion and small-scale targets in dense pedestrian detection, the paper proposes a dense pedestrian detection algorithm DSS R-CNN (Dual-branch Single-layer Sparse R-CNN) based on dual-branch multi-scale attention and single-layer output. Firstly, a Dual-Branch Multi-scale Attention Block (DBMAB) is designed and embedded into the CloFormer backbone network to enhance the feature extraction ability, so that the model can pay more attention to important information, so as to improve the detection accuracy. Secondly, aiming at the problem that the multi-layer output of feature pyramid network has limited contribution to Sparse R-CNN, a Single-layer Output Neck (SLON) based on Feature Modulation Block (FMB) is proposed. It improves the inference speed while maintaining the detection accuracy. Finally, Focal-EIoU loss function is used to further optimize the model training. Experimental results on the CrowdHuman dataset show that the proposed algorithm achieves 90.4% AP, 96.2% Recall and 44.1% MR-2, and the detection speed remains at 46 f/s, which is better than the existing pedestrian detection algorithms in complex scenes.

Key words: dense pedestrian detection, Sparse R-CNN, CloFormer, multi-scale attention, single-layer output neck

中图分类号: 

  • TP391

图1

DSS R-CNN算法框架"

图2

基于DBMAB的CloFormer主干网络示意图"

图3

改进的Clo block和Conv FFN模块示意图"

图4

DBMAB模块架构图"

图5

不同颈部结构的图解"

图6

FMB模块"

图7

Focal-EIoU的参数示意图"

表1

不同颈部应用于Sparse R-CNN的效果对比"

Neck

AP

/%

MR-2

/%

Recall

/%

FLOPs

/G

帧率/

(f·s-1

FPN(default)87.146.995.611243
BiFPN87.446.295.812940
SLON87.645.995.89246

表2

不同IoU方式的定位损失函数对实验结果的影响"

算法

AP

/%

MR-2

/%

Recall

/%

帧率/

(f·s-1

Sparse RCNN+IoU86.847.595.443
Sparse RCNN+GIoU loss87.146.995.642
Sparse RCNN+DIoU loss87.247.395.642
Sparse RCNN+CIoU loss(default)87.147.095.643
Sparse RCNN+SIoU loss87.346.595.642
Sparse RCNN+Alpha-IoU loss2887.446.395.743
Sparse RCNN+Focal-EIoU87.646.195.843

表3

不同目标检测算法对比"

算法

Image-size

AP

/%

MR-2

/%

Recall

/%

帧率/

(f·s-1

Faster R-CNN

640×640

72.4

51.2

88.5

29

Cascade R-CNN

640×640

74.6

44.2

87.2

36

YOLOX

640×640

86.5

46.3

95.9

79

CenterNet

640×640

87.0

45.7

96.1

48

YOLOv8

640×640

90.2

44.5

96.2

76

Sparse R-CNN(Baseline)

640×640

87.1

46.9

95.6

43

Swin-Transformer

640×640

90.1

44.8

95.9

51

文献[16

640×640

87.4

45.4

95.6

44

YOLOv11

640×640

91.1

44.3

97.2

62

DSS R-CNN(Ours)

640×640

90.4

44.1

96.2

46

表4

Crowdhuman 数据集上的比较实验 (%)"

算法APAP50AP75APlAPmAPs
RetinaNet3330.1665.8722.8833.1530.8516.96
Faster R-CNN38.7873.1235.5340.7938.7129.05
Cascade R-CNN42.6477.6342.6941.5641.9731.13
Sparse R-CNN45.3780.1945.0748.4343.8532.86
DSS R-CNN(Ours)47.4681.3847.2649.6244.9336.21

图8

五种目标检测方法的APs、APm和APl的P-R曲线"

表5

本文数据集上的消融实验结果"

Improved scheme

AP

/%

MR-2

/%

Recall

/%

帧率/

(f·s-1

ModelDBMAB-CloFormerSLONFocal-EIoU
A×××87.146.995.643
B××88.245.395.840
C××87.645.995.846
D××87.646.195.843
E×88.944.896.041
F×89.644.596.142
H90.444.196.246

图9

CrowdHuman 数据集上的检测结果"

[1] 齐向明, 刘晓暄, 王子键. 关键特征感知并行细粒度特征提取的密集行人检测[J]. 计算机工程与应用, 2026, 62(1): 297-306.
Qi Xiang-ming, Liu Xiao-xuan, Wang Zi-jian. Dense pedestrian detection based on key feature perception and parallel fine-grained feature extraction[J]. Computer Engineering and Applications, 2026, 62(1): 297-306.
[2] Ren S Q, He K M, Girshick R, et al. Faster R-CNN: towards real-time object detection with region proposal networks[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2017, 39(6): 1137-1149.
[3] Cai Z W, Vasconcelos N. Cascade R-CNN: Delving into high quality object detection[C]∥IEEE/CVF Conference on Computer Vision and Pattern Recognition, Salt Lake City, USA, 2018: 6154-6162.
[4] He K, Gkioxari G, Dollár P, et al. Mask R-CNN[C]∥Proceedings of IEEE Conference on Computer Vision and Pattern Recognition, Venice, Italy,2017: 2961-2969.
[5] Sun P Z, Zhang R, Jiang Y F, et al. Sparse r-CNN: end-to-end object detection with learnable proposals[C]∥Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, Nashville, USA, 2021, 14449-14458.
[6] Redmon J, Divvala S, Girshick R, et al. You only look once: Unified, real-time object detection[C]∥IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas,USA, 2016: 779-788.
[7] Redmon J, Farhadi A. YOLO9000: better, faster, stronger[C]∥IEEE Conference on Computer Vision and Pattern Recognition, Honolulu, USA, 2017: 6517-6525.
[8] Redmon J, Farhadi A. YOLOv3: an incremental improvement [EB/OL]. [2018-04-08]. .
[9] Bochkovskiy A, Wang C Y, Liao H Y M. YOLOv4: optimal speed and accuracy of object detection[C]∥Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2020, 11:829-838.
[10] Zhu X K, Lyu S C, Wang X, et al. TPH-YOLOv5: improved YOLOv5 based on transformer prediction head for object detection on drone-captured scenarios[C]∥2021 IEEE/CVF International Conference on Computer Vision Workshops, Montreal, Canada, 2021:2778-2788.
[11] Wang C Y, Bochkovskiy A, Liao H Y M. YOLOv7: trainable bag-of-freebies sets new state-of-the-art for real-time object detectors[C]∥Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, Vancouver, Canada, 2023: 7464-7475.
[12] Liu W, Anguelov D, Erhan D, et al. Ssd: Single shot multibox detector[C]∥Computer Vision-ECCV 2016: 14th European Conference, Amsterdam, The Netherlands,2016,9905: 21-37.
[13] Alexey D. An image is worth 16x16 words: Transformers for image recognition at scale[J]. Arxiv Preprint arxiv: , 2020.
[14] Liu Z, Lin Y T, Cao Y, et al. Swin transformer: Hierarchical vision transformer using shifted windows[C]∥Proceedings of the IEEE/CVF International Conference on Computer Vision, Montreal, Canada, 2021:9992-10002.
[15] Li Q M, Su Y J, Gao Y, et al. OAF-Net: an occlusion-aware anchor-free network for pedestrian detection in a crowd[J]. IEEE Transactions on Intelligent Transportation Systems, 2022, 23(11): 21291-21300.
[16] Wu J T, Dai G J, Zhou W H, et al. Multi-scale feature fusion with attention mechanism for crowded road object detection[J]. Journal of Real-Time Image Processing, 2024, 21(2): 29.
[17] 柳长源, 张玉亮, 毕晓君. 基于多阶段提议稀疏区域卷积网络的城市交通目标检测[J]. 电子学报, 2023, 51(1): 26-31.
Liu Chang-yuan, Zhang Yu-liang, Bi Xiao-jun. Urban traffic object detection based on multi-stage proposal sparse regional convolutional neural network[J]. Chinese Journal of Electronics, 2023, 51(1): 26-31.
[18] Chen T, Chen J H, Gao T, et al. A novel scene-aware pedestrian detection in dense scenes[C]∥2024 27th International Conference on Computer Supported Cooperative Work in Desig, Tianjin, China, 2024: 1316-1321.
[19] Park S K, Chung J H, Pae D S, et al. Fusion-attention network using dense scale-invariant feature transform flow image and point cloud for 3D pedestrian detection[J]. Multimed Tools and Applications,2025,84(14): 12813-12833.
[20] Fan Q, Huang H B, Guan J Y, et al. Rethinking local perception in lightweight vision transformer[J]. arXiv, 2023. arXiv:.
[21] Chollet F. Xception: deep learning with depthwise separable convolutions[C]∥Proceedings of the IEEE conference on computer vision and pattern recognition, Honolulu, USA, 2017:1800-1807.
[22] Li J F, Wen Y, He L H. Scconv: spatial and channel reconstruction convolution for feature redundancy[C]∥Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Vancouver, Canada,2023: 6153-6162.
[23] Wang Y, Li Y S, Wang G, et al. Multi-scale attention network for single image super-resolution[C]∥Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Seattle, USA, 2024: 5950-5960.
[24] Zheng M J, Sun L, Dong J X, et al. SMFANet: A lightweight self-modulation feature aggregation network for efficient image super-resolution[C]∥European Conference on Computer Vision, Milan, Italy, 2024:359-375.
[25] Zhang Y F, Ren W, Zhang Z, et al. Focal and efficient IOU loss for accurate bounding box regression[J]. Neurocomputing, 2022, 506: 146-157.
[26] Shao S, Zhao Z J, Li B X, et al. Crowdhuman: a benchmark for detecting human in a crowd[J]. arXiv, 2018. arXiv:.
[27] Tan M X, Pang R M, Le Q V. EfficientDet: scalable and efficient object detection[C]∥2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition, Seattle, USA, 2020:10778-10787.
[28] He J B, Erfani S, Ma X J, et al. Alpha-IoU: a family of power intersection over union losses for bounding box regression[C]∥2021 Conference on Neural Information Processing Systems,San Diego,USA,2021: 20230-20242
[29] Ge Z, Liu S T, Wang F, et al. YOLOX: exceeding YOLO series in 2021[J].arXiv, 2021. arXiv:.
[30] Zhou X, Wang D, Krähenbühl P. Objects as points[J]. arXiv, 2019. arXiv:.
[31] Varghese R, Sambath M. YOLOv8: a novel object detection algorithm with enhanced performance and robustness[C]∥2024 International Conference on Advances in Data Engineering and Intelligent Computing Systems, Chennai, India, 2024: 1-6.
[32] Khanam R, Hussain M. Yolov11: An overview of the key architectural enhancements[J].arXiv, 2024. arXiv:.
[33] Lin T Y, Goyal P, Girshick R, et al. Focal loss for dense object detection[C]∥Proceedings of the IEEE International Conference on Computer Vision, Venice, Italy, 2017:2999-3007.
[1] 张瑞峰,郭芳兆,李锵. 基于多尺度注意力信息复用网络的胸片图像分类[J]. 吉林大学学报(工学版), 2025, 55(11): 3686-3696.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!