Aerial image detection method and device, computer equipment and storage medium

By introducing LSKBlock and HorBlock modules into the YOLO V8 network, dynamically adjusting the receptive field and advanced analysis, the problem of low aerial image detection accuracy of drones is solved, and more accurate identification of small targets is achieved.

CN119131618APending Publication Date: 2024-12-13SOUTH CHINA NORMAL UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410957876.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-17
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

The existing YOLO V8 algorithm is difficult to recognize small target images during high altitude flight, resulting in low aerial image detection accuracy of drones.

Method used

Add LSKBlock module to the backbone network, and replace the C2f module connected to the LSKBlock module with the HorBlock module, dynamically adjust the receptive field of the network model, enhance the feature extraction ability of aerial image data of different sizes, and through advanced spatial analysis and attention mechanism Improve detection accuracy.

Benefits of technology

It improves the accuracy of aerial image detection, can more effectively extract rich features and deep details of images of different sizes, and enhances the ability to identify small objects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119131618A_ABST
    Figure CN119131618A_ABST
Patent Text Reader

Abstract

The invention relates to an aerial image detection method, which comprises the following steps of: sequentially performing convolution, receptive field expansion and high-order spatial analysis on aerial image data to obtain a first feature map; sequentially performing convolution, receptive field expansion and high-order space analysis on the first feature map to obtain a second feature map; sequentially carrying out convolution and conversion fusion on the second feature map to obtain a third feature map; sequentially carrying out convolution, conversion fusion and pooling fusion on the third feature graph to obtain a fourth feature graph; and fusing the plurality of feature maps for detection, and outputting a target detection result. According to the aerial image detection method, feature extraction can be carried out on aerial image data of different sizes, rich features and deep detail features of the aerial image data of different sizes are obtained, and therefore the detection precision of the aerial image is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image detection technology, and in particular to an aerial image detection method, device, computer equipment and storage medium. Background Art

[0002] With the development of remote sensing information technology, drones are playing a vital role in various fields. For example, drones can reach high altitudes and dangerous areas, and can be used for disaster relief searches, as well as urban planning, forest fire prevention, resource surveys, and border military reconnaissance. When drones are used in the above fields, it is necessary to identify and detect small target aerial images of drones, and use the detection results of aerial images to work.

[0003] In traditional technology, image detection is usually performed based on deep learning target detection algorithms. Deep learning-based target detection algorithms can be divided into single-stage target detection and dual-stage target detection. Single-stage target detection algorithms are more convenient for end-to-end industrial deployment due to their faster detection speed. As one of the most advanced single-stage target detection algorithms, YOLO V8 has achieved advanced results on many natural scene data sets. However, it is difficult to recognize small target images taken by drones at high altitudes. The existing YOLO V8 algorithm cannot adapt to the detection of drone aerial images containing a large number of small targets, resulting in low detection accuracy for drone aerial images. Summary of the invention

[0004] Based on this, the present invention provides an aerial image detection method, which adds an LSKBlock module in the backbone network and replaces the C2f module connected to the LSKBLock module with a HorBlock module. It can perform feature extraction on aerial image data of different sizes, obtain rich features and deep detail features of aerial image data of different sizes, improve the ability to extract image features, and thus improve the detection accuracy of aerial images.

[0005] In one embodiment, the present invention provides an aerial image detection method, comprising: S1, extracting features from aerial image data to obtain a plurality of feature maps; S2, fusing the plurality of feature maps to obtain a plurality of fused feature maps; S3, detecting the plurality of fused feature maps and outputting target detection results;

[0006] Wherein, the S1 includes:

[0007] S11: performing convolution, expanding the receptive field, and high-order spatial analysis on the aerial image data in sequence to obtain a first feature map;

[0008] S12: performing convolution, expanding the receptive field, and high-order spatial analysis on the first feature map in sequence to obtain a second feature map;

[0009] S13: performing convolution, conversion and fusion on the second feature map in sequence to obtain a third feature map;

[0010] S14: performing convolution, conversion fusion and pooling fusion on the third feature map in sequence to obtain a fourth feature map.

[0011] Further, the S2 includes:

[0012] S21: performing feature fusion on the fourth feature map and the third feature map to obtain a first fused feature map;

[0013] S22: performing feature fusion on the first fused feature map and the second feature map to obtain a second fused feature map;

[0014] S23: performing feature fusion and attention mechanism processing on the second fused feature map and the first feature map to obtain a third fused feature map;

[0015] S24: performing feature fusion and attention mechanism processing on the third fused feature map and the second fused feature map to obtain a fourth fused feature map;

[0016] S25: performing feature fusion on the fourth fused feature map and the first fused feature map to obtain a fifth fused feature map;

[0017] S26: Perform feature fusion on the fifth fused feature map and the fourth feature map to obtain a sixth fused feature map.

[0018] Further, the S23 includes:

[0019] S231: performing upsampling processing on the second fused feature map to obtain a third sampling result;

[0020] S232: After performing feature fusion processing on the third sampling result and the first feature map, and performing attention mechanism processing, the third fused feature map is obtained;

[0021] The S24 includes:

[0022] S241: performing convolution processing on the third fused feature map to obtain a sixth convolution result;

[0023] S242: After performing feature fusion processing on the sixth convolution result and the second fused feature map, and performing attention mechanism processing, a fourth fused feature map is obtained.

[0024] In one embodiment, the present invention provides an aerial image detection device, comprising:

[0025] The backbone network is used to extract features from the aerial image data and obtain several feature maps;

[0026] The neck network is used to fuse several feature maps to obtain several fused feature maps;

[0027] The head network is used to detect several fused feature maps and output the target detection results;

[0028] The backbone network includes:

[0029] A first feature extraction unit is used to perform convolution, expand the receptive field, and perform high-order spatial analysis on the aerial image data in sequence to obtain a first feature map;

[0030] A second feature extraction unit is used to perform convolution, expand the receptive field, and perform high-order spatial analysis on the first feature map in sequence to obtain a second feature map;

[0031] A third feature extraction unit is used to perform convolution, conversion and fusion on the second feature map in sequence to obtain a third feature map;

[0032] The fourth feature extraction unit is used to perform convolution, conversion fusion and pooling fusion on the third feature map in sequence to obtain a fourth feature map.

[0033] Furthermore, the first feature extraction unit includes a first convolutional layer, a second convolutional layer, a first LSKBlock module and a first HorBlock module connected in sequence; the aerial image data is sequentially convolved by the first convolutional layer and the second convolutional layer, and then sequentially expanded by the first LSKBlock module to expand the receptive field, and high-order spatial analysis is performed by the first HorBlock module to obtain the first feature map;

[0034] The second feature extraction unit includes a third convolutional layer, a second LSKBlock module and a second HorBlock module connected in sequence; the first feature map is convolved through the third convolutional layer, and then the receptive field is expanded through the second LSKBlock module in sequence, and a high-order spatial analysis is performed through the second HorBlock module to obtain the second feature map.

[0035] Further, the neck network includes a first feature fusion unit, a second feature fusion unit, a third feature fusion unit, a fourth feature fusion unit, a fifth feature fusion unit and a sixth feature fusion unit which are connected in sequence;

[0036] The first feature fusion unit is used to perform feature fusion on the fourth feature map and the third feature map to obtain a first fused feature map;

[0037] The second feature fusion unit is used to perform feature fusion on the first fused feature map and the second feature map to obtain a second fused feature map;

[0038] The third feature fusion unit is used to perform feature fusion and attention mechanism processing on the second fused feature map and the first feature map to obtain a third fused feature map;

[0039] The fourth feature fusion unit is used to perform feature fusion and attention mechanism processing on the third fused feature map and the second fused feature map to obtain a fourth fused feature map;

[0040] The fifth feature fusion unit is used to perform feature fusion on the fourth fused feature map and the first fused feature map to obtain a fifth fused feature map;

[0041] The sixth feature fusion unit is used to perform feature fusion on the fifth fused feature map and the fourth feature map to obtain a sixth fused feature map.

[0042] Further, the third feature fusion unit includes a third sampling layer, a third fusion layer, a fifth C2f module and a first attention mechanism module connected in sequence; the third sampling layer is used to perform upsampling processing on the second fused feature map to obtain a third sampling result, the third fusion layer and the fifth C2f module are used to perform feature fusion processing on the third sampling result and the first feature map, and the first attention mechanism module is used to perform attention mechanism processing on the result after the feature fusion processing to obtain a third fused feature map;

[0043] The fourth feature fusion unit includes a sixth convolutional layer, a fourth fusion layer, a sixth C2f module and a second attention mechanism module connected in sequence; the sixth convolutional layer is used to perform convolution processing on the third fusion feature map to obtain a sixth convolution result, the fourth fusion layer and the sixth C2f module are used to perform feature fusion processing on the sixth convolution result and the second fusion feature map, and the second attention mechanism module is used to perform attention mechanism processing on the result after feature fusion processing to obtain a fourth fusion feature map.

[0044] Furthermore, the head network includes a first detection head, a second detection head, a third detection head and a fourth detection head; the first detection head is used to perform target detection on the third fused feature map and output the corresponding detection result; the second detection head is used to perform target detection on the fourth fused feature map and output the corresponding detection result; the third detection head is used to perform target detection on the fifth fused feature map and output the corresponding detection result; the fourth detection head is used to perform target detection on the sixth fused feature map and output the corresponding detection result.

[0045] In one embodiment, the present invention further provides a computer device, including a processor and a memory, wherein the memory stores a computer program, and is characterized in that the processor is used to implement the detection method provided in the above embodiment when executing the computer program.

[0046] In one embodiment, the present invention further provides a computer-readable storage medium, characterized in that a computer program is stored thereon, and when the computer program is executed by a processor, the processor implements the detection method provided in the above embodiment.

[0047] Compared with the prior art, the aerial image detection method described in the present invention is implemented based on an improved YOLOV8 network model. By adding an LSKBlock module to the backbone network, the receptive field of the network model is dynamically adjusted to enhance the network model's ability to perceive different areas of the input aerial image data; at the same time, the C2f module connected to the LSKBLock module is replaced with a HorBlock module, and after extracting rich image features of different sizes, the HorBlock module can be used to further extract deep image features of the aerial image data, thereby reducing the spatial resolution of the aerial image and increasing the depth of the features. Therefore, the above-mentioned aerial image detection method of the present invention can perform feature extraction on aerial image data of different sizes, obtain rich features and deep detail features of aerial image data of different sizes, improve the ability to extract image features, and thus improve the detection accuracy of aerial images.

[0048] For better understanding and implementation, the present invention is described in detail below with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 A schematic diagram of the structure of an aerial image detection device according to an embodiment of the present invention;

[0050] Figure 2 A schematic diagram of a flow chart of an aerial image detection method according to an embodiment of the present invention;

[0051] Figure 3 A schematic diagram of an improved YOLOV8 network model according to an embodiment of the present invention;

[0052] Figure 4 This is a schematic diagram of the structure of the LSKBlock module in one embodiment of the present invention;

[0053] Figure 5 Schematic diagram of the structure of the HorBlock module in one embodiment of the present invention;

[0054] Figure 6 This is a schematic diagram of the structure of the Sea Attention module in one embodiment of the present invention;

[0055] Figure 7 A schematic diagram of the framework of an aerial image detection device after adding a small target detection head in one embodiment of the present invention. DETAILED DESCRIPTION

[0056] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0057] In order to solve the problem of low detection accuracy of existing drone aerial images, the present invention applies the receptive field mechanism, high-order analysis mechanism and attention mechanism to aerial image target detection without significantly increasing the number of algorithm parameters. The extracted aerial image features are converted to adapt to receptive fields of different sizes, and high-order analysis and feature fusion are performed on the processed feature matrix. At the same time, attention analysis is performed on the fused feature matrix, so as to obtain high-resolution aerial image features. Target detection is performed based on the high-resolution aerial image features, thereby further improving the detection accuracy.

[0058] See also Figure 1 and Figure 2 ,in, Figure 1 is a schematic structural diagram of the aerial image detection device of the present invention, Figure 2 for Figure 1 The flowchart of the detection method performed by the aerial image detection device shown is shown. It can be understood that the aerial image detection device is implemented using the improved YOLO V8 network model of this embodiment, which includes a backbone network, a neck network and a head network; the backbone network is used to perform step S1 to extract features from the aerial image data to obtain a number of feature maps; the neck network is used to perform step S2 to fuse a number of feature maps to obtain a number of fused feature maps; the head network is used to perform step S3 to detect a number of fused feature maps and output target detection results. Please refer to Figure 3 , a schematic diagram of the improved YOLO V8 network model is given.

[0059] Specifically, the backbone network includes a first feature extraction unit, a second feature extraction unit, a third feature extraction unit and a fourth feature extraction unit connected in sequence:

[0060] The first feature extraction unit is used to execute step S11: sequentially perform convolution, expand the receptive field, and perform high-order spatial analysis on the aerial image data to obtain a first feature map;

[0061] The first feature extraction unit includes a first convolution layer, a second convolution layer, a first LSKBlock module and a first HorBlock module connected in sequence. After the aerial image data undergoes two convolution operations, it is sequentially processed by the first LSKBlock module to expand the receptive field, and the first HorBlock module performs high-order spatial analysis to obtain a first feature map.

[0062] For further information, see Figure 4 , a schematic diagram of the structure of the LSKBlock (Large Selective Kernel) module is given. The above-mentioned LSKBlock (Large Selective Kernel) module includes a LK Selection submodule and a feedforward network FFN submodule connected in sequence, wherein the LK Selection submodule includes a large Kernel convolution layer and a spatial Kernel selection mechanism, and the feedforward network FFN submodule includes a first fully connected layer (FC), a deep convolution (DW-Conv), a GELU activation function and a second fully connected layer (FC) connected in sequence. After two convolution operations, the aerial image data is sequentially subjected to deep convolution by a large Kernel convolution layer, and then subjected to spatial pooling by a spatial Kernel selection mechanism to obtain a first intermediate feature map. The first intermediate feature map is sequentially subjected to feature fusion by a first fully connected layer, a deep convolution (DW-Conv), a GELU activation function and a second fully connected layer (FC) to obtain a second intermediate feature map. In this embodiment, by adjusting the parameters in the LSKBlock module (such as the convolution kernel size, the expansion rate, the number of depth convolutions, etc.), it is possible to adapt to target detection tasks in aerial images of different sizes and improve the feature extraction capability of the improved YOLOV 8 network model for aerial image data.

[0063] For further information, see Figure 5 , a schematic diagram of the structure of the HorBlock module is given. The HorBlock module includes a gnConv layer, a normalization layer Layer Norm, an MLP feedforward network, and an FFN feedforward network connected in sequence. The second intermediate feature map after the receptive field is expanded by the LSKBlock module is convolved and normalized in sequence by the gnConv layer, the normalization layer Layer Norm, the MLP feedforward network, and the FFN feedforward network to obtain the first feature map after high-order spatial interaction.

[0064] In this embodiment, the aerial image data is the original aerial image data after preprocessing, and the size is 640x640 and the number of channels is 3. Then the aerial image data is processed twice by the first feature extraction unit to generate a feature map with a size of 160x160 and a number of channels of 128. After the first LSKBlock module dynamically adjusts its internal structure and then undergoes high-order spatial interaction, the generated first feature map can adapt to receptive fields of different sizes.

[0065] A second feature extraction unit is used to execute step S12: performing convolution, expanding the receptive field, and high-order spatial analysis on the first feature map in sequence to obtain a second feature map;

[0066] Specifically, the second feature extraction unit includes a third convolution layer, a second LSKBlock module and a second HorBlock module connected in sequence. After the first feature map is convolutionally processed, the receptive field is enlarged by the second LSKBlock module, and a high-order spatial analysis is performed by the second HorBlock module to obtain the second feature map.

[0067] In this embodiment, the first feature map with a size of 160x160 and 128 channels is convolved to generate a feature map with a size of 80x80 and 256 channels. The internal structure of the feature map is dynamically adjusted by the second LSKBlock module, and then the high-order spatial interaction is performed to generate a second feature map that is enhanced to adapt to receptive fields of different sizes.

[0068] A third feature extraction unit is used to execute step S13: sequentially convolve, transform and fuse the second feature map to obtain a third feature map;

[0069] Specifically, the third feature extraction unit includes a fourth convolution layer and a first C2f module connected in sequence. After the second feature map is convolved by the fourth convolution layer, it is converted and fused by the first C2f module to obtain a third feature map.

[0070] In this embodiment, the second feature map with a size of 80x80 and a number of channels of 256 is convolved to generate a feature map with a size of 40x40 and a number of channels of 512x512. The feature map is converted and fused by the first C2f module to generate a third feature map.

[0071] The fourth feature extraction unit is used to execute step S14: sequentially perform convolution, conversion fusion and pooling fusion on the third feature map to obtain a fourth feature map.

[0072] Specifically, the fourth feature extraction unit includes a fifth convolutional layer, a second C2f module, and an SPPF (Spatial Pyramid Pooling-Fast) pooling module connected in sequence. After the third feature map is subjected to the convolution operation, the feature fusion of the second C2f module and the SPPF pooling module is performed to obtain the fourth feature map.

[0073] In this embodiment, the third feature map with a size of 40x40 and a channel number of 512x512 is convolved to generate a feature map with a size of 20x20 and a channel number of 1024x1024. The feature map is converted and fused by the second C2f module, and then pooled and fused by the SPPF module to generate the fourth feature map.

[0074] In this embodiment, an LSKBlock module is added to the backbone network to dynamically adjust the receptive field of the network model, thereby enhancing the network model's ability to sense different areas of the input aerial image data; at the same time, by replacing the C2f module connected to the LSKBLock module with the HorBlock module, after extracting rich image features of different sizes, the HorBlock module can be used to further extract deep image features of the aerial image data, gradually reducing the spatial resolution of the aerial image and increasing the depth of the features. Therefore, through the backbone network provided above, it is possible to extract features of aerial image data of different sizes, obtain rich features and deep detail features of aerial image data of different sizes, improve the ability to extract image features, and thus improve the detection accuracy of aerial images.

[0075] Further, the neck network includes a first feature fusion unit, a second feature fusion unit, a third feature fusion unit, a fourth feature fusion unit, a fifth feature fusion unit and a sixth feature fusion unit connected in sequence:

[0076] A first feature fusion unit is used to execute step S21: perform feature fusion on the fourth feature map and the third feature map to obtain a first fused feature map;

[0077] Specifically, the first fusion unit includes a first sampling layer, a first fusion layer and a third C2f module connected in sequence. The first sampling layer upsamples the fourth feature map to obtain a first sampling result. The first fusion layer receives the third feature map, performs feature fusion processing on the first sampling result and the third feature unit, and then obtains the first fused feature map through convolution processing of the third C2 module.

[0078] A second feature fusion unit is used to execute step S22: perform feature fusion on the first fused feature map and the second feature map to obtain a second fused feature map;

[0079] Specifically, the second feature fusion unit includes a second sampling layer, a second fusion layer and a fourth C2f module connected in sequence. The second sampling layer upsamples the first fused feature map to obtain a second sampling result. The second fusion layer receives the second feature map, performs feature fusion processing on the second sampling result and the second feature map, and then obtains the second fused feature map through convolution processing of the fourth C2 module.

[0080] A third feature fusion unit is used to execute step S23: perform feature fusion and attention mechanism processing on the second fused feature map and the first feature map to obtain a third fused feature map;

[0081] Specifically, the third feature fusion unit includes a third sampling layer, a third fusion layer, a fifth C2f module and a first attention mechanism module connected in sequence. The third sampling layer upsamples the second fused feature map to obtain a third sampling result. The third fusion layer receives the first feature map, and performs feature fusion processing on the third sampling result and the first feature map, and then processes the third fused feature map through the attention mechanism of the first attention mechanism module to obtain a third fused feature map.

[0082] The fourth feature fusion unit is used to execute step S24: perform feature fusion and attention mechanism processing on the third fused feature map and the second fused feature map to obtain a fourth fused feature map;

[0083] Specifically, the fourth feature fusion unit includes a sixth convolutional layer, a fourth fusion layer, a sixth C2f module and a second attention mechanism module connected in sequence. The sixth convolutional layer performs convolution processing on the third fusion feature map to obtain a sixth convolution result. The fourth fusion layer receives the second fusion feature map, and performs feature fusion processing on the sixth convolution result and the second fusion feature map, and then processes them through the attention mechanism of the second attention mechanism module to obtain a fourth fusion feature map.

[0084] A fifth feature fusion unit, configured to execute step S25: performing feature fusion on the fourth fused feature map and the first fused feature map to obtain a fifth fused feature map;

[0085] Specifically, the fifth feature fusion unit includes a seventh convolutional layer, a fifth fusion layer and a seventh C2f module connected in sequence. The seventh convolutional layer performs convolution processing on the fourth fusion feature map to obtain a seventh convolution result. The fifth fusion layer receives the first fusion feature map, performs feature fusion processing on the seventh convolution result and the first fusion feature map, and extracts features through the seventh C2f module to obtain the fifth fusion feature map.

[0086] The sixth feature fusion unit is used to execute step S26: perform feature fusion on the fifth fused feature map and the fourth feature map to obtain a sixth fused feature map;

[0087] Specifically, the sixth feature fusion unit includes a sixth fusion layer and an eighth C2f module connected in sequence. The sixth fusion layer receives the fourth feature map and the fifth fused feature map, fuses the fifth fused feature map and the fourth feature map, and extracts features through the eighth C2f module to obtain the sixth fused feature map.

[0088] Among them, each sampling layer Upsample amplifies the low-resolution image features to a higher resolution, which can capture more detail information, thereby improving the detection accuracy of small targets. By upsampling the image features, the feature information of different scales can be fused, so that the aerial image detection device can take into account both the global context and local details when performing target detection, further enhancing the aerial image detection device's ability to recognize small objects. Each attention mechanism module Sea Attention combines axial attention (Axial Attention) and detail enhancement (DetailEnhancement), compressing the input image features along the horizontal or vertical axis to reduce computational complexity and retain global information. Then, local details are enhanced through depthwise separable convolution to further compensate for the information lost during the compression process. Please refer to Figure 6 , a structural diagram of the attention mechanism module Sea Attention module is given.

[0089] Therefore, in this embodiment, the neck network fuses the feature maps of different scales output by the backbone network to achieve the ability to recognize small target objects in aerial images; at the same time, by setting the attention mechanism module SeaAttention in the neck network, the computational complexity and memory requirements are effectively reduced, so that the computational complexity can be further reduced while improving the accuracy of drone aerial images.

[0090] The head network is used to execute step S3: respectively perform target detection on the third fused feature map, the fourth fused feature map, the fifth fused feature map and the sixth fused feature map, and output respective detection results.

[0091] Furthermore, the head network includes a first detection head, a second detection head, a third detection head and a fourth detection head, wherein the first detection head is a small target detector head, used to perform target detection on the third fused feature map and output the corresponding detection result; the second detection head is used to perform target detection on the fourth fused feature map and output the corresponding detection result; the third detection head is used to perform target detection on the fifth fused feature map and output the corresponding detection result; the fourth detection head is used to perform target detection on the sixth fused feature map and output the corresponding detection result.

[0092] For further information, please refer to Figure 7 , the neck network includes four detection heads: Tiny-head, Small-head, Mid-head, and Tiny-head. In the traditional YOLO network model, the backbone network Bone generates five different levels of feature maps Pi (P1 to P5) through five downsampling processes, where Pi represents 1 / 2i resolution relative to the original image; the neck network Neck uses top-down and bottom-up paths to achieve multi-scale fusion of features. However, this traditional YOLO network model does not change the scale of the feature map. The final detection of the network model is performed after the features are processed by the P3, P4, and P5 layers, and their feature maps correspond to the sizes of 80×80, 40×40, and 20×20 pixels, respectively.

[0093] Therefore, the improved YOLOV8 network model used in the aerial image detection device provided in this embodiment further adds a small target detection head Tiny-head based on the P2 layer feature on the basis of the traditional YOLOV8 network model. The resolution of the P2 layer detection head is 160×160 pixels, so it can retain more underlying feature information of the target. The fused feature maps of different sizes obtained after multiple fusion processes in the neck network are input into the head network. By performing target detection on the fused feature maps of different levels through different detection heads, target objects of different sizes can be captured, thereby realizing target detection of small target aerial images taken by drones and improving the detection accuracy of aerial image data.

[0094] Compared with the prior art, in this embodiment, the present invention applies a dynamic receptive field mechanism, high-order analysis, and attention analysis mechanism to aerial image target detection, which can capture more underlying features in the aerial images; at the same time, a small target detection head is added to be able to perform target detection on aerial image feature maps of different sizes, and while improving the detection accuracy of aerial images, it further reduces the amount of calculation and improves detection efficiency.

[0095] Furthermore, in order to improve the detection accuracy of aerial images, the present invention also trains the improved YOLO V8 network model used in the above-mentioned aerial image detection device. Before training, a training data set needs to be established.

[0096] The training data set is obtained in the following way:

[0097] (1) Using original aerial image data.

[0098] Specifically, a drone can be used to collect the original aerial image dataset VisDrone.

[0099] (2) Preprocessing the original aerial image data, including scaling, cropping and splicing.

[0100] First, the original aerial images are scaled and adjusted to a uniform size of 640×640, and then these resized aerial images are cropped, split, and reassembled to form a new aerial image. The new aerial image data formed by cutting and reassembling the aerial image data can significantly increase the diversity of the aerial image data. At the same time, when the new aerial image data is used as a training data set to train the aerial image detection model, the adaptability of the aerial image detection model to different scenes, different targets, and background complexity can be improved.

[0101] (3) Divide the preprocessed aerial image data into training set, test set, and validation set.

[0102] Specifically, after the original aerial image data is preprocessed, the original image after preprocessing is divided into a training set, a test set, and a validation set. For example, assuming that 10,209 original aerial image data can be collected, the original aerial image data is divided into 6,471 training sets, 548 validation sets, and 3,190 test sets. Among them, the training set can be further divided into multiple different training subsets, and the aerial image detection model is trained by multiple different training sets. The validation set is the aerial image data annotated by professionals, which can include 10 types of targets (pedestrians, people, bicycles, cars, trucks, trucks, tricycles, awning tricycles, buses, cars). The test set is used to evaluate the performance of the improved YOLO V8 network model determined after optimization. The aerial image data in multiple different training subsets are respectively input into the initial improved YOLO V8 network model, and the trainable parameters of the backbone network, the neck network, and the head network are trained to obtain multiple initially trained improved YOLO V8 network models. Then set the parameters corresponding to the model. Preferably, set the maximum number of iterations to 400, the batch size to 4, the learning rate to 0.01, the optimizer to SGD, the momentum to 0.9, and the input size of the training aerial image data to 640×640. Then input the validation set into multiple initially trained improved YOLO V8 network models to select the best performing model from multiple initially trained aerial image detection models as the trained model. If the expected effect is not achieved, re-divide the training set, validation set, and test set, and repeat the training and evaluation until the model performance reaches the expected effect.

[0103] Furthermore, in order to improve the detection accuracy of aerial images, the present invention also evaluates the performance of the improved YOLO V8 network model used in the above-mentioned aerial image detection device. Specifically, the performance of the model is evaluated by calculating the precision and recall rate of the improved YOLO V8 network model used.

[0104] Specifically, precision refers to the ratio of the number of real targets to the total number of detected targets among all detected targets, reflecting the correct prediction ratio of the model on all samples, and can provide a macro perspective to evaluate the performance of the model. Recall refers to the ratio of the number of detected targets to the total number of real targets among all real targets. The specific calculation formula is:

[0105]

[0106] Among them, TP stands for true positive examples, that is, the number of targets correctly detected in the test results; FP stands for false positive examples, that is, the number of targets incorrectly detected in the test results. FN stands for false negative examples, that is, the number of targets not detected among the correct targets.

[0107] Based on the same inventive concept, the present invention also provides a computer device, which may be a terminal device such as a server, a desktop computing device or a mobile computing device (e.g., a laptop computing device, a handheld computing device, a tablet computer, a netbook, etc.). The device includes one or more processors and a memory, wherein the processor is used to implement the aerial image detection method described in the above embodiment when executing the program; and the memory is used to store the computer program executable by the processor.

[0108] Based on the same inventive concept, the present invention also provides a computer storage medium, on which a computer program is stored, and when the program is executed by a processor, the steps of the aerial image detection method recorded in the above embodiment are implemented.

[0109] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0110] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.

Claims

1. A method for detecting aerial images, comprising: S1, extracting features from the aerial image data to obtain several feature maps; S2, fuse several feature maps to obtain several fused feature maps; S3, detects several fused feature maps and outputs target detection results; Characterized in that, the S1 comprises: S11: performing convolution, expanding the receptive field, and high-order spatial analysis on the aerial image data in sequence to obtain a first feature map; S12: performing convolution, expanding the receptive field, and high-order spatial analysis on the first feature map in sequence to obtain a second feature map; S13: performing convolution, conversion and fusion on the second feature map in sequence to obtain a third feature map; S14: performing convolution, conversion fusion and pooling fusion on the third feature map in sequence to obtain a fourth feature map.

2. The detection method according to claim 1, characterized in that: The S2 includes: S21: performing feature fusion on the fourth feature map and the third feature map to obtain a first fused feature map; S22: performing feature fusion on the first fused feature map and the second feature map to obtain a second fused feature map; S23: performing feature fusion and attention mechanism processing on the second fused feature map and the first feature map to obtain a third fused feature map; S24: performing feature fusion and attention mechanism processing on the third fused feature map and the second fused feature map to obtain a fourth fused feature map; S25: performing feature fusion on the fourth fused feature map and the first fused feature map to obtain a fifth fused feature map; S26: Perform feature fusion on the fifth fused feature map and the fourth feature map to obtain a sixth fused feature map.

3. The detection method according to claim 2, characterized in that: The S23 includes: S231: performing upsampling processing on the second fused feature map to obtain a third sampling result; S232: After performing feature fusion processing on the third sampling result and the first feature map, and performing attention mechanism processing, the third fused feature map is obtained; The S24 includes: S241: performing convolution processing on the third fused feature map to obtain a sixth convolution result; S242: After performing feature fusion processing on the sixth convolution result and the second fused feature map, and performing attention mechanism processing, a fourth fused feature map is obtained.

4. An aerial image detection device, characterized in that: include: The backbone network is used to extract features from the aerial image data and obtain several feature maps; The neck network is used to fuse several feature maps to obtain several fused feature maps; The head network is used to detect several fused feature maps and output the target detection results; The backbone network includes: A first feature extraction unit is used to perform convolution, expand the receptive field, and perform high-order spatial analysis on the aerial image data in sequence to obtain a first feature map; A second feature extraction unit is used to perform convolution, expand the receptive field, and perform high-order spatial analysis on the first feature map in sequence to obtain a second feature map; A third feature extraction unit is used to perform convolution, conversion and fusion on the second feature map in sequence to obtain a third feature map; The fourth feature extraction unit is used to perform convolution, conversion fusion and pooling fusion on the third feature map in sequence to obtain a fourth feature map.

5. The detection device according to claim 4, characterized in that: The first feature extraction unit includes a first convolution layer, a second convolution layer, a first LSKBlock module and a first HorBlock module connected in sequence; the aerial image data is sequentially convolutionally processed by the first convolution layer and the second convolution layer, and then sequentially processed by the first LSKBlock module to expand the receptive field and the first HorBlock module to perform high-order spatial analysis to obtain the first feature map; The second feature extraction unit includes a third convolutional layer, a second LSKBlock module and a second HorBlock module connected in sequence; the first feature map is convolved through the third convolutional layer, and then sequentially through the second LSKBlock module to expand the receptive field and the second HorBlock module to perform high-order spatial analysis to obtain the second feature map.

6. The detection device according to claim 5, characterized in that: The neck network includes a first feature fusion unit, a second feature fusion unit, a third feature fusion unit, a fourth feature fusion unit, a fifth feature fusion unit and a sixth feature fusion unit connected in sequence; The first feature fusion unit is used to perform feature fusion on the fourth feature map and the third feature map to obtain a first fused feature map; The second feature fusion unit is used to perform feature fusion on the first fused feature map and the second feature map to obtain a second fused feature map; The third feature fusion unit is used to perform feature fusion and attention mechanism processing on the second fused feature map and the first feature map to obtain a third fused feature map; The fourth feature fusion unit is used to perform feature fusion and attention mechanism processing on the third fused feature map and the second fused feature map to obtain a fourth fused feature map; The fifth feature fusion unit is used to perform feature fusion on the fourth fused feature map and the first fused feature map to obtain a fifth fused feature map; The sixth feature fusion unit is used to perform feature fusion on the fifth fused feature map and the fourth feature map to obtain a sixth fused feature map.

7. The detection device according to claim 6, characterized in that: The third feature fusion unit includes a third sampling layer, a third fusion layer, a fifth C2f module and a first attention mechanism module connected in sequence; the third sampling layer is used to perform upsampling processing on the second fused feature map to obtain a third sampling result, the third fusion layer and the fifth C2f module are used to perform feature fusion processing on the third sampling result and the first feature map, and the first attention mechanism module is used to perform attention mechanism processing on the result after the feature fusion processing to obtain a third fused feature map; The fourth feature fusion unit includes a sixth convolutional layer, a fourth fusion layer, a sixth C2f module and a second attention mechanism module connected in sequence; the sixth convolutional layer is used to perform convolution processing on the third fusion feature map to obtain a sixth convolution result, the fourth fusion layer and the sixth C2f module are used to perform feature fusion processing on the sixth convolution result and the second fusion feature map, and the second attention mechanism module is used to perform attention mechanism processing on the result after feature fusion processing to obtain a fourth fusion feature map.

8. The detection device according to claim 7, characterized in that: The head network includes a first detection head, a second detection head, a third detection head and a fourth detection head; the first detection head is used to perform target detection on the third fused feature map and output the corresponding detection result; the second detection head is used to perform target detection on the fourth fused feature map and output the corresponding detection result; the third detection head is used to perform target detection on the fifth fused feature map and output the corresponding detection result; the fourth detection head is used to perform target detection on the sixth fused feature map and output the corresponding detection result.

9. A computer device comprising a processor and a memory, wherein the memory stores a computer program, characterized in that: The processor is used to implement the detection method described in any one of claims 1 to 3 when executing a computer program.

10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the processor executes the detection method according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Aerial photography target detection method based on attention mechanism and adaptive feature fusion

    CN116524379A

  • Improved unmanned aerial vehicle aerial image dense and small target identification method, system and device based on YOLOv5s and medium

    CN117456389A

  • Improved YOLOv8 unmanned aerial vehicle aerial target detection method

    CN117557922A