Aerial image small target detection method based on improved YOLO algorithm
By introducing a multi-branch depth strip attention module and a deep reshaping sampling module in the YOLO algorithm, the detection method of small targets in aerial images is improved, the problem of poor feature extraction effect of small targets in the prior art is solved, and high-precision small target detection and positioning are achieved.
Patent Information
- Application Number
- CN202411586431.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-03-28
AI Technical Summary
When detecting and positioning small objects in aerial images, it is difficult to accurately extract and retain the features of small objects, resulting in poor detection accuracy.
By introducing multi-branched deep strip attention module and deep reshaping sampling module in the YOLO algorithm, the classification task and regression task are decoupled, and the object detection network model is improved to improve the feature extraction effect of small targets.
The feature extraction effect of small targets in aerial images is significantly improved, feature loss and information loss are reduced, and accurate detection and positioning of small targets is achieved.
Smart Images

Figure CN119723027A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a method for detecting small targets in aerial images based on an improved YOLO algorithm. Background Art
[0002] With the widespread application of aerial unmanned systems, the demand for accurate detection and positioning of small targets in aerial images is growing. Small target detection in aerial images has become an important research direction in the field of computer vision and image processing.
[0003] There are currently two main implementation solutions for image object detection: the first implementation solution is based on traditional image processing and computer vision methods, specifically by using manually designed features and classifiers, such as Haar features, HOG features, and SVM classifiers, to perform object detection; the second implementation solution is based on deep learning, specifically by using deep learning models, such as CNN (convolutional neural network), Faster R-CNN, YOLO, SSD and other models, to achieve end-to-end object detection.
[0004] However, due to the small size and dense distribution of small targets in aerial images, it is difficult for hand-designed features and classifiers to accurately detect and locate small targets in aerial images. The commonly used deep learning models usually use feature pyramids to process targets of different scales in images. Feature pyramids need to fuse feature maps from different scales to obtain richer semantic information. However, due to the small size and low resolution of small targets, their features are often sparse on high-resolution feature maps. In addition, due to the interference of environmental factors such as lighting and complex background in aerospace images, the features of small targets are easily dominated by relatively large background features during the feature fusion process, resulting in poor feature extraction of small targets. At the same time, conventional deep learning models usually obtain low-resolution feature maps by downsampling in feature pyramids to capture target information of larger scales. However, due to the small size and low resolution of small targets, small targets are extremely sensitive to feature loss. During the downsampling process, small target features are easily lost, which leads to the loss of details and local information of small targets, resulting in poor detection and positioning accuracy of small targets. Summary of the invention
[0005] In order to solve some or all of the technical problems existing in the above-mentioned prior art, the present invention provides a small target detection method in aerial images based on an improved YOLO algorithm.
[0006] The technical solution of the present invention is as follows:
[0007] A method for detecting small targets in aerial images based on an improved YOLO algorithm is provided, the method comprising:
[0008] Acquire the aerial image to be detected;
[0009] Preprocessing the aerial image to be detected so that the preprocessed aerial image to be detected conforms to the usage format of the pre-trained target detection network model;
[0010] The preprocessed aerial image to be detected is input into a pre-trained target detection network model to obtain the category and target frame position of the target in the aerial image to be detected output by the target detection network model. The target detection network model is obtained by introducing a multi-branch deep strip attention module and a deep reshaping sampling module in a YOLO model, and decoupling the classification task and the regression task in the YOLO model. The multi-branch deep strip attention module is used to extract multi-scale contextual features, and the deep reshaping sampling module is used to downsample features on the basis of retaining the target's own features.
[0011] In some optional implementations, preprocessing the aerial image to be detected includes:
[0012] Cropping the aerial image to be detected into an image of 1024*1024 pixels;
[0013] Normalize the cropped image so that the pixel values of the image are scaled to between [0,1];
[0014] Convert the normalized image into a tensor.
[0015] In some optional embodiments, the target detection network model includes a backbone network, a neck network, and a head network connected in sequence;
[0016] The backbone network is used to extract features of the image input into the target detection network model and output them to the neck network. The neck network is used to fuse feature maps of different scales input into the backbone network and output them to the head network. The head network is used to extract and output the category and target frame position of the target from the feature map input into the neck network.
[0017] In some optional implementations, the backbone network includes:
[0018] A 2×2 convolutional layer, whose input end is connected to the input end of the target detection network model, and the 2×2 convolutional layer is used to perform a 2×2 convolution operation on the input image and output the obtained features;
[0019] A first 3×1 convolutional layer, whose input end is connected to the output end of the 2×2 convolutional layer, and the first 3×1 convolutional layer is used to perform a 3×1 convolution operation on the input features and output the obtained features;
[0020] A first deep reshaping sampling module, whose input end is connected to the output end of the first 3×1 convolutional layer, and the first deep reshaping sampling module is used to downsample the input features on the basis of retaining the own features of the target, and output the obtained features;
[0021] A first C3 True module, including three convolutional layers with residual connections, wherein an input end of the first C3 True module is connected to an output end of the first deep reshaping sampling module, and an output end of the first C3 True module is respectively connected to an input end of a second 3×1 convolutional layer and the neck network, and the first C3 True module is used to extract features and output the extracted features;
[0022] The second 3×1 convolutional layer is used to perform a 3×1 convolution operation on the input features and output the obtained features;
[0023] A second deep reshaping sampling module, whose input end is connected to the output end of the second 3×1 convolutional layer, and the second deep reshaping sampling module is used to downsample the input features on the basis of retaining the own features of the target, and output the obtained features;
[0024] The multi-branch deep strip attention module, the input end of which is connected to the output end of the second deep reshaping sampling module, the output end of which is respectively connected to the input end of the third 3×1 convolutional layer and the neck network, and the multi-branch deep strip attention module is used to perform multi-scale context feature extraction and output the obtained features;
[0025] The third 3×1 convolutional layer is used to perform a 3×1 convolution operation on the input features and output the obtained features;
[0026] A third deep reshaping sampling module, whose input end is connected to the output end of the third 3×1 convolutional layer, and the third deep reshaping sampling module is used to downsample the input features on the basis of retaining the own features of the target, and output the obtained features;
[0027] A second C3 True module, including three convolutional layers of residual connection, the input end of the second C3 True module is connected to the output end of the third deep reshaping sampling module, and the second C3 True module is used to extract features and output the extracted features;
[0028] The spatial pyramid pooling module has an input end and an output end connected to the output end of the second C3 True module and the neck network respectively, and is used to fuse features at different scales of the same feature map through a connection operation and output a fusion result.
[0029] In some optional embodiments, the multi-branch deep strip attention module includes: a 5×5 convolutional layer, a 1×3 convolutional layer, a 3×1 convolutional layer, a 9×1 convolutional layer, a 1×9 convolutional layer, a 1×15 convolutional layer, a 15×1 convolutional layer, a splicing unit, a 1×1 convolutional layer, and a matrix multiplication unit;
[0030] The output end of the 5×5 convolutional layer is respectively connected to the input end of the 1×3 convolutional layer, the input end of the 9×1 convolutional layer, the input end of the 1×15 convolutional layer and the input end of the splicing unit. The 5×5 convolutional layer is used to perform a 5×5 convolution operation on the input features and output the obtained features;
[0031] The output end of the 1×3 convolutional layer is connected to the input end of the 3×1 convolutional layer, and the 1×3 convolutional layer is used to perform a 1×3 convolution operation on the input features and output the obtained features;
[0032] The output end of the 3×1 convolution layer is connected to the input end of the splicing unit, and the 3×1 convolution layer is used to perform a 3×1 convolution operation on the input features and output the obtained features;
[0033] The output end of the 9×1 convolutional layer is connected to the input end of the 1×9 convolutional layer, and the 9×1 convolutional layer is used to perform a 9×1 convolution operation on the input features and output the obtained features;
[0034] The output end of the 1×9 convolutional layer is connected to the input end of the splicing unit, and the 1×9 convolutional layer is used to perform a 1×9 convolution operation on the input features and output the obtained features;
[0035] The output end of the 1×15 convolutional layer is connected to the input end of the 15×1 convolutional layer, and the 1×15 convolutional layer is used to perform a 1×15 convolution operation on the input features and output the obtained features;
[0036] The output end of the 15×1 convolutional layer is connected to the input end of the splicing unit, and the 15×1 convolutional layer is used to perform a 15×1 convolution operation on the input features and output the obtained features;
[0037] The output end of the splicing unit is connected to the input end of the 1×1 convolutional layer, and the splicing unit is used to perform a splicing operation on the four input features to obtain a fused feature and output it;
[0038] The output end of the 1×1 convolution layer is connected to the input end of the matrix multiplication unit, and the 1×1 convolution layer is used to perform a 1×1 convolution operation on the input features and output the obtained features;
[0039] The input end of the matrix multiplication unit is also connected to the input end of the 5×5 convolutional layer and together serves as the input end of the multi-branch deep strip attention module. The output end of the matrix multiplication unit serves as the output end of the multi-branch deep strip attention module. The matrix multiplication unit is used to perform element-by-element matrix multiplication on the two input features to obtain a fused feature and output it.
[0040] In some optional embodiments, the neck network includes a first dimensionality increase fusion module, a second dimensionality increase fusion module, a first dimensionality reduction processing module, and a second dimensionality reduction processing module connected in sequence;
[0041] The first dimension-upgrading fusion module includes a 1×1 convolutional layer, an upsampling unit, a splicing unit and a C3False module connected in sequence, the input end of the 1×1 convolutional layer is connected to the output end of the spatial pyramid pooling module in the backbone network, the output end of the 1×1 convolutional layer is also connected to the second dimension reduction processing module, the input end of the splicing unit is also connected to the output end of the multi-branch deep strip attention module in the backbone network, the output end of the C3False module is connected to the second dimension-upgrading fusion module, the 1×1 convolutional layer is used to perform a 1×1 convolution operation on the input features, the upsampling unit is used to upsample the input features, the splicing unit is used to perform a splicing operation on the input features, the C3 False module includes three convolutional layers connected in sequence, and the C3False module is used for feature fusion;
[0042] The second dimension-upgrading fusion module includes a 1×1 convolutional layer, an upsampling unit, a splicing unit and a C3False module connected in sequence, the input end of the 1×1 convolutional layer is connected to the output end of the C3 False module in the first dimension-upgrading fusion module, the output end of the 1×1 convolutional layer is also connected to the first dimension reduction processing module, the input end of the splicing unit is also connected to the output end of the first C3 True module in the backbone network, the output end of the C3 False module is respectively connected to the first dimension reduction processing module and the head network, the 1×1 convolutional layer is used to perform a 1×1 convolution operation on the input features, the upsampling unit is used to upsample the input features, the splicing unit is used to perform a splicing operation on the input features, the C3 False module includes three convolutional layers connected in sequence, and the C3False module is used for feature fusion;
[0043] The first dimensionality reduction processing module includes a 3×1 convolutional layer, a deep reshaping sampling module, a splicing unit and a C3 False module connected in sequence, the input end of the 3×1 convolutional layer is connected to the output end of the C3 False module in the second dimensionality increase fusion module, the input end of the splicing unit is also connected to the output end of the 1×1 convolutional layer in the second dimensionality increase fusion module, the output end of the C3 False module is respectively connected to the second dimensionality reduction processing module and the head network, the 3×1 convolutional layer is used to perform a 3×1 convolution operation on the input features, the deep reshaping sampling module is used to downsample the input features on the basis of retaining the target's own features, the splicing unit is used to perform a splicing operation on the input features, the C3 False module includes three convolutional layers connected in sequence, and the C3False module is used for feature fusion;
[0044] The second dimensionality reduction processing module includes a C3 False module, a splicing unit, a deep reshaping sampling module and a 3×1 convolutional layer connected in sequence. The input end of the C3 False module is connected to the output end of the C3False module in the first dimensionality reduction processing module. The input end of the splicing unit is also connected to the output end of the 1×1 convolutional layer in the first dimensionality increase fusion module. The output end of the 3×1 convolutional layer is connected to the head network. The C3 False module includes three convolutional layers connected in sequence. The C3 False module is used for feature fusion. The splicing unit is used to perform a splicing operation on the input features. The deep reshaping sampling module is used to downsample the input features while retaining the target's own features. The 3×1 convolutional layer is used to perform a 3×1 convolution operation on the input features.
[0045] In some optional embodiments, the head network includes: a classification branch and a regression branch arranged in parallel, the classification branch is used to predict and output the category of the target based on the features of the neck network input, and the regression branch is used to predict and output the target box position and confidence of the target based on the features of the neck network input.
[0046] In some optional embodiments, the classification branch includes:
[0047] A first 3×3 convolutional layer, an input end of which is connected to a plurality of outputs of the neck network, an output end of the first 3×3 convolutional layer is connected to an input end of a second 3×3 convolutional layer, and the first 3×3 convolutional layer is used to perform a 3×3 convolution operation on input features and output the obtained features;
[0048] The output end of the second 3×3 convolutional layer is connected to the input end of the first 1×1 convolutional layer, and is used to perform a 3×3 convolution operation on the input features and output the obtained features;
[0049] The first 1×1 convolution layer is used to perform a 1×1 convolution operation on the input features to obtain the category of the target and output it.
[0050] In some optional implementations, the regression branch includes:
[0051] A third 3×3 convolutional layer, an input end of which is connected to a plurality of outputs of the neck network, an output end of the third 3×3 convolutional layer is connected to an input end of a fourth 3×3 convolutional layer, and the third 3×3 convolutional layer is used to perform a 3×3 convolution operation on input features and output the obtained features;
[0052] The output end of the fourth 3×3 convolutional layer is respectively connected to the input end of the second 1×1 convolutional layer and the input end of the third 1×1 convolutional layer, and is used to perform a 3×3 convolution operation on the input features and output the obtained features;
[0053] The second 1×1 convolution layer is used to perform a 1×1 convolution operation on the input features to obtain the target frame position of the target and output it;
[0054] The third 1×1 convolution layer is used to perform a 1×1 convolution operation on the input features to obtain the confidence of the target and output it.
[0055] In some optional implementations, the target detection network model is pre-trained in the following manner:
[0056] Acquire a training data set, the training data including aerial images and categories and location information of targets in the aerial images;
[0057] Preprocessing the training data in the training data set so that the preprocessed training data conforms to the usage format of the target detection network model;
[0058] The target detection network model is trained by taking the aerial image of the training data in the training data set as input and taking the category and position information of the target corresponding to the input aerial image as output.
[0059] The main advantages of the technical solution of the present invention are as follows:
[0060] The aerial image small target detection method based on the improved YOLO algorithm of the present invention can significantly improve the feature extraction effect of targets in aerial images, reduce feature loss and information loss in the feature extraction process, and realize accurate detection and positioning of small targets in aerial images. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] The drawings described herein are used to provide a further understanding of the embodiments of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0062] Figure 1 A flowchart of a method for detecting small targets in aerial images based on an improved YOLO algorithm provided by an embodiment of the present invention;
[0063] Figure 2 A schematic diagram of the overall structure of a target detection network model provided by an embodiment of the present invention;
[0064] Figure 3 for Figure 2 A working principle diagram corresponding to the deep reshaping sampling module in the target detection network model;
[0065] Figure 4 for Figure 2 A schematic diagram of the structure of the multi-branch deep stripe attention module in the target detection network model;
[0066] Figure 5 for Figure 2 Schematic diagram of the structure of the head network in the target detection network model shown. DETAILED DESCRIPTION
[0067] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the specific embodiments of the present invention and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0068] The technical solution provided by the embodiments of the present invention is described in detail below with reference to the accompanying drawings.
[0069] See also Figure 1-2 The embodiment of the present invention provides a method for detecting small targets in aerial images based on an improved YOLO algorithm, the method comprising the following steps:
[0070] Step 1, obtaining the aerial image to be detected;
[0071] Step 2, preprocessing the aerial image to be detected so that the preprocessed aerial image to be detected conforms to the usage format of the pre-trained target detection network model;
[0072] Step 3: Input the preprocessed aerial image to be detected into the pre-trained target detection network model to obtain the category and target frame position of the target in the aerial image to be detected output by the target detection network model.
[0073] In an embodiment of the present invention, the target detection network model is improved based on the existing YOLO model, specifically by introducing a multi-branch deep strip attention module and a deep reshaping sampling module into the YOLO model, and decoupling the classification task and regression task in the YOLO model.
[0074] In an embodiment of the present invention, a multi-branch deep strip attention module is used to perform multi-scale contextual feature extraction. By adding a multi-branch deep strip attention module to the feature pyramid structure of the YOLO model, multi-scale contextual features can be adaptively captured, so that the model can better understand and represent the spatial relationships and contextual dependencies of objects at different scales, thereby improving the model's feature extraction effect on small targets.
[0075] In an embodiment of the present invention, the deep reshaping sampling module is used to downsample features while retaining the target's own features. By introducing the deep reshaping sampling module in the YOLO model, the feature loss caused by the downsampling process can be reduced, the target's features can be retained to the greatest extent, and the information loss in the feature transmission process can be reduced, thereby improving the model's feature extraction effect and detection accuracy for small targets.
[0076] In an embodiment of the present invention, by decoupling the classification task and the regression task so that the classification task and the regression task are performed independently, the unique discriminant features of each task can be better retained and utilized, the risk of information loss is reduced, and the target detection performance is improved.
[0077] The aerial image small target detection method based on the improved YOLO algorithm provided by the embodiment of the present invention can significantly improve the feature extraction effect of targets in aerial images, reduce feature loss and information loss in the feature extraction process, and realize accurate detection and positioning of small targets in aerial images.
[0078] Furthermore, in an embodiment of the present invention, for the target detection network model improved based on the existing YOLO model, preprocessing the aerial image to be detected further includes the following steps:
[0079] Step 21, cropping the aerial image to be detected into an image of 1024*1024 pixels;
[0080] Step 22, normalizing the cropped image so that the pixel values of the image are scaled to between [0, 1];
[0081] Step 23, converting the normalized image into a tensor form.
[0082] In the embodiment of the present invention, the normalization process for the image is specifically to divide the pixel value of the image by 255, so as to scale the pixel value of the image to between [0, 1].
[0083] Further, in the embodiment of the present invention, similar to the structure of the existing YOLO model, the target detection network model includes a backbone network, a neck network and a head network connected in sequence;
[0084] The backbone network is used to extract the features of the image input into the target detection network model and output it to the neck network. The neck network is used to fuse the feature maps of different scales input into the backbone network and output them to the head network. The head network is used to extract and output the target category and target box position from the feature maps input into the neck network.
[0085] refer to Figure 2 , further, in an embodiment of the present invention, the backbone network includes:
[0086] 2×2 convolution layer, the input end is connected to the input end of the target detection network model. The 2×2 convolution layer is used to perform a 2×2 convolution operation on the input image and output the obtained features;
[0087] The first 3×1 convolutional layer, whose input end is connected to the output end of the 2×2 convolutional layer, is used to perform a 3×1 convolution operation on the input features and output the obtained features;
[0088] A first deep reshaping sampling module, whose input end is connected to the output end of the first 3×1 convolutional layer, and the first deep reshaping sampling module is used to downsample the input features on the basis of retaining the own features of the target, and output the obtained features;
[0089] A first C3 True module, including three convolutional layers with residual connections, an input end of the first C3 True module is connected to an output end of the first deep reshaping sampling module, an output end of the first C3 True module is respectively connected to an input end of the second 3×1 convolutional layer and a neck network, and the first C3 True module is used to extract features and output the extracted features;
[0090] The second 3×1 convolution layer is used to perform a 3×1 convolution operation on the input features and output the obtained features;
[0091] A second deep reshaping sampling module, whose input end is connected to the output end of the second 3×1 convolutional layer, and the second deep reshaping sampling module is used to downsample the input features on the basis of retaining the own features of the target, and output the obtained features;
[0092] A multi-branch deep strip attention module, the input end of which is connected to the output end of the second deep reshaping sampling module, and the output end of which is connected to the input end of the third 3×1 convolutional layer and the neck network respectively. The multi-branch deep strip attention module is used to extract multi-scale context features and output the obtained features;
[0093] The third 3×1 convolution layer is used to perform a 3×1 convolution operation on the input features and output the obtained features;
[0094] A third deep reshaping sampling module, whose input end is connected to the output end of the third 3×1 convolutional layer, and the third deep reshaping sampling module is used to downsample the input features on the basis of retaining the own features of the target, and output the obtained features;
[0095] A second C3 True module includes three convolutional layers of residual connection, an input end of the second C3 True module is connected to an output end of the third deep reshaping sampling module, and the second C3 True module is used to extract features and output the extracted features;
[0096] The input and output of the spatial pyramid pooling module are respectively connected to the output of the second C3 True module and the neck network, and are used to fuse features of different scales of the same feature map through a connection operation and output the fusion result.
[0097] In an embodiment of the present invention, based on the structure of the backbone network defined above, when the backbone network performs feature extraction on the input preprocessed image, it first uses two convolutional layers to extract preliminary features from the image, and then uses a deep reshaping sampling module to perform downsampling (dimensionality reduction), and then further extracts features through a C3 True module and a convolutional layer, and then uses a deep reshaping sampling module to perform downsampling. After the downsampling is completed, a multi-branch deep strip attention module is used to perform multi-scale context feature extraction, and then further extracts features through a convolutional layer, a deep reshaping sampling module and a C3True module in sequence, and finally the spatial pyramid pooling module fuses the features of the same feature map at different scales through a connection operation to obtain and output the corresponding fusion result.
[0098] It should be noted that in the attached Figure 2In the backbone network, Conv(2,2) represents a 2×2 convolutional layer, Conv(3,1) represents a 3×1 convolutional layer, DWR (Depth-Wise-Reshaping) represents a deep reshaping sampling module, C3 True represents a C3 True module, MDSA (Multi-branch Deep Stripe Attention) represents a multi-branch deep stripe attention module, and SPPF (Spatial Pyramid Pooling Fast) represents a spatial pyramid pooling module.
[0099] In an embodiment of the present invention, by utilizing the backbone network defined above to extract features of an image input into a target detection network model, the spatial relationship and contextual dependency of features at different scales can be accurately captured, a good feature extraction effect can be achieved, and the feature loss caused by the downsampling process can be reduced. The features of various targets can be retained to the greatest extent, and information loss during the feature extraction and transmission processes can be reduced.
[0100] refer to Figure 3 Furthermore, in an embodiment of the present invention, the downsampling operation of the deep reshaping sampling module is used to replace the conventional maximum pooling or average pooling. The deep reshaping sampling module adopts the idea of interlaced sampling to perform the downsampling operation. Specifically, when performing the downsampling operation, the width and length dimensions of the feature are sampled at a set interval. The interval is 1, for example. At this time, the two dimensions of the width and length are sampled starting from the first pixel and the second pixel respectively. After obtaining a plurality of sampling results, they are spliced along the channel direction. The spliced features are then convolved with a stride of 1 (Stride=1) to reduce the number of channels so that the number of channels is restored to the same as the input feature.
[0101] like Figure 3 As shown, when the feature data input to the depth reshaping sampling module is (C, H, W), that is, the number of channels is C, the length and width are H and W, during the downsampling process of the depth reshaping sampling module, after interval sampling and splicing, the feature data is (4C, H / 2, W / 2), that is, the number of channels is 4C, the length and width are H / 2 and W / 2, and after convolution processing with a step size of 1, the feature data is (C, H / 2, W / 2), that is, the number of channels is C, the length and width are H / 2 and W / 2.
[0102] In an embodiment of the present invention, by using the deep reshaping sampling module to perform downsampling in the above manner, it is possible to reduce the feature loss caused by the downsampling process, retain the target's own characteristics to the maximum extent, and reduce the information loss in the feature transmission process, thereby improving the feature extraction effect and detection accuracy of the target.
[0103] refer to Figure 4,Further, in an embodiment of the present invention, the multi-branch deep strip attention module includes: a 5×5 convolution layer, a 1×3 convolution layer, a 3×1 convolution layer, a 9×1 convolution layer, a 1×9 convolution layer, a 1×15 convolution layer, a 15×1 convolution layer, a splicing unit, a 1×1 convolution layer and a matrix multiplication unit;
[0104] The output of the 5×5 convolutional layer is connected to the input of the 1×3 convolutional layer, the input of the 9×1 convolutional layer, the input of the 1×15 convolutional layer, and the input of the splicing unit respectively. The 5×5 convolutional layer is used to perform a 5×5 convolution operation on the input features and output the obtained features;
[0105] The output of the 1×3 convolutional layer is connected to the input of the 3×1 convolutional layer. The 1×3 convolutional layer is used to perform a 1×3 convolution operation on the input features and output the obtained features.
[0106] The output end of the 3×1 convolutional layer is connected to the input end of the splicing unit. The 3×1 convolutional layer is used to perform a 3×1 convolution operation on the input features and output the obtained features;
[0107] The output of the 9×1 convolutional layer is connected to the input of the 1×9 convolutional layer. The 9×1 convolutional layer is used to perform a 9×1 convolution operation on the input features and output the obtained features.
[0108] The output end of the 1×9 convolutional layer is connected to the input end of the splicing unit. The 1×9 convolutional layer is used to perform a 1×9 convolution operation on the input features and output the obtained features;
[0109] The output of the 1×15 convolutional layer is connected to the input of the 15×1 convolutional layer. The 1×15 convolutional layer is used to perform a 1×15 convolution operation on the input features and output the obtained features.
[0110] The output end of the 15×1 convolutional layer is connected to the input end of the splicing unit. The 15×1 convolutional layer is used to perform a 15×1 convolution operation on the input features and output the obtained features;
[0111] The output end of the splicing unit is connected to the input end of the 1×1 convolutional layer. The splicing unit is used to perform a splicing operation on the four input features to obtain a fused feature and output it;
[0112] The output end of the 1×1 convolution layer is connected to the input end of the matrix multiplication unit. The 1×1 convolution layer is used to perform a 1×1 convolution operation on the input features and output the obtained features;
[0113] The input end of the matrix multiplication unit is also connected to the input end of the 5×5 convolutional layer and serves as the input end of the multi-branch deep strip attention module. The output end of the matrix multiplication unit serves as the output end of the multi-branch deep strip attention module. The matrix multiplication unit is used to perform element-by-element matrix multiplication of the two input features to obtain the fused feature and output it.
[0114] In the embodiment of the present invention, considering the characteristics that small targets are small in size and often appear densely, if the fused context information area is too large, the area may contain other small targets of different categories, resulting in incorrect fusion of feature information of other targets and affecting detection. For this reason, the size of the convolution kernel is specially selected. Since paired convolutions similar to 1×N and N×1 can effectively simulate N×N convolutions and are more efficient, 1×N strip convolutions are also suitable for extracting features of small targets with slender shapes. For this reason, three pairs of convolutions of sizes 1×3 and 3×1, 1×9 and 9×1, and 1×15 and 15×1 are set in the multi-branch deep strip attention module for fusing feature information, and different padding values are used so that the feature sizes obtained by the three branches are consistent with the feature sizes after the initial 5×5 convolution, and then the four feature parts are spliced to obtain fused feature information, and then the fused feature information is re-weighted by 1×1 convolution, and finally the weighted feature information is fused with the original features input into the multi-branch deep strip attention module to obtain the final fused feature.
[0115] It should be noted that in the attached Figure 4 In the figure, 5×5conv means 5×5 convolution layer, 1×3conv means 1×3 convolution layer, 3×1conv means 3×1 convolution layer, 9×1conv means 9×1 convolution layer, 1×9conv means 1×9 convolution layer, 1×15conv means 1×15 convolution layer, 15×1conv means 15×1 convolution layer, and 1×1conv means 1×1 convolution layer. represents the splicing unit, Represents a matrix multiplication unit.
[0116] In an embodiment of the present invention, based on the above-defined structure, the relationship between the input features and the output features of the multi-branch deep strip attention module can be expressed as:
[0117]
[0118] Attention1(Conv 5×5 (Fin))=Conv 3×1 (Conv 1×3 (Conv 5×5 (Fin)));
[0119] Attention2(Conv5×5 (Fin))=Conv 9×1 (Conv 1×9 (Conv 5×5 (Fin)));
[0120] Attention3(Conv 5×5 (Fin))=Conv 15×1 (Conv 1×15 (Conv 5×5 (Fin)));
[0121] Among them, F in represents the input features of the multi-branch deep stripe attention module, F out Represents the output features of the multi-branch deep strip attention module, Conv M×N Represents a convolution with a kernel size of M×N, Attention i ,i=1,2,3 is used to represent three different attention branches, Represents an element-by-element matrix multiplication operation.
[0122] In an embodiment of the present invention, by utilizing the multi-branch deep strip attention module defined above to perform multi-scale contextual feature extraction, multi-scale contextual features can be adaptively captured, enabling the model to better understand and represent the spatial relationships and contextual dependencies of objects at different scales, thereby improving the model's feature extraction effect on small targets.
[0123] refer to Figure 2 ,Further, in an embodiment of the present invention, the neck network includes a first dimensionality increase fusion module, a second dimensionality increase fusion module, a first dimensionality reduction processing module and a second dimensionality reduction processing module connected in sequence;
[0124] The first dimension-upgrading fusion module includes a 1×1 convolutional layer, an upsampling unit, a splicing unit, and a C3False module connected in sequence. The input end of the 1×1 convolutional layer is connected to the output end of the spatial pyramid pooling module in the backbone network. The output end of the 1×1 convolutional layer is also connected to the second dimension reduction processing module. The input end of the splicing unit is also connected to the output end of the multi-branch deep strip attention module in the backbone network. The output end of the C3 False module is connected to the second dimension-upgrading fusion module. The 1×1 convolutional layer is used to perform a 1×1 convolution operation on the input features. The upsampling unit is used to upsample the input features. The splicing unit is used to perform a splicing operation on the input features. The C3 False module includes three convolutional layers connected in sequence, and the C3False module is used for feature fusion.
[0125] The second dimensionality increase fusion module includes a 1×1 convolution layer, an upsampling unit, a splicing unit and a C3False module connected in sequence, the input end of the 1×1 convolution layer is connected to the output end of the C3 False module in the first dimensionality increase fusion module, the output end of the 1×1 convolution layer is also connected to the first dimensionality reduction processing module, the input end of the splicing unit is also connected to the output end of the first C3 True module in the backbone network, the output end of the C3 False module is respectively connected to the first dimensionality reduction processing module and the head network, the 1×1 convolution layer is used to perform a 1×1 convolution operation on the input features, the upsampling unit is used to upsample the input features, the splicing unit is used to perform a splicing operation on the input features, the C3 False module includes three convolution layers connected in sequence, and the C3 False module is used for feature fusion;
[0126] The first dimensionality reduction processing module includes a 3×1 convolution layer, a deep reshaping sampling module, a splicing unit and a C3 False module connected in sequence. The input end of the 3×1 convolution layer is connected to the output end of the C3 False module in the second dimensionality increase fusion module. The input end of the splicing unit is also connected to the output end of the 1×1 convolution layer in the second dimensionality increase fusion module. The output end of the C3 False module is respectively connected to the second dimensionality reduction processing module and the head network. The 3×1 convolution layer is used to perform a 3×1 convolution operation on the input features. The deep reshaping sampling module is used to downsample the input features on the basis of retaining the target's own features. The splicing unit is used to perform a splicing operation on the input features. The C3 False module includes three convolution layers connected in sequence, and the C3 False module is used for feature fusion.
[0127] The second dimensionality reduction processing module includes a C3 False module, a splicing unit, a deep reshaping sampling module and a 3×1 convolutional layer connected in sequence. The input end of the C3 False module is connected to the output end of the C3 False module in the first dimensionality reduction processing module. The input end of the splicing unit is also connected to the output end of the 1×1 convolutional layer in the first dimensionality increase fusion module. The output end of the 3×1 convolutional layer is connected to the head network. The C3 False module includes three convolutional layers connected in sequence. The C3 False module is used for feature fusion. The splicing unit is used to perform splicing operations on input features. The deep reshaping sampling module is used to downsample the input features while retaining the target's own features. The 3×1 convolutional layer is used to perform 3×1 convolution operations on the input features.
[0128] In an embodiment of the present invention, the neck network is used to add shallow features to the feature maps of three scales that need to be detected, and complete the splicing of shallow features and deep features. In the above-mentioned neck network, the features are first upgraded and fused through the first dimensionality increase fusion module and the second dimensionality increase fusion module, and then the features are reduced and fused through the first dimensionality reduction processing module and the second dimensionality reduction processing module, and the C3 False module is used to reduce the complexity of the calculation, so as to complete the target detection later.
[0129] It should be noted that in the attached Figure 2 In the neck network of , Conv(1,1) represents a 1×1 convolutional layer, Conv(3,1) represents a 3×1 convolutional layer, Upsample represents an upsampling unit, Concat represents a concatenation unit, C3 False represents a C3 False module, and DWR (Depth-Wise-Reshaping) represents a deep reshaping sampling module.
[0130] In the embodiment of the present invention, the difference between the C3 True module and the C3 False module is that the three convolutional layers included in the C3 True module use residual connections, while the C3 False module does not use residual connections.
[0131] refer to Figure 5 Furthermore, in an embodiment of the present invention, the head network includes: a classification branch and a regression branch arranged in parallel, the classification branch is used to predict and output the category of the target according to the features of the neck network input, and the regression branch is used to predict and output the target frame position and confidence of the target according to the features of the neck network input.
[0132] In an embodiment of the present invention, by decoupling the classification task and the regression task in the detection task in the head network, the classification task and the regression task are performed independently, which can better retain and utilize the unique discriminative features of each task, reduce the risk of information loss, and thus improve the target detection performance.
[0133] refer to Figure 5 , further, in an embodiment of the present invention, the classification branch includes:
[0134] The first 3×3 convolutional layer, the input end is connected to multiple outputs of the neck network, the output end of the first 3×3 convolutional layer is connected to the input end of the second 3×3 convolutional layer, and the first 3×3 convolutional layer is used to perform a 3×3 convolution operation on the input features and output the obtained features;
[0135] The output of the second 3×3 convolutional layer is connected to the input of the first 1×1 convolutional layer, and is used to perform a 3×3 convolution operation on the input features and output the obtained features;
[0136] The first 1×1 convolution layer is used to perform a 1×1 convolution operation on the input features to obtain the target category and output it.
[0137] Furthermore, in an embodiment of the present invention, the regression branch includes:
[0138] The third 3×3 convolutional layer, the input end is connected to multiple outputs of the neck network, the output end of the third 3×3 convolutional layer is connected to the input end of the fourth 3×3 convolutional layer, and the third 3×3 convolutional layer is used to perform a 3×3 convolution operation on the input features and output the obtained features;
[0139] The output end of the fourth 3×3 convolutional layer is connected to the input end of the second 1×1 convolutional layer and the input end of the third 1×1 convolutional layer respectively, and is used to perform a 3×3 convolution operation on the input features and output the obtained features;
[0140] The second 1×1 convolution layer is used to perform a 1×1 convolution operation on the input features to obtain the target box position of the target and output it;
[0141] The third 1×1 convolution layer is used to perform a 1×1 convolution operation on the input features to obtain the confidence of the target and output it.
[0142] In the embodiment of the present invention, completing the classification task and the regression task based on the above-defined classification branch and regression branch can enable the model to learn and optimize different tasks separately, so that the model can achieve better target detection performance.
[0143] It should be noted that in the attached Figure 5 In the figure, 3×3Conv represents a 3×3 convolutional layer, 1×1Conv represents a 1×1 convolutional layer, Cls represents the category, Reg represents the target box position, and Obj represents the confidence.
[0144] In the embodiment of the present invention, the category of the target indicates the category to which the target belongs, which is represented by an integer. Each target is associated with a numerical label to indicate which category the target belongs to when the model predicts it during the detection process. The target box position of the target is represented by (x min ,y min ,x max ,y max ) in the form of (x min ,y min ) represents the coordinate of the upper left corner of the target box, (x max ,y max ) represents the coordinate of the lower right corner of the target box. The confidence of the target is represented by a probability value, which ranges from 0 to 1. A higher confidence value means that the model is more confident in the detection result of the target, while a lower confidence value means that the model is not sure about the detection result of the target or the detection result of the target is unreliable.
[0145] Furthermore, in an embodiment of the present invention, the target detection network model is pre-trained in the following manner:
[0146] Step 31, obtaining a training data set, the training data including the aerial image and the category and location information of the target in the aerial image;
[0147] In the embodiment of the present invention, when acquiring training data, the aerial image may use currently known image data.
[0148] Step 32, preprocessing the training data in the training data set so that the preprocessed training data conforms to the usage format of the target detection network model;
[0149] Step 33, taking the aerial image of the training data in the training data set as input, taking the category and location information of the target corresponding to the input aerial image as output, and training the target detection network model.
[0150] Furthermore, in the embodiment of the present invention, in the above step 32, preprocessing the training data in the training data set further includes the following steps:
[0151] Step 321, cropping the aerial image of the training data into an image of 1024*1024 pixels;
[0152] Step 322, normalizing the cropped image so that the pixel values of the image are scaled to between [0, 1];
[0153] Step 323, converting the normalized image into a tensor form.
[0154] In the embodiment of the present invention, the normalization process for the image is specifically to divide the pixel value of the image by 255, so as to scale the pixel value of the image to between [0, 1].
[0155] Furthermore, in the embodiment of the present invention, preprocessing the training data in the training data set may also include:
[0156] The normalized image is subjected to data enhancement to obtain multiple corresponding images, and each image and the category and position information of the target corresponding to the image are used as new training data for training the target detection network model.
[0157] In the embodiment of the present invention, by performing data enhancement operations on existing aerial images, the diversity of training data and the generalization ability of the model can be increased, thereby improving the detection performance of the pre-trained model. The data enhancement operations specifically include: random cropping, random scaling, random flipping and color perturbation, and the color perturbation is, for example, adjusting the saturation and exposure rate.
[0158] Further, in the embodiment of the present invention, in step 33, the aerial image of the training data in the training data set is used as input, and the category and position information of the target corresponding to the input aerial image is used as output to train the target detection network model, further comprising the following steps:
[0159] Step 331, inputting all aerial images in the training data into the target detection network model in batches, and obtaining the prediction results of the category and position information of the target in each aerial image output by the target detection network model;
[0160] In an embodiment of the present invention, an aerial image in the training data is input from the input end of the target detection network model, processed by each layer in the target detection network model in sequence, and output from the output end of the target detection network model. The information output by the target detection network model is the prediction result of the category and position information of the target in the input aerial image.
[0161] In the embodiment of the present invention, the parameters of the target detection network model are initialization parameters. During the training process of the model, the parameters of the model are continuously updated and learned.
[0162] Step 332, calculating the target detection loss function according to the category and position information of the target in the training data and the prediction result of the category and position information of the target corresponding to the training data output by the target detection network model;
[0163] In an embodiment of the present invention, the target detection loss function includes a regression loss function part and a classification loss function part. The regression loss function adopts a mean square error loss function, and the classification loss function adopts a cross entropy loss function.
[0164] Step 333, determine whether the preset training stop condition is reached, if so, use the current target detection network model as the target detection network model that has completed training, if not, use the target detection loss function to update the parameters of the target detection network model, and return to step 331.
[0165] In an embodiment of the present invention, the training stop condition is specifically set according to the actual situation, for example, the number of training iterations reaches a set number of iterations or the optimization index reaches a set threshold, wherein the target detection loss function can be used as the optimization index.
[0166] Furthermore, in an embodiment of the present invention, a stochastic gradient descent method is used to train and update the parameters of the target detection network model.
[0167] Furthermore, in an embodiment of the present invention, when pre-training the model, the prediction results can also be screened and filtered, and the prediction results with higher quality are retained for the calculation of the target detection loss function and the update of the model parameters, thereby improving the detection performance of the pre-trained model. Specifically, when screening and filtering the prediction results, by calculating the intersection-and-union ratio of the predicted target frame position and the actual target frame position, the relationship between the calculated intersection-and-union ratio and the preset threshold is determined. If the calculated intersection-and-union ratio is lower than the preset threshold, the corresponding prediction result is removed. If the intersection-and-union ratio is not lower than the preset threshold, the corresponding prediction result is retained.
[0168] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0169] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for detecting small targets in aerial images based on an improved YOLO algorithm, characterized in that: The method comprises: Acquire the aerial image to be detected; Preprocessing the aerial image to be detected so that the preprocessed aerial image to be detected conforms to the usage format of the pre-trained target detection network model; The preprocessed aerial image to be detected is input into a pre-trained target detection network model to obtain the category and target frame position of the target in the aerial image to be detected output by the target detection network model. The target detection network model is obtained by introducing a multi-branch deep strip attention module and a deep reshaping sampling module in a YOLO model, and decoupling the classification task and the regression task in the YOLO model. The multi-branch deep strip attention module is used to extract multi-scale contextual features, and the deep reshaping sampling module is used to downsample features on the basis of retaining the target's own features.
2. The method for detecting small targets in aerial images based on the improved YOLO algorithm according to claim 1, characterized in that: Preprocessing the aerial image to be detected includes: Cropping the aerial image to be detected into an image of 1024*1024 pixels; Normalize the cropped image so that the pixel values of the image are scaled to between [0,1]; Convert the normalized image into a tensor.
3. The method for detecting small targets in aerial images based on the improved YOLO algorithm according to claim 1, characterized in that: The target detection network model includes a backbone network, a neck network and a head network connected in sequence; The backbone network is used to extract features of the image input into the target detection network model and output them to the neck network. The neck network is used to fuse feature maps of different scales input into the backbone network and output them to the head network. The head network is used to extract and output the category and target frame position of the target from the feature map input into the neck network.
4. The method for detecting small targets in aerial images based on the improved YOLO algorithm according to claim 3, characterized in that: The backbone network includes: A 2×2 convolutional layer, whose input end is connected to the input end of the target detection network model, and the 2×2 convolutional layer is used to perform a 2×2 convolution operation on the input image and output the obtained features; A first 3×1 convolutional layer, whose input end is connected to the output end of the 2×2 convolutional layer, and the first 3×1 convolutional layer is used to perform a 3×1 convolution operation on the input features and output the obtained features; A first deep reshaping sampling module, whose input end is connected to the output end of the first 3×1 convolutional layer, and the first deep reshaping sampling module is used to downsample the input features on the basis of retaining the own features of the target, and output the obtained features; A first C3 True module, including three convolutional layers with residual connections, wherein an input end of the first C3 True module is connected to an output end of the first deep reshaping sampling module, and an output end of the first C3 True module is respectively connected to an input end of a second 3×1 convolutional layer and the neck network, and the first C3 True module is used to extract features and output the extracted features; The second 3×1 convolutional layer is used to perform a 3×1 convolution operation on the input features and output the obtained features; A second deep reshaping sampling module, whose input end is connected to the output end of the second 3×1 convolutional layer, and the second deep reshaping sampling module is used to downsample the input features on the basis of retaining the own features of the target, and output the obtained features; The multi-branch deep strip attention module, the input end of which is connected to the output end of the second deep reshaping sampling module, the output end of which is respectively connected to the input end of the third 3×1 convolutional layer and the neck network, and the multi-branch deep strip attention module is used to perform multi-scale context feature extraction and output the obtained features; The third 3×1 convolutional layer is used to perform a 3×1 convolution operation on the input features and output the obtained features; A third deep reshaping sampling module, whose input end is connected to the output end of the third 3×1 convolutional layer, and the third deep reshaping sampling module is used to downsample the input features on the basis of retaining the own features of the target, and output the obtained features; A second C3 True module, including three convolutional layers of residual connection, the input end of the second C3 True module is connected to the output end of the third deep reshaping sampling module, and the second C3 True module is used to extract features and output the extracted features; The spatial pyramid pooling module has an input end and an output end connected to the output end of the second C3 True module and the neck network respectively, and is used to fuse features at different scales of the same feature map through a connection operation and output a fusion result.
5. The method for detecting small targets in aerial images based on the improved YOLO algorithm according to claim 4, characterized in that: The multi-branch deep strip attention module includes: a 5×5 convolution layer, a 1×3 convolution layer, a 3×1 convolution layer, a 9×1 convolution layer, a 1×9 convolution layer, a 1×15 convolution layer, a 15×1 convolution layer, a splicing unit, a 1×1 convolution layer and a matrix multiplication unit; The output end of the 5×5 convolutional layer is respectively connected to the input end of the 1×3 convolutional layer, the input end of the 9×1 convolutional layer, the input end of the 1×15 convolutional layer and the input end of the splicing unit. The 5×5 convolutional layer is used to perform a 5×5 convolution operation on the input features and output the obtained features; The output end of the 1×3 convolutional layer is connected to the input end of the 3×1 convolutional layer, and the 1×3 convolutional layer is used to perform a 1×3 convolution operation on the input features and output the obtained features; The output end of the 3×1 convolution layer is connected to the input end of the splicing unit, and the 3×1 convolution layer is used to perform a 3×1 convolution operation on the input features and output the obtained features; The output end of the 9×1 convolutional layer is connected to the input end of the 1×9 convolutional layer, and the 9×1 convolutional layer is used to perform a 9×1 convolution operation on the input features and output the obtained features; The output end of the 1×9 convolutional layer is connected to the input end of the splicing unit, and the 1×9 convolutional layer is used to perform a 1×9 convolution operation on the input features and output the obtained features; The output end of the 1×15 convolutional layer is connected to the input end of the 15×1 convolutional layer, and the 1×15 convolutional layer is used to perform a 1×15 convolution operation on the input features and output the obtained features; The output end of the 15×1 convolutional layer is connected to the input end of the splicing unit, and the 15×1 convolutional layer is used to perform a 15×1 convolution operation on the input features and output the obtained features; The output end of the splicing unit is connected to the input end of the 1×1 convolutional layer, and the splicing unit is used to perform a splicing operation on the four input features to obtain a fused feature and output it; The output end of the 1×1 convolution layer is connected to the input end of the matrix multiplication unit, and the 1×1 convolution layer is used to perform a 1×1 convolution operation on the input features and output the obtained features; The input end of the matrix multiplication unit is also connected to the input end of the 5×5 convolutional layer and together serves as the input end of the multi-branch deep strip attention module. The output end of the matrix multiplication unit serves as the output end of the multi-branch deep strip attention module. The matrix multiplication unit is used to perform element-by-element matrix multiplication on the two input features to obtain a fused feature and output it.
6. The method for detecting small targets in aerial images based on the improved YOLO algorithm according to claim 4 or 5, characterized in that: The neck network includes a first dimensionality increase fusion module, a second dimensionality increase fusion module, a first dimensionality reduction processing module and a second dimensionality reduction processing module connected in sequence; The first dimension-upgrading fusion module includes a 1×1 convolutional layer, an upsampling unit, a splicing unit and a C3False module connected in sequence, the input end of the 1×1 convolutional layer is connected to the output end of the spatial pyramid pooling module in the backbone network, the output end of the 1×1 convolutional layer is also connected to the second dimension reduction processing module, the input end of the splicing unit is also connected to the output end of the multi-branch deep strip attention module in the backbone network, the output end of the C3 False module is connected to the second dimension-upgrading fusion module, the 1×1 convolutional layer is used to perform a 1×1 convolution operation on the input features, the upsampling unit is used to upsample the input features, the splicing unit is used to perform a splicing operation on the input features, the C3 False module includes three convolutional layers connected in sequence, and the C3 False module is used for feature fusion; The second dimension-upgrading fusion module includes a 1×1 convolutional layer, an upsampling unit, a splicing unit and a C3False module connected in sequence, the input end of the 1×1 convolutional layer is connected to the output end of the C3 False module in the first dimension-upgrading fusion module, the output end of the 1×1 convolutional layer is also connected to the first dimension reduction processing module, the input end of the splicing unit is also connected to the output end of the first C3 True module in the backbone network, the output end of the C3 False module is respectively connected to the first dimension reduction processing module and the head network, the 1×1 convolutional layer is used to perform a 1×1 convolution operation on the input features, the upsampling unit is used to upsample the input features, the splicing unit is used to perform a splicing operation on the input features, the C3 False module includes three convolutional layers connected in sequence, and the C3False module is used for feature fusion; The first dimensionality reduction processing module includes a 3×1 convolutional layer, a deep reshaping sampling module, a splicing unit and a C3 False module connected in sequence, the input end of the 3×1 convolutional layer is connected to the output end of the C3 False module in the second dimensionality increase fusion module, the input end of the splicing unit is also connected to the output end of the 1×1 convolutional layer in the second dimensionality increase fusion module, the output end of the C3 False module is respectively connected to the second dimensionality reduction processing module and the head network, the 3×1 convolutional layer is used to perform a 3×1 convolution operation on the input features, the deep reshaping sampling module is used to downsample the input features on the basis of retaining the target's own features, the splicing unit is used to perform a splicing operation on the input features, the C3 False module includes three convolutional layers connected in sequence, and the C3 False module is used for feature fusion; The second dimensionality reduction processing module includes a C3 False module, a splicing unit, a deep reshaping sampling module and a 3×1 convolutional layer connected in sequence. The input end of the C3 False module is connected to the output end of the C3 False module in the first dimensionality reduction processing module. The input end of the splicing unit is also connected to the output end of the 1×1 convolutional layer in the first dimensionality increase fusion module. The output end of the 3×1 convolutional layer is connected to the head network. The C3 False module includes three convolutional layers connected in sequence. The C3 False module is used for feature fusion. The splicing unit is used to perform a splicing operation on the input features. The deep reshaping sampling module is used to downsample the input features while retaining the target's own features. The 3×1 convolutional layer is used to perform a 3×1 convolution operation on the input features.
7. The method for detecting small targets in aerial images based on the improved YOLO algorithm according to claim 6, characterized in that: The head network includes: a classification branch and a regression branch arranged in parallel, the classification branch is used to predict and output the category of the target according to the features input by the neck network, and the regression branch is used to predict and output the target frame position and confidence of the target according to the features input by the neck network.
8. The method for detecting small targets in aerial images based on the improved YOLO algorithm according to claim 7, characterized in that: The classification branches include: A first 3×3 convolutional layer, an input end of which is connected to a plurality of outputs of the neck network, an output end of the first 3×3 convolutional layer is connected to an input end of a second 3×3 convolutional layer, and the first 3×3 convolutional layer is used to perform a 3×3 convolution operation on input features and output the obtained features; The output end of the second 3×3 convolutional layer is connected to the input end of the first 1×1 convolutional layer, and is used to perform a 3×3 convolution operation on the input features and output the obtained features; The first 1×1 convolution layer is used to perform a 1×1 convolution operation on the input features to obtain the category of the target and output it.
9. The method for detecting small targets in aerial images based on the improved YOLO algorithm according to claim 8, characterized in that: The regression branch includes: A third 3×3 convolutional layer, an input end of which is connected to a plurality of outputs of the neck network, an output end of the third 3×3 convolutional layer is connected to an input end of a fourth 3×3 convolutional layer, and the third 3×3 convolutional layer is used to perform a 3×3 convolution operation on input features and output the obtained features; The output end of the fourth 3×3 convolutional layer is respectively connected to the input end of the second 1×1 convolutional layer and the input end of the third 1×1 convolutional layer, and is used to perform a 3×3 convolution operation on the input features and output the obtained features; The second 1×1 convolution layer is used to perform a 1×1 convolution operation on the input features to obtain the target frame position of the target and output it; The third 1×1 convolution layer is used to perform a 1×1 convolution operation on the input features to obtain the confidence of the target and output it.
10. The method for detecting small targets in aerial images based on the improved YOLO algorithm according to claim 1, characterized in that: The target detection network model is pre-trained in the following way: Acquire a training data set, the training data including aerial images and categories and location information of targets in the aerial images; Preprocessing the training data in the training data set so that the preprocessed training data conforms to the usage format of the target detection network model; The target detection network model is trained by taking the aerial image of the training data in the training data set as input and taking the category and position information of the target corresponding to the input aerial image as output.
Citation Information
Cited By
SAR ship detection method based on distance compression domain characteristic guidance
CN120652469A