Gated image pedestrian detection method based on improved YOLOv10
By improving the YOLOv10 algorithm and introducing the DFAttention attention mechanism, FC-C2f module, and BiFPN-SPPF module, the problems of difficult extraction of target features and large scale variations in gated images are solved, thereby improving detection accuracy and robustness and adapting to real-time detection in complex environments.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NORTH CHINA UNIVERSITY OF TECHNOLOGY
- Filing Date
- 2025-05-29
- Publication Date
- 2026-05-15
AI Technical Summary
In laser distance-gated imaging technology, the lack of color information in the gated image makes it difficult to extract target features, which can easily be confused with the background. Furthermore, the large variation in target scale leads to low detection accuracy and a high risk of false positives and false negatives.
An improved YOLOv10 algorithm is adopted, introducing the DFAttention attention mechanism module for multi-scale feature extraction, replacing the C2f module in the backbone network with FC-C2f, replacing the SPPF module with the BiFPN-SPPF module, and improving the loss function to ES-CIoU.
It significantly improves the detection accuracy and robustness of pedestrians in gated images, enhances the detection capability of small targets, reduces model complexity and parameter count, and adapts to real-time detection in complex environments.
Smart Images

Figure CN122049385A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of computer vision technology, specifically a method for pedestrian detection in gated images based on an improved YOLOv10. Background Technology
[0002] With the continuous development of science and technology, digital imaging technology has made rapid progress, but it also faces many challenges, such as adverse conditions like nighttime and rainy / foggy weather. Distance-gated imaging technology, as an active imaging method different from traditional imaging, is crucial in addressing these challenges. [1][2][3][4] It possesses a certain degree of penetration capability, overcoming the problems of traditional cameras being susceptible to interference from the environment and transmission media, and is widely used in underwater imaging and nighttime target imaging. Combined with pedestrian detection algorithms, laser range-gated imaging technology can improve pedestrian detection performance in complex environments.
[0003] Pedestrian detection is one of the core tasks in computer vision, aiming to locate and identify pedestrian targets from images or videos. It has important applications in scenarios such as autonomous driving, video surveillance, and robot navigation. Traditional pedestrian detection methods rely on HOG features and sliding windows, while current mainstream methods are based on deep learning and are divided into single-stage and two-stage detectors. Two-stage pedestrian detection algorithms include R-CNN and Faster R-CNN. [6] Mask R-CNN achieves high-precision detection through the paradigm of "candidate region generation + fine detection". It first generates candidate boxes that may contain pedestrians, and then classifies and regresses the location of each candidate box. These models have also made breakthrough progress in pedestrian detection.
[0004] Single-stage detection methods do not require candidate region generation; they directly predict the target category and location end-to-end, resulting in higher computational efficiency. Algorithms such as SSD and YOLO (You Only Look Once) perform better in dynamic and complex environments. Glenn Jocher's YOLOv5 and YOLOv6, employing a RepVGG reparameterized backbone network and a 7-decoupled detection head design, were the first in the YOLO series to achieve a fully anchor-free detection framework. YOLOv7...
[22] Through E-ELAN dynamic feature aggregation and Aux Head design, it became the most accurate real-time detector at the time. YOLOv8, released by Ultralytics, employs a unified multi-task architecture (detection / segmentation / pose estimation) and Distribution Focal Loss, achieving a 3.1% AP improvement over YOLOv5 on the COCO dataset. YOLOv10, proposed by the Tsinghua University team...
[23] This study achieves end-to-end detection without NMS for the first time, improving inference speed by 50% while maintaining the same accuracy through consistent dual-label assignment and the CSPNet v2 backbone network. However, when pedestrians are in complex backgrounds and their features are not obvious, this places higher demands on the detection model.
[0005] To address the aforementioned problems, many scholars have proposed various improved algorithm models. (Li Xianguo) [9] Researchers optimized the feature extraction network using GhostNet, performed feature fusion using an improved PANet, and replaced ordinary 3×3 convolutions at specific locations with depthwise separable convolutions to better extract multi-scale features and reduce the number of parameters. (Yuan Lei)
[16] Based on YOLOv5, researchers designed the CoT3 module to guide the learning of dynamic attention matrices. The C3 module in the Neck section integrates a convolutional block attention model to find attention regions in various complex scenes. (Wang Xinwei)
[10] Li Y et al. introduced convolutional attention modules into the decoding layer of the U-Net network and ResNet-50 residual blocks into the encoding layer to improve the network's recognition ability. [5] Wang Z et al. introduced the SimAM attention mechanism in YOLOv8 to capture features more accurately and reduced redundant information through the GhostConv module. [7] Liu Q et al. proposed the SC-YOLOv8 detection network, which effectively reduces spatial and channel redundancy in the feature extraction process by introducing a spatial and channel dimension reconstruction mechanism, and adds a soft pooling branch in the SPP-Fast module to retain key details while compressing the feature map.
[15] The proposed YOLOv8-CB replaces the traditional C2F block with the Focal-NeXtF Block, improving the efficiency of multi-scale feature extraction and fusion while simplifying the model's complexity. (Hu Miao)
[17] The improved YOLOv7 autonomous driving target detection algorithm by Wang Zeyu et al. introduces a two-layer routing attention mechanism at the backbone network output to improve the model's detection performance for small targets.
[18] MER-YOLO, proposed by Zhang Xiaoyan et al., uses MobileViT as the backbone network to improve the model's overall feature extraction capability for target clustering regions.
[24] Du Hong et al. proposed the Spatial and Channel Reconstruction Attention Convolution (SCC2fEMA) module to significantly reduce the number of model parameters, thereby improving the model's detection speed. [8]To address the issues of false detection and missed detection in complex and severe weather conditions, such as the impact of factors like lighting, rain, snow, and dust, a YOLOv10-vehicle target detection algorithm is proposed. This algorithm improves the model's attention to vehicle targets under complex weather conditions by designing a novel attention mechanism module, WT-PSA.
[0006] The above research shows that deep learning-based detection methods have made good progress, but some problems still exist when dealing with gated images. Laser range-gated imaging technology performs well in complex environments, but the resulting images lack color information, making target feature extraction difficult and prone to confusion with the background. Furthermore, the target scale changes significantly with varying detection distances, leading to frequent false positives and false negatives. In addition, target occlusion in the gated image also affects detection accuracy. Summary of the Invention
[0007] To address the above issues, this invention selects the YOLOv10n algorithm as the basic network to further improve the problem of low detection accuracy caused by the difficulty in extracting target features in gated images, thereby adapting to the widespread application of laser distance gated imaging technology in complex scenarios.
[0008] The present invention provides a method for pedestrian detection in gated images based on an improved YOLOv10n algorithm model, which uses the acquired gated image as input to detect pedestrians in the gated image.
[0009] The improvement method for the YOLOv10n algorithm model is as follows: First, an attention mechanism module DFAttention is designed for feature extraction of multi-scale maps; second, the C2f module in the YOLOv10n backbone network is replaced with the FC-C2f module; finally, SPPF-BiFPN is used to replace the SPPF module in YOLOv10.
[0010] The DFAttention module comprises four parts: multi-scale feature extraction, spatial attention mechanism, channel attention mechanism, and feature fusion. The processing of the input feature map by the DFAttention module includes:
[0011] 1) Multi-scale feature extraction: Parallel convolutional structure is adopted, and 1×1, 3×3 and 5×5 convolutions are used for feature processing to capture feature information at different scales. These features are concatenated in the channel dimension to generate multi-scale feature maps.
[0012] 2) Spatial attention mechanism: In the spatial dimension, global spatial information is extracted by performing global average pooling and global max pooling operations on the input feature map respectively; the attributes of the two results are added together and then an activation function is used to generate a spatial attention map; the spatial attention map and the input feature map are weighted by a dot product operation to obtain a weighted spatial attention feature map.
[0013] 3) Channel attention mechanism: In the channel dimension, global average pooling is performed on the input feature map to obtain the importance information of each channel; then, feature transformation is performed through two fully connected layers, and channel attention maps are generated through activation functions; the channel attention map and the input feature map are weighted by a dot product operation to obtain a weighted channel attention feature map;
[0014] 4) Feature fusion: The results of steps 2) and 3) are initially fused by concatenation, and then further integrated by convolution. The fused feature map and the multi-scale feature map obtained in step 1) are finally fused by addition to generate the output feature map.
[0015] The innovations of the improved YOLOv10n gated image pedestrian detection algorithm proposed in this invention are reflected in the following four aspects:
[0016] (1) To address the problem of difficulty in extracting pedestrian target features due to the lack of color information in gated images, a novel attention mechanism module DFAttention is proposed, which combines multi-scale convolution.
[14] Spatial attention and channel attention dynamically adjust the weights of different features, providing richer feature representation capabilities for subsequent processing.
[0017] (2) In order to better address the problem of pedestrian targets in gated images being easily confused with the background, the original C2f module is replaced with FC-C2f to enhance important features and suppress background noise.
[0018] (3) To address the problem of large changes in the scale of pedestrian targets in gated images, the BiFPF-SPPF module is used to avoid information loss when the target scale changes significantly, which greatly improves the detection accuracy of small target pedestrians.
[0019] (4) The loss function is used to replace the CIoU function to solve the problem that pedestrians in the gated image are blurred due to noise and it is difficult to accurately locate the boundary, thus improving the detection accuracy of small target pedestrians. Attached Figure Description
[0020] Figure 1 This represents the YOLOv10 network architecture diagram;
[0021] Figure 2 This represents the improved YOLOv10 network structure diagram;
[0022] Figure 3 This diagram illustrates the structure of the DFAttention attention mechanism.
[0023] Figure 4a This represents the FasterNet Block module;
[0024] Figure 4b Indicates the FNB-CBAM module;
[0025] Figure 5 Indicates the CBAM module;
[0026] Figure 6 This indicates a comparison between the C2f module and the FC-C2f module;
[0027] Figure 7a Indicates a BiFPN module;
[0028] Figure 7b This indicates a comparison between the SPPF module and the BiFPN-SPPF module;
[0029] Figure 8 This is a visual comparison of the actual performance of YOLOv10n and the improved model. Detailed Implementation
[0030] Overview
[0031] To address the challenges of feature extraction, background interference, and large scale variations in pedestrian detection in distance-gated images, this invention proposes an improved pedestrian detection method for YOLOv10.
[0032] First, a brand-new attention mechanism module, DFAttention, is introduced, which effectively enhances the model's ability to extract features from low-contrast targets in gated images.
[0033] Next, the convolutional attention module CBAM was innovatively integrated into the FasterNet Block structure.
[12] This improves upon the original C2f module, resolving the complex background interference problem in the gated image;
[0034] Finally, to address the drastic changes in pedestrian scale in gating scenarios, an improved feature pyramid network, BiFPN-SPPF, is proposed. This module replaces the traditional convolutions in the BiFPN Block with deformable convolutional networks (DCNs) and combines them with the Contact operation to replace the Contact operation in the original SPPF module, thus constructing a multi-scale feature fusion architecture with geometric adaptability.
[0035] Experimental results show that the improved model improves mAP@0.5, Precision, and Recall by 2.8%, 1.2%, and 1.4% on the M3FD dataset, and by 2.5%, 2.1%, and 2.4% on the gated dataset.
[0036] The present invention will be further described below with reference to the accompanying drawings.
[0037] 1. Introduction to the YOLOv10 Algorithm
[0038] refer to Figure 1 YOLOv10 is a real-time object detection algorithm in the YOLO (You Only Look Once) series, developed by the Ultralytics team. It further optimizes upon YOLOv8 and YOLOv9, significantly improving the balance between speed and accuracy while reducing computational overhead. The following are the core innovations and key technologies of YOLOv10:
[0039] (1) NMS-free design
[0040] YOLOv10 uses a dual-label assignment and consistency matching strategy to enable the model to directly output the optimal detection result in a single forward propagation, eliminating the need for NMS and improving inference speed by 20%-40%.
[0041] (2) Lightweight architecture optimization
[0042] Large-kernel depthwise convolutions are used to replace some standard convolutions, increasing the receptive field while reducing computation. Dynamic Sparse Attention is introduced to adaptively focus on key regions in the detection head.
[0043] (3) Enhanced feature fusion
[0044] Improved PANet++: Enhances the interaction between shallow localization information and deep semantic information through the cross-scale bidirectional fusion (CBF) module, thereby improving the detection performance of small targets.
[0045] (4) Upgrading training strategies
[0046] New pre-training targets for tasks such as image rotation and color jitter have been added to enhance feature representation.
[0047] 2. This invention improves the YOLOv10 algorithm.
[0048] To improve the accuracy of pedestrian detection in gated images while making the model more lightweight, this invention proposes an improved lightweight pedestrian detection method based on YOLOv10. The network structure diagram is shown below. Figure 2As shown, firstly, a novel attention mechanism module, DFAttention, is proposed to enhance the feature representation capability of the model and overcome the problem of difficult target extraction in gated images. Secondly, the C2f is improved by introducing the convolutional attention module CBAM into the FasterNet Block structure to enhance important features and suppress background interference. Finally, the conventional convolutional module in BiFPN is replaced by the deformable convolutional module DCN and combined with Contact to improve the spatial feature pyramid module to replace the original SPPF module, thus solving the problem of multi-scale changes of target pedestrians in gated images.
[0049] 2.1 Attention Mechanism
[0050] Gated images are typically used in long-distance or complex environments where target features are weak and easily overwhelmed by noise, leading to a significant decline in target detection and recognition performance. To address this issue, this invention proposes a novel attention mechanism module named DFAttentiion (Dual-Focus Attention), referencing... Figure 3 This module significantly enhances feature representation capabilities through the synergistic effect of multi-scale feature extraction, spatial attention mechanisms, and channel attention mechanisms, thereby effectively improving the identifiability of targets in complex environments. It mainly consists of four parts: multi-scale feature extraction, spatial attention mechanism, channel attention mechanism, and feature fusion, ultimately performing weighted fusion to further enhance feature representation capabilities.
[0051] Parallel convolutional structures are employed, using 1×1, 3×3, and 5×5 convolutions for feature processing to capture feature information at different scales. These features are then concatenated along the channel dimension to generate a multi-scale feature map, thereby enriching the target representation capability and enhancing the adaptability of multi-scale targets.
[0052] Spatial attention mechanism
[0053] In the spatial dimension, global average pooling and global max pooling are performed on the input feature map to extract global spatial information. The attributes of the two are then added together, and a spatial attention map is generated using the sigmoid activation function. The spatial attention map and the input feature map are weighted by a dot product operation to obtain a weighted spatial attention feature map, which significantly enhances the saliency of the target region and reduces the interference of background noise.
[0054] At the channel level, global average pooling is applied to the input feature map to obtain the importance information of each channel. Subsequently, feature transformation is performed through two fully connected layers (FC1 → ReLU → FC2), and a channel attention map is generated using a sigmoid activation function. This map is then weighted with the input feature map through a dot product operation to obtain a weighted channel attention map, thereby enhancing the expressive power of key channels and improving the model's focus on crucial information.
[0055] Finally, the weighted spatial attention map and channel attention map are initially fused through a concatenation operation, and then further integrated through a convolution operation, ensuring full interaction between the two attention information. The fused feature map is then finally fused with the multi-scale convolutional feature map through an addition operation to generate an output feature map, providing richer feature representation capabilities for subsequent tasks. This multi-level, multi-angle feature fusion mechanism not only enhances the expressive power of target features but also significantly improves the model's robustness and generalization ability in complex environments.
[0056] Through the above design, the DFAttention module performs excellently in complex scenarios such as long distance and low signal-to-noise ratio, providing strong support for target detection and recognition tasks.
[0057] 2.2 Improved C2f module (FC-C2f)
[0058] In target detection tasks based on distance-gated images, targets may be affected by factors such as illumination, noise, and occlusion, increasing the recognition speed of the detection network. The feature representation ability of traditional Bottleneck blocks may be insufficient, leading to a decrease in detection performance. To effectively extract contextual information from input features and improve the detection capability for small targets and occluded blurred images, this invention proposes to incorporate features from FasterNet Block modules (such as...) Figure 4a The second PWConv introduces a convolutional attention module CBAM, which is then fused into an FNB-CBAM module (e.g., ...). Figure 4b ); Replace the Bottleneck module in the C2f module with the FNB-CBAM module to form a completely new module FC-C2f (e.g. Figure 6 ).
[0059] The FasterNet Block module extracts spatial features more effectively and suppresses noise by simultaneously reducing redundant computation and memory access through Partial Convolution (Pconv) and Point-Wise Convolution (PWConv). The structure is shown in the figure below. The Convolutional Attention Module (CBAM) is as follows. Figure 5As shown, by combining channel attention and spatial attention, not only can important features be adaptively enhanced and irrelevant features suppressed, but background noise interference can also be effectively suppressed.
[0060] Replacing the C2f module in the YOLOv10 backbone network with the brand-new FC-C2f module not only enhances important features and suppresses noise, solving the problem of insufficient feature representation in complex scenes, but also has stronger adaptability in different gating environments (night, rain, fog, windowing, etc.), while reducing the number of model parameters, improving computational efficiency, and meeting real-time requirements.
[0061] 2.3 Improved Spatial Pyramid Pooling Module
[0062] While the SPPF module in YOLOv10 improves the ability to extract multi-scale features to some extent, its multi-scale feature fusion capability is limited, it lacks a bidirectional feature fusion mechanism, has insufficient feature interaction, and cannot dynamically adjust the pooling strategy for targets with large scale changes.
[0063] To address the aforementioned issues, this invention introduces SPPF-BiFPN to replace the original SPPF module. This is achieved by replacing BiFPN with Deformable Convolutional Networks (DCN).
[13] The conventional convolutional modules in SPPF are converted into DCN-BiFPN, and then DCN-BiFPN is combined with Contact to form Contact-DCN-BiFPN, which replaces the Contact module in SPPF, thus forming SPPF-BiFPN.
[0064] DCN introduces learnable offsets, allowing the sampling positions of the convolutional kernels to dynamically adjust based on the content of the input features, thus better capturing features of irregular shapes and complex aggregate structures. BiFPN improves efficiency by optimizing the feature fusion path, removing nodes containing only a single input to reduce redundancy. As shown in Figure 7(a), BiFPN achieves deeper feature fusion and information transfer through multiple repetitions of bidirectional paths. Furthermore, BiFPN introduces a weighted feature fusion strategy, dynamically assigning different weights based on feature importance to enhance the fusion effect. The DCN-BiFPN module, combining DCN and BiFPN, can more flexibly capture features of multi-scale targets, improving feature extraction performance. By incorporating the Concat operation, DCN-BiFPN can adjust the contribution of features at different scales, ensuring that important or more discriminative features are given greater weight during the fusion process, thereby more effectively capturing multi-scale information of the target.
[0065] Finally, Contact in the original SPPF of YOLOv10 was replaced with Contact-DCN-BiFPN to form SPPF-BiFPN (see reference). Figure 7b This not only optimizes global feature representation but also enhances the preservation of small target features and background suppression capabilities. At the same time, it reduces computational redundancy, improves detection accuracy while maintaining real-time performance, and enables YOLOv10 to have stronger detection capabilities when facing gated image scale variations.
[0066] 2.4 Loss Function
[0067] YOLOv10's bounding box regression uses the CIoU loss function, and the formula for calculating CIoU is as follows:
[0068]
[0069]
[0070]
[0071] in This represents the Euclidean distance between the center of the predicted bounding box and the center of the ground truth bounding box. This represents the length of the diagonal of the smallest bounding rectangle.
[0072] Traditional CIoU, while considering various geometric factors such as the position, overlap, and aspect ratio between the predicted and ground truth bounding boxes, still suffers from insensitivity to blurred edge targets in gated images. This is particularly true in the presence of strong noise or unclear target boundaries, where the model may misclassify the target as background, leading to missed detections. To address this, this invention introduces an edge weight factor, using the standard deviation of pixels within the target region to quantify boundary sharpness. This adaptively adjusts the loss weights, making the model more attentive to areas with uncertain boundary information.
[0073] The edge weighting factor is defined as follows:
[0074]
[0075] in The standard deviation of pixels within the current ground truth bounding box. For all ground truth boxes in the current batch The mean, As an adjustment factor, the edge sensitivity intensity is controlled (0.3 is the default value in this paper, which achieves the best trade-off between performance improvement and stability). The final ES-CIoU calculation formula is as follows:
[0076]
[0077] This design ensures that when the edge of a target is blurred (with a small standard deviation), the loss weight is appropriately increased to guide the model to focus on the blurred area; conversely, targets with clear boundaries maintain normal weights, which helps improve the model's ability to learn targets that are difficult to distinguish.
[0078] 3. Experimental Results and Analysis
[0079] 3.1 Experimental Platform and Environment Configuration
[0080] The experimental platform consisted of an Nvidia RTX 2080Ti GPU with 11GB of VRAM. The PyTorch 1.12.1 framework was used for model building, training, and testing, with Python version 3.8 and CUDA version 11.8.
[0081] In this practical application, the network model was trained with a batch size of 8, a batch size of 48, a training batch size of 200, an SGD optimizer, a learning rate descent method of Cos, an initial learning rate of 1e-2, a learning rate of 1e-4, no pre-trained weights used, and training set images were scaled proportionally to 640×640 before being input into the network.
[0082] The experiment used mean precision (mAP@0.5, mAP@0.5:0.95), precision, recall, number of model parameters, and model size as evaluation criteria to measure model performance. Mean precision measures the overall performance of the model in the recognition task, comprehensively considering both accuracy and recall to provide a holistic assessment of the model's prediction quality. Precision and recall represent the proportion of positive samples and true targets, respectively, defined as follows:
[0083]
[0084]
[0085]
[0086] Where TP refers to the match between the detected target and the actual target, FP refers to the model incorrectly predicting a negative sample as a positive sample, and FN refers to the model failing to detect the actual target. i It is the Recall value corresponding to the first interpolation point of Precision, P inter For the next Recall value r i+1 With the current value r iThe maximum precision value between the categories, where k represents the number of categories.
[0087] 3.2 Introduction to the Dataset
[0088] This experiment uses the publicly available dataset M3DF and a self-made gating dataset to train and validate the algorithm in order to evaluate its performance and effectiveness in detection tasks.
[0089] The M3DF dataset focuses on dual-modal pedestrian detection in visible light and infrared light under low-light conditions. It solves the challenge of pedestrian detection in extremely low light and fills a research gap in nighttime, light-free scenes. It includes 4200 pairs of strictly aligned RGB and IR images. The dataset is divided into training, validation, and test sets in a 7:1:2 ratio.
[0090] The self-made gating dataset consists of 12,531 gated images of pedestrian targets in complex scenes, including nighttime, backlighting, and long distances, acquired using a laser range-gated camera. As shown in the figure, compared to normal RGB images, gated images lack target features and have low contrast, thus posing greater challenges in pedestrian detection tasks. The gating dataset was divided into training, validation, and test sets in a 7:1:2 ratio.
[0091] 3.3 Comparative Experiment
[0092] All comparative experiments in this study were conducted on the M3FD dataset, using YOLOv10n as the baseline model, to verify the detection performance of different improved modules.
[0093] 3.3.1 Comparative Experiment of Different Attention Mechanisms
[0094] To verify the detection capabilities of the DFAttention attention mechanism, it was compared with common attention mechanisms such as SE, ECA, EMA, and CBAM, as shown in Table 1. The comparison results are shown in the table. It can be seen that the model using DFAttention has relatively better detection performance compared to the basic model in terms of mAP. 50 and mAP 50:95 The results improved by 0.6 and 0.4 percentage points respectively, validating the effectiveness of DFAttention.
[0095] Table 1. Comparative Experiment Results of Different Attention Mechanism Modules
[0096]
[0097] 3.3.2 Comparative Experiment of Different C2f Improved Modules
[0098] To investigate the effectiveness of the FC-C2f improvement module, YOLOv10n was used as the baseline model, and the baseline module and C2f-FasterBlock (FasterNet) were selected.
[11] FasterBlock replaces Bottleneck in C2f), C2f-RepVitBlock (RepViTBlock in RepViT)
[19] Replace Bottleneck in C2f), C2f-RepVGG (RepVGG)
[20] RepVGGBlock replaces Bottleneck in C2f), C2f-Ghost (GhostNet)
[21] A comparative experiment was conducted between GhostBottleNeck (which replaces Bottleneck in C2f) and FC-C2f.
[0099] As shown in Table 2, the comparison results reveal that C2f-RepVGG performed the worst. While C2f-RepVitBlock had a relatively high recall rate, its parameter count was large. C2f-Ghost performed well in other aspects, but its detection accuracy decreased significantly. Although C2f-FasterBlock had a significantly reduced parameter count, its recall rate was insufficient. Compared to other modules, EC-C2f demonstrated the best performance and significantly reduced the model's parameters. This indicates that EC-C2f effectively helps the model improve its ability to extract target features at different scales in gated images, strengthens the features of regions of interest, and suppresses noise.
[0100] Table 2 Comparison of experimental results for different improved C2f modules
[0101]
[0102] 3.3.3 Comparative Experiment of Different Pyramid Improvement Modules
[0103] To investigate the effectiveness of the BiFPN-SPPF module, YOLOv10n was used as the baseline model. Comparative experiments were conducted with the baseline module, SimSPPF, CSP-SPPF, and BiFPN-SPPF. The results are shown in Table 3. SimSPPF shows improvements in all aspects compared to the baseline module, but it is slightly inferior to our proposed module, BiFPN-SPPF. Although CSP-SPPF performs well in detection performance, its parameter count is too large. BiFPN-SPPF shows good performance in all aspects compared to other modules. This indicates that BiFPN-SPPF improves the model's ability to extract multi-scale features, effectively reduces the loss of targets in gated images, and reduces the parameter count, resulting in better detection performance.
[0104] Table 3. Comparative Experiment Results of Different Improved Pyramid Modules
[0105]
[0106] 3.3.4 Comparison Experiment of Different Loss Functions
[0107] To explore the effectiveness of the improved loss function ES-CIoU, this paper designs several sets of comparative experiments based on the YOLOv10n model, covering traditional CIoU, Focal-CIoU which introduces a difficult sample focusing mechanism, Grad-CIoU which integrates image gradient information, and a variant of ES-CIoU that removes the adjustment factor.
[0108] The so-called ES-CIoU without adjustment factors means that the edge sensitivity intensity is not artificially controlled, but the weights are directly adjusted by the experimental standard deviation ratio. Therefore, the loss function becomes:
[0109] As shown in Table 4, the performance of Baseline (YOLOv10n + CIoU) in small object detection is relatively limited, with an mAP@0.5 of 85.3%, an mAP@0.5:0.95 of 49.1%, and a small object detection accuracy (mAP-S) of only 27.8%. Introducing Focal Loss slightly improves the performance, indicating that modeling difficult samples helps in identifying small objects. Furthermore, introducing Grad-CIoU with image gradient edge weights further improves the performance, reaching 86.2% for mAP@0.5 and 29.5% for mAP-S, demonstrating enhanced ability to perceive boundary information.
[0110] In comparison, the ES-CIo proposed in this invention performs best across all metrics, achieving 86.4% mAP@0.5, 49.8% mAP@0.5:0.95, and 30.1% mAP-S. It also achieves a localization accuracy (mean CIoU) of 0.767 and a false negative rate of 12.3%, significantly outperforming other comparative methods. This indicates that the strategy of using the standard deviation of GT box pixels as an adaptive adjustment factor for edge weights can effectively improve the model's ability to perceive targets with blurred boundaries, thereby improving overall detection accuracy, especially in small target scenarios.
[0111] Furthermore, the ES-CIoU performance decreased slightly after removing the adjustment factor, indicating that introducing the adjustment factor helps to achieve a better balance between edge sensitivity and training stability, avoiding training instability caused by excessive fluctuations in edge standard deviation.
[0112] In summary, ES-CIoU not only improves the overall performance of object detection, but also demonstrates better robustness and practical value, especially in complex environments with small targets, blurred boundaries, and strong background interference, verifying its effectiveness and potential for widespread application as a boundary-aware localization loss function.
[0113] Table 4. Experimental results comparing different loss functions
[0114]
[0115] This design introduces only a lightweight weighting term to the original CIoU, adding almost no computational overhead, and possesses good boundary adaptability, making it particularly suitable for small target detection tasks in complex backgrounds. Experimental results show that ES-CIoU effectively improves the detection rate and localization accuracy of small pedestrian targets while maintaining model stability.
[0116] 3.3.4 Comparison Experiment of Different Algorithms
[0117] To further demonstrate the effectiveness of the improved algorithm performance of this invention, a comparative experiment was conducted with the improved model and current mainstream deep learning algorithm models, including Faster R-CNN, YOLOv5n, YOLOv6s, YOLOv7-tiny, YOLOv8n, YOLOv10n, as well as methods proposed in recent years for pedestrian detection such as YOLOv8-CB, CTC-YOLO, and MER-YOLO.
[0118] YOLOv8-CB is a lightweight, multi-scale pedestrian detection algorithm based on YOLOv8. It introduces the cascaded fusion network CFNet and the CBAM attention mechanism, and superimposes a bidirectional weighted feature fusion path (BIFPN) structure, making it a lighter model for multi-scale pedestrian detection in complex scenes such as streets or intersections. MER-YOLO, building upon YOLOv8, uses MobileViT as the backbone network, introduces the EMA attention mechanism, and employs a 160×160 detector head and a repulsion loss function, providing an efficient and high-performance solution for handling dense pedestrian detection problems.
[0119] The experimental results are shown in Table 5. The improved algorithm of this invention achieves performance improvements of 2.1%, 1.2%, 1.3%, and 1.4% over the original YOLOv10n model in mAP@0.5, mAP@0.5:0.95, Precision, and Recall, respectively, while reducing the number of parameters by 1.1M. Compared with the classic two-stage algorithm Faster R-CNN, the detection performance is improved by 2.9%, 1.1%, 1.8%, and 1.7%, respectively, and the number of parameters is significantly reduced. It is evident that Faster R-CNN not only has a large number of parameters but also low computational efficiency, making it unsuitable for real-time scenarios.
[0120] Compared to YOLOv6s, the detection performance improved by 5.4%, 4.3%, 2.8%, and 5.0%, respectively, while the number of parameters decreased by 5.1M. Compared to YOLOv7-tiny, the detection performance improved by 4.9%, 3.4%, 2.4%, and 4.8%, respectively, while the number of parameters decreased by 5.9M. Both of these algorithms not only have a large number of parameters but also insufficient detection accuracy, resulting in a significant number of false positives and false negatives.
[0121] Compared to YOLOv5n, detection performance improved by 3.7%, 3.1%, 2.2%, and 4.3%, respectively, while the parameter count remained similar. Compared to YOLOv8n, detection performance improved by 3.0%, 1.0%, 1.4%, and 0.7%, with a parameter count reduction of 1.4M. Compared to YOLOv8-CB, with a similar parameter count, detection performance improved by 2.0%, 0.9%, 0.8%, and 1.6%. Compared to CTC-YOLO, detection performance improved by 0.9%, 0.7%, 0.2%, and 1.2%, with a parameter count reduction of 1.0M. Compared to MER-YOLO, detection performance improved by 1.2%, 0.8%, 1.0%, and 1.0%, with a parameter count reduction of 1.0M. Although these algorithms have a sufficiently small parameter count, there is still significant room for improvement in detection performance. In summary, the improved model based on YOLOv10 proposed in this invention not only enhances the accuracy of object detection but also effectively reduces the model's complexity and number of parameters. Furthermore, the improved algorithm presented in this study demonstrates superior performance in pedestrian detection tasks, effectively addressing the common problems of missed detections and false detections in traditional methods through innovative structural optimization. This algorithm not only significantly improves detection accuracy but also achieves lightweight model implementation, providing an efficient solution for pedestrian detection in real-time and complex scenarios.
[0122] Table 5. Comparison of Experimental Results for Different Algorithms
[0123]
[0124] 3.4 Ablation Experiment
[0125] To verify the effectiveness of the improved module method proposed in this invention, ablation experiments were conducted on the LLVIP and gated datasets using YOLOv10n as the baseline model, employing DFAttention, FC-C2f, and BiFPN-SPPF, respectively. The experimental results are shown in Tables 6 and 7. The rows marked with "√" in the tables indicate a set of improved points and their corresponding experimental result evaluation index values.
[0126] After introducing the novel attention mechanism module DFAttention, the detection performance (mAP@0.5, mAP@0.5:0.95), Precision, and Recall were improved by 0.2, 0.4, 0.1, and 0.2 on the M3FD and gated datasets, respectively, and by 0.8, 0.3, 0.2, and 0.2 on the gated dataset. This indicates that the DFAttention module can dynamically adjust the weights of different features and effectively improve the model's feature extraction and representation capabilities through multi-scale information enhancement.
[0127] After replacing the original C2f module with FC-C2f, on the M3DF dataset, mAP@0.5, mAP@0.5:0.95, and Recall decreased by 0.1, 0.2, and 0.1, but Precision improved by 0.4, and the number of parameters decreased by 0.7M. On the gated dataset, the detection performance mAP@0.5, mAP@0.5:0.95, Precision and Recall improved by 1.9, 1.3, 0.6, and 2.5, respectively, and the number of parameters decreased by 0.4M. This shows that the improved C2f module effectively suppressed background noise and reduced model complexity and number of parameters while maintaining good detection accuracy.
[0128] When the SPPF module was replaced with the BiFPN-SPPF module, mAP@0.5, mAP@0.5:0.95, Precision, and Recall were improved by 0.6, 0.7, 0.8, and 0.4 respectively on the M3DF dataset, and by 2.1, 2.2, 0.8, and 1.8 respectively on the gated dataset. This shows that the BiFPN-SPPF module can effectively solve the target loss problem caused by large multi-scale changes and make up for the lack of multi-scale feature interaction of the SPPF module.
[0129] By integrating DFAttention, FC-C2f, and BiFPN-SPPF, the detection performance on the M3DF dataset was improved by 2.8, 1.2, 1.2, and 1.4, respectively, with a decrease of 1.1M parameters. On the gated dataset, the performance was improved by 2.5, 2.1, 2.0, and 2.4, with a decrease of 0.8M parameters. Furthermore, the model size was significantly reduced on both datasets, resulting in a comprehensive improvement in overall performance.
[0130] Table 6. Module ablation experimental results on the M3DF dataset
[0131]
[0132] Table 7. Experimental Results of Module Ablation on the Gated Dataset
[0133]
[0134] 3.5 Analysis of Experimental Results
[0135] To visually demonstrate the actual effect of the improved algorithm, this experiment compares YOLOv10n with the improved model using visualization, such as... Figure 8 As shown.
[0136] 4. Conclusion
[0137] To address the challenges of target feature extraction in gated images, susceptibility to background interference, and poor detection performance due to large scale variations, this invention uses YOLOv10n as the base network. First, a novel attention mechanism module, DFAttebtion, is added. Then, an FC-C2f module is proposed to replace the original C2f module, which not only suppresses the influence of background noise but also effectively reduces the number of parameters. Simultaneously, an improved spatial pyramid module, BiFPN-SPPF, is used to replace the original SPPF module, addressing the limited multi-scale capabilities of the SPPF module and optimizing global feature representation, allowing the model to focus more on key feature information. Compared to baseline models, the improved model of this invention shows significant performance improvements on both the M3DF and gated datasets.
[0138] References
[0139] [1] Song Yanfeng, Sun Weiping, Liu Hao. Research on long-range laser illuminating gated imaging technique[J]. LASER&INFRARED,2013, 43(1):9-13.
[0140] [2] Li Yuanmiao, Sun Huayan, Guo Huichao. Current situation of time-slicing and super-resolution laser imaging in three-dimensional[J]. LASER&INFRARED, 2019, 49(4):395-402.
[0141] [3]Pierre Andersson. Long-range three-dimensional imaging using range-gated laser radar images[J].Optical Engineering, 2006, 45(3):1-10.
[0142] [4]Xiuda Zhang, Huimin Yan. Three-dimensional active imaging with maximum depth range [J]. Applied Optics, 2011,50(12):1682-1686.
[0143] [5] Li Y, Yin C, Lei Y, Zhang J, Yan Y. RDD-YOLO: Road Damage Detection Algorithm Based on Improved You Only Look Once Version 8[J]. Applied Sciences. 2024; 14(8):3360. Introducing a focus mechanism (CBAM) in YOLOv8 to enhance small target detection capabilities.
[0144] [6]Girshick R. Fast R-CNN[C] / / Proceedings of the IEEE internationalconference on computer vision.2015:1440-1448.
[0145] [7]Wang Z, Chen J, Yu P, Feng B, Feng D. SC-YOLOv8 Network with Soft-Pooling and Attention for Elevator Passenger Detection. Applied Sciences.2024; 14(8):3321.
[0146] [8] Du Hong, Gu Chenyu, Zhang Xiaozheng, et al. A vehicle target detection method based on YOLOv10-vehicle algorithm under complex weather conditions [J]. Journal of Jilin University (Engineering Science), 1-10 [2025-04-09].
[0147] [9] Li Xianguo, Cao Mingteng, Li Bin, et al. GPNet: Lightweight Infrared Image Target Detection Algorithm [J]. Journal of Infrared and Millimeter Waves, 2022, 41(06): 1092-1101.
[0148]
[10] Wang, XW., Shi, SZ., Yao, XJ. et al. Automatic identification of seismic faults via integrating Residual Network-50 residual blocks and convolutional block attention modules. Appl. Geophys. 20, 20–35 (2023). Wang Xinwei, Shi Suzhen, Yao Xuejun, et al. Automatic identification of seismic faults via integrating Residual Network-50 residual blocks and convolutional block attention modules (English) [J]. Applied Geophysics, 2023, 20(01): 20-35+130. (CBAM)
[0149]
[11] J. Chen et al., "Run, Don't Walk: Chasing Higher FLOPS for FasterNeural Networks," 2023 IEEE / CVF Conference on Computer Vision and PatternRecognition (CVPR), Vancouver, BC, Canada, 2023, pp. 12021-12031.(FasteraNet)
[0150]
[12] Sanghyun Woo, Jongchan Park, Joon-Young Lee, and In So Kweon.2018. CBAM: Convolutional Block Attention Module. In Computer Vision – ECCV2018: 15th European Conference, Munich, Germany, September 8–14, 2018,Proceedings, Part VII. Springer-Verlag, Berlin, Heidelberg, 3–19.(CBAM) Conference
[0151]
[13] M. Tan, R. Pang and Q. V. Le, "EfficientDet: Scalable andEfficient Object Detection," 2020 IEEE / CVF Conference on Computer Vision andPattern Recognition (CVPR), Seattle, WA, USA, 2020, pp. 10778-10787.(BiFPN) Conference
[0152]
[14] C. Szegedy et al., "Going deeper with convolutions," 2015 IEEEConference on Computer Vision and Pattern Recognition (CVPR), Boston, MA,USA, 2015, pp. 1-9.(Multi-scale Convolution) [Christian Szegedy; Wei Liu; Yangqing Jia;Pierre Sermanet; Scott Reed; Dragomir Anguelov. All authors]
[0153]
[15] Liu Q, Ye H, Wang S, et al. YOLOv8-CB: Dense Pedestrian DetectionAlgorithm Based on In-Vehicle Camera[J].Electronics,2024,13(1):236.https: / / doi.org / 10.3390 / electronics13010236.
[0154]
[16] Yuan L, Tang H, Chen YR, Gao R, Wu WH. Improved YOLOv5 for Road Target Detection in Complex Environments[J]. Computer Engineering and Applications, 2023, 59(16):212-222. (CTC-YOLO)
[0155]
[17] HU M, JIANG L, TAO YF, ZHANG Z J. Improved YOLOv7 Automatic Driving Object Detection Algorithm[J]. Computer Engineering and Applications, 2024, 60(11): 165-172.
[0156]
[18] WANG ZY, XU HY, ZHU XZ, et al. An improved dense pedestrian detection algorithm based on YOLOv8: MERYOLO[J]. Computer Engineering & Science, 2024, 46(06):1050-1062.
[0157]
[19] WANGA, CHEN H, LIN Z, et al. RepViT: Revisiting mobile cnn fromvit perspective[C] / / Proceedings of the IEE / CVFConference on Computer Vision and Pattern Recognition. 2024:15909-15920.
[0158]
[20]
[0159]
[21] K. Han, Y. Wang, Q. Tian, J. Guo, C. Xu and C. Xu, "GhostNet: More Features From Cheap Operations," 2020 IEEE / CVF Conference on ComputerVision and Pattern Recognition (CVPR), Seattle, WA, USA, 2020, pp. 1577-1586.
[0160]
[22] WANG CY, BOCHKOVSKIY A, LIAOHY M. YOLOv7: trainable bag-of-freebies sets new state-of-the-art for realtimeobject detectors[C] / / Proceedings of the IEEE / CVF Conference on Computer Vision and PatternRecognition. Piscatawayc: IEEE Press, 2023:7464-7475.
[0161]
[23] WANG A, CHEN H, Liu L, et al YOLOv10: Real-time end-to-end ObjectDetection[EB / OL]. arxiv:2405.14258,2024.
[0162]
[24] ZHANG Xiaoyan, WANG Miao. Research on ImprovedYOLOv8n Light-Weight Pedestrian Detection Method in Scenic Spots[J]. ComputerEngineering and Applications, 2025, 61(2): 84-96.
Claims
1. A method for detecting pedestrians in images based on improved YOLOv10n, characterized by An improved YOLOv10n algorithm model is adopted to collect a gated image as input, and pedestrians in the gated image are detected. The improved method of the YOLOv10n algorithm model is as follows: first, an attention mechanism module DFAttention is designed for multi-scale feature extraction; second, an FC-C2f module is used to replace a C2f module in a main network of the YOLOv10n; and finally, an SPPF-BiFPN is used to replace an SPPF module in the YOLOv10; The DFAttention module includes four parts of multi-scale feature extraction, spatial attention mechanism, channel attention mechanism and feature fusion, and the processing process of the DFAttention module on an input feature map includes: 1) Multi-scale feature extraction: a parallel convolution structure is adopted, 1×1, 3×3 and 5×5 convolutions are used for feature processing respectively to capture feature information of different scales, and the features are spliced in a channel dimension to generate a multi-scale feature map; 2) Spatial attention mechanism: in a spatial dimension, global average pooling and global maximum pooling operations are performed on the input feature map respectively to extract global spatial information; the properties of the two results are added, and a spatial attention map is generated through an activation function; the spatial attention map and the input feature map are weighted through a point multiplication operation to obtain a weighted spatial attention feature map; 3) Channel attention mechanism: in a channel dimension, global average pooling is performed on the input feature map to obtain importance information of each channel; then, feature transformation is performed through two fully connected layers, and a channel attention map is generated through an activation function; the channel attention map and the input feature map are weighted through a point multiplication operation to obtain a weighted channel attention feature map; 4) Feature fusion: the results of steps 2) and 3) are preliminarily fused through splicing operation, and then further integrated through convolution operation; the fused feature map and the multi-scale feature map obtained in step 1) are finally fused through addition operation to generate an output feature map.
2. The gated image pedestrian detection method based on the improved YOLOv10n according to claim 1, wherein the method for modifying the C2f module to obtain the FC-C2f module is as follows: First, a convolution attention module CBAM is introduced after a second point convolution PWConv of a FasterNet Block module to obtain a fused FNB-CBAM module; then, the FNB-CBAM module is used to replace a Bottleneck module in the C2f module to obtain the FC-C2f module; The FC-C2f module is used to replace the C2f module in the main network of the YOLOv10n.
3. The improved YOLOv10n-based gating image pedestrian detection method according to claim 1, characterized in that The method for improving the spatial pyramid pooling module is as follows: First, a deformable convolution DCN is used to replace a regular convolution module in the BiFPN to form a DCN-BiFPN; Then, a Contact-DCN-BiFPN obtained by combining the DCN-BiFPN with the Contact is used to replace a Contact module in the SPPF to form the SPPF-BiFPN.
4. The improved YOLOv10n-based gating image pedestrian detection method according to claim 1, characterized in that The improved YOLOv10 prediction frame regression adopts an ES-CIoU loss function; The ES-CIoU calculation formula is: , wherein: is an edge weight factor, is a CIoU loss function; The definition of "C1-C6alkyl" is: , wherein is the standard deviation of the pixels within the current GT box, is the mean of all GT boxes of the current batch, is the mean of all GT boxes of the current batch, is an adjustment factor; , , , wherein denotes the Euclidean distance between the center of the prediction box and the GT box, denotes the diagonal length of the minimum enclosing rectangle; b denotes the predicted bounding box area, w denotes the predicted bounding box width, h denotes the predicted bounding box height, b gt denotes the GT bounding box area, w gt denotes the GT bounding box width, h gt denotes the GT bounding box height.