A low, small and slow target detection method based on improved YOLOv10
By improving the YOLOv10 model, taking into account the loss function of the shape, size and angle of the bounding box, the problem of insufficient bounding box regression accuracy in the prior art is solved, and higher robustness and accuracy are achieved in complex scenarios.
Patent Information
- Application Number
- CN202411688751.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2044-11-25
AI Technical Summary
The existing low-small and slow object detection methods fail to fully consider the impact of the shape, size and angle of bounding boxes on regression accuracy, resulting in insufficient robustness and accuracy in complex scenarios.
Using the improved YOLOv10 model, the shape angle interleaving ratio Lsal is calculated by comprehensively considering the loss function of the bounding box shape, size and angle, to improve the degree of matching between the prediction box and the real bounding box.
It improves the accuracy of bounding box regression and improves the robustness and accuracy of low-small and slow object detection in complex scenarios.
Smart Images

Figure CN119169280B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of low, small and slow target detection, and relates to a low, small and slow target detection method based on improved YOLOv10. Background Art
[0002] In the field of low-resolution, small and slow object detection, due to the variability of the object's scale and low imaging pixels, there are few extractable features, resulting in accurate bounding box regression being the key factor in ensuring the model's positioning accuracy. The existing low-resolution, small and slow object detection uses the CIoU (Distance-IoU Loss: Faster and Better Learning for Bounding Box Regression) algorithm, which mainly relies on the geometric relationship between the object's true bounding box (GT box) and the predicted bounding box, focusing on the relative position and shape of the bounding box, and further optimizing the matching degree between the predicted bounding box and the true bounding box by adding the loss term of the detection box scale and the loss term of the aspect ratio. Although these improvements make the predicted bounding box closer to the true bounding box, the algorithm still does not fully consider the important impact of the bounding box's inherent attributes such as shape, size and angle on the regression accuracy. Summary of the invention
[0003] The technical problem to be solved by the present invention is to provide a low, small and slow target detection method based on improved YOLOv10, which comprehensively considers the loss function of the shape, size and angle of the bounding box, thereby improving the robustness and accuracy of low, small and slow target detection in complex scenes.
[0004] In order to solve the above technical problems, the present invention provides a low, small and slow target detection method based on improved YOLOv10, characterized in that the method comprises the following steps:
[0005] Step 1: Collect 10,000 to 15,000 images of low, small, and slow objects, encode each object category in the image and generate GT boxes, and then take 70% of the images to add to the training set;
[0006] Step 2: Use the training set images to train the YOLO model to obtain an improved YOLOv10 model;
[0007] Step 3: Use the improved YOLOv10 model to detect the images actually taken containing low, small and slow targets, and identify the categories of each target in the image;
[0008] In step 2, the method for training the YOLO model to obtain the improved YOLOv10 model is as follows:
[0009] Step 1: Divide the images in the training set into multiple batches. For the first batch of images in the training set, use the YOLO model to generate initial prediction boxes for the targets of each category in the image.
[0010] Step 2: For each predicted box, use the following formula to calculate the intersection over union (IoU) and angle loss term between it and the corresponding GT box: , distance loss term △ and shape loss term Ω:
[0011] Among them, B is the prediction box, B GT For GT frame;
[0012]
[0013] , in, It is the maximum angle between the line connecting the center point of the prediction box and the corresponding GT box and the x-axis or y-axis. is the minimum angle between the line connecting the center point of the prediction box and the corresponding GT box and the x-axis or y-axis, p is The sine value of q is The sine value of ;
[0014] Among them, γ is the sensitivity of the set distance loss to the error between the prediction box and the GT box; It is the square of the ratio of the distance between the farthest point in the x direction of the GT frame and the predicted frame to the distance between the center points. It is the square of the ratio of the distance between the farthest points in the y direction of the GT frame and the predicted frame to the distance between the center points;
[0015] , in, and is the weight coefficient, and are the width and height of the prediction box respectively, and are the width and height of the GT box, respectively, and θ is the sensitivity of the set shape loss to the prediction error;
[0016] Step 3: Calculate the shape angle intersection ratio L sal ;
[0017] L sal =1- +△+0.5×Ω
[0018] Step 4: With the goal of minimizing the distance between the center point of the prediction box and the center point of the GT box, the difference between the angle of the prediction box and the angle of the GT box, and the difference between the width and height of the prediction box and the GT box, the position, angle, width, and height of the prediction box are comprehensively adjusted to improve the performance of the prediction box, and the YOLO model after this iteration is obtained;
[0019] Step 5: For the next batch of images in the training set, use the YOLO model after the previous iteration to generate the initial prediction box for the targets of each category in the image; repeat steps 2 to 4 to obtain the YOLO model after the next iteration; and so on, use the shape angle intersection and union ratio L sal With the goal of reducing the speed quickly and stabilizing it within a range, the YOLO model is iteratively trained using images from other batches in the training set, and finally an improved YOLOv10 model is obtained;
[0020] Step 3: Use the improved YOLOv10 model to detect the images actually taken containing low, small and slow targets, and identify the categories of each target in the image.
[0021] Furthermore, in step 1, a zoom camera is used to capture images of low, small and slow targets.
[0022] Furthermore, in step 1, the target categories include rotary-wing UAVs, fixed-wing UAVs, and birds, which are coded as 0, 1, and 2, respectively.
[0023] Furthermore, in step 1, each batch of images in the training set contains 2 n images, n=1~7.
[0024] Furthermore, it is preferred that γ = (1- )~(4- ).
[0025] Furthermore, preferably θ=2~6.
[0026] Furthermore, in the step 1, after encoding each target category in the collected image and generating a GT frame, in addition to adding 70% of the images to the training set, 20% of the images are also added to the validation set; each image in the validation set is sequentially input into the improved YOLOv10 model obtained in step 5 to obtain the detection result of each target category in each image; according to the detection result of each target category in each image, it is verified whether the map meets the requirements of stability and improvement. If the requirements are not met, the YOLO model is retrained until the improved YOLOv10 model whose map can meet the requirements is obtained.
[0027] Beneficial effects: The present invention calculates the loss by comprehensively considering the shape, size and angle of the bounding box itself, comprehensively evaluates the matching degree between the predicted box and the GT box in multiple dimensions, improves the accuracy of bounding box regression, and enhances the robustness and accuracy of low, small and slow target detection in complex scenes. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 , Figure 2 It is the IoU distribution map; Figure 1 In the figure, the light blue part is the part where the GT box does not intersect with the prediction box, the green part is the part where the prediction box does not intersect with the GT box, and the dark blue part is the intersection of the GT box and the prediction box; Figure 2 In the figure, the dark blue part is the intersection of the GT box and the prediction box, and the prediction box completely overlaps with the intersection.
[0029] Figure 3 It is a flow chart of the present invention.
[0030] Figure 4 It is a schematic diagram of the relative position of the GT box and the prediction box.
[0031] Figure 5 This is a map obtained by using the existing YOLOv10 model to detect low, small and slow targets.
[0032] Figure 6 This is a map obtained by detecting low, small and slow targets using the present invention.
[0033] Figure 7 It is an image captured containing low, small and slow targets.
[0034] Figure 8 The present invention is used to detect Figure 7 Detection effect diagram of medium, low, small and slow targets. DETAILED DESCRIPTION
[0035] The present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention rather than to limit the present invention.
[0036] In the description of the embodiments, the terms "upper", "lower", "left", "right" and other directions or positional relationships are based on the directions or positional relationships shown in the drawings, and are only for the convenience of description and simplified operation, rather than indicating or implying that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore cannot be understood as limiting the present invention. In addition, the terms "first" and "second" are only used to distinguish in the description and have no special meaning.
[0037] exist Figure 1 and Figure 2In the above figure, the size and deviation distance of target A and target B are the same, but the shape is different, resulting in a large change in IoU. The same situation occurs in target C and target D. The shape and deviation distance of target A and target D are the same, but the size is different, resulting in a change in IoU (intersection over union). The same situation also exists in target B and target C. Comparing the analysis of target A and target D relative to target B and target C at different sizes, we can get the impact of shape on loss. Comparing the changes between target A and target B relative to target C and target D, we can determine that small targets have a greater impact on the results of IoU.
[0038] In summary, Figure 1 and Figure 2 The difference between them mainly comes from the difference in size and shape. When the target box sizes are different, the small-sized target box is more sensitive to the IoU result; and the shape deviation (rectangle) can be divided into long-side deviation and short-side deviation. When the long-side deviation occurs, the IoU result is more sensitive. Therefore, when detecting in an environment dominated by small and tiny targets such as low, small, and slow objects, the small size and long-side deviation are set to a larger loss threshold to improve the convergence speed of the model.
[0039] like Figure 3 As shown, the low, small and slow target detection method based on the improved YOLOv10 model of the present invention is as follows:
[0040] Step 1: Image data collection of low, small and slow targets: Low, small and slow targets refer to targets that fly at low altitudes, move slowly and are small in size, such as rotary-wing drones, fixed-wing drones, birds, etc. flying against low-altitude backgrounds at a distance of 200 to 1,000 meters; Use a zoom camera to collect 10,000 to 15,000 images of low, small and slow targets, take 70% of them to add to the training set, 20% to the validation set, and 10% to the test set. The target categories in the training set, validation set, and test set are coded as 0 (rotor-wing drone), 1 (fixed-wing drone), and 2 (birds), respectively, and each category of targets is manually annotated or with the help of automated annotation tools, and a GT box (true box) is generated based on the actual position and size of the target in the image to ensure the adequacy and effectiveness of model training;
[0041] Step 2: Train the YOLO model to obtain an improved YOLOv10 model. The specific training method is as follows:
[0042] Step 1: Divide the images in the training set into multiple batches, each batch contains 2 n images, n=1~7; for the first batch of images in the training set, the existing YOLO model is used to generate initial prediction boxes for targets of each category in the image;
[0043] Step 2: For each prediction box, Figure 4 As shown, the intersection-over-union ratio (IoU) between the predicted box and the GT box and the corresponding GT box is calculated according to formula (1);
[0044] (1)
[0045] B is the prediction box, B GT For GT frame;
[0046] Calculate the angle loss term :
[0047] According to formulas (2) and (3), the x-distance c between the farthest point of the predicted box and the corresponding GT box is calculated respectively. w , y distance c h ;
[0048] (2)
[0049] (3)
[0050] in Represents the coordinates of any point on the GT box, Represents the coordinates of any point on the prediction box;
[0051] According to formula (4), the Euclidean distance between the center point of the predicted box and the corresponding GT box is calculated ;
[0052] (4)
[0053] in Represents the coordinates of the center point of the GT box, Represents the coordinates of the center point of the prediction box;
[0054] set up It is the maximum angle between the line connecting the center point of the prediction box and the corresponding GT box and the x-axis or y-axis. It is the smallest angle between the line connecting the center point of the prediction box and the corresponding GT box and the x-axis or y-axis. ;by Figure 3 Take the case as an example, the angle is calculated according to formulas (5) and (6) respectively. The sine value p and the angle The sine value q;
[0055] (5)
[0056] (6)
[0057] in is the y-distance between the center point of the predicted box and the corresponding GT box, where It is the x-distance between the center point of the predicted box and the corresponding GT box;
[0058] Calculate the angle loss term according to formula (7): ;
[0059] (7)
[0060] After integrating the angle loss term, define the distance loss term △;
[0061] (8)
[0062] ,
[0063] in, It is the square of the ratio of the distance between the farthest point in the x direction of the GT frame and the predicted frame to the distance between the center points. It is the square of the ratio of the distance between the farthest point in the y direction of the GT box and the predicted box to the distance between the center points; γ is the sensitivity of the distance loss to the error between the predicted box and the true box; The value of affects the decay rate of the exponential term in the distance loss term, thereby affecting the sensitivity of the distance loss term. The distance loss term is more sensitive to the change of error, resulting in a larger error, which will significantly increase the distance loss value; by adjusting , can control the feedback degree of the YOLO model to the prediction error during training, thereby affecting the learning effect and convergence speed of the YOLO model. Experiments have shown that when γ = (1- )~(4- ), the learning effect of the YOLO model is better and the convergence speed is faster; specifically, in this embodiment, γ=2- ;
[0064] Calculate the shape loss term Ω according to formula (10);
[0065] (9)
[0066] ,
[0067] in, and is the weight coefficient used to adjust the importance of width and height in the shape similarity measurement, and are the width and height of the prediction box respectively, and are the width and height of the GT box, respectively. θ is the sensitivity of the shape loss to the prediction error, which affects the nonlinearity of the shape loss function and the impact of the adjustment error on the final loss. By adjusting θ, the sensitivity of the shape loss to the prediction error can be controlled, thereby affecting the penalty for the shape error during YOLO model training, and further affecting the learning effect and convergence performance of the YOLOv10 model. Experiments have shown that when θ=2~6, the learning effect of the YOLO model is better and the convergence speed is faster; specifically, this embodiment takes θ=4;
[0068] Step 3: Calculate the shape angle intersection ratio L according to formula (10) sal ;
[0069] L sal =1- +△+0.5×Ω (10)
[0070] Shape Angle Intersection Ratio L sal It measures the degree of overlap between the predicted box and the GT box, taking into account the shape (length and width) and angle (rotation angle) of the target. Unlike the standard IoU, which only considers the overlapping area, L sal The geometric properties and orientation of the predicted box and the true box are also considered;
[0071] Step 4: With the goal of minimizing the distance between the center point of the prediction box and the center point of the GT box, the difference between the angle of the prediction box and the angle of the GT box, and the difference between the width and height of the prediction box and the GT box, the position, angle, width, and height of the prediction box are comprehensively adjusted to improve the performance of the prediction box, and the YOLO model after this iteration is obtained;
[0072] Step 5: For the next batch of images in the training set, use the YOLO model after the previous iteration to generate the initial prediction box for the targets of each category in the image; repeat steps 2 to 5 to obtain the YOLO model after the next iteration; and so on. sal With the goal of reducing the speed quickly and stabilizing it within a range, the YOLO model is iteratively trained using images from other batches in the training set, and finally an improved YOLOv10 model is obtained;
[0073] Input each image in the validation set into the improved YOLOv10 model in turn to obtain the detection results of each target category in each image; verify whether the map (mean AveragePrecision) meets the requirements of stability and improvement based on the detection results of each target category in each image. If it does not meet the requirements, re-adjust the parameters of the YOLO model until an improved YOLOv10 model with map that meets the requirements is obtained.
[0074] Step 3: Use the improved YOLOv10 model to detect the images actually taken containing low, small and slow targets, and identify the categories of each target in the image.
[0075] The performance of the existing YOLO model and the improved YOLOv10 model are tested using the images in the test set. The map obtained by using the existing YOLO model to detect low, small and slow targets is shown in Figure 5, and the map obtained by using the improved YOLOv10 model to detect low, small and slow targets is shown in Figure 5. Figure 6 As shown. Figure 5 and Figure 6 It can be seen that the improved YOLOv10 model is used to detect low, small and slow targets, and the map of the four categories of targets is improved. The map reaches 0.806 when the confidence level is above 0.5, which is 2 percentage points higher than the existing YOLO model detection map. Figure 8 Demonstrating the detection effectiveness of the present invention, these results not only demonstrate the accuracy of the present invention in classification, but also demonstrate the ability to capture and identify drones and birds within a range of 200 meters to 1000 meters.
[0076] In the object detection algorithm, the fitting of the bounding box is actually an approximation of the position of the two-dimensional center point. Therefore, the present invention regards this approximation process as a fitting along two dimensions (i.e., the x-axis and the y-axis) in a rectangular coordinate system. In this process, we hope to ensure that for angles with large errors, more sensitive parameters can be used for fitting, so as to ensure that the prediction box is fitted faster under the calculation of two angles. This not only takes into account the position adjustment in the traditional method, but also emphasizes the more sensitive processing of angle errors, thereby improving the adaptability and accuracy of the model in complex scenes.
[0077] Based on the default CIoU method of the YOLOv10 model, this paper adopts the shape, size and angle of the bounding box to calculate the loss. The basic idea is to increase the convergence term to fit the GT box at the maximum speed of the target prediction box, thereby improving the accuracy of bounding box regression and the accuracy of target detection.
[0078] The present invention uses an improved YOLOv10 model to detect low, small and slow targets. The improved YOLOv10 model is based on the existing YOLO model and introduces an optimized loss function module. The backbone network of the YOLO model is responsible for feature extraction and uses an enhanced version of CSPNet (cross-stage partial network) to improve gradient flow and reduce computational redundancy; the neck network is designed to merge features of the same scale and pass them to the prediction head, including the PAN (path aggregation network) layer, which can achieve effective multi-scale feature fusion; the YOLO model uses three prediction heads to simultaneously process the positioning, classification and confidence information of the target; these prediction heads operate on different layers of the feature map to ensure that targets of different scales can be detected. Each prediction head is responsible for predicting the category, position (bounding box coordinates) and confidence (confidence in detecting the target) of an anchor box. During the YOLO model training process, the optimized loss function module optimizes the YOLO model by comprehensively considering multiple loss terms such as the shape, size, and angle of the bounding box itself, speeding up the fitting speed of the YOLO model while improving the accuracy of bounding box regression to improve the detection accuracy of different categories of targets, and generating multiple predictions for each target to provide rich supervision signals and improve learning accuracy. During the inference process, an optimal prediction is generated for each target without NMS (maximum suppression), thereby reducing latency and improving efficiency. The improved YOLOv10 model obtained by training the YOLO model can effectively identify small and slow-moving targets.
[0079] The present invention adopts the shape-angle intersection-and-union algorithm to detect low, small and slow targets. Firstly, the influence of shape and size differences on bounding box regression is analyzed. Secondly, the influence in the angle direction of bounding box regression is analyzed. According to the relevant analysis, the loss function is improved in three aspects: shape, size and angle, so as to improve the detection accuracy of low, small and slow targets.
[0080] Shape angle intersection and union (IoU) is an important indicator used to evaluate the degree of match between the prediction box and the GT box in the target detection algorithm. It not only takes into account the overlap between the prediction box and the GT box, but also integrates the differences in shape and angle. This indicator plays a vital role in the task of detecting low, small and slow targets. By accurately calculating the shape angle intersection and union (IoU), the degree of match between the prediction box and the GT box can be determined more accurately, thereby improving the detection precision and accuracy. The application of shape angle intersection and union (IoU) is not limited to simple position overlap evaluation. It also takes into account the shape change and rotation angle of the target. Therefore, it can effectively cope with the challenges of target detection in complex scenes, and provides strong support for algorithm optimization and improvement.
Claims
1. A low, small and slow target detection method based on improved YOLOv10, characterized in that The method comprises the following steps: S1. Collect 10,000 to 15,000 images of low, small, and slow objects, encode each object category in the image and generate GT boxes, and then take 70% of the images to add to the training set; S2. Use the training set images to train the YOLO model to obtain an improved YOLOv10 model; S21, dividing the images in the training set into multiple batches, and for the first batch of images in the training set, using the YOLO model to generate initial prediction boxes for targets of each category in the image; S22. For each predicted box, the following formula is used to calculate the intersection over union (IoU) and angle loss term between it and the corresponding GT box. , distance loss term △ and shape loss term Ω: Among them, B is the prediction box, B GT For GT frame; in, It is the maximum angle between the line connecting the center point of the prediction box and the corresponding GT box and the x-axis or y-axis. is the minimum angle between the line connecting the center point of the prediction box and the corresponding GT box and the x-axis or y-axis, p is The sine value of q is The sine value of ; Among them, γ is the sensitivity of the set distance loss to the error between the prediction box and the GT box; It is the square of the ratio of the distance between the farthest point in the x direction of the GT frame and the predicted frame to the distance between the center points. It is the square of the ratio of the distance between the farthest points in the y direction of the GT frame and the predicted frame to the distance between the center points; , in, and is the weight coefficient, and are the width and height of the prediction box respectively, and are the width and height of the GT box, respectively, and θ is the sensitivity of the set shape loss to the prediction error; S23, calculate shape angle intersection ratio L sal ; L sal =1- +△+0.5×Ω S24, with the goal of minimizing the distance between the center point of the prediction box and the center point of the GT box, the difference between the angle of the prediction box and the angle of the GT box, and the difference between the width and height of the prediction box and the GT box, comprehensively adjust the position, angle, width, and height of the prediction box to improve the performance of the prediction box, and obtain the YOLO model after this iteration; S25. For the next batch of images in the training set, use the YOLO model after the previous iteration to generate an initial prediction box for each category of targets in the image; repeat steps 2 to 4 to obtain the YOLO model after the next iteration; and so on. sal With the goal of reducing the speed quickly and stabilizing it within a range, the YOLO model is iteratively trained using images from other batches in the training set, and finally an improved YOLOv10 model is obtained; Step 3: Use the improved YOLOv10 model to detect the images actually taken containing low, small and slow targets, and identify the categories of each target in the image.
2. The low, small and slow target detection method based on improved YOLOv10 according to claim 1 is characterized in that In step S1, a zoom camera is used to capture an image of a low, small, and slow target.
3. The low, small and slow target detection method based on improved YOLOv10 according to claim 1 is characterized in that In step S1, the target categories include rotary-wing UAVs, fixed-wing UAVs, and birds, which are coded as 0, 1, and 2, respectively.
4. The low, small and slow target detection method based on improved YOLOv10 according to claim 1 is characterized in that In step S21, each batch of images in the training set contains 2 n images, n=1~7.
5. The low, small and slow target detection method based on improved YOLOv10 according to claim 1 is characterized in that γ=(1- )~(4- ).
6. The low, small and slow target detection method based on improved YOLOv10 according to claim 1 is characterized in that θ=2~6.
7. The low, small and slow target detection method based on improved YOLOv10 according to claim 1 is characterized in that In the step S1, after encoding each target category in the collected image and generating a GT frame, in addition to adding 70% of the images to the training set, 20% of the images are also added to the verification set; each image in the verification set is sequentially input into the improved YOLOv10 model obtained in step S25 to obtain the detection result of each target category in each image; according to the detection result of each target category in each image, it is verified whether the map meets the requirements of stability and improvement. If the requirements are not met, the YOLO model is retrained until the improved YOLOv10 model whose map can meet the requirements is obtained.
Citation Information
Patent Citations
An image target detection method based on DC-SPP-YOLO
CN109685152A
Pedestrian detection method based on improved YOLOv3 and improved NMS
CN112287788A