Road vehicle target detection method based on lightweight network

By optimizing the lightweight network architecture of YOLOv1 and adopting the SALBNet backbone network, C2PSA_GZB attention mechanism and Dxh_Sample upsampling mechanism, the problems of large parameter number, high computational complexity and insufficient environmental adaptability of YOLOv1 in road vehicle detection are solved, and the detection efficiency and accuracy are improved.

CN120599232APending Publication Date: 2025-09-05HUAIYIN INSTITUTE OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511034212.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-25
Publication Date
2025-09-05

AI Technical Summary

Technical Problem

YOLOv1 has problems in road vehicle detection, such as large model parameters, high computational complexity, long training time, and insufficient adaptability to complex environments. It is difficult to meet the high frame rate and low latency requirements of traffic monitoring systems, and its ability to recognize vehicles of different sizes is insufficient.

Method used

A lightweight network architecture is adopted, including the SALBNet backbone network, the C2PSA_GZB attention mechanism, the C3k2_SHD neck structure, and the Dxh_Sample upsampling mechanism, to optimize the backbone structure and neck module of YOLOv1, improve detection efficiency, and enhance robustness.

Benefits of technology

It effectively reduces the computing cost, improves the real-time performance and detection accuracy of the model, enhances the adaptability to complex environments and the ability to recognize vehicles of different sizes, and maintains a high detection accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120599232A_ABST
    Figure CN120599232A_ABST
Patent Text Reader

Abstract

The invention discloses a road vehicle target detection method based on a lightweight network, and provides a lightweight and high-expression backbone network node SALBNet to replace a traditional backbone network based on a YOLOv11 backbone structure, a novel C2PSAGZB attention mechanism is added, and the novel C2PSAGZB attention mechanism is utilized to be connected with the SALBNet lightweight backbone network. In a neck structure of YOLOv11, an innovative C3k2SHD is utilized to replace a C3k2 layer in the neck, and an innovative up-sampling mechanism DxhSample fusing local and global information is provided. And training on an ACDC vehicle data set by using the improved target detection model, and carrying out system evaluation on the model performance through a training result. Compared with the prior art, the method has the advantages that the parameter quantity and the calculation quantity of the YOLOv11 model are remarkably reduced while the detection precision is kept, the training efficiency is improved, the lightweight improvement of a network structure is realized, and the deployment performance and the operation efficiency of the model in practical application are enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of target detection, and in particular to a road vehicle target detection method based on a lightweight network. Background Art

[0002] The environmental conditions during road vehicle image acquisition are complex and changeable, affected by lighting interference, weather interference (such as rain, fog, and cloudy skies), and vehicle occlusion. These factors pose challenges to YOLOv11's performance in real-world road vehicle detection, leading to reduced detection accuracy and requiring targeted optimization for complex environments.

[0003] Although YOLOv11 has good real-time performance while ensuring high detection accuracy, traffic monitoring systems still have strict requirements for high frame rates and low latency. The model's computational efficiency and inference speed need to be further improved to meet the real-time response requirements of actual application scenarios.

[0004] The resolution of road vehicle images continues to increase. When processing high-resolution images, YOLOv11 faces bottlenecks such as large model parameters, high computational complexity, and long training time, which affects the real-time application and rapid iteration of the model.

[0005] Vehicle sizes in traffic images vary significantly, ranging from small cars to large trucks. YOLOv11 needs to improve its ability to recognize vehicles of varying sizes to ensure accurate detection results. Furthermore, complex road backgrounds and vehicle occlusions increase detection complexity and affect the robustness of the model.

[0006] Aiming at the technical difficulties of YOLOv11 in road vehicle target detection, such as large number of model parameters, long training time and insufficient adaptability to complex environments, this study proposes a YOLOv11 road vehicle target detection method based on a lightweight network architecture to solve the above problems. Summary of the Invention

[0007] Purpose of the Invention: To address the issues of large parameters, high GFLOPs, and long training time in YOLOv11 training using n-weights, this invention provides a road vehicle target detection method based on a lightweight network. By optimizing the backbone structure, introducing an attention mechanism, replacing the original neck module with C3k2_SHD, and designing a lightweight upsampling module Dxh_Sample that integrates local and global information, this method effectively improves detection efficiency and reduces computational costs.

[0008] Technical solution: The present invention provides a road vehicle target detection method based on a lightweight network, comprising the following steps:

[0009] Step 1: Obtain the ACDC vehicle dataset and divide it into training set, validation set, and test set;

[0010] Step 2: Based on the YOLOV11 model, a backbone network SALBNet is proposed to replace the traditional backbone network. The backbone network SALBNet consists of an initial convolutional downsampling stem module and four progressive stages Stage1-4. Each stage contains a 3×3 convolutional layer with a stride of 2 and a different number of basic residual modules Block; the backbone network SALBNet extracts semantic features of different scales layer by layer, and finally outputs four feature maps of different resolutions, corresponding to P2, P3, P4, and P5 in the detection task;

[0011] Step 3: In the YOLOv11 backbone network, add the C2PSA_GZB attention mechanism and connect it to the SPPF module;

[0012] Step 4: In the neck structure of YOLOv11, the feature fusion module C3k2_SHD is used to replace the C3k2 layer in the neck;

[0013] Step 5: In the neck structure of YOLOv11, an innovative upsampling mechanism Dxh_Sample is proposed to fuse local and global information.

[0014] Step 6: Use the dataset to train the improved target detection model from Step 2 to Step 5, and evaluate the model based on the training results.

[0015] Furthermore, in step 2, the basic residual module Block first extracts spatial information through a 7×7 depthwise separable convolution. The features are then fed into two parallel 1×1 convolution branches to generate tensors x1 and x2, respectively. x1 is activated with ReLU6 and then fused with x2, achieving fine-grained interaction and fusion between features.

[0016] Furthermore, in step 3, the C2PSA_GZB attention mechanism is specifically as follows:

[0017] First, the input feature map is mapped to a 2C-dimensional intermediate feature space after a 1×1 convolution process;

[0018] Then, the features are divided into two parts along the channel dimension, where:

[0019] Part IX part1 Keep the original information;

[0020] Part IIX part2 Feed it into the deep attention substructure for deeper semantic modeling and context enhancement;

[0021] In the second part of the deep attention substructure, a learnable position bias matrix P is introduced to enhance the model's sensitivity to spatial position information, and by modeling the relationship between the query vector and the key vector, attention weights for feature weighting are generated;

[0022] The calculation form of attention weight is shown in Formula 1:

[0023] Ag=softnax(Q g K g +P) (1)

[0024] Among them, Q g represents the query vector, K g Represents the key vector, the query vector extracts spatial features through deep convolution, and then performs dot product operation with the corresponding key vector to obtain the attention map;

[0025] Subsequently, the attention weight is multiplied by the value vector Vg, and a feedforward network consisting of two layers of 1×1 convolution is used to further fuse the information between channels and improve the nonlinear expression ability and modeling depth of the model;

[0026] In the output stage, keep branch X part1 With X part2 Splicing and fusion to generate the final output features.

[0027] Furthermore, the feature fusion module C3k2_SHD in step 4 is specifically:

[0028] First, the input features are mapped to the feature space of the intermediate number of channels through 1×1 convolution. The number of channels is determined by the number of output channels and the expansion ratio as shown in Formula 2:

[0029] c=C out ×e (2)

[0030] Among them, c out is the number of output channels, e is the expansion ratio coefficient;

[0031] The mapping results are divided into two paths: the main path maintains the basic features of the input to ensure stable gradient transmission; the auxiliary path enters the deep substructure to extract multi-scale features and enhance complex features;

[0032] The two paths finally converge through feature concatenation and convolution fusion.

[0033] Furthermore, in the auxiliary path, a lightweight channel division strategy is adopted, and the number of output channels is divided into two parts: the main channel and the auxiliary channel. The relationship between them is:

[0034]

[0035] Cghost =C main ×(r-1) (4)

[0036] Among them, C out is the number of output channels, r is the channel compression ratio, C main The number of channels generated by the main branch, responsible for extracting core features, C ghost It is the number of auxiliary channels generated by the auxiliary branch through low-computation depth convolution, which is used to supplement and enrich the feature expression. Finally, the two parts of the channel are spliced ​​and cropped to the target number of channels.

[0037] Furthermore, in step 5, the specific process of the innovative upsampling mechanism Dxh_Sample that integrates local and global information is as follows:

[0038] First, the input X passes through two parallel linear transformation branches, each of which maps the input to a uniform dimension H×W×2gs 2 ,in:

[0039] Encoding branch: used to extract local structure and context information;

[0040] Weight prediction branch: used to generate attention guidance maps and estimate the importance distribution of each position;

[0041] The results of the two branches are element-wise added, i.e., feature fusion. In this process, the output of the weight prediction branch is first multiplied by a scaling factor of 0.5σ, where σ represents a dynamic or learnable weight scaling value used to adjust the relative influence of the two branches.

[0042] The fused feature output is still H×W×2gs 2 ';

[0043] The fused feature map is input into the PixelShuffle upsampling module, and the encoded information is expanded from the channel dimension to the spatial dimension through channel rearrangement.

[0044] Furthermore, the result of the PixelShuffle upsampling module is recorded as Its size is sH×sW×2gs, and it introduces a global action graph from outside the module or shared calculations The size is also sH×sW×2gs, and Additive fusion, specifically:

[0045]

[0046] Guided by the global graph, the ScopeFactor mechanism is used to achieve collaborative modeling of local-global information.

[0047] Beneficial effects:

[0048] 1. Based on the YOLOv11 backbone architecture, this paper proposes a lightweight backbone network, SALBNet, which extracts multi-scale semantic features layer by layer through an initial convolutional downsampling module and four progressive stages, ultimately outputting feature maps of four different resolutions suitable for object detection tasks. The SALBNet core block design includes a 7×7 depthwise separable convolution and two parallel 1×1 convolution branches, combined with ReLU6 activation to achieve fine-grained feature interaction and effectively model nonlinear relationships between features.

[0049] 2. This paper incorporates an innovative lightweight attention mechanism, C2PSA_GZB, into the YOLOV11 backbone architecture. This mechanism implements spatial semantic modeling and fine-grained feature extraction through channel partitioning and multi-group attention computation. By employing a learnable position bias and window partitioning strategy, the model's ability to model local structure and contextual relationships is enhanced while maintaining manageable computational overhead, demonstrating its effectiveness without increasing output size.

[0050] 3. In the neck structure of YOLOv11, this paper proposes an innovative C3k2_SHD layer to replace the C3k2 layer in the neck. Input features are first mapped to the intermediate channel space and divided into a primary path and an auxiliary path. The primary path retains basic information, while the auxiliary path extracts multi-scale features, which are ultimately fused to enhance expressiveness. The auxiliary path uses lightweight channel partitioning and a deformable convolutional structure to enhance feature modeling capabilities and robustness while maintaining computational efficiency.

[0051] 4. Based on the YOLOv11 model, this paper proposes an innovative upsampling mechanism, Dxh_Sample, that fuses local and global information within the YOLOv11 neck structure. This mechanism extracts structural semantics and attention information through a dual-branch encoding and weight prediction approach, and introduces a scaled fusion strategy to enhance feature representation. The fused result is then upsampled using PixelShuffle and added to the global action graph to form the ScopeFactor output, effectively improving spatial resolution and key region perception, enhancing the model's detection accuracy and robustness. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 This is a diagram of the improved YOLOv11 network structure in an embodiment of the present invention;

[0053] Figure 2 FIG1 is a block diagram of the improved SALBNet module in an embodiment of the present invention;

[0054] Figure 3 This is a diagram of the improved backbone Block structure in an embodiment of the present invention;

[0055] Figure 4 This is a structural diagram of the improved C2PSA_GZB in an embodiment of the present invention;

[0056] Figure 5 This is a diagram of the improved C3k2_SHD structure in an embodiment of the present invention;

[0057] Figure 6 This is a diagram of the improved Dxh_Sample structure in an embodiment of the present invention;

[0058] Figure 7 This is a diagram of the improved YOLOv11 detection dataset in an embodiment of the present invention;

[0059] Figure 8 This is a diagram of the unimproved YOLOv11 detection dataset in an embodiment of the present invention. DETAILED DESCRIPTION

[0060] The present invention will be further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention and are not intended to limit the scope of protection of the present invention.

[0061] The present invention discloses a road vehicle target detection method based on a lightweight network, which specifically includes the following steps:

[0062] Step 1: Select the ACDC vehicle dataset and divide it into training set, validation set, and test set.

[0063] Step 2: Based on the YOLOV11 model, in order to balance computational efficiency and multi-scale feature modeling capabilities, this paper proposes a lightweight and highly expressive backbone network structure - SALBNet. Figure 2 As shown in the figure, SALBNet consists of an initial convolutional downsampling (stem) module and four progressive stages (Stages 1-4). Each stage includes a 3×3 convolutional layer with a stride of 2 and a varying number of basic residual modules (Blocks). Starting from the input, the network extracts semantic features of different scales layer by layer, ultimately outputting four feature maps of different resolutions (corresponding to P2, P3, P4, and P5 in the detection task).

[0064] The core module of SALBNet is Block Figure 3 As shown in Figure 1, its structural design aims to efficiently model nonlinear relationships between features. Each block first extracts spatial information through a 7×7 depthwise separable convolution. The features are then fed into two parallel 1×1 convolution branches, generating tensors x1 and x2, respectively. x1 is activated with ReLU6 and then fused with x2, achieving fine-grained interaction and fusion between features. The specific expression is shown in Formula 11:

[0065] x=ReLU6(x1)x2 (11)

[0066] To accommodate different computing budgets, SALBNet supports flexible control of network width and the number of blocks per stage through two hyperparameters: width and depth. This design version uses the following configuration:

[0067] base_dim=24

[0068] depths = [2, 2, 8, 3]

[0069] width=0.25

[0070] Through the make_divisible function, all channel numbers are finally adjusted to integer multiples of 8 to optimize memory access alignment and deployment efficiency.

[0071] In the network's forward function, a feature map resizing strategy is employed to obtain representative multi-scale feature outputs. After the network runs, it automatically extracts unique spatial resolutions from all intermediate feature maps and outputs the last four layers (P2–P5, from highest to lowest) for downstream object detection tasks.

[0072] This mechanism enables SALBNet to output multi-resolution features and simplifies the connection process between the backbone network and the YOLO detection head.

[0073] To further improve training stability, SALBNet uses TruncatedNormal distribution initialization to initialize weights in convolutional and linear layers. Furthermore, DropPath perturbs the model structure by randomly skipping certain network paths during training. This lightweight optimization method effectively prevents overfitting and improves the model's generalization performance on unseen data.

[0074] Step 3: In order to improve the model detection accuracy of the lightweight network in target detection, a lightweight attention mechanism C2PSA_GZB is designed in the backbone structure. Figure 4 As shown in Figure 1, the input feature map X is first mapped to a 2C-dimensional intermediate feature space after a 1×1 convolution. Subsequently, the feature is divided into two parts along the channel dimension, where:

[0075] Part IX part1 Keep the original information;

[0076] Part IIX part2 It is fed into a deep attention substructure for deeper semantic modeling and context enhancement.

[0077] In the second part of the attention substructure, a learnable position bias matrix P is introduced to enhance the model's sensitivity to spatial position information, thereby improving the local receptive field and position perception capabilities. Attention weights for feature weighting are generated by modeling the relationship between the query vector and the key vector.

[0078] The calculation form of attention weight is shown in Formula 12:

[0079] Ag=softmax(Q g K g +P) (12)

[0080] Among them, Q g represents the query vector, K g The query vector is deep convolutionally extracted to extract spatial features, and then dot-producted with the corresponding key vector to obtain the attention map. This operation significantly improves the model's ability to model relationships between different locations.

[0081] Subsequently, the attention weight is multiplied by the value vector Vg, and a feedforward network consisting of two layers of 1×1 convolution is used to further fuse the information between channels and improve the nonlinear expression ability and modeling depth of the model.

[0082] In the output stage, keep branch X part1 With X part2 The final output features are generated by splicing and fusion as shown in Formula 13:

[0083] F out =Conv(Concat(X part1 Xpart2)) (13)

[0084] To control computational complexity and maintain structural flexibility, the module employs a window partitioning mechanism. When the feature map is large, it is divided into several fixed-size windows, and attention is calculated independently within each window. For smaller inputs, global modeling is performed directly on the entire image. If the input size does not meet the window divisibility criteria, the module automatically fills the edges and restores the original size after the calculation is complete to ensure information integrity.

[0085] In the experiment, a feature map with an input size of 1×64×224×224 was used. After processing by the C2PSA_GZB module, the output size remained consistent, verifying that the module effectively enhanced the expressiveness and contextual relevance of the features without introducing additional space overhead.

[0086] Step 4: To further improve the representation ability of convolutional neural networks in complex visual scenes, this paper proposes a feature fusion module C3k2_SHD with lightweight characteristics and multi-scale enhancement capabilities to replace the C3k2 module in the neck structure. Figure 5 As shown, the input features are first mapped to the feature space of the intermediate number of channels through 1×1 convolution. The number of channels is determined by the number of output channels and the expansion ratio as shown in Formula 14:

[0087] c=C out ×e (14)

[0088] Among them, C out is the number of output channels, and e is the expansion coefficient, which is usually set to 0.5 to control the computational complexity. This mapping not only adjusts the number of channels but also provides a unified input basis for the subsequent multi-branch structure.

[0089] The mapping results are divided into two paths: the primary path preserves the basic features of the input, ensuring stable gradient transfer; the auxiliary path enters the deep substructure to extract multi-scale features and enhance complex features. The two paths ultimately converge, achieving efficient information exchange through feature concatenation and convolutional fusion.

[0090] In the auxiliary path, a lightweight channel division strategy is adopted. The number of output channels is divided into two parts: the main channel and the auxiliary channel. The relationship between them is shown in Formula 15 and Formula 16:

[0091]

[0092] C ghost =C main ×(r-1) (16)

[0093] Among them, C out is the number of output channels, r is the channel compression ratio (r = 2). main The number of channels generated by the main branch, responsible for extracting core features. ghost The auxiliary branch generates auxiliary channels through low-computation depthwise convolution, which supplement and enrich feature representation. Finally, the two channels are concatenated and cropped to the target number of channels. This design effectively reduces computational resource requirements while maintaining the network's expressive power and robustness.

[0094] To fully capture multi-scale information in images, the auxiliary path employs a bottleneck structure consisting of multiple stacked deformable convolution kernels. Within each bottleneck unit, the adjustable kernel size allows for the capture of both local details and contextual information. Furthermore, the introduction of residual connections ensures stable gradient transfer and effective fusion of deep features.

[0095] The stacked multi-branch output features are concatenated in the channel dimension to form a rich multi-scale expression. Finally, the feature integration and dimensionality reduction are achieved through 1×1 convolution, as shown in Formula 17:

[0096] Y = Conv1×1([X1, X2…Xi ]) (17)

[0097] Among them, X i Represents the features extracted by the i-th sub-branch. This design effectively coordinates the fusion of local details and global semantic information, improving the model's adaptability to complex targets and backgrounds.

[0098] Step 5: Based on the YOLOv11 model, an innovative upsampling mechanism Dxh_Sample is proposed. Figure 6 As shown in Figure 1, the input feature map is X, with a size of H×W×H×W. The input X passes through two parallel linear change branches at the same time, each branch maps the input to a uniform dimension of H×W×2gs 2 .

[0099] in:

[0100] Encoding branch: used to extract local structure and context information.

[0101] Weight prediction branch: used to generate attention guidance maps and estimate the importance distribution of each position.

[0102] In order to balance the contributions of the two branches, the results of the two branches are element-wise added (i.e., feature fusion). During this process, the output of the weight prediction branch is first multiplied by a scaling factor of 0.5σ.

[0103] Where: σ represents a dynamic or learnable weight scaling value, which is used to adjust the relative influence of the two branches. The fused feature output is still H×W×2gs 2 .

[0104] The fused feature map is input to the PixelShuffle upsampling module, which expands the encoded information from the channel dimension to the spatial dimension through channel rearrangement to achieve improved spatial resolution. Specifically, the input size is H×W×2gs 2 , the output size is sH×sW×2gs, where s represents the upsampling multiple and g represents the number of groups.

[0105] The result of the above pixel shuffle is recorded as Its size is sH×sW×2gs, and it introduces a global action graph from outside the module or shared calculations (The dimensions are also sH×sW×2gs). and Addition fusion enhances the global correlation ability of local features. The specific mathematical expressions are shown in Formula 18 and Formula 19:

[0106]

[0107] Guided by the global graph, the ScopeFactor mechanism is used to achieve collaborative modeling of local-global information.

[0108] The fusion result is the final The output, whose size is sH×sW×2gs, helps to dynamically adjust the receptive field range and improve the network's ability to focus on key areas and its robustness.

[0109] Step 6: Based on the improved target detection model, conduct target recognition experiments on the training data, and quantitatively analyze and verify the model detection effect using common performance indicators.

[0110] The modified YOLOv11 model backbone network is as follows Figure 1 As shown in the figure, the traditional backbone network is replaced by a new lightweight, highly expressive backbone network SALBNet, and the new C2PSA_GZB attention mechanism is added. The new C2PSA_GZB attention mechanism is used to connect with the SALBNet lightweight backbone network. In the neck structure of YOLOv11, the innovative C3k2_SHD is used to replace the C3k2 layer in the neck, and the innovative upsampling mechanism Dxh_Sample is replaced.

[0111] The original YOLOv11 network and the improved new YOLOv11 network are trained as follows:

[0112] Original YOLOv11 network: Use YOLOv11n.pt weights and YOLOv11 network to iteratively train the ACDC vehicle dataset. Run in CUDA 11.8, PyTorch 11.8, and use NVIDIA GeForce RTX 3070 8G GPU.

[0113] During the model training process, after 300 iterations of training, the dataset detection pictures are as follows Figure 7 shown.

[0114] Experiments show that the accuracy of map50 reaches 60%, the number of parameters is 2583712 parameters, GFLOPs is 6.3, and the model size is 5.5MB.

[0115] Improved YOLOv11 network: Use YOLOv11n.pt weights and the improved YOLOv11 network to iteratively train the ACDC vehicle dataset. Run the following environment: CUDA 11.8; Pytorch 11.8; GPU: NVIDIA GeForce RTX 3070 8G.

[0116] During the model training process, after 300 iterations of training, the dataset detection pictures are as follows Figure 8 shown.

[0117] Experiments show that the accuracy of map50 reaches 59.2%, the number of parameters is 1819252 parameters, GFLOPs is 4.3, and the model size is 4.0MB.

[0118] Table 1

[0119] Parameter quantity Model size GFLOPs map50 average precision YOLOv11 2583712 5.5 6.3 0.60 The present invention 1819252 4.0 4.3 0.592

[0120] According to the data in Table 1, the YOLOv11 network in this embodiment has a significant decrease in model size, number of parameters, and GFLOPs compared to the original YOLOv11 network, and the map50 average accuracy decreases slightly.

[0121] Among them, the model size is reduced by: (5.5-4.0) / 5.5=27.2%;

[0122] Parameter quantity decreased: (2583712-1819252) / 2583712=29.6%;

[0123] Average precision map decreases: 0.60-0.592=0.8%.

[0124] Experimental results show that on the ACDC vehicle dataset, the improved YOLOv11 model reduces the model size by 27.2% and the number of model parameters by 29.6% compared to the original YOLOv11 network model, demonstrating a significant lightweighting effect. Furthermore, the average precision (MAP50) is 59.2%, a decrease of approximately 0.8 percentage points compared to the original YOLOv11 network model, while maintaining essentially the same accuracy.

[0125] The above embodiments are intended only to illustrate the technical concepts and features of the present invention. Their purpose is to enable those skilled in the art to understand the contents of the present invention and implement them accordingly. They are not intended to limit the scope of protection of the present invention. Any equivalent changes or modifications made in accordance with the spirit of the present invention are intended to be covered by the scope of protection of the present invention.

Claims

1. A road vehicle target detection method based on a lightweight network, characterized in that: The following steps are involved: Step 1: Obtain the ACDC vehicle dataset and divide it into training set, validation set, and test set; Step 2: Based on the YOLOV11 model, a backbone network SALBNet is proposed to replace the traditional backbone network. The backbone network SALBNet consists of an initial convolutional downsampling stem module and four progressive stages Stage1-4. Each stage contains a 3×3 convolutional layer with a stride of 2 and a different number of basic residual modules Block; The backbone network SALBNet extracts semantic features of different scales layer by layer, and finally outputs four feature maps with different resolutions, corresponding to P2, P3, P4, and P5 in the detection task; Step 3: In the YOLOv11 backbone network, add the C2PSA_GZB attention mechanism and connect it to the SPPF module; Step 4: In the neck structure of YOLOv11, the feature fusion module C3k2_SHD is used to replace the C3k2 layer in the neck; Step 5: In the neck structure of YOLOv11, an innovative upsampling mechanism Dxh_Sample is proposed to fuse local and global information. Step 6: Use the dataset to train the improved target detection model from Step 2 to Step 5, and evaluate the model based on the training results.

2. The method for detecting road vehicles based on a lightweight network according to claim 1, wherein: In step 2, the basic residual module Block first extracts spatial information through a 7×7 depthwise separable convolution. The features are then fed into two parallel 1×1 convolution branches, generating tensors x1 and x2, respectively. x1 is activated with ReLU6 and then fused with x2, achieving fine-grained interaction and fusion between features.

3. The method for detecting road vehicle targets based on a lightweight network according to claim 1, wherein: In step 3, the C2PSA_GZB attention mechanism is specifically as follows: First, the input feature map is mapped to a 2C-dimensional intermediate feature space after a 1×1 convolution process; Then, the features are divided into two parts along the channel dimension, where: Part IX part1 Keep the original information; Part IIX part2 Feed it into the deep attention substructure for deeper semantic modeling and context enhancement; In the second part of the deep attention substructure, a learnable position bias matrix P is introduced to enhance the model's sensitivity to spatial position information, and by modeling the relationship between the query vector and the key vector, attention weights for feature weighting are generated; The calculation form of attention weight is shown in Formula 1: Among them, Q g represents the query vector, K g Represents the key vector, the query vector extracts spatial features through deep convolution, and then performs dot product operation with the corresponding key vector to obtain the attention map; Subsequently, the attention weight is multiplied by the value vector Vg, and a feedforward network consisting of two layers of 1×1 convolution is used to further fuse the information between channels and improve the nonlinear expression ability and modeling depth of the model; In the output stage, keep branch X prat1 With X part2 Splicing and fusion to generate the final output features.

4. The method for detecting road vehicle targets based on a lightweight network according to claim 1, wherein: The feature fusion module C3k2_SHD in step 4 is specifically: First, the input features are mapped to the feature space of the intermediate number of channels through 1×1 convolution. The number of channels is determined by the number of output channels and the expansion ratio as shown in Formula 2: c=C out ×e (2) Among them, c out is the number of output channels, e is the expansion ratio coefficient; The mapping results are divided into two paths: the main path maintains the basic features of the input to ensure stable gradient transmission; the auxiliary path enters the deep substructure to extract multi-scale features and enhance complex features; The two paths finally converge through feature concatenation and convolution fusion.

5. The method for detecting road vehicle targets based on a lightweight network according to claim 4, characterized in that: In the auxiliary path, a lightweight channel division strategy is adopted. The number of output channels is divided into two parts: main channels and auxiliary channels. The relationship is: C ghost =C main ×(r-1) (4) Among them, C out is the number of output channels, r is the channel compression ratio, C main The number of channels generated by the main branch, responsible for extracting core features, C ghost It is the number of auxiliary channels generated by the auxiliary branch through low-computation depth convolution, which is used to supplement and enrich the feature expression. Finally, the two parts of the channel are spliced ​​and cropped to the target number of channels.

6. The method for detecting road vehicle targets based on a lightweight network according to claim 1, wherein: In step 5, the specific process of the innovative upsampling mechanism Dxh_Sample that integrates local and global information is as follows: First, the input X passes through two parallel linear transformation branches, each of which maps the input to a uniform dimension H×W×2gs 2 ,in: Encoding branch: used to extract local structure and context information; Weight prediction branch: used to generate attention guidance maps and estimate the importance distribution of each position; The results of the two branches are element-wise added, i.e., feature fusion. In this process, the output of the weight prediction branch is first multiplied by a scaling factor of 0.5σ, where σ represents a dynamic or learnable weight scaling value used to adjust the relative influence of the two branches. The fused feature output is still H×W×2gs 2 '; The fused feature map is input into the PixelShuffle upsampling module, and the encoded information is expanded from the channel dimension to the spatial dimension through channel rearrangement.

7. The method for detecting road vehicle targets based on a lightweight network according to claim 6, wherein: The result of the PixelShuffle upsampling module is recorded as Its size is sH×sW×2gs, and it introduces a global action graph from outside the module or shared calculations The size is also sH×sW×2gs, and Additive fusion, specifically: Guided by the global graph, the ScopeFactor mechanism is used to achieve collaborative modeling of local-global information.