Special vehicle target detection algorithm under extremely small samples and small targets
By constructing a very small sample dataset of special vehicles and designing the YOLOv11-SV algorithm, adopting the WT-SE attention module, adding a feature fusion layer and improving the loss function EIoU Loss, the problem of low detection accuracy of special vehicles under extremely small samples and small targets is solved, and a more efficient detection effect is achieved.
Patent Information
- Application Number
- CN202510751291.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-06
- Publication Date
- 2025-09-05
AI Technical Summary
In the case of extremely small samples and small targets, the special vehicle target detection model has low detection accuracy, is prone to missed detections and false detections, and the existing algorithm is not efficient when running on resource-limited devices.
A very small sample dataset of special vehicles was constructed, and the YOLOv11-SV vehicle target detection algorithm was designed. The WT-SE attention module was adopted, a feature fusion layer and detection head were added, and the loss function was improved to EIoU Loss to improve the model's attention to vehicle targets, detection accuracy, and convergence speed.
It improves the detection accuracy of the model under extremely small samples and small targets, improves the generalization ability and detection effect of the model, reduces missed detections and false detections, and improves detection speed and accuracy.
Smart Images

Figure CN120599227A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of vehicle target detection, and in particular to a special vehicle target detection algorithm under extremely small samples and small targets. Background Art
[0002] With the advancement of deep learning-based vehicle detection technology, it is playing an increasingly important role in intelligent transportation. However, in the field of special vehicles, due to their relatively small proportion in traffic flow and their unique operating scenarios, it is difficult to obtain sufficient high-quality data (such as images and videos) containing special vehicles in various environments and states. This typically results in extremely small samples (usually less than 200). Furthermore, the scale of the objects in the images and videos obtained is relatively small. This results in insufficient data for training target detection models, affecting the model's generalization ability and accuracy. Detecting special vehicles in extremely small sample sizes and with small objects has become a pressing issue.
[0003] Currently, deep learning-based object detection algorithms fall into two main categories. One is two-stage object detection algorithms, represented by algorithms such as R-CNN, Faster R-CNN, and Mask R-CNN; the other is single-stage object detection algorithms, such as the SSD series, the YOLO series, EfficientDet, and DETR. Two-stage object detection algorithms achieve high detection accuracy by combining candidate region generation with precise positioning. However, due to their large computational workload and lengthy inference processes, they present adaptation challenges when running on resource-constrained devices. Single-stage object detection algorithms, on the other hand, use direct regression to generate detection bounding boxes, significantly improving inference speed and achieving superior detection performance. This feature enables single-stage object detection algorithms to be more efficiently deployed on resource-constrained devices.
[0004] In the field of single-stage object detection, many scholars at home and abroad have conducted in-depth research. Zhang Yaliang et al. used the k-means method to redesign the prior box and proposed an object detection algorithm for drones, improving the original model's accuracy in detecting drones in complex backgrounds and occlusions. Zhou Fei et al. proposed an improved YOLOv8 algorithm. They replaced the backbone feature extraction network with FasterNet to improve detection accuracy and inference speed; added the SimAM attention module to enhance feature fusion capabilities. To address the problems of missed detection, low accuracy, and weak generalization in urban vehicle detection under complex traffic scenarios, Xu Degang et al. proposed an improved YOLOv8 algorithm. They replaced the C2f module with an improved GAM-C2f structure to balance computational efficiency and accuracy. Bai Yu et al. increased the proportion of small objects in the image data by slicing the image, allowing the model to learn more about small object features.
[0005] Although the above algorithms have been applied to vehicle target detection, there is no targeted method to solve the special vehicle detection tasks with extremely small samples and small targets in different scenarios, and the detection effect is poor. Summary of the Invention
[0006] The purpose of this invention is to propose a special vehicle target detection algorithm under extremely small samples and small targets, which can detect extremely small samples and small targets in different scenarios, improve the problems of low model detection accuracy, easy missed detection and false detection caused by the small number of data set samples, and improve the average accuracy of the model.
[0007] In order to achieve the above object, the technical solution adopted by the present invention is as follows:
[0008] A special vehicle target detection algorithm under extremely small samples and small targets includes the following steps:
[0009] S1, constructing a very small sample data set of special vehicles, including steps S11-S12:
[0010] S11, collects image data of special vehicles in different backgrounds such as desert, snow, grassland, etc.
[0011] S12: Use the local labeling tool Labelimg to label the collected images, select the target vehicle by a rectangular selection box and mark the specific category;
[0012] S2, based on the baseline algorithm YOLOv11, design the YOLOv11-SV vehicle target detection algorithm suitable for special vehicle detection in small target and small sample conditions;
[0013] S3 inputs the dataset constructed by S1 into the YOLOv11-SV network model constructed by S2 for training, uses the trained model to detect, and outputs the detection results.
[0014] The resolution of small targets in the extremely small sample data set of special vehicles is less than 32×32, and the extremely small sample data set has less than 200 images.
[0015] The YOLOv11-SV vehicle target detection algorithm mainly consists of a backbone network (Backbone), a neck network (Neck) and a detection head (Head).
[0016] The specific operation steps of S2 are Sa1-Sa4:
[0017] Sa1 processes the input information by convolutionally connecting a conventional convolutional layer with a 3×3 convolution kernel and a wavelet convolution (WTConv) in series, and then extracts multi-scale features in parallel with a single 3×3 convolution kernel. After obtaining the multi-scale feature information of the image, it draws on the idea of channel attention (SENet) to compress and excite the input information. In the activation function after the first fully connected layer, the original ReLU activation function of SENet is replaced with the SiLU activation function to form a new attention mechanism module WT-SE. This WT-SE module is used to replace the C2PSA module in the YOLOv11 backbone network, improving the model's attention to vehicle targets and appropriately increasing the network depth to improve the model's generalization ability.
[0018] Sa2, adds an additional upsampling convolution layer to the YOLOv11 neck network and connects it laterally to the feature extraction module of the previous layer in the backbone network, thereby obtaining a 160×160 feature map. This larger scale feature map is specifically used for detecting small objects;
[0019] Sa3, adds a small object detection head to the YOLOv11 network to improve the detection accuracy of small-scale objects;
[0020] Sa4, replace the CIoU Loss of the YOLOv11 model with EIoU Loss to increase the model convergence speed and further improve the detection accuracy.
[0021] The backbone network performs downsampling operations through five standard convolution modules CBS (convolution, batch normalization and SiLU activation function) to generate feature maps of different scales. C3K2 is used to make the network more flexible and efficient. After downsampling, the spatial pyramid pooling fast module (SPPF) is introduced to pool the feature maps with pooling kernels of different sizes, increasing the diversity of feature expression. Finally, the WT-SE module is used to enhance the model's feature extraction ability for the input image and better process multi-level features.
[0022] The neck network is mainly responsible for feature fusion, connecting the backbone network and the detection head. Its design purpose is to effectively integrate features at different scales for more accurate target detection.
[0023] The detection head adopts a decoupled structure, with two branches predicting category information and location information respectively. The bounding box regression task uses distribution focus loss (DFL) and CIOU; the classification task uses binary cross entropy loss (BCE Loss) and introduces a depthwise separable convolution (DWConv) operation on its branch, significantly reducing the number of parameters and computational complexity.
[0024] The beneficial effects of the present invention are as follows:
[0025] This paper proposes a special vehicle target detection algorithm for extremely small samples and small targets. First, an improved WT-SE attention mechanism module is designed to increase the model's attention to special vehicle targets, and the network depth is appropriately increased to improve the model's generalization ability. Second, to address the small target size, a feature fusion layer and an extremely small target detection head are added to improve the model's detection accuracy. Finally, the loss function is modified to EIOU to enhance the model's regression accuracy and speed up convergence. Comparative experiments demonstrate that this method has good detection results and the improved network model has a certain degree of generalization ability. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 Design a flow chart for the present invention;
[0027] Figure 2 This is the YOLOv11-SV network structure diagram;
[0028] Figure 3 This is the WT-SE module structure diagram;
[0029] Figure 4 This is an example diagram of wavelet convolution;
[0030] Figure 5 This is an example diagram of the EIoU loss function;
[0031] Figure 6 This is a diagram of some special vehicle data sets;
[0032] Figure 7 To improve the algorithm visualization comparison chart, Figure 7 (a) is the original algorithm’s missed detection image. Figure 7 (b) is the effect diagram of the improved algorithm. DETAILED DESCRIPTION
[0033] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solution of the present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0034] In order to accurately represent the detection effect of the algorithm, the experimental evaluation index of the present invention uses the mean average precision (mAP@0.5), the number of model parameters (Params), and the number of floating-point operations (FLOPs) as relevant indicators for model performance evaluation. In the target detection algorithm, the mean average precision (mAP) is an important indicator for evaluating detection performance. The mean average precision reflects the detection accuracy of the model, and the number of parameters and floating-point calculations reflect the size and computational complexity of the model. Among them, the mean average precision is related to the accuracy (P), recall (R) and average precision (AP) of the model. The calculation formula for accuracy is:
[0035]
[0036] The recall calculation formula is:
[0037]
[0038] The calculation formula for average precision is:
[0039]
[0040] The calculation formula for the mean average precision is:
[0041]
[0042] Where TP is the number of targets correctly detected by the model, FP is the number of targets incorrectly detected by the model, and FN is the number of targets not correctly detected by the model. cls is the number of classes of all samples in the dataset.
[0043] The design flow chart of the present invention is as follows Figure 1 As shown in the figure, the designed YOLOv11-SV vehicle target detection algorithm mainly consists of a backbone network, a neck network and a detection head. Its structure is as follows Figure 2 shown.
[0044] 1. WT-SE Attention Module Design
[0045] Aiming at the problem of small sample and small-scale vehicle target detection, this paper improves and designs the WT-SE attention mechanism module based on SENet. The WT-SE module is as follows: Figure 3 shown.
[0046] First, a convolution layer with a 3×3 convolution kernel and a wavelet convolution (WTConv) layer are used to process the input information, and then a single 3×3 convolution kernel is used in parallel to perform multi-scale feature extraction to obtain feature maps of multiple scales. Figure 4 As shown in the figure, the input image is decomposed into different frequency components through wavelet transform. A small-sized deep convolution kernel is then applied to each frequency subband for convolution. Low-frequency information is obtained through smoothing or downsampling operations. This suppresses details and rapidly changing parts of the image, while retaining slowly changing, more stable parts. This information focuses on the overall outline and approximate position of the car, reflecting its main structure, such as its length and width. High-frequency information highlights areas of the image with drastic grayscale changes, capturing details such as the car's outline, windows, and lights. These details are relatively more important when detecting small targets. By subdividing high- and low-frequency feature information, multi-scale image analysis is achieved, enabling the extraction of richer and more comprehensive image features.
[0047] After obtaining the multi-scale feature information of the image, the input information is compressed and excited, drawing on the SENet concept. And in the activation function after the first fully connected layer, the original ReLU activation function of SENet is replaced with the SiLU activation function. The SiLU activation function is a non-monotonic, lower-bounded, upper-unbounded, regularized smooth activation function. It allows a portion of negative gradients to flow in to ensure information flow, preventing the use of the ReLU function from causing the death of some neurons and the loss of too many valid features; at the same time, it helps to improve nonlinear relationships. Through compression and excitation operations, the multi-scale information obtained previously is assigned at the channel layer, thereby highlighting the vehicle target information. This allows the module to better focus on the vehicle target information in the image, increasing the model's attention to special vehicle targets, while slightly increasing the network depth to improve the model's generalization ability.
[0048] 2. Small target detection based on feature fusion
[0049] The detection head primarily handles target classification and localization, using the features extracted by the backbone network to determine the target's position in the image and its category. To address the issue of smaller targets, this paper introduces a new small-target detection head compared to the original YOLOv11n network, improving detection accuracy for small-scale targets.
[0050] Different detection heads exhibit significant differences in detection performance and feature extraction. The original YOLOv11n utilizes the PANet feature fusion architecture for the neck region, equipped with three detection heads of varying sizes, performing classification and regression on feature maps of 20×20, 40×40, and 80×80 dimensions, respectively. However, this model performs poorly for small object detection. When the input image size is 640×640, if the target object occupies less than 5% of the image or even smaller, the target object's representation in the feature map disappears, rendering it undetectable. This demonstrates that existing network detection heads struggle to meet the requirements of small object detection. To address this issue, the present invention employs a method that adds a very small object detection layer. Although this method increases the number of parameters, leading to increased computational effort and slower inference speed, it significantly improves the low accuracy of small object detection. Specifically, an additional upsampling convolutional layer is added to the YOLOv11n network and horizontally connected to the feature extraction module in the previous layer of the backbone network, resulting in a 160×160 feature map. This larger-scale feature map is specifically used to detect small objects.
[0051] 3. EIOU loss function
[0052] YOLOv11n's bounding box regression uses the CIoU loss function. The calculation formula of CIoU is as follows:
[0053]
[0054] Where d is the Euclidean distance between the center of the real box and the predicted box; b represents the predicted box; b gt represents the real box; c is the diagonal distance between the real box and the minimum bounding rectangle of the predicted box; α is the weight parameter; v is the consistency of the aspect ratio; IoU is the intersection over union of the real box and the predicted box; w gt is the width of the real frame; h gt is the height of the real box; w is the width of the predicted box; h is the height of the predicted box. CIOU not only takes into account the intersection-union ratio, but also the center distance between the target box and the predicted box and the difference in aspect ratio. However, CIoU is difficult to measure the real difference between the width and height of the predicted box and the real box, and when the predicted box and the target box almost completely overlap (IoU is close to 1), the changes in the CIOU loss function are very small, which may cause the gradient to disappear. Therefore, this paper introduces the EIoU loss function to calculate the regression loss of the predicted box. EIoU splits the aspect ratio loss term of the predicted box and the real box in CIoU into the width difference and height difference between the predicted box and the real box, that is, Replace the αv term in CIoU. Taking the detection of car targets as an example, assume that the width of the real car frame is 100 pixels and the height is 50 pixels, and the predicted frame width is 80 pixels and the height is 50 pixels. EIoU can directly reflect the difference of 20 pixels in width, instead of comprehensively measuring this difference through aspect ratio like CIoU. This split can more accurately capture this geometric mismatch. During the backpropagation process, it provides the model with more accurate gradient information, and the model can adjust the parameters of the predicted frame more accurately based on these gradients. Figure 5 As shown in the figure, when the predicted box only needs to adjust its height, the regression process can change only its height because EIoU specifies the loss of both width and height differences. However, CIoU also changes the width of the predicted box, affecting the regression effect. Therefore, the EIoU loss function allows the model to update parameters more quickly to reduce the height difference without being affected by the comprehensive aspect ratio. This accelerates model convergence and improves regression accuracy.
[0055] Example 1
[0056] In order to prove the effectiveness of the WT-SE attention module design in this invention, ablation experiments are conducted based on a self-built dataset of 181 special vehicles. Due to the particularity of special vehicles, this self-built dataset uses off-road vehicles with a high similarity to special vehicles as a substitute. The images of off-road vehicles taken by drones in different scenes such as deserts, snow, and grasslands are downloaded from the Internet. Some special vehicle datasets are as follows: Figure 6Using YOLOv11n as the baseline model, we conducted ablation experiments on a self-built small-sample, small-scale special vehicle dataset. We observed the model's mean average precision (mAP@0.5), number of model parameters (Params), and floating-point operations (FLOPs). The experimental results are shown in Table 1. As Table 1 shows, adding the improved WT-SE attention module can significantly improve the model's detection accuracy.
[0057] Table 1 Ablation experiment results of WT-SE attention module design
[0058]
[0059] Example 2
[0060] To demonstrate the effectiveness of adding a small detection head in this invention, we conducted an ablation experiment on a self-built special vehicle dataset using the YOLOv11n model based on Example 1. The experimental results, shown in Table 2, show the model's mean average precision (mAP@0.5), number of model parameters (Params), and floating-point operations (FLOPs). The addition of a very small object detection head during the feature fusion stage significantly improves the model's detection accuracy.
[0061] Table 2 WT-SE attention module design and ablation experiment results with small detection head added
[0062]
[0063] Example 3
[0064] To demonstrate the progress achieved by the improved regression design in this invention, based on Examples 1 and 2, the model loss function was changed to EIoU Loss, and an ablation experiment was conducted on a self-built special vehicle dataset. The results are shown in Table 3. The YOLOv11-SV algorithm in this invention is based on YOLOv11n with a WT-SE attention module design, a feature fusion block design, and an improved regression design. As shown in Table 3, the algorithm achieves high detection accuracy, which can prove the effectiveness and scientific nature of the YOLOv11-SV algorithm design in this invention.
[0065] Table 3 Ablation experiment results of YOLOv11-SV algorithm
[0066]
[0067] Example 4
[0068] In order to further verify the performance superiority of the algorithm in the present invention, the algorithm was compared with the popular target detection algorithms YOLOv7tiny, YOLOv8n, YOLOv9-tiny, YOLOv10n, etc. in recent years. The comparative experimental results are shown in Table 4. It can be seen from the table that the YOLOv11-SV algorithm in the present invention has better detection performance than other algorithms. In order to verify the actual effect of the algorithm in the present invention, YOLOv11n and YOLOv11-SV were visually compared. The detection results are shown in Table 4. Figure 7 shown.
[0069] Table 4 Comparison experiment of different algorithms
[0070]
[0071] By comparison, it can be seen that the YOLOv11n algorithm has obvious false detection and missed detection, and the detection accuracy is not high. In contrast, the YOLOv11-SV algorithm has stronger detection and positioning capabilities when the sample size is small and the vehicle target scale is small, which solves the problems of false detection and missed detection, and proves the advanced nature of the algorithm in this invention.
[0072] Although the above describes the specific embodiments of the invention in conjunction with the drawings, it does not limit the scope of protection of the invention. Those skilled in the art can make equivalent replacements or changes based on the technical solutions and inventive concepts of the invention within the technical scope disclosed by the present invention, and all of these should fall within the scope of protection of the present invention.
Claims
1. A special vehicle target detection algorithm under extremely small samples and small targets, characterized by: The steps include: S1, constructing a very small sample data set of special vehicles, including steps S11-S12: S11, collects image data of special vehicles in different backgrounds such as desert, snow, grassland, etc. S12, use the local labeling tool Labelimg to label the collected images, select the target vehicle by a rectangular selection box and mark the specific category; S2, based on the baseline algorithm YOLOv11, design the YOLOv11-SV vehicle target detection algorithm suitable for special vehicle detection in small target and small sample conditions; S3 inputs the dataset constructed by S1 into the YOLOv11-SV network model constructed by S2 for training, uses the trained model to detect, and outputs the detection results.
2. The special vehicle target detection algorithm for extremely small samples and small targets according to claim 1 is characterized by: In S1, the resolution of small targets in the extremely small sample data set of special vehicles is less than 32×32, and the number of images in the extremely small sample data set is less than 200.
3. The special vehicle target detection algorithm for extremely small samples and small targets according to claim 1 is characterized by: In S2, the YOLOv11-SV vehicle target detection algorithm is mainly composed of a backbone network (Backbone), a neck network (Neck) and a detection head (Head).
4. The special vehicle target detection algorithm for extremely small samples and small targets according to claim 1 is characterized by: The specific operation steps of S2 are Sa1-Sa4: Sa1 processes the input information by convolutionally connecting a conventional convolutional layer with a 3×3 convolution kernel and a wavelet convolution (WTConv) in series. Multi-scale feature extraction is then performed in parallel with a single 3×3 convolution kernel. After obtaining multi-scale feature information of the image, the input information is compressed and stimulated by drawing on the idea of channel attention (SENet). The original ReLU activation function of SENet is replaced with the SiLU activation function in the activation function after the first fully connected layer, thereby forming a new attention mechanism module WT-SE. This WT-SE module is then used to replace the C2PSA module in the YOLOv11 backbone network, improving the model's focus on vehicle targets and appropriately increasing the network depth to improve the model's generalization ability. Sa2, adds an additional upsampling convolution layer to the YOLOv11 neck network and connects it laterally to the feature extraction module of the previous layer in the backbone network, thereby obtaining a 160×160 feature map. This larger scale feature map is specifically used for detecting small objects; Sa3, adds a small object detection head to the YOLOv11 network to improve the detection accuracy of small-scale objects; Sa4, replace the CIoU Loss of the YOLOv11 model with EIoU Loss to increase the model convergence speed and further improve the detection accuracy.
5. The special vehicle target detection algorithm for extremely small samples and small targets according to claim 3 is characterized by: The backbone network performs downsampling operations through five standard convolution modules (CBS) (convolution, batch normalization and SiLU activation function) to generate feature maps of different scales. The C3K2 module is used to make the network more flexible and efficient. After downsampling, the spatial pyramid pooling fast module SPPF is introduced to pool the feature maps with pooling kernels of different sizes, increasing the diversity of feature expression. Finally, the WT-SE module is used to enhance the model's feature extraction ability for the input image and better handle multi-level features.
6. The special vehicle target detection algorithm for extremely small samples and small targets according to claim 3 is characterized by: The neck network is mainly responsible for feature fusion, connecting the backbone network and the detection head. Its design purpose is to effectively integrate features at different scales. For more accurate target detection.
7. The special vehicle target detection algorithm for extremely small samples and small targets according to claim 3 is characterized by: The detection head adopts a decoupled structure, with two branches predicting category information and location information respectively. The bounding box regression task uses distribution focus loss (DFL) and CIOU; the classification task uses binary cross entropy loss (BCE Loss) and introduces depthwise separable convolution (DWConv) operation on its branch, which significantly reduces the number of parameters and computational complexity.
Citation Information
Cited By
Intelligent detection algorithm, system and equipment for vehicle bottom inspection robot and memory
CN121147711A
A smart detection algorithm, system, device and memory for undercarriage inspection robots
CN121147711B
