Traffic image target detection method based on YOLO-Light

By adjusting the number of backbone channels in YOLO-Light, introducing fast convolution and upsampling mechanisms, and combining the spatial attention mechanism and improving the rapid space pooling layer, the missed detection and false detection problems in small target detection from the perspective of the drone are solved, significantly improving the detection accuracy and stability of target tracking.

CN119360325BActive Publication Date: 2025-04-18WUXI UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411896708.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-23
Publication Date
2025-04-18
Estimated Expiration
2044-12-23

AI Technical Summary

Technical Problem

The prior art is prone to missed detection and missed detection in target detection with small sizes, complex scenes and frequent occlusions from the perspective of a drone, affecting the detection accuracy and stability of target tracking.

Method used

The traffic image object detection method based on YOLO-Light is adopted, and the rapid convolution and upsampling mechanism is introduced by adjusting the number of channels of the backbone, combining the spatial attention mechanism and improving the rapid spatial pooling layer, the detection ability and feature extraction ability of small objects are enhanced.

Benefits of technology

It improves the accuracy of identification of small targets, enhances the ability to distinguish complex relationships between small targets and backgrounds, especially performs well in occlusion, and significantly improves detection accuracy and stability of target tracking.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119360325B_ABST
    Figure CN119360325B_ABST
Patent Text Reader

Abstract

The traffic image target detection method based on YOLO-Light belongs to the field of image recognition technology. It solves the problem that the existing technology is prone to missed detection and false detection for targets with small size, complex scenes and frequent occlusion from the perspective of drones, thus affecting the detection accuracy and stability of target tracking. In the backbone of YOLO-Light, after the traffic image is feature extracted, the feature extraction is performed again through the improved fast spatial pooling layer to output the traffic feature map; the number of channels in the last three layers of the backbone of YOLO-Light is adjusted; in the neck of YOLO-Light, the traffic feature map is subjected to multi-level upsampling, connection layers and feature decomposition, and then multi-scale feature fusion is performed to output a multi-scale traffic feature map; in the head of YOLO-Light, the multi-scale traffic feature map is sequentially input into the spatial attention mechanism and the detection head to detect traffic targets.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image recognition, and in particular to a method for detecting targets in traffic images based on YOLO-Light. Background Art

[0002] In modern urban traffic systems, the safety of vehicles and pedestrians sharing road space has become an important challenge. With the continuous increase in urban population and number of vehicles, traditional traffic management methods are difficult to meet the growing demand. Emerging intelligent transportation systems provide new opportunities to solve this problem, among which vehicle-road collaboration is considered a key factor in improving urban traffic safety and efficiency. Vehicle-road collaboration integrates information exchange and collaboration between vehicles, roads and traffic facilities to achieve smarter and more efficient traffic management and control. In this context, vehicle detection technology based on roadside and drone perspectives has become an indispensable part and is also a research hotspot in the current intelligent transportation field. Vehicle and pedestrian target detection in these traffic scenarios needs to improve detection accuracy while taking into account detection speed. Although high-complexity deep learning target detection models have high detection accuracy, their speed is often affected and difficult to deploy. Therefore, it is of great practical significance to develop a multi-view vehicle and pedestrian detection model that takes into account both accuracy and lightness.

[0003] As a classic one-stage target detection algorithm, YOLO has outstanding performance in fast target detection and real-time application scenarios due to its high real-time performance, simplicity and efficiency, multi-scale detection, and utilization of global context information. However, the YOLO series of models have always had problems with large number of parameters and high computational cost. Therefore, lightweight improvement of the YOLO model has become a hot topic of research while ensuring high target detection performance.

[0004] In recent years, many scholars at home and abroad have made important contributions to the application of YOLO series models in the field of transportation. Wang et al. used ELAN-SW (detection prediction head) to improve the detection accuracy of small objects in urban traffic detection and tracking tasks. This design uses global context information and local features to improve the detection accuracy of tiny vehicles and pedestrians. To deal with the problem of vehicle and pedestrian size changes, the BFFP module (bidirectional feature fusion pyramid module) is proposed to solve this challenge through multi-scale feature aggregation, and the AASPP module (adaptive spatial pyramid pooling module) is introduced to support feature fusion and mitigate the impact of complex traffic background. Zhang et al. improved the Neck component of the YOLOv8 (v8 version of YOLO) model, adopted a three-layer PAFPN (path aggregation network) structure, and specially designed a small-sized vehicle detection head in combination with large-scale feature maps, which significantly enhanced the model's detection ability for small-sized targets. By fusing the PAFPN module in each layer, the network features are combined with low-level features to provide rich spatial information. Fusion is achieved through deep separable convolution, balancing the number of parameters and large receptive field. Wang et al. also proposed a drone vehicle detection model based on the improved YOLOv5 (v5 version of YOLO) model, designed the SPB module (strip bottleneck module), and improved the detection sensitivity of vehicles of different scales in drone images through the attention mechanism to cope with the detection tasks of densely distributed vehicles.

[0005] In order to achieve better real-time performance on embedded and mobile devices, researchers have proposed lightweight network architectures such as MobileNet, ShuffleNet, and GhostNet. Liu et al. proposed the SLIM (Structured Lottery Hypothesis-Aware Pruning) algorithm, which reduces weights through a structured pruning strategy, reducing the number of model parameters and the amount of computation. SLIM uses the idea of ​​the "lottery hypothesis" to optimize computational efficiency while ensuring model performance by identifying and retaining the most critical structures in the neural network. Finally, through high-performance deep learning inference frameworks such as TensorRT (Tensor Runtime), inference acceleration can be achieved while ensuring accuracy. However, although deep learning target detection algorithms have made significant progress in the field of drone aerial target detection, it is still difficult to meet real-time requirements while ensuring high detection accuracy.

[0006] In the prior art, Chinese patent CN118918148A discloses "a traffic tracking detection system for drones", which is based on improved YOLOv8+ByteTrack and solves the problem of low tracking accuracy caused by small-sized targets, complex backgrounds and occlusions in the previous drone tracking of targets. However, for small targets with small size, complex scenes and frequent occlusions from the drone's perspective, missed detection and false detection are prone to occur, thus affecting the detection accuracy and stability of target tracking.

[0007] In summary, the existing technology is prone to missed detection and false detection for targets with small size, complex scenes and frequent occlusions from the perspective of drones, thereby affecting the detection accuracy and stability of target tracking. Summary of the invention

[0008] The present invention solves the problem that in the prior art, targets with small size, complex scenes and frequent occlusions under the perspective of a drone are prone to missed detection and false detection, thereby affecting the detection accuracy and stability of target tracking.

[0009] The method for detecting traffic image targets based on YOLO-Light described in the present invention is specifically as follows:

[0010] Traffic images are sequentially input into the backbone, neck, and head of YOLO-Light for feature extraction and traffic target detection;

[0011] In the backbone of YOLO-Light, after the traffic image is feature extracted, it is subjected to feature extraction again through the improved fast spatial pooling layer to output the traffic feature map;

[0012] Adjust the number of channels in the last three layers of the YOLO-Light backbone;

[0013] In the neck of YOLO-Light, the traffic feature map undergoes multi-level upsampling, connection layers, and feature decomposition, and then multi-scale feature fusion is performed to output a multi-scale traffic feature map;

[0014] In the head of YOLO-Light, multi-scale traffic feature maps are sequentially input into the spatial attention mechanism and the detection head to detect traffic targets;

[0015] The improved fast spatial pooling layer is specifically:

[0016] After the traffic feature map is convolved, the convolved traffic feature map is output. The convolved traffic feature map is divided into a first-way traffic feature map, a second-way traffic feature map, a third-way traffic feature map and a fourth-way traffic feature map. Among them, the first-way traffic feature map passes through a multi-level maximum pooling layer, and the second-way traffic feature map and the traffic feature map output after the first-way traffic feature map passes through the maximum pooling layer are jointly input into the next-level maximum pooling layer for pooling. The pooled traffic feature map, the second-way traffic feature map, the third-way traffic feature map after adaptive maximum pooling, and the fourth-way traffic feature map after adaptive average pooling are jointly input into the connection layer for splicing to output a multi-scale feature map. The multi-scale feature image is convolved for feature extraction to output the traffic feature map.

[0017] Furthermore, in one embodiment of the present invention, the number of channels of the last three layers of the YOLO-Light backbone is adjusted to 512.

[0018] Furthermore, in one embodiment of the present invention, the upsampling is specifically:

[0019] The traffic feature map is divided into two paths. One path of traffic feature images is processed by linear and pixel random shuffling in sequence to generate an offset. The other path of traffic feature images is point sampled. Point sampling generates a sampling network according to the upsampling factor. The offset and the sampling network are sampled and transformed together to output the upsampling result.

[0020] Furthermore, in one embodiment of the present invention, the traffic characteristic graph of one road is processed by linear and pixel random shuffling in sequence to generate an offset, specifically:

[0021] One traffic feature map is divided into two, and both traffic feature maps are processed linearly. One traffic feature map after linear processing is scaled and then fused with the other traffic feature map after linear processing to output the fused traffic feature map. The fused traffic feature map is processed by random pixel shuffling to generate an offset.

[0022] Furthermore, in one embodiment of the present invention, the spatial attention mechanism is specifically:

[0023] The traffic feature map is divided into a fifth-way traffic feature map, a sixth-way traffic feature map, a seventh-way traffic feature map and an eighth-way traffic feature map. The fifth-way traffic feature map after global maximum pooling and the sixth-way traffic feature map after global average pooling are normalized together and multiplied with the seventh-way traffic feature map after convolution to output the first feature map. The eighth-way traffic feature map after convolution is normalized again and multiplied with the seventh-way traffic feature map after convolution to output the second feature map. The first feature image and the second feature map are convolved respectively and matrix multiplied to output the feature map.

[0024] Furthermore, in one embodiment of the present invention, the detection head is specifically:

[0025] The traffic feature map is divided into two paths. One of the traffic feature maps is successively subjected to fast convolution, multi-stage convolution and detection frame loss, and the detected traffic feature map is output. The other traffic feature map is successively subjected to fast convolution, multi-stage convolution and classification loss, and the detected traffic feature map is output.

[0026] Furthermore, in one embodiment of the present invention, the fast convolution is specifically:

[0027] Multiple feature channels are divided into two parts, one part of the feature channels maintains the original feature channels after convolution, and the other part of the feature channels is combined with the original feature channels after convolution to output the information between different feature channels.

[0028] The method for detecting targets in traffic images based on YOLO-Light-Tiny described in the present invention is to perform pruning operation on YOLO-Light and implement the method for detecting targets in traffic images based on YOLO-Light described in any of the above methods.

[0029] The target tracking trajectory method in the real-time traffic video of an unmanned aerial vehicle described in the present invention is implemented based on any of the YOLO-Light-based traffic image target detection methods described in the above methods.

[0030] The present invention solves the problem that the existing technology is prone to missed detection and false detection for targets with small size, complex scenes and frequent occlusions under the perspective of drones, thereby affecting the detection accuracy and stability of target tracking. Specific beneficial effects include:

[0031] 1. The method for detecting traffic images based on YOLO-Light described in the present invention is prone to missed detection and false detection in the prior art for targets with small size, complex scenes and frequent occlusion from the perspective of drones. To solve the above technical problems, the present invention designs a YOLO-Light, modifies the number of channels of the backbone, and introduces fast convolution, which is specially designed to enhance the detection capability of small targets. It adopts an upsampling mechanism, which can dynamically adjust the resolution of feature maps according to the size of the target, improves the recognition accuracy of small targets, introduces a spatial attention mechanism, enhances the ability to distinguish the complex relationship between small targets and backgrounds, and performs well in the case of occlusion. At the same time, an improved fast spatial pooling layer is used to optimize the extraction of spatial features, further improving the detection accuracy. The improved YOLO-Light is applied to the target tracking trajectory in the real-time traffic video of drones, which can effectively solve the problem that the prior art is prone to missed detection and false detection for targets with small size, complex scenes and frequent occlusion from the perspective of drones;

[0032] 2. The traffic image target detection method based on YOLO-Light-Tiny described in the present invention is that YOLO-Light-Tin is pruned after sparse training to reduce redundant parameters, making it more suitable for deployment on resource-constrained embedded platforms;

[0033] The traffic image target detection method based on YOLO-Light described in the present invention is not only suitable for multi-target detection in drone aerial videos, but also can effectively improve the accuracy and efficiency of detection and tracking in an environment with limited computing resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0035] Figure 1 is a YOLO-Light structure diagram described in Implementation Example 1;

[0036] Figure 2 is a convolution structure diagram described in Implementation Mode 1;

[0037] Figure 3 is a feature decomposition structure diagram described in the first embodiment;

[0038] Figure 4 is a structural diagram of the bottleneck structure described in the first embodiment;

[0039] Figure 5 This is a diagram of the structure of the improved fast spatial pooling layer described in Implementation Mode 1;

[0040] Figure 6 is a diagram of the upsampling structure described in Implementation Mode 3;

[0041] Figure 7 is a structural diagram of the spatial attention mechanism described in Implementation Mode 4;

[0042] Figure 8 is a structural diagram of the detection head described in Embodiment 5;

[0043] Fig. 9 It is a fast convolution structure diagram described in implementation mode five;

[0044] Fig.10 It is a comparison chart of YOLO-Light described in Implementation Example 6 with various models on the Visdorne dataset under COCO indicators (evaluation indicators);

[0045] Fig.11 It is a comparison chart of the recall rates of YOLO-Light and YOLOv8n described in Implementation Mode 1;

[0046] Fig.12 It is a comparison chart of YOLO-Light described in Implementation Example 1 on the UA-DRTERAC dataset and various models under the COCO index;

[0047] Fig.13 It is an ablation experiment diagram of each component of YOLO-Light described in Implementation Example 6 on the Visdrone dataset;

[0048] Fig.14 is a diagram of the sparse factor after sparse training described in Implementation Method 6;

[0049] Fig.15 This is an embedded deployment experiment diagram described in Implementation Example 6;

[0050] Fig.16 is a performance diagram of YOLO-Light at different pruning rates described in Implementation Example 6;

[0051] Fig.17 It is a comparison chart of YOLO-Light and YOLOv8 described in Implementation Method 1 on ByteTrack;

[0052] Fig.18 It is the difference between YOLOv8 and YOLO-Light in the ByteTrack algorithm on the same frame described in Implementation 7, and 15 frames apart are selected as reference images;

[0053] Fig.19 It is a comparison diagram of the YOLOv8 and YOLO-Light heat maps described in Implementation Example 7;

[0054] Fig. 20This is a comparison chart of the performance of YOLO-Light compared to YOLOv8 in various scenarios in the VisDrone dataset described in Implementation Example 7;

[0055] Fig.21 It is a figure showing that YOLO-Light in Implementation Example 7 is superior to YOLOv8 on the UA-DRTERAC dataset;

[0056] Fig. 22 This is a diagram of the detection of small targets by the model described in CN118918148A under the condition of frequent occlusion described in Implementation Example 7;

[0057] Fig.23 This is a diagram of a small target detected by YOLO-Light under frequent occlusion conditions as described in Implementation Example 7. DETAILED DESCRIPTION

[0058] The following will clearly and completely describe various embodiments of the present invention in conjunction with the accompanying drawings. The embodiments described with reference to the accompanying drawings are exemplary and intended to be used to explain the present invention, but should not be understood as limiting the present invention.

[0059] Implementation 1: The method for detecting traffic image targets based on YOLO-Light described in this implementation is specifically as follows:

[0060] Traffic images are sequentially input into the backbone, neck, and head of YOLO-Light for feature extraction and traffic target detection;

[0061] In the backbone of YOLO-Light, after the traffic image is feature extracted, it is subjected to feature extraction again through the improved fast spatial pooling layer to output the traffic feature map;

[0062] Adjust the number of channels in the last three layers of the YOLO-Light backbone;

[0063] In the neck of YOLO-Light, the traffic feature map undergoes multi-level upsampling, connection layers, and feature decomposition, and then multi-scale feature fusion is performed to output a multi-scale traffic feature map;

[0064] In the head of YOLO-Light, multi-scale traffic feature maps are sequentially input into the spatial attention mechanism and the detection head to detect traffic targets;

[0065] The improved fast spatial pooling layer is specifically:

[0066] After the traffic feature map is convolved, the convolved traffic feature map is output. The convolved traffic feature map is divided into a first-way traffic feature map, a second-way traffic feature map, a third-way traffic feature map and a fourth-way traffic feature map. Among them, the first-way traffic feature map passes through a multi-level maximum pooling layer, and the second-way traffic feature map and the traffic feature map output after the first-way traffic feature map passes through the maximum pooling layer are jointly input into the next-level maximum pooling layer for pooling. The pooled traffic feature map, the second-way traffic feature map, the third-way traffic feature map after adaptive maximum pooling, and the fourth-way traffic feature map after adaptive average pooling are jointly input into the connection layer for splicing to output a multi-scale feature map. The multi-scale feature image is convolved for feature extraction to output the traffic feature map.

[0067] Based on the existing technology, when detecting traffic image targets with small size, complex scenes and frequent occlusion, missed detection and false detection are prone to occur, which affects the detection accuracy and the stability of target tracking.

[0068] In order to solve the above technical problems, Figure 1 As shown, this embodiment designs a YOLO-Light (lightweight YOLO), and detects traffic image targets based on YOLO-Light, specifically:

[0069] In the backbone of YOLO-Light, the traffic image is convolved for feature extraction and the traffic feature map is output. After the traffic feature map is subjected to four-level convolution and feature decomposition, it is extracted again through the improved fast spatial pooling layer and the traffic feature map is output.

[0070] like Figure 2 As shown, in the convolution, after the traffic image is convolved for feature extraction, it also needs to be processed by batch normalization and activation function to output a traffic feature map.

[0071] like Figure 3 As shown, in the feature decomposition, the traffic feature map is divided into two paths after being convolved and segmented in sequence. One path of the traffic feature map after segmentation is input into the bottleneck structure for the first time and then is divided into two paths. Among them, after one path of the traffic feature map after being input into the bottleneck structure for the first time is input into the bottleneck structure for the second time, it and the other path of the traffic feature map after segmentation and the other path of the traffic feature map after being input into the bottleneck structure for the first time are input into the connection layer together, and the fused traffic feature map is output. The fused traffic feature map is subjected to convolution for feature extraction.

[0072] like Figure 4 As shown, in the neck structure, the traffic feature map is subjected to two-stage convolution for feature extraction and then fused with the original traffic feature map.

[0073] Improving the fast spatial pooling layer can improve the detection performance of YOLO-Light in different sizes and complex backgrounds.

[0074] like Figure 1 As shown in the figure, at the neck of YOLO-Light, the traffic feature map passing through the backbone of YOLO-Light is divided into two paths, wherein one traffic feature map is divided into two paths after three-stage upsampling, connection layer and feature decomposition, wherein one traffic feature map is output and recorded as a traffic feature map of the first size, and the other traffic feature map is subjected to three-stage convolution, connection layer and feature decomposition, each time after the above feature decomposition, a traffic feature map of a different size is output, and the connection layer of the last stage inputs another traffic feature map, therefore, the traffic feature maps of different sizes are respectively recorded as a traffic feature map of the second size, a traffic feature map of the third size and a traffic feature map of the fourth size.

[0075] The upsampling described is an improved upsampling, which can increase image resolution and improve model efficiency and performance at minimal cost.

[0076] like Figure 1 As shown, in the head of YOLO-Light, the traffic feature map of the first size, the traffic feature map of the second size, the traffic feature map of the third size and the traffic feature map of the fourth size of the head of YOLO-Light are sequentially input into the spatial attention mechanism and the detection head to detect the traffic target.

[0077] The described spatial attention mechanism can enhance the representation ability and global relevance of feature maps.

[0078] The detection head can reduce feature map loss and enhance detail information, and reduce the number of parameters and computational complexity.

[0079] In this embodiment, if Figure 5 As shown in the figure, in order to effectively extract traffic feature maps in the traffic image target detection task, an improved fast spatial pooling layer is designed to improve the detection performance of YOLO-Light in different sizes and complex backgrounds.

[0080] The existing SPPF (Spatial Pyramid Pooling Layer) captures features of different scales through multi-level max pooling, but its fixed pooling window limits its adaptability.

[0081] In order to solve the above technical problems, this embodiment introduces adaptive maximum pooling and adaptive average pooling in the improved fast spatial pooling layer, so that the pooling window is dynamically adjusted according to the size of the input feature map, which significantly enhances the adaptability. Specifically, Figure 5As shown in the figure, the improved fast spatial pooling layer first convolves the input traffic feature map, and then extracts and fuses features of different scales through a triple-level maximum pooling layer. The pooled traffic feature map is spliced ​​through the operation of the connection layer to form a multi-scale traffic feature map. Among them, the adaptive maximum pooling and adaptive average pooling can capture global background information and edge information, and reduce the impact of targets of different scales. Finally, the feature information is further extracted and compressed through the convolution operation to enhance the global perspective and adaptability of the model. This multi-level pooling and feature fusion design enables YOLO-Light to fully capture features at different spatial positions and scales. The addition of adaptive maximum pooling and adaptive average pooling further enhances YOLO-Light's ability to capture global information and improves its judgment and adaptability.

[0082] YOLO-Light described in this embodiment uses self-developed fast convolution, combined with upsampling and spatial attention mechanisms, to reduce the amount of calculation and parameters while maintaining high detection accuracy. In order to further improve the ability to process details, YOLO-Light integrates Soft-NMS and an improved fast spatial pooling layer. This enables accurate detection of traffic image targets that are small in size, complex in scenes, and frequently occluded, greatly reducing the problems of missed detection and false detection, thereby improving detection accuracy and target tracking stability.

[0083] This embodiment uses UA-DRTERAC (dataset) to further verify the generalization of the YOLO-Light, where “Ours” represents the YOLO-Light described in this embodiment.

[0084] like Fig.12 As shown in the figure, Ours performs well on many key indicators, demonstrating its superior generalization and robustness. Specifically, Ours achieves a mean of 48.2 at 95% Averaging Precision, which is 14.8% higher than YOLOv8n's 42.0, and a mean of 62.7 at 0.5 Averaging Precision, which is 8.8% higher than YOLOv8n's 57.6. These results show that Ours performs consistently across different datasets and has strong generalization capabilities. Ours achieves 67.0 and 53.6 in detection precision and recall, respectively. Compared to other models, such as YOLOv9n with a precision of 64.1 and a recall of 59.0, and YOLOv10n with a precision of 70.2 and a recall of 54.7, Ours excels in balancing precision and recall, further demonstrating its robustness. Overall, the performance of Ours on the UA-DETRAC dataset verifies its superior generalization and robustness in urban traffic vehicle detection and tracking tasks.

[0085] like Fig.11 As shown in the figure, the horizontal axis is the recall rate and the vertical axis is the detection accuracy. The accuracy of YOLO-Light in the high recall rate area is significantly higher than that of YOLOv8n, indicating that YOLO-Light provides higher accuracy under most recall rate conditions. In addition, YOLO-Light also shows higher accuracy in the low recall rate area, showing the effectiveness of pruning technology and ensuring the robustness and reliability of the model. This improvement shows that YOLO-Light significantly improves the target detection performance while maintaining its lightweight, especially in application scenarios that require high recall rates, showing its great application prospects in urban traffic vehicle detection and tracking tasks.

[0086] In order to verify the robustness of YOLO-Light described in this embodiment, a comparative experiment of multi-target tracking algorithms was conducted, and ByteTrack was used as the multi-target tracking algorithm. The experiment verified the effectiveness of the model by fusing the detection algorithm with the tracking algorithm. The results are shown in Figure 2. Fig.17 As shown. The YOLO-Light described in this embodiment is denoted as "Ours", and experimental results show that the YOLO-Light detector outperforms the baseline YOLOv8n in multiple video sequences. In Video 1, YOLO-Light's high-order tracking accuracy is 45.2, multi-target tracking accuracy is 74.1, and multi-target tracking accuracy, identity F1 score, and inference speed are 65.1, 56.8, and 43.6, respectively, all better than YOLOv8n. In Videos 3 and 4, YOLO-Light's multi-target tracking accuracy is 71.8 and 46.7, respectively, and its identity F1 scores are 83.9 and 67.1, respectively, both higher than YOLOv8n's 69.7, 49.5, and 82.3, 68.7. Overall, YOLO-Light's average high-order tracking accuracy is 53.1, slightly higher than YOLOv8n's 52.7, and its average multi-target tracking accuracy is 57.8, higher than YOLOv8n's 55.7, and its average multi-target tracking accuracy is 76.4, comparable to YOLOv8n's 76.3. YOLO-Light's identity F1 score and inference speed are 69.1 and 51.2, respectively, significantly better than YOLOv8n's 67.3 and 47.0. In addition, YOLO-Light has a smaller number of identity jumps, 263, showing higher tracking accuracy and stability. Verified by the ByteTrack tracking algorithm, YOLO-Light performs well in most indicators, especially in terms of significant improvements in identity F1 score and inference speed.

[0087] Implementation method 2: This implementation method further limits the method for detecting traffic image targets based on YOLO-Light described in implementation method 1, and adjusts the number of channels of the last three layers of the backbone of YOLO-Light to 512.

[0088] In this implementation, the number of channels in the last three layers of the YOLO-Light backbone is adjusted to 512 to retain more detailed information.

[0089] Implementation method 3: This implementation method further limits the method for detecting traffic image targets based on YOLO-Light described in implementation method 1. The upsampling is specifically as follows:

[0090] The traffic feature map is divided into two paths. One path of traffic feature images is processed by linear and pixel random shuffling in sequence to generate an offset. The other path of traffic feature images is point sampled. Point sampling generates a sampling network according to the upsampling factor. The offset and the sampling network are sampled and transformed together to output the upsampling result.

[0091] In this implementation, the traffic characteristic graph of one road is processed by linear and pixel random shuffling in sequence to generate an offset, which is specifically:

[0092] One traffic feature map is divided into two, and both traffic feature maps are processed linearly. One traffic feature map after linear processing is scaled and then fused with the other traffic feature map after linear processing to output the fused traffic feature map. The fused traffic feature map is processed by random pixel shuffling to generate an offset.

[0093] In this implementation, in the traffic image object detection task, the upsampling operation is used to resize the input feature map to match the size of the original image, so that YOLO-Light can effectively detect objects of various sizes and distances.

[0094] Existing upsampling usually relies on bilinear interpolation, which may lead to the loss of key traffic image details and requires a lot of computing resources and parameter overhead, which is not conducive to the realization of lightweight network architecture. In real-world traffic vehicle scenes, traffic images are small and may have pixel distortion, resulting in the loss of fine-grained details and difficulty in feature learning.

[0095] To solve the above technical problems, this embodiment designs an improved upsampling to enhance the detection capability of low-resolution traffic images or small vehicle targets and reduce false positives and false negatives.

[0096] The upsampling is based on the point sampling method and the learning sampling perspective, which avoids time-consuming dynamic convolution operations and additional sub-networks, reduces computing resources, improves image resolution, and improves YOLO-Light efficiency and performance at minimal cost. Upsampling achieves flexible resampling of traffic feature maps through dynamic convolution and offset calculation, which can better handle the geometric changes of input traffic images and improve YOLO-Light's ability to adapt to objects of different scales and shapes. Figure 6 As shown, the sampling set S consists of a sampling grid O and a generated offset G. The offset G is generated by "linear + pixel random shuffling". Specifically, the input traffic feature map is divided into two paths, one of which is further divided into two paths. Both traffic feature maps are processed linearly. One of the traffic feature maps after linear processing is scaled by 0.5 times and then fused with the other traffic feature map after linear processing to output the fused traffic feature map. The fused traffic feature map is processed by pixel random shuffling to generate the offset G. The other traffic feature map is sampled by points, and the sampling network O is generated according to the upsampling factor. The offset G and the sampling network O are sampled and transformed together to output the upsampling set S, so as to achieve efficient and accurate upsampling of the input traffic feature map.

[0097] Through efficient upsampling technology, the resolution and geometric processing capabilities of the traffic feature map are optimized, so that YOLO-Light can better adapt to targets of different scales and shapes. And through three upsampling and retaining the shallow channel, the size of the detected traffic feature map is enlarged to 160×160×64, and a small target detection layer is added.

[0098] Implementation 4: This implementation further limits the method for detecting traffic image targets based on YOLO-Light described in Implementation 1. The spatial attention mechanism is specifically as follows:

[0099] The traffic feature map is divided into a fifth-way traffic feature map, a sixth-way traffic feature map, a seventh-way traffic feature map and an eighth-way traffic feature map. The fifth-way traffic feature map after global maximum pooling and the sixth-way traffic feature map after global average pooling are normalized together and multiplied with the seventh-way traffic feature map after convolution to output the first feature map. The eighth-way traffic feature map after convolution is normalized again and multiplied with the seventh-way traffic feature map after convolution to output the second feature map. The first feature image and the second feature map are convolved respectively and matrix multiplied to output the feature map.

[0100] In this implementation, in order to improve the performance of YOLO-Light in the traffic image object detection task, a spatial attention mechanism based on the channel attention mechanism is introduced into the head of YOLO-Light. Figure 7 As shown in the figure, the spatial attention mechanism uses global average pooling and global maximum pooling to capture the global spatial information and significant features of the image. After the activation function, it performs Hadamard product with the true value feature map to generate the fused feature map. The input traffic feature map is processed by two convolutions to generate the true value feature map and QK (query) key value feature map respectively. After the QK key value feature map obtains the attention weight map through the activation function, it performs Hadamard product with the true value feature map to generate the fused feature map. The two fused feature maps are convolved and matrix multiplied to enhance the expression ability of YOLO-Light.

[0101] In the head of YOLO-Light, the spatial attention mechanism is placed at the output position of the traffic feature map in front of the detection head. By fusing feature information of different scales through global average pooling and maximum pooling, the spatial attention mechanism calculates the importance of the traffic feature map in the channel dimension, enhancing the feature representation ability and global relevance while avoiding increasing complexity. The spatial attention mechanism enhances the weak feature representation of small targets, suppresses the confusing background, and ensures the expressiveness of multi-scale feature maps. In addition, the spatial attention mechanism is also applied to the output position of feature maps at higher levels, improving YOLO-Light's adaptability and detection accuracy to complex scenes.

[0102] Therefore, the spatial attention mechanism enhances the representation ability and global relevance of the traffic feature map through the channel attention mechanism, so that YOLO-Light can capture key features more accurately and suppress background noise. Combining it with the upsampling described in Implementation 3 effectively improves the detection accuracy and robustness of YOLO-Light.

[0103] Embodiment 5: This embodiment further limits the method for detecting traffic image targets based on YOLO-Light described in Embodiment 1. The detection head is specifically:

[0104] The traffic feature map is divided into two paths. One of the traffic feature maps is successively subjected to fast convolution, multi-stage convolution and detection frame loss, and the detected traffic feature map is output. The other traffic feature map is successively subjected to fast convolution, multi-stage convolution and classification loss, and the detected traffic feature map is output.

[0105] In this implementation manner, the fast convolution is specifically:

[0106] Multiple feature channels are divided into two parts, one part of the feature channels maintains the original feature channels after convolution, and the other part of the feature channels is combined with the original feature channels after convolution to output the information between different feature channels.

[0107] In this embodiment, if Figure 8 As shown in the figure, the traffic feature map is divided into two paths, one of which is subjected to fast convolution, two-stage convolution and detection frame loss in sequence, and the detected traffic feature map is output, and the other traffic feature map is subjected to fast convolution, two-stage convolution and classification loss in sequence, and the detected traffic feature map is output.

[0108] The existing translation operation simply maintains the original features.

[0109] To solve the above technical problems, Fig. 9 As shown, this embodiment designs a fast convolution. The feature channels are grouped and convolved to focus on extracting spatial features. The channels are convolved, and the remaining Each channel is passed through ordinary convolution to maintain the original features, so as to more comprehensively extract the information of the input feature map. In the detection of small targets with high requirements for details, using convolution instead of translation operation can enhance the nonlinear representation ability of YOLO-Light and introduce more parameters, so that YOLO-Light can learn more complex and diverse features, and improve the overall expression and generalization capabilities. The convolution operation combines the information between different channels to make the feature information more compact and coordinated, which is conducive to subsequent detection tasks. The convolution operation conforms to the optimization rules of the deep learning framework. By unifying the convolution operation, the GPU (graphics processing unit) can be better utilized to accelerate the calculation and improve the training and reasoning efficiency. In addition, the gradient calculation of the convolution operation is more common, which helps YOLO-Light optimize and converge, and optimizes resource consumption. Its computational complexity can be expressed as:

[0110] ;

[0111] In the formula, and are the width and height of the traffic feature map, is the convolution kernel size, is the number of groups, is the total number of channels involved in grouped convolution, is the number of individual channels of the convolution. The computational efficiency of grouped convolution is much higher than that of regular convolution, such as When , the computational complexity of fast convolution is only 1 / 2 of that of regular convolution. , the memory access amount is approximately:

[0112] .

[0113] In the task of object detection in traffic images, the existing NMS (non-maximum suppression) method is prone to missed detection when dealing with complex backgrounds and object masking, thus affecting the detection performance. In response to this, YOLO-Light uses Soft-NMS (soft non-maximum suppression) to reduce missed detections by reducing the confidence of detection frames with high overlap. In the standard detection process, the detection frames and their scores generated by the sliding window processing are processed by NMS. This method selects the detection frame with the highest score and removes other frames that overlap with it by more than a certain threshold, but this may cause valid detection frames to be incorrectly eliminated. Mathematically, NMS is expressed as:

[0114] ;

[0115] In the formula, It is detection bounding boxes, is the corresponding detection score, is the NMS threshold, is the detection box with the highest score. Soft-NMS improves this process by using a linear or Gaussian attenuation function to gradually reduce the score of the detection box with a high overlap with the highest scoring box. The calculation expression of Soft-NMS is:

[0116] Linear Falloff: ;

[0117] Gaussian Falloff: ;

[0118] This method reduces the information loss caused by fixed thresholds and is particularly suitable for small target detection in traffic images, effectively improving the detection accuracy. Overall, Soft-NMS enables YOLO-Light to surpass the limitations of existing NMS methods in target detection in complex scenes.

[0119] Therefore, an improved fast convolution is introduced in the head of YOLO-Light. Different from the existing full-channel convolution, the fast convolution groups the input channels and performs convolution independently on each group, reducing the number of parameters and computational complexity while maintaining the integrity of the number of channels and avoiding redundancy. This design reduces the amount of computation and memory requirements between channels of the traffic feature map, allowing YOLO-Light to more effectively improve spatial features.

[0120] Implementation method six, the YOLO-Light-Tiny method for detecting targets in traffic images described in this implementation method, wherein the method is to perform a pruning operation on YOLO-Light and implement it by using the YOLO-Light-based method for detecting targets in traffic images described in any one of implementation methods one to five.

[0121] Although the improved YOLO-Light has fewer parameters, its calculation speed on the embedded platform is still not fast enough. In order to meet the real-time requirements, YOLO-Light needs to be pruned. Pruning methods are mainly divided into structured pruning and unstructured pruning. Since unstructured pruning will destroy the network structure and have high hardware requirements, in order to ensure network integrity, this implementation adopts structured pruning. Specifically:

[0122] First, sparse training is performed. The purpose of sparse training is to distinguish important channels from unimportant channels for subsequent pruning. BN (batch normalization) layers are widely used in neural network training to improve training efficiency and enhance model generalization capabilities. Therefore, YOLO-Light is trained sparsely through the BN layer. :

[0123] ;

[0124] In the formula, and are the input and output of the BN layer respectively, is each batch in training, and are the mean and standard deviation of each batch, and are the scaling and translation factors respectively. The parameter is used as the basis for judging the importance of the channel, thereby obtaining the total loss function in pruning :

[0125] ;

[0126] Where the first term is the training loss function of the original network, and They are the input and output of the training respectively. is a training parameter, and the second term is the L1 regularization constraint on the scaling factor. is the sparse scaling factor, is the full set of scaling factors in the BN layer, is the scaling factor penalty term.

[0127] After the sparse training, the absolute values ​​of all scaling factor γ values ​​of the BN layer are arranged in descending order, and the channels that need to be pruned are determined according to the pruning ratio. The higher the pruning ratio, the smaller the YOLO-Light, but the detection accuracy may decrease. It is challenging to deploy neural networks on embedded devices, so compressing the amount of calculation and the amount of parameters is particularly critical. This implementation method uses the SLIM algorithm (sparse linear algorithm) for pruning. By introducing a sparse regularization term, the YOLO-Light parameters automatically tend to be sparse, thereby significantly reducing the amount of parameters while maintaining the performance of YOLO-Light. Specifically: introduce a sparse regularization term in the loss function, train the neural network to make unimportant parameters close to zero, and then remove these parameters to simplify the model structure. Finally, fine-tune the pruned YOLO-Light to restore its performance. In the SLIM algorithm, the loss function is modified as follows:

[0128] ;

[0129] In the formula, is the sparsity regularization parameter, is the first This sparse regularization term uses the L1 norm, so that many weights approach zero during the optimization process.

[0130] The SLIM algorithm determines whether to retain each parameter by calculating its importance, automatically adjusting the sparsity, ensuring that each layer retains the most important connections and avoiding layer collapse problems. The SLIM algorithm can effectively reduce the number of model parameters, making it suitable for deployment on resource-constrained embedded devices, while maintaining model accuracy and significantly reducing computing and storage requirements, thereby improving the operating efficiency of embedded devices.

[0131] Therefore, this implementation further compresses the model through the channel pruning strategy based on YOLO-Light so that it can be deployed on embedded platforms. The sparsity level has a significant impact on the performance of the pruned model. Too small a sparsity level will lead to insufficient pruning, while too large a sparsity level will lead to a sharp drop in performance. After multiple rounds of experiments, 0.005 was finally selected as the sparsity factor for sparse training of the YOLO-Light model. Fig.14 The distribution of the γ value of the BN layer before and after sparse training is shown. Before training, the γ value of the BN layer is normally distributed. After training, as the number of training iterations increases, the γ value gradually approaches 0, which indicates that these channels close to 0 are non-important channels and can be pruned.

[0132] Based on sparse training, this implementation adopts different pruning rates to conduct pruning experiments. It should be noted that too high a pruning ratio will cause some channel layers to be 0. To ensure the integrity of the network structure, at least one channel must be retained. Fig.16As shown, this implementation sets different pruning rates, including ByteTrack (byte tracking), GIOU (loss function), NSA_W (pruning rate), CMC (pruning rate), GIOU+NSA_W, and the pruning rate described in this implementation is denoted as Our, and fine-tunes after pruning to restore the model detection accuracy, and selects a pruning ratio that balances multiple indicators. Fig.15 The comparison of parameters after fine-tuning at different pruning ratios is shown, including YOLOv8n, YOLOv8n+TensorRT (deep learning inference optimizer), YOLO-Light-Tiny, YOLO-Light-Tiny-TensorRT, and YOLO-Light-Tiny-TensorRT-ByteTrack. As the pruning ratio increases, the average model accuracy decreases. Considering the detection accuracy and inference time, the pruning ratio of 2.0 is finally selected, and the pruned model is named YOLO-Light-Tiny.

[0133] This implementation further verifies the impact of each component on model performance through ablation experiments. The experimental results Fig.13As shown. Among them, "Ours-prune" represents the YOLO-Light-Tiny described in this embodiment. First, adding the head of YOLO-Light is denoted as ①, the detection accuracy and recall rate are increased to 63.7 and 45.6 respectively, the mean at the average accuracy of 50% and the mean at the average accuracy of 95% are 50.0 and 34.2 respectively, the number of parameters is reduced to 1.7M, but the amount of calculation is increased to 11.1s, which significantly improves the detection performance. Adding fast convolution is denoted as ②, the accuracy is reduced to 59.5, the mean at the average accuracy of 50% and the mean at the average accuracy of 95% are 48.0 and 32.7 respectively, the number of parameters and the amount of calculation are reduced to 1.2M and 5.5s, which shows that adding fast convolution has a certain impact on the accuracy while reducing the amount of calculation. Adding upsampling and spatial attention mechanism is recorded as ③, the accuracy is improved to 66.4, the mean at 50% average accuracy and the mean at 95% average accuracy are 51.2 and 35.1 respectively, the number of parameters and the amount of calculation are 1.7M and 11.3s respectively, which proves the effectiveness of upsampling and spatial attention mechanism. Adding improved fast spatial pooling layer is recorded as ④, the mean at 50% average accuracy and the mean at 95% average accuracy are 48.5 and 32.9 respectively, the number of parameters and the amount of calculation are 1.3M and 5.6s respectively, indicating that the improved fast spatial pooling layer contributes little to performance improvement, but has little effect on the demand for computing resources. Combining multiple methods is recorded as ⑤⑥ respectively, showing different degrees of performance improvement, especially combining Soft-NMS is recorded as ⑦, the accuracy is improved to 70.5, the mean at 50% average accuracy and the mean at 95% average accuracy are 56.6 and 42.8 respectively, the number of parameters and the amount of calculation are 1.3M and 5.9s. Finally, Ours-prune significantly reduced the computing resource requirements while maintaining high performance, with an accuracy of 63.0, a recall of 37.2, an average of 51.1 at 50% average precision, and an average of 37.5 at 95% average precision. The number of parameters and the amount of computation were 0.54M and 2.9 s, respectively, which verified the lightweight and high efficiency of the model. Each component significantly improved the model performance, especially the final model optimized by pruning technology showed great application potential on resource-constrained edge devices.

[0134] In order to better illustrate the performance of YOLO-Light described in Implementation Modes 1 to 5, and YOLO-Light-Tiny described in Implementation Mode 6, the following examples are provided for detailed description:

[0135] In this implementation, all algorithms are written in Python 3.8 (program), and Pytorch 1.11.0 (program) is used as the deep learning framework, PyCharm (program) is used as the code editor, and runs on a Windows (system) operating system with a GPU model of RTX4060 Ti (model).

[0136] The effectiveness of the improved YOLO-Light was evaluated on VisDrone2019 (dataset). To ensure the fairness and reliability of the experiment, this implementation was compared with the best and most widely used target detection networks in recent years on the same experimental environment and hardware equipment. These networks include YOLOv5 series, Faster R-CNN (Faster Regional Convolutional Neural Network), SSD (Solid State Drive), CenterNet (Center Network), YOLOv5 series, YOLOv7 series, RT-DETR (Real-time-end-to-end target detector) series, YOLOX series, YOLOv9 series, YOLOv10 series and YOLOv8 series. Among them, "Ours" represents the YOLO-Light described in Implementations 1 to 5, and "Ours-prune" represents the pruned YOLO-Light described in this Implementation 6.

[0137] like Fig.10As shown in the figure, YOLOv7l performs best with a detection accuracy of 73.5, a recall rate of 59.1, an average precision of 63.1 at 0.5, and an average precision of 43.9 at 95%, but its parameter count is 37.2M and the computation time is 105.2s, which is not suitable for resource-constrained edge devices. In contrast, the baseline model YOLOv8n performs 32.3 at an average precision of 95%, and its parameter count and computation time are 3.1M and 8.2 respectively, showing good lightweight characteristics and high accuracy. Ours achieves 42.8 at an average precision of 95%, which is 32.5% higher than YOLOv8n, and its parameter count and computation time are 1.3M and 5.9 respectively, which are reduced by 58.1% and 28.0%. While maintaining high detection accuracy, Ours greatly reduces the computational resource requirements and model size, making it suitable for edge devices. Ours-prune achieved an average of 37.5% at an average precision of 95%, an increase of 16.1% over YOLOv8n. Its parameter volume and computational cost were 0.54M and 2.9s, respectively, a reduction of 82.6% and 64.6%. This further demonstrates the significant effect of pruning technology in improving the deployment efficiency of YOLO-Light. Among other models, Faster R-CNN has a certain advantage with an accuracy of 52.4 and a recall rate of 31.3, but its parameter volume of 136.9M and computational cost of 369.7s are extremely high, which limits its practical application. CenterNet's average performance at an average precision of 95% is 25.8, and its parameter volume and computational cost are 32.6M and 70.2s, respectively. YOLOv5s' average precision at 95% is 33.9, and its parameter volume and computational cost are 7.0M and 15.8, respectively, which are nearly 13 times and 5 times higher than Ours, respectively. In addition, the comparison of FPS (inference speed) shows that the inference speed of Ours is 42.3 and the inference speed of Ours-prune is 44.3, which is significantly better than other models, illustrating the advantage of pruning technology in inference speed.

[0138] In general, although some traditional models such as Faster R-CNN have certain advantages in detection accuracy and recall rate, their high number of parameters and computational complexity limit their practical applications. YOLO-Light described in Implementation Methods 1 to 5 and YOLO-Light-Tiny described in Implementation Method 6 significantly reduce the computing resource requirements and model size while maintaining high detection accuracy, showing extremely high application potential in urban traffic vehicle detection and tracking tasks, and providing a feasible solution for efficient target detection and tracking on edge devices.

[0139] Implementation method seven, the target tracking trajectory method in the real-time traffic video of the drone described in this implementation method, the method described is based on the YOLO-Light based traffic image target detection method described in any one of implementation methods one to five.

[0140] In this embodiment, the target tracking trajectory method refers to the target tracking trajectory method disclosed in Chinese patents CN118918148A and CN116630376A, and the original detection model is replaced by the model described in this embodiment. The specific method will not be repeated here. The experimental effect of YOLO-Light on the target tracking trajectory in the real-time traffic video of the drone is now described.

[0141] The improved YOLO-Light was deployed on NVIDIA Jetson Orin NX (embedded platform), configured with acceleration environments such as OpenCV (acceleration environment), CuDNN (acceleration environment) and TensorRT (acceleration environment), and accelerated using the TensorRT model inference framework. TensorRT's optimization strategies include: layer and tensor fusion, fusion of vertical structure convolutional layers, ReLU activation layers (rectified linear unit activation layers), and Bias (bias) into CBR (convolution-batch normalization-activation) layers, reducing the calculation accuracy from float32 (single-precision 32-bit floating point numbers) to half-precision FP16 (half-precision 16-bit floating point numbers) or INT8 (an 8-bit numerical type), and parallel calculation of multiple branches of the same input.

[0142] Combined with the embodiment described in Fig.17 and Fig.18 As shown in the figure, the YOLO-Light+ByteTrack combination tracks the target earlier in the same frame and still tracks stably after an interval of 15 frames, while the YOLOv8+ByteTrack combination has lost the target, which further proves the effectiveness and robustness of YOLO-Light.

[0143] In addition, this implementation verifies the excellence of YOLO-Light from multiple perspectives, and visualizes the detection results and heat maps to demonstrate the effectiveness of the model from multiple perspectives. Fig.19 It can be seen that YOLO-Light effectively prevents false detection and missed detection, and has more accurate positioning. In contrast, YOLOv8 has false detection and missed detection problems when detecting different categories, while YOLO-Light can detect accurately.

[0144] In order to verify the target detection effect of YOLO-Light described in this embodiment in actual scenes, targets of different scales in complex intersections and high-altitude road scenes of VisDrone2019 (dataset) were selected for visual detection. Fig. 20 The visual comparison results are shown. Fig. 20 As shown in (a) in the figure, in the missed detection scenario, YOLOv8 has obvious missed detection in the dense area, especially the targets in the red box. YOLOv8 fails to fully detect all vehicles and pedestrians. However, YOLO-Light can accurately detect all targets, such as Fig. 20 As shown in (b) in the figure, that is, the false detection scenario, YOLOv8 has a high false detection rate in complex intersection environments. For example, in the area within the red box, YOLOv8 mistakenly identifies some non-target objects as targets. In contrast, YOLO-Light significantly reduces the false detection phenomenon, and the detection results in the red box are more accurate. Fig. 20 As shown in (c) in the figure, which is a small target detection scenario, YOLOv8 performs poorly in detecting small targets in the distance, and there is a serious phenomenon of missed detection, especially the distant people and vehicles in the red box. However, YOLO-Light performs well under the same conditions and can effectively detect small targets in the distance with almost no missed detection. Combining the above three sets of visual comparison results, it can be found that the detection effect of YOLO-Light in actual scenarios is significantly better than that of YOLOv8. YOLO-Light not only shows higher detection accuracy and robustness in dense targets and complex backgrounds, but also performs well in small target detection. Through these improvements, the YOLO-Light model can be more effectively applied to actual scenarios such as urban traffic monitoring, verifying its superior performance in various complex environments. As Fig. 20 As shown in (d) in the figure, YOLO-Light’s detection effect in occluded scenes is significantly better than YOLOv8.

[0145] like Fig. 22 As shown in FIG. 1 , it is the target detection effect of the model described in CN118918148A under frequent occlusion. It can be seen that the model described in CN118918148A is prone to missed detection under this condition. Fig.23 As shown, it is the target detection effect of YOLO-Light in the scene with frequent occlusion. In contrast, YOLO-Light does not miss any detection under this condition, and achieves accurate detection of the target. Therefore. The detection effect of YOLO-Light described in this embodiment in the scene with frequent occlusion is significantly better than the model described in CN118918148A, solving the problem of poor detection effect of the model described in CN118918148A in the scene with frequent occlusion.

[0146] Fig.21The comparison of detection effects of YOLOv8 and YOLO-Light under UA-DETRAC (dataset) is shown. YOLO-Light performs better than YOLOv8 in all scenarios. In the first group of images, YOLOv8 has missed detection in the red frame area, and some pedestrians are not detected, while YOLO-Light can accurately detect all pedestrians. In the second group of images, YOLOv8 has confusion in detection in densely trafficked areas, and some targets in the red frame are misdetected or missed. In contrast, YOLO-Light can clearly separate each target, and the detection result is more accurate. In the third group of images, YOLOv8 has false detection and missed detection under complex backgrounds, while YOLO-Light's detection effect is significantly improved, and the target is accurately detected and labeled, showing stronger background adaptability. In summary, YOLO-Light shows higher detection accuracy and robustness under the UA-DETRAC dataset, especially when dealing with dense targets and complex backgrounds, which verifies its superior performance in practical applications such as urban traffic monitoring.

[0147] The above is a detailed introduction to the traffic image target detection method based on YOLO-Light proposed in the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A traffic image target detection method based on YOLO-Light, characterized in that: Specifically: Traffic images are sequentially input into the backbone, neck, and head of YOLO-Light for feature extraction and traffic target detection; In the backbone of YOLO-Light, after the traffic image is feature extracted, it is subjected to feature extraction again through the improved fast spatial pooling layer to output the traffic feature map; Adjust the number of channels in the last three layers of the YOLO-Light backbone; In the neck of YOLO-Light, the traffic feature map undergoes multi-level upsampling, connection layers, and feature decomposition, and then multi-scale feature fusion is performed to output a multi-scale traffic feature map; In the head of YOLO-Light, multi-scale traffic feature maps are sequentially input into the spatial attention mechanism and the detection head to detect traffic targets; The improved fast spatial pooling layer is specifically: After the traffic feature map is convolved, the convolved traffic feature map is output. The convolved traffic feature map is divided into a first-way traffic feature map, a second-way traffic feature map, a third-way traffic feature map and a fourth-way traffic feature map. Among them, the first-way traffic feature map passes through a multi-level maximum pooling layer, and the second-way traffic feature map and the traffic feature map output after the first-way traffic feature map passes through a multi-level maximum pooling layer are jointly input into the next-level maximum pooling layer for pooling. The pooled traffic feature map, the second-way traffic feature map, the third-way traffic feature map after adaptive maximum pooling, and the fourth-way traffic feature map after adaptive average pooling are jointly input into the connection layer for splicing to output a multi-scale feature map. The multi-scale feature map is convolved for feature extraction to output the traffic feature map.

2. The method for detecting traffic image targets based on YOLO-Light according to claim 1, characterized in that: The number of channels of the last three layers of the YOLO-Light backbone is adjusted to 512.

3. The method for detecting traffic image targets based on YOLO-Light according to claim 1, characterized in that: The up-sampling is specifically: The traffic feature map is divided into two paths. One path of the traffic feature map is processed by linear and pixel random shuffling in sequence to generate an offset. The other path of the traffic feature map is subjected to point sampling. Point sampling generates a sampling network according to the upsampling factor. The offset and the sampling network are sampled and transformed together to output the upsampling result.

4. The method for detecting traffic image targets based on YOLO-Light according to claim 3, characterized in that: The traffic characteristic map of one road is processed by linear and pixel random shuffling in sequence to generate an offset, which is specifically: One traffic feature map is divided into two, and both traffic feature maps are processed linearly. One traffic feature map after linear processing is scaled and then fused with the other traffic feature map after linear processing to output the fused traffic feature map. The fused traffic feature map is processed by random pixel shuffling to generate an offset.

5. The method for detecting traffic image targets based on YOLO-Light according to claim 1, characterized in that: The spatial attention mechanism is specifically: The traffic feature map is divided into a fifth-way traffic feature map, a sixth-way traffic feature map, a seventh-way traffic feature map and an eighth-way traffic feature map. The fifth-way traffic feature map after global maximum pooling and the sixth-way traffic feature map after global average pooling are normalized together and multiplied with the seventh-way traffic feature map after convolution to output the first-way feature map. The eighth-way traffic feature map after convolution is normalized again and multiplied with the seventh-way traffic feature map after convolution to output the second-way feature map. The first-way feature image and the second-way feature map are convolved respectively and matrix multiplied to output the traffic feature map.

6. The method for detecting traffic image targets based on YOLO-Light according to claim 1, characterized in that: The detection head is specifically: The traffic feature map is divided into two paths. One of the traffic feature maps is successively subjected to fast convolution, multi-stage convolution and detection frame loss, and the detected traffic feature map is output. The other traffic feature map is successively subjected to fast convolution, multi-stage convolution and classification loss, and the detected traffic feature map is output.

7. The method for detecting traffic image targets based on YOLO-Light according to claim 6, characterized in that: The fast convolution is specifically: Multiple feature channels are divided into two parts, one part of the feature channels maintains the original feature channels after convolution, and the other part of the feature channels is combined with the original feature channels after convolution to output the information between different feature channels.

8. A traffic image target detection method based on YOLO-Light-Tiny, characterized in that: The method is implemented by pruning YOLO-Light and using the traffic image target detection method based on YOLO-Light as described in any one of claims 1 to 7.

9. A method for tracking target trajectories in real-time traffic video of a UAV, characterized in that: The method is implemented based on the YOLO-Light-based traffic image target detection method described in any one of claims 1-7.

Citation Information

Patent Citations

  • Unmanned aerial vehicle multi-target tracking method based on ByteTrack

    CN116630376A

  • Traffic tracking detection system for view angle of unmanned aerial vehicle

    CN118918148A

  • Wire clamp defect detection model and wire clamp detection method based on YOLOv51 frame

    CN118552502A