Multi-object detection for crowded road scene based on ML-AFP of YOLOv5

Yiming Li, Kaiwen Wu, Wenshuo Kang, Yuhui Zhou, Di FanScientific 2023 · DOI

Abstract

Aiming at the problem of multi-object detection such as target occlusion and tiny targets in road scenes, this paper proposes an improved YOLOv5 multi-object detection model based on ML-AFP (multi-level aggregation feature perception) mechanism. Since tiny targets such as non-motor vehicle and pedestrians are not easily detected, this paper adds a micro target detection layer and a double head mechanism to improve the detection ability of tiny targets. Varifocal loss is used to achieve a more accurate ranking in the process of non-maximum suppression to solve the problem of target occlusion, and this paper also proposes a ML-AFP mechanism. The adaptive fusion of spatial feature information at different scales improves the expression ability of network model features, and improves the detection accuracy of the model as a whole. Our experimental results on multiple challenging datasets such as KITTI and BDD100K show that the accuracy, recall rate and mAP value of the proposed model are greatly improved, which solves the problem of multi-object detection in crowded road scenes.

Introduction

Object detection in autonomous driving and traffic monitoring remains a significant challenge, particularly in crowded urban environments. Standard models often fail when faced with "tiny targets"—such as distant pedestrians or cyclists—and "occlusion," where overlapping vehicles confuse standard detection algorithms. This research enhances the YOLOv5 architecture to better handle these complexities by introducing a multi-level feature aggregation mechanism (ML-AFP) and architectural refinements specifically tuned for small, densely packed objects.

Proposed Methodology

The researchers introduced four primary enhancements to the baseline YOLOv5 architecture to bridge the gap in performance for crowded scenes.

The proposed architecture featuring the Micro target detection layer, ML-AFP neck, and Double head mechanism.

1. ML-AFP (Multi-Level Aggregation Feature Perception)

The core innovation is the ML-AFP module, a "plug-and-play" component that adaptively fuses spatial information across different scales. By utilizing both Max Pooling and Average Pooling, the module captures diverse local features. A Sigmoid-based weighting system then allows the network to dynamically prioritize feature levels most relevant to the current scene.

2. Micro Target Detection Layer

Standard YOLOv5 typically utilizes three detection scales. To prevent the loss of fine-grained information during downsampling, the authors added a fourth, high-resolution "Level 4" layer. This layer preserves the features of tiny objects before they are lost to deeper network layers.

3. Double Head Mechanism

To resolve the inherent conflict between identifying what an object is and where it is, the architecture decouples classification and regression tasks into two separate "heads." This separation reduces task interference and leads to higher overall precision.

4. Varifocal Loss

By replacing standard loss functions with Varifocal Loss, the model prioritizes high-quality positive samples during training. This results in more accurate confidence rankings, which is critical for correctly identifying objects that are partially occluded by others during non-maximum suppression.

Experimental Results

The model was rigorously evaluated on two gold-standard benchmarks: KITTI (mid-sized European city traffic) and BDD100K (diverse weather and complex urban environments).

Precision-Recall curves comparing the proposed model against Faster-RCNN, YOLOv5, and PP-YOLOE.

The improvements were substantial across both datasets:

  • BDD100K: The proposed model achieved a Mean Average Precision (mAP) of 66.8%, a significant jump from the baseline YOLOv5's 59.0%.
  • KITTI: The model reached 93.2% mAP, outperforming both the baseline (88.4%) and other modern detectors like PP-YOLOE.
  • Vulnerable Road Users: Significant gains were observed in detecting pedestrians and cyclists. On the KITTI dataset, detection accuracy for pedestrians increased by nearly 10% over the standard model.

Discussion and Conclusion

The success of the ML-AFP mechanism highlights the importance of adaptive feature fusion. Rather than simply stacking features, learning the relative contribution of each scale allows the model to maintain high-level semantic awareness while preserving the fine details necessary for small objects.

While the model demonstrates superior accuracy, the addition of a fourth detection layer and a double-head mechanism increases computational complexity. Future work will focus on optimizing inference speed and adapting the model for deployment on low-power edge devices and industrial hardware platforms to facilitate real-world autonomous driving applications.

Summary updated

Abstract

Aiming at the problem of multi-object detection such as target occlusion and tiny targets in road scenes, this paper proposes an improved YOLOv5 multi-object detection model based on ML-AFP (multi-level aggregation feature perception) mechanism. Since tiny targets such as non-motor vehicle and pedestrians are not easily detected, this paper adds a micro target detection layer and a double head mechanism to improve the detection ability of tiny targets. Varifocal loss is used to achieve a more accurate ranking in the process of non-maximum suppression to solve the problem of target occlusion, and this paper also proposes a ML-AFP mechanism. The adaptive fusion of spatial feature information at different scales improves the expression ability of network model features, and improves the detection accuracy of the model as a whole. Our experimental results on multiple challenging datasets such as KITTI, BDD100K, and show that the accuracy, recall rate and mAP value of the proposed model are greatly improved, which solves the problem of multi-object detection in crowded road scenes.
BibTeX
@inproceedings{li2023multi,
  author = {Yiming Li and Kaiwen Wu and Wenshuo Kang and Yuhui Zhou and Di Fan},
  title = {{Multi-object detection for crowded road scene based on ML-AFP of YOLOv5}},
  booktitle = {Scientific},
  year = {2023},
  doi = {10.1038/s41598-023-43458-3},
}
Figure