A detection method for small remote sensing targets based on improved YOLO

By improving the YOLO method, constructing the YOLO-tiny network model and reconstructing the loss function, the problem of low accuracy and high error rate of the single-stage target detection method in remote sensing small target detection is solved, achieving higher detection accuracy and lower detection accuracy. amount of calculation.

CN118230079BActive Publication Date: 2024-08-30XIAN INST OF OPTICS & PRECISION MECHANICS CHINESE ACAD OF SCI
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202410658583.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-27
Publication Date
2024-08-30
Estimated Expiration
2044-05-27

AI Technical Summary

Technical Problem

The existing single-stage target detection method has low detection accuracy and high category discrimination error rate when detecting small targets in remote sensing, making it difficult to meet actual needs.

Method used

The improved YOLO method is adopted, by constructing a YOLO-tiny network model, reconstructing the loss function, increasing attention to positive sample training, and using group convolution to replace the spatial pooling pyramid module, reducing parameters and calculation amount, and improving detection accuracy.

Benefits of technology

It improves the accuracy of remote sensing small target detection, reduces the category discrimination error rate, meets actual detection needs, and reduces the amount of parameters and calculations under the same number of network layers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118230079B
    Figure CN118230079B
Patent Text Reader

Abstract

The present invention belongs to the field of image detection, and specifically relates to a detection method for remote sensing small targets based on improved YOLO. The method comprises the following steps: step 1, obtaining a remote sensing small target detection data set, and randomly dividing the remote sensing small target detection data set into a training set, a validation set and a test set according to a preset ratio; step 2, building a YOLO-tiny network model; step 3, inputting the training set and the validation set into the YOLO-tiny network model for training and verification, obtaining the training weight file of the YOLO-tiny network model, and iteratively optimizing the training weight file through forward and backward propagation based on the loss function, and obtaining the trained YOLO-tiny network model; step 4, inputting the test set into the trained YOLO-tiny network model, and performing and completing remote sensing small target detection. The present invention reconstructs the existing loss function, and when detecting remote sensing small targets, the detection accuracy can be improved, and the category discrimination error rate can be reduced, thereby meeting the actual detection needs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a detection method, and in particular to a detection method for small remote sensing targets based on improved YOLO. Background Art

[0002] With the continuous development of the space field, remote sensing small target detection intersects with many other important fields and has become an important foundation of aerospace technology with great research significance.

[0003] For remote sensing small target detection, traditional target detection methods are mainly based on features such as straight lines, polygons and ellipses, extracting features from selected areas, and then judging the type of target by features. However, traditional target detection methods have high algorithm complexity, low detection accuracy and poor generalization ability in extremely complex spatial environments. Therefore, research on fast real-time algorithms, high detection accuracy and high reliability has become a hot topic.

[0004] In recent years, with the rapid development of computer technology and image processing technology, convolutional neural networks have made great progress in the field of target detection. Compared with traditional target detection methods, convolutional neural networks have stronger feature expression capabilities for targets. From the perspective of detection ideas, existing target detection methods based on convolutional neural networks can be divided into two-stage target detection methods and one-stage target detection methods. Among them, the two-stage target detection method is based on candidate regions and then classifies the selected regions, such as Faster R-CNN, Mask R-CNN and R-FCN. This type of method has high detection accuracy, but the speed is still not satisfactory; the one-stage target detection method can directly locate the target and output the target's category discrimination information, such as SSD, YOLOv3, YOLOv4 and YOLOv5. This type of method only needs one detection to obtain the target position, which improves the detection speed and meets the detection accuracy requirements.

[0005] However, the existing single-stage target detection methods have low detection accuracy when detecting images with low pixel values, complex backgrounds, and fewer pixels, such as small remote sensing targets, resulting in a high category discrimination error rate, which is difficult to meet actual detection needs. Summary of the invention

[0006] The purpose of the present invention is to solve the technical problems that the existing single-stage target detection method has low detection accuracy and high category discrimination error rate when detecting images with low pixel values, complex backgrounds and fewer pixels such as small remote sensing targets, and to provide a detection method for small remote sensing targets based on improved YOLO.

[0007] To achieve the above purpose, the technical solution adopted by the present invention is:

[0008] A detection method for small remote sensing targets based on improved YOLO, which is special in that it includes the following steps:

[0009] Step 1: obtain a remote sensing small target detection dataset, and randomly divide the remote sensing small target detection dataset into a training set, a validation set, and a test set according to a preset ratio;

[0010] Step 2: Build the YOLO-tiny network model;

[0011] Step 3: Input the training set and validation set into the YOLO-tiny network model in step 2 for training and validation, obtain the training weight file of the YOLO-tiny network model, and iteratively optimize the training weight file through forward and backward propagation based on the loss function to obtain the trained YOLO-tiny network model;

[0012] The expression of the loss function is: ;

[0013] Where: Loss is the loss function; Loss cls is the classification loss; Loss obj is the confidence loss; Loss loc is the position loss; are all constants;

[0014] Step 4: Input the test set into the trained YOLO-tiny network model to perform and complete remote sensing small target detection.

[0015] Furthermore, in step 3, the classification loss Loss cls The expression is:

[0016] ;

[0017] Where: p is the category of the prediction box; γ and α are all constants;

[0018] Confidence loss Loss obj The expression is:

[0019] ;

[0020] Where: m Classify positive and negative samples;

[0021] Position loss Loss loc The expression is:

[0022] ;

[0023] Where: NWD is the Varstein distance loss function.

[0024] Furthermore, the Varstein distance loss function NWD The expression is:

[0025] ;

[0026] Where: C is a constant; for The mean square distance between ; ; x a and y a is the center point coordinate of the real frame; w a and h a are the width and height of the real frame respectively; x b and y b They are the center point coordinates of the prediction box respectively; w b and h b are the width and height of the prediction box respectively.

[0027] Further, The values ​​of are 0.4, 0.3 and 0.4 respectively; γ The value of is 1.5; α The value of is 0.25; C The value of is 12.8.

[0028] Further, in step 2, the YOLO-tiny network model includes a backbone feature extraction module and a decoupling output module; the backbone feature extraction module includes a first Conv module, a first MPConv module, a first ELAN module, a second MPConv module, a second ELAN module, a third MPConv module, a third ELAN module and a fourth MPConv module connected in sequence;

[0029] The decoupled output module includes a second Conv module, a third Conv module, a fourth Conv module, and a fourth ELAN module, a SPPCSPC module, a first UN-ELAN module, a second UN-ELAN module, a fifth MPConv module, a fifth ELAN module, a sixth MPConv module, and a sixth ELAN module connected in sequence;

[0030] The output end of the second MPConv module is connected to the second UN-ELAN module, and the output end of the second UN-ELAN module is connected to the fourth Conv module; the output end of the third MPConv module is connected to the first UN-ELAN module and the fifth MPConv module respectively, the output end of the first UN-ELAN module is connected to the fifth MPConv module, the output end of the fifth ELAN module is connected to the third Conv module, the output end of the fourth ELAN module is connected to the sixth MPConv module, and the output end of the sixth ELAN module is connected to the second Conv module; among them, the SPPCSPC module adopts group convolution, and other modules all adopt 3*3 full convolution.

[0031] Furthermore, in step 1, the preset ratio is 8:1:1.

[0032] The beneficial effects of the present invention are:

[0033] 1. The present invention reconstructs the existing loss function, which can improve the detection accuracy and reduce the category discrimination error rate when detecting small remote sensing targets, thereby meeting actual detection needs.

[0034] 2. The loss function of the present invention pays more attention to the training of positive samples during training. It not only pays attention to the loss between bounding boxes, but also considers the distance loss between the center point, width and height of the bounding box. When detecting small remote sensing targets, the detection accuracy can be further improved.

[0035] 3. The present invention adopts group convolution to replace the spatial pooling pyramid used in the existing SPPCSPC module, and uses 3*3 full convolution to replace the existing re-parameterized convolution, so that under the same number of network layers, the number of parameters can be reduced to 81.58% of the existing one, and the amount of calculation can be reduced to 92.77% of the existing one. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 is a schematic diagram of a flow chart of an embodiment of the present invention;

[0037] Figure 2 Schematic diagram of the network structure of the backbone feature extraction module and the decoupling output module in the embodiment of the present invention. DETAILED DESCRIPTION

[0038] In order to make the purpose, advantages and features of the present invention clearer, the following is a further detailed description of a detection method for small remote sensing targets based on improved YOLO proposed by the present invention in conjunction with the accompanying drawings and specific embodiments. According to the following specific implementation methods, the advantages and features of the present invention will be clearer.

[0039] See also Figure 1In this embodiment, a method for detecting small remote sensing targets based on improved YOLO mainly includes the following steps:

[0040] Step 1: Obtain a remote sensing small target detection dataset, and randomly divide the remote sensing small target detection dataset into a training set, a validation set, and a test set according to a preset ratio.

[0041] Specifically, remote sensing small targets generally include targets such as airplanes, ships, vehicles, pedestrians, satellite bodies, satellite cabins, and satellite solar panels. At the same time, when the data set is specifically classified, it can be randomly classified according to a ratio of 8:1:1. Of course, in other embodiments of the present invention, it can also be classified according to other ratios such as 7:2:1 to meet the use needs.

[0042] Step 2: Build the YOLO-tiny network model. The YOLO-tiny network model mainly includes the backbone feature extraction module and the decoupling output module.

[0043] For details, see Figure 2 The backbone feature extraction module includes a first Conv module, a first MPConv module, a first ELAN module, a second MPConv module, a second ELAN module, a third MPConv module, a third ELAN module, and a fourth MPConv module connected in sequence. The decoupling output module includes a second Conv module, a third Conv module, a fourth Conv module, and a fourth ELAN module, a SPPCSPC module, a first UN-ELAN module, a second UN-ELAN module, a fifth MPConv module, a fifth ELAN module, a sixth MPConv module, and a sixth ELAN module connected in sequence.

[0044] The output end of the second MPConv module is connected to the second UN-ELAN module, and the output end of the second UN-ELAN module is connected to the fourth Conv module; the output end of the third MPConv module is connected to the first UN-ELAN module and the fifth MPConv module respectively, the output end of the first UN-ELAN module is connected to the fifth MPConv module, the output end of the fifth ELAN module is connected to the third Conv module, the output end of the fourth ELAN module is connected to the sixth MPConv module, and the output end of the sixth ELAN module is connected to the second Conv module.

[0045] The SPPCSPC module of this embodiment adopts group convolution; the remaining modules all adopt 3*3 full convolution, thereby reducing the number of parameters and calculations under the same number of network layers.

[0046] Table 1 Comparison of parameters and computational complexity between the YOLO-tiny network model and the YOLOv7 network model

[0047]

[0048] It can be seen from Table 1 that, through the above design, the YOLO-tiny network model of this embodiment can reduce the number of parameters to 81.58% and the amount of calculation to 92.77% of the original compared with the existing YOLOv7 network model.

[0049] Step 3: Input the training set and validation set into the YOLO-tiny network model in step 2 for training and validation, obtain the training weight file of the YOLO-tiny network model, and iteratively optimize the training weight file through forward and backward propagation based on the loss function to obtain the trained YOLO-tiny network model.

[0050] Specifically, after the images in the training set and the validation set are subjected to feature extraction by the backbone feature extraction module, three feature maps will be output. The formats of the three feature maps are 80*80*256, 40*40*512 and 20*20*1024 respectively. After the three feature maps are convolved in the decoupled output module respectively, their formats are converted into 80*80*3(5+8), 40*40*3(5+8) and 20*20*3(5+8). Among them, 3 represents that each feature map contains 3 bounding boxes, namely the real box (real bounding box), the predicted box (predicted bounding box) and the prior box (bounding box with size prior). (5+8) represents the information contained in each bounding box, where 5 represents , x and y Represents the coordinates of the center point of the bounding box, w and h Represents the width and height of the bounding box respectively, c represents the confidence level; 8 represents that there are 8 different target categories in the image.

[0051] The loss in the YOLO-tiny network model mainly consists of three parts: classification loss, confidence loss and position loss.

[0052] In this field, if the predicted box is CIoU If the difference between the predicted box and any true box is greater than or equal to the preset threshold, it is considered a positive sample; CIoU If the value is smaller than the preset threshold or there is no corresponding real box, it is considered a negative sample.

[0053] 1. Classification loss: The classification loss of this embodiment only calculates the category difference between the positive sample and the true category, and its purpose is to accurately classify the predicted box into the correct category or background.

[0054] In this example, the classification loss Loss cls The specific expression of is as follows:

[0055] ;

[0056] Where: p is the category of the prediction box; γ is a constant, and in this embodiment, the value is 1.5; α is a constant, and in this embodiment, its value is 0.25.

[0057] 2. Confidence loss: Confidence loss is mainly used to measure the probability of the existence of an object in an image. Both positive and negative samples need to calculate confidence loss. The negative sample is 0 and the positive sample is CIoU The value of .

[0058] For positive samples, the positive sample classification error with the true box is calculated; for negative samples, the negative sample classification error with the background category is calculated to balance the confidence loss.

[0059] In this embodiment, the confidence loss Loss obj The specific expression is:

[0060] ;

[0061] Where: m For positive sample classification and negative sample classification.

[0062] 3. Position loss: Position loss refers to the difference between the predicted box and the real box. CIoU , which is used to measure the position difference between the predicted box and the real box. The smaller the difference, the more accurate the target can be located.

[0063] Specifically, the position difference is obtained by calculating the sum of squares between the center coordinates, length and width of the predicted box and the center coordinates, length and width of the real box.

[0064] When calculating the position loss of the prediction box, the main method is to use the Varstein distance loss function. NWD This is done by calculating the Varstein distance between the center coordinates, width, and height.

[0065] In this embodiment, the Varstein distance loss function NWD The specific expression of is as follows:

[0066] ;

[0067] Where: C is a constant; for The mean square distance between ; ; x a and y b They are the center point coordinates of the real frame respectively; w a and h a are the width and height of the real frame respectively; x b and y b They are the center point coordinates of the prediction box respectively; w b and h b are the width and height of the prediction box respectively.

[0068] In the YOLO-tiny network model, the prediction box is obtained based on the prior box. Therefore, the above x b , y b , w b and h b Calculate using the following formula:

[0069] x b = 2 sigmoid ( t x ) - 0.5 +c x ; y b = 2 sigmoid ( t y ) - 0.5 +c y ;

[0070] w b = (2 sigmoid ( p w ) 2 ×t x ; h b = (2 sigmoid ( p h ) 2 ×ty ;

[0071] Where: sigmoid for sigmoid function; t x and t y are the center coordinates of the prior box respectively; p w and p h are the width and height of the prior box respectively; c x and c y The width and height of the preset base cell in the bounding box respectively.

[0072] Based on the above Vastan distance loss function NWD , the position loss in this embodiment can be Loss loc The specific expression is written as follows:

[0073] .

[0074] Finally, based on the above classification loss Loss cls , confidence loss Loss obj and position loss Loss loc , we can get the final loss function of this embodiment:

[0075] ;

[0076] Where: Loss is the loss function; are all constants, and their values ​​are 0.4, 0.3 and 0.4 respectively.

[0077] Step 4: Input the images in the test set into the trained YOLO-tiny network model to perform and complete remote sensing small target detection.

[0078] Experimental analysis

[0079] This experiment verifies the YOLO-tiny network model of this embodiment and the current mainstream single-stage target detection network model on the same dataset (the ai-tod dataset is used in this embodiment). On the ai-tod dataset, the current more advanced network models, such as the YOLOv5 network model, the YOLOv6 network model, and the YOLOv7 network model, are experimentally verified.

[0080] The main verification results are:

[0081] AP (average precision), different CIoU The average of the last 10 mAPs, AP = (AP50 + AP55 + ... + AP95) / 10;

[0082] AP50 (mAP@0.50);

[0083] AP75 (mAP@0.75), AP75= (AP50+AP55+…+AP75).

[0084] The results show that the YOLO-tiny network model has higher overall average detection accuracy and average detection accuracy of a single category than other single-stage target detection network models, as shown in Table 2. In addition, the YOLO-tiny network model has smaller computational complexity and parameter count than other single-stage target detection network models. The YOLOv6 network model, which is outside the YOLO-tiny network model, achieved the second best results. Compared with the YOLOv6 network model, the YOLO-tiny network model has higher AP50 and AP75 than the YOLOv6 network model.

[0085] Table 2 Experimental comparison results of the YOLO-tiny network model and the existing single-stage target detection network model

[0086]

[0087] The above experimental comparison results prove that the YOLO-tiny network model of this embodiment achieves higher detection accuracy than other single-stage target detection network models.

Claims

1. A detection method for small remote sensing targets based on improved YOLO, characterized in that: The following steps are involved: Step 1: obtain a remote sensing small target detection dataset, and randomly divide the remote sensing small target detection dataset into a training set, a validation set, and a test set according to a preset ratio; Step 2: Build the YOLO-tiny network model; The YOLO-tiny network model includes a backbone feature extraction module and a decoupling output module; The backbone feature extraction module includes a first Conv module, a first MPConv module, a first ELAN module, a second MPConv module, a second ELAN module, a third MPConv module, a third ELAN module and a fourth MPConv module connected in sequence; The decoupling output module includes a second Conv module, a third Conv module, a fourth Conv module, and a fourth ELAN module, a SPPCSPC module, a first UN-ELAN module, a second UN-ELAN module, a fifth MPConv module, a fifth ELAN module, a sixth MPConv module and a sixth ELAN module connected in sequence; The output end of the second MPConv module is connected to the second UN-ELAN module, and the output end of the second UN-ELAN module is connected to the fourth Conv module; The output end of the third MPConv module is connected to the first UN-ELAN module and the fifth MPConv module respectively, the output end of the first UN-ELAN module is connected to the fifth MPConv module, the output end of the fifth ELAN module is connected to the third Conv module, the output end of the fourth ELAN module is connected to the sixth MPConv module, and the output end of the sixth ELAN module is connected to the second Conv module; The SPPCSPC module adopts group convolution, and other modules adopt 3*3 full convolution; Step 3: Input the training set and validation set into the YOLO-tiny network model in step 2 for training and validation, obtain the training weight file of the YOLO-tiny network model, and iteratively optimize the training weight file through forward and backward propagation based on the loss function to obtain the trained YOLO-tiny network model; The expression of the loss function is: Loss = λ1Loss cls +λ2Loss obj +λ3Loss loc ; Where: Loss is the loss function; Loss cls is the classification loss; Loss obj is the confidence loss; Loss loc is the position loss; λ1, λ2 and λ3 are all constants; The classification loss Loss cls The expression is: Where: p is the category of the prediction box; γ and α are both constants; The confidence loss Loss obj The expression is: Where: m is the positive and negative sample classification; The position loss Loss loc The expression is: Loss loc =1-0.2CIoU-0.8NWD; Where: NWD is the Varstein distance loss function; Step 4: Input the test set into the trained YOLO-tiny network model to perform and complete remote sensing small target detection.

2. According to claim 1, a detection method for small remote sensing targets based on improved YOLO is characterized in that: The expression of the Varstein distance loss function NWD is: Where: C is a constant; for and The mean square distance between x a and a is the coordinate of the center point of the real frame; w a and h a are the width and height of the real frame respectively; x b and b are the center point coordinates of the prediction box; w b and h b are the width and height of the prediction box respectively.

3. According to claim 2, a method for detecting small remote sensing targets based on improved YOLO, characterized in that: The values ​​of λ1, λ2 and λ3 are 0.4, 0.3 and 0.4 respectively; The value of γ is 1.5; the value of α is 0.25; The value of C is 12.

8.

4. According to claim 1, a detection method for small remote sensing targets based on improved YOLO is characterized in that: In step 1, the preset ratio is 8:1:1.

Citation Information

Patent Citations

  • Remote sensing image small target detection method based on improved YOLOv3

    CN113971764A

  • Small target detection method based on deep learning

    CN116612292A

  • Remote sensing target detection based on YOLOX-Tiny biased feature fusion network

    CN116645608A

  • Small target traffic sign real-time detection method based on improved YOLOv5s

    CN117333845A

  • Flying bird detection method based on improved YOLO-v5 algorithm

    CN117496350A