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.
Sparse R-CNN的损失函数采用GIoU(Generalized intersection over union loss),计算公式如式(9)所示:
式中:为预测框和真实框的最小外接矩形;和分别为真实框和预测框。
GIoU是一种用于评估和优化目标检测中边界框(Bounding Box)回归的指标。它不仅考虑预测框与真实框的重叠区域,还引入了一个惩罚项,用于衡量两个框的最小外接矩形(Bounding rectangle)的面积差异。然而,它并未显式考虑两个框之间的相对位置关系(如中心点距离)。损失函数Focal-EIoU[25]通过引入中心点距离和宽高比的惩罚项,进一步优化了边界框回归。Focal-EIoU的参数示意图如图7所示。其中, A 为真实框, B 为预测框, C 为 A 和 B 的最小封闭框;为 A 、 B 中心点的距离, A ′为 A 点中心点, B ′为 B 点中心点;c为最小封闭框 C 的对角线长度,w、h为 A 、 B 、 C 3个框的宽和高。Focal-EIoU的计算公式如公式(10)所示:
图8展示了所提模型与表4中列出的其他先进模型在APs(小目标平均精度)、APm(中目标平均精度)和APl(大目标平均精度)3个指标上的P-R(精确率-召回率)曲线对比。其中,图8(a)展示了各模型在APs上的P-R曲线,图8(b)展示了APm的P-R曲线,图8(c)则展示了APl的P-R曲线。P-R曲线是目标检测领域中用于评估模型性能的核心指标之一,其横轴表示召回率(Recall),纵轴表示精确率(Precision)。通常,P-R曲线覆盖的面积(Area under curve, AUC)越大,表明模型在目标检测任务中的综合性能越优,能在高召回率的同时保持较高的精确率。
QiXiang-ming, LiuXiao-xuan, WangZi-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.
[3]
RenS Q, HeK M, GirshickR, 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.
[4]
CaiZ W, VasconcelosN. 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.
[5]
HeK, GkioxariG, DollárP, et al. Mask R-CNN[C]//Proceedings of IEEE Conference on Computer Vision and Pattern Recognition, Venice, Italy,2017: 2961-2969.
[6]
SunP Z, ZhangR, Jiang YF, 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.
[7]
RedmonJ, DivvalaS, GirshickR, 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.
[8]
RedmonJ, FarhadiA. YOLO9000: better, faster, stronger[C]//IEEE Conference on Computer Vision and Pattern Recognition, Honolulu, USA, 2017: 6517-6525.
[9]
RedmonJ, FarhadiA. YOLOv3: an incremental improvement [EB/OL]. [2018-04-08].
[10]
BochkovskiyA, WangC Y, LiaoH 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.
[11]
ZhuX K, LyuS C, WangX, 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.
[12]
WangC Y, BochkovskiyA, LiaoH 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.
[13]
LiuW, AnguelovD, ErhanD, et al. Ssd: Single shot multibox detector[C]//Computer Vision-ECCV 2016: 14th European Conference, Amsterdam, The Netherlands,2016,9905: 21-37.
[14]
AlexeyD. An image is worth 16x16 words: Transformers for image recognition at scale[J]. Arxiv Preprint arxiv: 2020.
[15]
LiuZ, LinY T, CaoY, 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.
[16]
LiQ M, SuY J, GaoY, 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.
[17]
WuJ T, DaiG J, ZhouW 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.
LiuChang-yuan, ZhangYu-liang, BiXiao-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.
[20]
ChenT, ChenJ H, GaoT, 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.
[21]
ParkS K, ChungJ H, PaeD 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.
[22]
FanQ, HuangH B, GuanJ Y, et al. Rethinking local perception in lightweight vision transformer[J]. arXiv, 2023. arXiv:
[23]
CholletF. Xception: deep learning with depthwise separable convolutions[C]//Proceedings of the IEEE conference on computer vision and pattern recognition, Honolulu, USA, 2017:1800-1807.
[24]
LiJ F, WenY, HeL 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.
[25]
WangY, LiY S, WangG, 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.
[26]
ZhengM J, SunL, DongJ 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.
[27]
ZhangY F, RenW, ZhangZ, et al. Focal and efficient IOU loss for accurate bounding box regression[J]. Neurocomputing, 2022, 506: 146-157.
[28]
ShaoS, ZhaoZ J, LiB X, et al. Crowdhuman: a benchmark for detecting human in a crowd[J]. arXiv, 2018. arXiv:
[29]
TanM X, PangR M, LeQ V. EfficientDet: scalable and efficient object detection[C]//2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition, Seattle, USA, 2020:10778-10787.
[30]
HeJ B, ErfaniS, MaX 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
[31]
GeZ, LiuS T, WangF, et al. YOLOX: exceeding YOLO series in 2021[J].arXiv, 2021. arXiv:
[32]
ZhouX, WangD, KrähenbühlP. Objects as points[J]. arXiv, 2019. arXiv:
[33]
VargheseR, SambathM. 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.
[34]
KhanamR, HussainM. Yolov11: An overview of the key architectural enhancements[J].arXiv, 2024. arXiv:
[35]
LinT Y, GoyalP, GirshickR, et al. Focal loss for dense object detection[C]//Proceedings of the IEEE International Conference on Computer Vision, Venice, Italy, 2017:2999-3007.