Small target detection method and device based on unmanned aerial vehicle aerial image and electronic equipment

By improving the YOLOv11n model, introducing MSFAM and P2 detection layers, and combining them with IBDFPN, ​​the problems of accuracy and positioning precision in small target detection in UAV aerial images were solved, achieving more efficient target detection results.

CN121147503BActive Publication Date: 2026-03-27HEBEI SHANGYUN INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-23
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

The detection of small targets in drone aerial images is a challenge. Existing technologies have low detection accuracy in complex scenes, especially for small targets that are easy to miss and have low positioning accuracy.

Method used

An improved YOLOv11n model is adopted. By introducing MSFAM to replace the C3k2 module in the backbone feature extraction network, adding a P2 small target detection layer, and constructing an improved bidirectional dense feature pyramid network IBDFPN, ​​cross-level feature fusion and multi-scale target detection are achieved.

Benefits of technology

It significantly improves the accuracy and localization precision of small target detection, and enhances the model's detection performance in complex scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121147503B_ABST
    Figure CN121147503B_ABST
Patent Text Reader

Abstract

The application is suitable for the field of image recognition technology, and provides a small target detection method and device based on unmanned aerial vehicle aerial image and electronic equipment.The method comprises the following steps: acquiring training image data, converting the training image data into a preset format; constructing an improved YOLOv11n model, replacing the first two C3k2 in the main feature extraction network with MSFAM, adding a P2 small target detection layer in the detection head network and the feature enhancement extraction network, connecting the first MSFAM with the P2 small target detection layer, and connecting the two MSFAM, the first C3k2 and the C2PSA in the main feature extraction network with the improved bidirectional dense feature pyramid network respectively; dividing the training image data into a training data set, a verification data set and a test data set, and training the improved YOLOv11n model; inputting the image data to be detected into the improved YOLOv11n model after training, and obtaining the class and position of the small target.The detection performance of the application in a complex scene is relatively good, and the detection accuracy can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image recognition, and in particular to a small target detection method and device based on unmanned aerial vehicle aerial image and electronic equipment. BACKGROUND

[0002] In recent years, with the rapid development of target detection and unmanned aerial vehicle (UAV) technology, using unmanned aerial vehicle platform for target detection is a challenging and promising frontier topic in the field of computer vision. Unmanned aerial vehicles equipped with target detection algorithms are widely used in forest fire warning, intelligent transportation, power line detection, crop disease and pest detection, personnel search and rescue, and military operations. However, unlike images in natural scenes, unmanned aerial vehicle aerial images usually have large target size variation, high small target proportion, and complex environment. On the one hand, due to the high flight altitude of unmanned aerial vehicles and the wide field of view of the camera, the images captured by the camera often contain a large number of small targets and are densely distributed. On the other hand, when the unmanned aerial vehicle is in a downward shooting state, the distance between the target and the camera will cause the size of the near target to be larger and the size of the far target to be smaller, resulting in a significant change in the size of the target. The above two challenges make it difficult to directly apply the detection model designed for natural scenes to the unmanned aerial vehicle image target detection scene.

[0003] With the development of deep learning technology, the performance of small target detection has been continuously improved, providing a better solution for detecting small targets. Traditional small target detection methods have low detection accuracy for small targets in complex scenes. SUMMARY

[0004] Therefore, the embodiments of the present application provide a small target detection method and device based on unmanned aerial vehicle aerial image and electronic equipment, which can effectively improve the small target detection accuracy.

[0005] To achieve the above purpose, the technical scheme adopted by the present application is as follows:

[0006] In a first aspect, the embodiments of the present application provide a small target detection method based on unmanned aerial vehicle aerial image, comprising:

[0007] Obtaining training image data and converting the training image data into a preset format;

[0008] An improved YOLOv11n model is constructed, the improved YOLOv11n model comprising a backbone feature extraction network, a feature enhancement extraction network and a detection head network, MSFAM is used to replace the first two C3k2 in the backbone feature extraction network, a P2 small target detection layer is added in the detection head network and the feature enhancement extraction network, and the first MSFAM is connected with the P2 small target detection layer; the feature enhancement extraction network further comprises an improved bidirectional dense feature pyramid network, two MSFAMs, the first C3k2 and the C2PSA in the backbone feature extraction network are connected with the improved bidirectional dense feature pyramid network respectively, and hierarchical expansion and cross-layer connection optimization are performed through BiFPN2 and BiFPN3;

[0009] The training image data in the preset format is divided into a training data set, a verification data set and a test data set;

[0010] The training data set and the verification data set are used to train the improved YOLOv11n model, and the test data set is used to evaluate the improved YOLOv11n model;

[0011] The to-be-detected image data is input into the improved YOLOv11n model after training to obtain the class and position of the small target.

[0012] Based on the first aspect, in some embodiments, the backbone feature extraction network comprises a first Conv, a second Conv, a first MSFAM, a third Conv, a second MSFAM, a fourth Conv, a first C3k2, a fifth Conv, a second C3k2, an SPPF and a C2PSA connected in sequence, the first MSFAM is connected with the P2 small target detection layer, and the first MSFAM, the second MSFAM, the first C3k2 and the C2PSA are connected with the improved bidirectional dense feature pyramid network respectively.

[0013] Based on the first aspect, in some embodiments, the MSFAM comprises a main branch and a residual branch and a seventh 1×1 convolution module, and the input ends of the main branch and the residual branch are connected with the input end of the MSFAM;

[0014] The main branch comprises a first 1×1 convolution module, three sub-branches, a first splicing module and a fifth 1×1 convolution module, the first sub-branch comprises a first 3×3 convolution module and a second 1×1 convolution module connected in sequence, the second sub-branch comprises a first 5×5 convolution module and a third 1×1 convolution module connected in sequence, the third sub-branch comprises a fourth 1×1 convolution module, the output ends of the three sub-branches are connected with the first splicing module, and the output end of the first splicing module is connected with the fifth 1×1 convolution module;

[0015] The residual branch includes a sixth 1*1 convolution module, the output end of the sixth 1*1 convolution module and the output end of the fifth 1*1 convolution module are both connected with a second splicing module, the output end of the second splicing module is connected with the input end of a seventh 1*1 convolution module, the output end of the seventh 1*1 convolution module is connected with the output end of the MSFAM.

[0016] Based on the first aspect, in some embodiments, the P2 small target detection layer includes a third BIFPN2, a fifth C3k2, a fourth BIFPN2, a sixth C3k2 and a first Detect in the detection head network, the third BIFPN2, the fifth C3k2, the fourth BIFPN2 and the sixth C3k2 are connected in sequence, the output end of the sixth C3k2 is also connected with the first Detect, and the output end of the first MSFAM is connected with the third BIFPN2 and the fourth BIFPN2 respectively.

[0017] Based on the first aspect, in some embodiments, the improved bidirectional dense feature pyramid network includes a sixth Conv, a first Upsample, a first BIFPN2, a third C3k2, a second Upsample, a second BIFPN2, a fourth C3k2, a third Upsample, a third BIFPN2, a fifth C3k2, a fourth BIFPN2, a sixth C3k2, a seventh Conv, a first BIFPN3, a seventh C3k2, a fifth BIFPN2, an eighth C3k2, an eighth Conv, a second BIFPN3, a ninth C3k2, a sixth BIFPN2, a tenth C3k2, a ninth Conv, a seventh BIFPN2, an eleventh C3k2, an eighth BIFPN2 and a twelfth C3k2 connected in sequence.

[0018] The output end of the first MSFAM is connected with the third BIFPN2, the fourth BIFPN2 and the first BIFPN3 respectively, the output end of the second MSFAM is connected with the second BIFPN2 and the second BIFPN3 respectively, the output end of the first C3k2 is further connected with the first BIFPN2, the output end of the C2PSA is connected with the sixth Conv, the seventh BIFPN2 and the eighth BIFPN2 respectively, the output end of the third C3k2 is further connected with the second BIFPN3 and the sixth BIFPN2 respectively, the output end of the fourth C3k2 is further connected with the first BIFPN3 and the fifth BIFPN2 respectively, the output end of the sixth C3k2 is further connected with the first Detect of the detection head network, the output end of the eighth C3k2 is further connected with the third Detect of the detection head network, the output end of the tenth C3k2 is further connected with the fourth Detect of the detection head network, and the output end of the twelfth C3k2 is further connected with the second Detect of the detection head network.

[0019] Based on the first aspect, in some embodiments, the BIFPN2 fuses two input feature maps, and the fusion formula is:

[0020] ,

[0021] and are two feature maps input into the BIFPN2, is a fusion weight parameter of the feature map , is a fusion weight parameter of the feature map , and the calculation formula of the fusion weight parameter is:

[0022] ,

[0023] represents an original learnable weight of the i-th feature map, represents a normalized weight of the i-th feature map, is a constant.

[0024] Based on the first aspect, in some embodiments, the BIFPN3 fuses three input feature maps, and the fusion formula is:

[0025] ,

[0026] , and are three feature maps input into the BIFPN3, is a fusion weight parameter of the feature map The fusion weight parameters, For feature map The fusion weight parameters, For feature map The fusion weight parameters are calculated using the following formula:

[0027] ,

[0028] This represents the original learnable weights of the i-th feature map. This represents the normalized weights of the i-th feature map. It is a constant.

[0029] Secondly, embodiments of the present invention provide a small target detection device based on UAV aerial images, comprising:

[0030] The image acquisition module is used to acquire training image data and convert the training image data into a preset format;

[0031] The model building module is used to construct an improved YOLOv11n model. This improved YOLOv11n model includes a backbone feature extraction network, a feature enhancement extraction network, and a detection head network. In the backbone feature extraction network, the first two C3k2s are replaced with MSFAM. A P2 small target detection layer is added to the detection head network and the feature enhancement extraction network, and the first MSFAM is connected to the P2 small target detection layer. The feature enhancement extraction network also includes an improved bidirectional dense feature pyramid network. The two MSFAMs, the first C3k2, and C2PSA in the backbone feature extraction network are respectively connected to the improved bidirectional dense feature pyramid network. The feature map is extended hierarchically and the cross-layer connection is optimized through BiFPN2 and BiFPN3.

[0032] The data partitioning module is used to divide training image data in a preset format into training dataset, validation dataset, and test dataset;

[0033] The model training module is used to train the improved YOLOv11n model using the training dataset and the validation dataset, and to evaluate the improved YOLOv11n model using the test dataset.

[0034] The object detection module is used to input the image data to be detected into the improved YOLOv11n model after training to obtain the category and location of small objects.

[0035] In the second aspect, in some embodiments, the backbone feature extraction network comprises a first Conv, a second Conv, a first MSFAM, a third Conv, a second MSFAM, a fourth Conv, a first C3k2, a fifth Conv, a second C3k2, an SPPF and a C2PSA connected in sequence, the first MSFAM is connected with the P2 small target detection layer, and the first MSFAM, the second MSFAM, the first C3k2 and the C2PSA are respectively connected with the improved bidirectional dense feature pyramid network.

[0036] In a third aspect, an electronic device is provided, comprising a memory and a processor, the memory stores a computer program capable of running on the processor, and the processor implements the small target detection method based on aerial images of a UAV when executing the computer program.

[0037] Compared with the prior art, the beneficial effects of the embodiments of the present application include:

[0038] In the field of UAV vision, for the problem of small target detection in aerial images, the present application proposes an improved small target detection model of YOLOv11n. By introducing MSFAM to replace the first two C3k2 modules in the backbone feature extraction network, rich feature information extraction under cross-branch multi-scale convolution operation is realized; the newly added P2 detection layer significantly enhances the detection ability of the model for small targets; and the improved bidirectional dense feature pyramid network IBDFPN effectively promotes the efficient fusion of shallow fine-grained features and deep semantic features. The effectiveness of the improved strategies of the present application is verified through experiments, and the detection performance of the model of the present application in complex scenes is better than that of other comparative models, which can effectively improve the small target detection accuracy. BRIEF DESCRIPTION OF DRAWINGS

[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or prior art description will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0040] Figure 1 is a flowchart of the small target detection method based on aerial images of a UAV provided by the embodiments of the present application;

[0041] Figure 2 is the structure of a traditional YOLOv11n model;

[0042] Figure 3 is the structure of the improved YOLOv11n model provided by the embodiments of the present application;

[0043] Figure 4 is a structure of the MSFAM provided by the embodiment of the application;

[0044] Figure 5 is a feature fusion network structure after adding a P2 detection layer provided by the embodiment of the application;

[0045] Figure 6 is a feature map connection schematic diagram of the improved bidirectional dense feature pyramid network provided by the embodiment of the application;

[0046] Figure 7 is a structural schematic diagram of the small target detection device based on the unmanned aerial vehicle aerial image provided by the embodiment of the application;

[0047] Figure 8 is a schematic diagram of an electronic device provided by the embodiment of the application. DETAILED DESCRIPTION

[0048] The application will be described in further detail below with reference to specific embodiments. The following embodiments will help those skilled in the art to further understand the role of the application, but do not limit the application in any form. It should be noted that, for those skilled in the art, without departing from the concept of the application, a number of modifications and improvements can be made. These all belong to the protection scope of the application.

[0049] In order to make the purpose, technical scheme and advantages of the application clearer, specific embodiments will be described below with reference to the accompanying drawings.

[0050] Figure 1 shows a flow schematic diagram of the small target detection method based on the unmanned aerial vehicle aerial image provided by the embodiment of the application, referring to Figure 1 The small target detection method based on the unmanned aerial vehicle aerial image is described in detail as follows:

[0051] Step 101, acquiring training image data, converting the training image data into a preset format.

[0052] In this step, since the manual labeling work of the image is large, the existing unmanned aerial vehicle aerial image dataset can be used or adapted, and the dataset suitable for small target detection is selected.

[0053] In addition, the YOLOv11n model training needs to input fixed-size images. Therefore, all the collected images need to be adjusted to the uniform size required by the model. Ensure that the image labeling is compatible with the input format of the YOLOv11n model.

[0054] Step 102, constructing an improved YOLOv11n model.

[0055] In the embodiments of the present application, the improved YOLOv11n model includes a backbone feature extraction network, a feature enhancement extraction network and a detection head network, MSFAM is used to replace the first two C3k2 in the backbone feature extraction network, a P2 small target detection layer is added in the detection head network and the feature enhancement extraction network, and the first MSFAM is connected with the P2 small target detection layer; the feature enhancement extraction network further includes an improved bidirectional dense feature pyramid network, and the two MSFAMs, the first C3k2 and the C2PSA in the backbone feature extraction network are respectively connected with the improved bidirectional dense feature pyramid network, and hierarchical expansion and cross-layer connection optimization are performed through BiFPN2 and BiFPN3.

[0056] As shown in Figure 2 The main structure of the traditional YOLOv11n model mainly includes a backbone feature extraction network (Backbone), a feature enhancement extraction network (Neck) and a detection head network (Head). Referring to Figure 3 The improved YOLOv11n model of the present application is based on YOLOv11n, first, MSFAM modules are used to replace the first two C3k2 modules in the backbone feature extraction network, through parallel multi-branch convolution and feature reorganization mechanism, the differential feature extraction capability of the network for small targets is strengthened; then a P2 small target detection layer with a resolution of 160x160 is added, through expanding the high-resolution feature layer detection branch, the positioning sensitivity for small targets is significantly improved; finally, an improved bidirectional dense feature pyramid network IBDFPN is proposed, deep fusion of shallow fine-grained features and deep semantic features is performed, a multi-level feature representation space is constructed, and the robustness of multi-scale target detection is improved.

[0057] The improved YOLOv11n model of the present application will be described in detail below. Figures 3 to 6

[0058] In some embodiments, the backbone feature extraction network can include a first Conv, a second Conv, a first MSFAM, a third Conv, a second MSFAM, a fourth Conv, a first C3k2, a fifth Conv, a second C3k2, a SPPF and a C2PSA connected in sequence, the first MSFAM is connected with the P2 small target detection layer, and the first MSFAM, the second MSFAM, the first C3k2 and the C2PSA are respectively connected with the improved bidirectional dense feature pyramid network.

[0059] ​The target scale is small and the space distribution is dense in the UAV aerial image. The traditional CNN (Convolutional Neural Network) is difficult to effectively capture multi-granularity feature representation due to the limitation of fixed receptive field, resulting in a high small target missing detection rate. To solve this problem and enhance the network's perception ability of small targets, the MSFAM is used to replace the first two C3k2 modules in the backbone feature extraction network of YOLOv11n. By using convolution operations of different scales in the multi-branch structure, MSFAM can extract target feature information of different receptive field sizes, helping the network better understand the relationship between pixels in the feature map, thereby improving the detection accuracy. In addition, MSFAM can also avoid information loss in the feature map downsampling process.

[0060] In some embodiments, referring to Figure 4 , the MSFAM can include a main branch and a residual branch, and a seventh 1x1 convolution module, the input ends of the main branch and the residual branch are connected with the input end of the MSFAM.

[0061] The main branch includes a first 1x1 convolution module, three sub-branches, a first splicing module and a fifth 1x1 convolution module, the first sub-branch includes a first 3x3 convolution module and a second 1x1 convolution module connected in sequence, the second sub-branch includes a first 5x5 convolution module and a third 1x1 convolution module connected in sequence, the third sub-branch includes a fourth 1x1 convolution module, the output ends of the three sub-branches are connected with the first splicing module, and the output end of the first splicing module is connected with the fifth 1x1 convolution module.

[0062] The residual branch includes a sixth 1x1 convolution module, the output end of the sixth 1x1 convolution module and the output end of the fifth 1x1 convolution module are connected with a second splicing module, the output end of the second splicing module is connected with the input end of a seventh 1x1 convolution module, and the output end of the seventh 1x1 convolution module is connected with the output end of the MSFAM.

[0063] Specifically, each convolution module is composed of a convolution layer, a batch normalization and a SiLU activation function. Using the SiLU activation function, the output can be adaptively adjusted under different data distributions, introducing a nonlinear factor to enhance the model's learning ability of complex features. Compared with traditional ReLU and other activation functions, the SiLU activation function can make the model training more stable, faster convergence, and improve the feature expression ability. The batch normalization operation can normalize the input data, making the data distribution more stable. This helps to alleviate the problem of gradient vanishing or explosion, speeds up the model convergence, enhances the model's generalization ability to a certain extent, and reduces the model's sensitivity to hyperparameters.

[0064] The working process of MSFAM is as follows: first, the input feature map with the size of HxWxC is divided into a main branch and a residual branch. The main branch uses a 1x1 convolution operation and keeps the feature map size unchanged, and is then further divided into three convolution sub-branches. The first sub-branch uses a 3x3 convolution module and a 1x1 convolution module in turn; the second sub-branch uses a 5x5 convolution module and a 1x1 convolution module in turn; and the third sub-branch only uses a 1x1 convolution module to extract features. The outputs of the three sub-branches are spliced along the channel dimension and reduced to the original channel number (HxWxC) by a 1x1 convolution. This structure helps to alleviate the problem of gradient vanishing or explosion in deep network training, enables information to be more smoothly transmitted in the network, and is also conducive to the model learning an identity mapping, making it easier to train a deep network. The residual branch only uses a single 1x1 convolution module, and the output feature map size is also HxWxC. Due to the deep network depth, some information is inevitably lost during feature extraction. The output feature maps of the main branch and the residual branch are spliced along the channel dimension to obtain a feature map with the size of HxWx2C, achieving the effect of enhancing feature extraction. Finally, a 1x1 convolution module is used for dimension reduction, and finally a HxWxC feature map consistent with the input size is obtained as the output of MSFAM. The features extracted by different paths are fused, which can integrate the feature information extracted under different scales and different receptive fields, provide more rich and comprehensive feature representation for the subsequent layer, and improve the accuracy of target detection.

[0065] In some embodiments, the P2 small target detection layer can include a third BIFPN2, a fifth C3k2, a fourth BIFPN2, a sixth C3k2, and a first Detect in the detection head network, the third BIFPN2, the fifth C3k2, the fourth BIFPN2, and the sixth C3k2 are connected in turn, the output end of the sixth C3k2 is further connected with the first Detect, and the output end of the first MSFAM is connected with the third BIFPN2 and the fourth BIFPN2 respectively.

[0066] In order to solve the problems of easy missed detection and low positioning accuracy of micro targets in the unmanned airport scene, the application adds a P2 high-resolution detection layer on the basis of the original three detection layers (P3, P4 and P5) of YOLOv11n. The feature fusion network structure after adding the P2 detection layer is as follows: Figure 5As shown. When adding a new detection level, it is necessary to ensure that the features have the correct fusion path between different resolutions. The model finally uses four detection layers (corresponding to P2, P3, P4 and P5), and the design purpose is to ensure that the P2 detection head can effectively use the semantic information from the deeper layer, while maintaining its high resolution characteristics, thereby improving the detection ability of small targets; P2 layer directly accesses the shallow output of the backbone feature extraction network, and retains the high-resolution feature map (HxW=160x160) of 1 / 4 input size. These targets are originally easy to be ignored or misclassified due to their small size, but now benefit from the high sensitivity of the P2 layer and can be better detected, thereby improving the overall accuracy of small target detection.

[0067] In the convolutional neural network, the shallow feature map usually has a high spatial resolution and contains detailed information such as object edges, textures and colors; although the deep feature map has a low spatial resolution, it contains rich semantic information (such as object shape, structure and class attributes). Therefore, the target detection network generally adopts a feature fusion strategy to improve the multi-scale target detection performance. As a classic paradigm for cross-scale feature fusion, the Feature Pyramid Network (FPN) realizes efficient fusion of shallow detail features and deep semantic features through the construction of a top-down horizontal connection structure, thereby improving the multi-scale target detection capability.

[0068] The Bidirectional Dense Feature Pyramid Network (BDFPN) is an improvement on the traditional feature pyramid network. C1-C4 represents the feature maps output by the backbone feature extraction network at different levels, C1 is the shallowest layer, and C4 is the deepest layer. With the increase of the level, the spatial resolution is continuously reduced, and the semantics is enhanced. C1-C4 transmits and fuses features between different levels through convolution, upsampling and jump connection operations. From top to bottom, the high-level semantic information and shallow detail information are fused through upsampling, and from bottom to top, the features are further fused through convolution operations, so that each level of features can fully utilize the information of different levels. However, BDFPN has high requirements for data quality, and noise in the data may mislead the model's learning after multiple convolution and feature fusion operations, resulting in a decline in model performance. The improved bidirectional dense feature pyramid network is proposed based on this.

[0069] In some embodiments, the improved bidirectional dense feature pyramid network in the present application can include a sixth Conv, a first Upsample, a first BIFPN2, a third C3k2, a second Upsample, a second BIFPN2, a fourth C3k2, a third Upsample, a third BIFPN2, a fifth C3k2, a fourth BIFPN2, a sixth C3k2, a seventh Conv, a first BIFPN3, a seventh C3k2, a fifth BIFPN2, an eighth C3k2, an eighth Conv, a second BIFPN3, a ninth C3k2, a sixth BIFPN2, a tenth C3k2, a ninth Conv, a seventh BIFPN2, an eleventh C3k2, an eighth BIFPN2, and a twelfth C3k2 connected in sequence.

[0070] In addition, the output ends of the first MSFAM are connected with the third BIFPN2, the fourth BIFPN2 and the first BIFPN3 respectively, the output ends of the second MSFAM are connected with the second BIFPN2 and the second BIFPN3 respectively, the output end of the first C3k2 is also connected with the first BIFPN2, the output ends of the C2PSA are connected with the sixth Conv, the seventh BIFPN2 and the eighth BIFPN2 respectively, the output end of the third C3k2 is also connected with the second BIFPN3 and the sixth BIFPN2 respectively, the output end of the fourth C3k2 is also connected with the first BIFPN3 and the fifth BIFPN2 respectively, the output end of the sixth C3k2 is also connected with the first Detect of the detection head network, the output end of the eighth C3k2 is also connected with the third Detect of the detection head network, the output end of the tenth C3k2 is also connected with the fourth Detect of the detection head network, and the output end of the twelfth C3k2 is also connected with the second Detect of the detection head network.

[0071] Referring to Figure 6 Compared with the BDFPN, the improved bidirectional dense feature pyramid network IBDFPN in the present application re-plans the skip connection between different levels of features, making the path and mode of feature fusion more flexible. This network highlights the advantages of shallow features, and the P2'' feature map retains more image detail information, so that the feature of this layer enters the detection head in advance, which can highlight the role of shallow features in target detection and has better effect on small target detection; the P4 layer means that more levels of the network are used to refine the features, and as the number of network layers increases, the receptive field of the P4 layer will increase accordingly, making the feature difference between different categories of targets more obvious, improving the detection ability of larger targets and distant targets, improving the discrimination and robustness of features, better supporting multi-scale feature fusion, and effectively dealing with the challenges of target detection in complex scenes.

[0072] IBDFPN performs hierarchical expansion and cross-layer connection optimization through BiFPN2 and BiFPN3 to achieve efficient multi-scale feature fusion in aerial scenes. BiFPN2 and BiFPN3 are used to process the fusion of two and three input features, respectively. BiFPN2 adaptively determines the importance of each feature through learnable weight parameters. Before feature fusion, the problem of different input features possibly having different spatial sizes needs to be solved. The module uses the size of the first input feature as a reference standard to align the spatial dimensions of all input features. When the feature map size is larger than the target size, maximum pooling operation is applied for downsampling; when the feature map size is smaller than the target size, nearest neighbor interpolation method is used for upsampling. This ensures that all features have consistent spatial dimensions before fusion.

[0073] Referring to Figure 3 and Figure 6 , Figure 3 the first MSFAM in Figure 6 corresponds to the feature map C1 in Figure 3 the second MSFAM in Figure 6 corresponds to the feature map C2 in Figure 3 the first C3k2 in Figure 6 corresponds to the feature map C3 in Figure 3 C2PSA in Figure 6 corresponds to the feature map C4 in Figure 3 the third BIFPN2 in Figure 6 corresponds to the feature map P2' in Figure 3 the fourth BIFPN2 in Figure 6 corresponds to the feature map P2'' in Figure 3 the second BIFPN2 in Figure 6 corresponds to the feature map P3' in Figure 3 the first BIFPN3 in Figure 6 corresponds to the feature map P3'' in Figure 3 the fifth BIFPN2 in Figure 6 corresponds to the feature map P3''' in Figure 3 the first BIFPN2 in Figure 6 corresponds to the feature map P4' in Figure 3 the second BIFPN3 in Figure 6 corresponds to the feature map P4'' in Figure 3 the sixth BIFPN2 in Figure 6 corresponds to the feature map P4''' in Figure 6 the seventh BIFPN2 in Figure 1 corresponds to the feature map P5' in Figure 7 the eighth BIFPN2 in Figure 7 corresponds to the feature map P5'' in

[0074] For example, BIFPN2 fuses two input feature maps, and the fusion formula is:

[0075]

[0076] are two input feature maps of BIFPN2, is the fusion weight parameter of feature map is the fusion weight parameter of feature map The calculation formula of the fusion weight parameter is:

[0077]

[0078] represents the original learnable weight of the i-th feature map, represents the normalized weight of the i-th feature map, is a constant.

[0079] The BiFPN3 module is an extension of the BiFPN2, which is used to process 3 input features. Its basic principle is similar to that of BiFPN2, but it processes 3 input features. BIFPN3 fuses three input feature maps, and the fusion formula is:

[0080]

[0081] are three input feature maps of BIFPN3, is the fusion weight parameter of feature map is the fusion weight parameter of feature map is the fusion weight parameter of feature map The calculation formula of the fusion weight parameter is:

[0082]

[0083] represents the original learnable weight of the i-th feature map, represents the normalized weight of the i-th feature map, is a constant.

[0084] The two feature fusion modules BiFPN2 and BiFPN3 have the following advantages compared with traditional methods:

[0085] ​​​​​​​​​​(1) By introducing learnable weight parameters, the model can dynamically adjust the importance of different features and achieve an adaptive feature fusion process;

[0086] (2) Using concatenation instead of simple addition preserves the dimensional information of the original features and enhances the feature representation capability of the model;

[0087] (3) The flexible feature alignment mechanism enables the module to process feature maps from different levels and scales, making it suitable for various complex network structures.

[0088] In practical applications, BiFPN2 is suitable for handling two-layer feature fusion scenarios with high computational efficiency; while BiFPN3 provides richer feature representation capabilities when it is necessary to fuse three different levels of features. Figure 8 P3'' and P4'' are feature maps formed after being stitched together by BIFPN3, while the remaining feature maps are feature maps formed after being stitched together by BIFPN2.

[0089] Taking layer P3 as an example, the feature information fusion process is as follows: After multi-scale feature information fusion, P3''' serves as the output of IBDPFPN and the input of the detection layer, and will be used for target detection in UAV aerial images. The fusion formula for P3' is... P3 The formula for fusion is The formula for the fusion of P3''' is , Representing different learnable weights, ξ=0.0001 is used to avoid numerical instability, Conv( ) represents the convolution operation, and Upsample represents the upsampling operation.

[0090] The main innovations of the improved bidirectional dense feature pyramid network IBDFPN of this invention are as follows:

[0091] (1) Cross-scale feature pyramid structure expansion: On the basis of traditional FPN, a multi-level feature interaction path is constructed, and through bidirectional information flow from top to bottom and from bottom to top, the deep aggregation of shallow fine-grained features and deep semantic features is realized;

[0092] (2) Dense skip connection mechanism: Introducing cross-level shortcut connections to preserve the integrity of the original feature map during feature upsampling and downsampling, thus avoiding information dilution.

[0093] Step 103: Divide the training image data in the preset format into a training dataset, a validation dataset, and a test dataset.

[0094] In this step, the training image data in the preset format obtained in step 101 can be divided into training dataset, validation dataset and test dataset according to a preset ratio.

[0095] Step 104, using the training data set and the validation data set data to train the improved YOLOv11n model, and using the test data set data to evaluate the improved YOLOv11n model.

[0096] Step 105, inputting the to-be-detected image data into the improved YOLOv11n model after training to obtain the class and position of the small target.

[0097] Specifically, after the improved YOLOv11n model is trained, the to-be-detected image data to be detected is input into the improved YOLOv11n model, and the class and position of the small target contained in the to-be-detected image data are obtained.

[0098] It should be noted that the execution order between step 101 and step 102 is not limited to Figure 8 the manner shown, step 101 can be executed before step 102, or after step 102, or synchronized with step 102, which is not limited.

[0099] The simulation of the small target detection method based on the unmanned aerial vehicle aerial image of the embodiment of the application is described below.

[0100] The improved YOLOv11n small target detection model of the application is mainly applied to quickly patrol urban streets, large event sites and other areas, identify suspicious personnel and vehicles through target detection technology, discover safety hazards in time, and protect public safety; aerial photography above traffic congestion sections or accident sites to detect vehicle quantity and driving state, assist traffic departments in traffic diversion and develop more reasonable traffic control measures; monitor forests, wetlands, nature reserves and other areas, detect the species, quantity and activity track of wild animals, and evaluate the change of ecological environment to provide basis for ecological protection decision.

[0101] The operating system used in the experimental environment of the application is Ubuntu 20.04, the CPU is Intel(R) Core(TM) i7-14700HX, the GPU is NVIDIA RTX3090Ti graphics card, the programming language is Python 3.9.7, and CUDA 11.8 and PyTorch 1.8.1 are used as the deep learning framework. During model training, the training round is 300, the training image size is set to 640x640, and the batch size is 8. To ensure the comparability of the experimental results, all experiments are carried out under the same experimental environment.

[0102] The specific implementation of the application is as follows:

[0103] (1) Data collection and preprocessing

[0104] (1.1) Data collection

[0105] The VisDrone2019 dataset is collected by the AISKYEYE team of a university machine learning and data mining laboratory. The dataset is shot by various unmanned aerial vehicle cameras and covers rural and urban scenes in a total of 14 regions from south to north in country A, and contains a total of 10 categories, namely pedestrian, people, car, van, bus, truck, motor, bicycle, awning-tricycle and tricycle.

[0106] (1.2) Data preprocessing

[0107] The annotation format of the VisDrone2019 dataset is bbox_left, bbox_top, bbox_width, bbox_height, score, object_category, truncation and occlusion. The VisDrone2019 is processed into the txt format corresponding to YOLOv11n. In the dataset, 6471 images are used for training, 548 images are used for verification, and 1610 images are used for testing.

[0108] (2) Model experiment

[0109] (2.1) Evaluation index

[0110] In the selection of evaluation indexes, the present application uses the mean average precision (mAP), the size of network parameters (Parameters) and the calculation complexity (GFLOPs) as the evaluation indexes of the experiment. To calculate the mAP of the target, the precision (P), recall (R) and average precision (AP) are first calculated. P is the proportion of correctly detected targets to all detected targets, and the calculation formula is P=TP / (TP+FP), TP (True Positives) is the number of correctly classified positive examples, and FP (False Positives) is the number of incorrectly classified positive examples. The higher the accuracy, the fewer the false positives. R is the proportion of correctly detected targets to all existing targets, and the calculation formula is R=TP / (TP+FN), wherein FN is the number of examples that are predicted to be negative but are actually positive. The higher the recall, the fewer the missed detections. AP is the area surrounded by the accuracy and recall curve (PR curve) of each category and the coordinate axes, and the calculation formula is mAP is the average of AP values of all classes. Where n represents the number of classes of the data set summary detection target, and the calculation formula is mAP@0.5 represents the average precision when the IoU of the prediction box and the real box is 0.5, and mAP@0.5:0.95 represents the average precision when the IoU of the prediction box and the real box is between 0.5 and 0.95 (step length is 0.05).

[0111] (2.2) Analysis of experimental results;

[0112] The present application sequentially introduces MSFAM, P2, IBDFPN for ablation experiment. In order to determine the influence of each module on network performance, 6 groups of ablation experiments are set, the first group is the experimental result of YOLOv11n original model, the second group to the sixth group is the experimental result of adding MSFAM, adding P2 small target detection layer, adding IBDFPN, adding MSFAM and IBDFPN, adding MSFAM, P2 and IBDFPN after model, and the experimental result is as shown in table 1. According to the experimental result, after fusing MSFAM based on the original model, mAP@0.5 and mAP@0.5:0.95 are improved by 5.4% and 5.6% respectively, which proves that MSFAM can improve the detection accuracy of the model. On this basis, adding P2 detection layer, mAP@0.5 and mAP@0.5:0.95 are improved by 3.6% and 2.6% respectively. The effectiveness of adding P2 small target detection layer is verified. Finally, adding IBDFPN, mAP@0.5 and mAP@0.5:0.95 are improved by 5.3% and 3.8% respectively. The improved model mAP@0.5 is 9.1% higher than the original model, and mAP@0.5:0.95 is improved by 6.3%. Analyzing the data in the table, mAP@0.5 and mAP@0.5:0.95 are increased with the increase of each module, which shows that each added module is effective. The improved model shows better performance compared with the original YOLOv11n model.

[0113] Table 1 Ablation experiment result

[0114]

[0115] (2.3) Comparison experiment of different models;

[0116] The model of the present application is compared with the current mainstream algorithm Faster R-CNN, SSD, YOLOv5s, YOLOv5m, YOLOv8s, YOLOv10n, YOLOv11s and the original YOLOv11n, and the results are shown in table 2. According to the experimental results, the improved model completely exceeds other models in terms of detection accuracy.

[0117] Table 2 Comparison experiment of different models

[0118]

[0119] In the field of unmanned aerial vehicle vision, aiming at the problem of small target detection in aerial image, the application proposes an improved small target detection model of YOLOv11n. By introducing MSFAM into the main feature extraction network to replace the first two C3k2 modules, rich feature information extraction under cross-branch multi-scale convolution operation is realized; the newly added P2 detection layer significantly enhances the detection ability of the model for small targets; the improved bidirectional dense feature pyramid network effectively promotes the efficient fusion of shallow fine-grained features and deep semantic features. Ablation experiments verify the effectiveness of each improvement strategy, and comparative experiments show that the detection performance of the model in complex scenes is better than that of other comparative models, which can effectively improve the detection accuracy.

[0120] It should be understood that the size of the serial number of each step in the above embodiment does not mean the order of execution, and the execution order of each process should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiment of the application.

[0121] Corresponding to the small target detection method based on unmanned aerial vehicle aerial image described in the above embodiment, Figure 1 The structure block diagram of the small target detection device based on unmanned aerial vehicle aerial image provided by the embodiment of the application is shown, and only the part related to the embodiment of the application is shown for the convenience of description.

[0122] Referring to Figure 7 The embodiment of the application provides a small target detection device based on unmanned aerial vehicle aerial image, which comprises an image acquisition module 201, a model construction module 202, a data division module 203, a model training module 204 and a target detection module 205.

[0123] The image acquisition module 201 is used for acquiring training image data and converting the training image data into a preset format.

[0124] The model construction module 202 is used for constructing an improved YOLOv11n model. The improved YOLOv11n model comprises a main feature extraction network, a feature enhancement extraction network and a detection head network, MSFAM is used to replace the first two C3k2 in the main feature extraction network, P2 small target detection layer is added in the detection head network and the feature enhancement extraction network, and the first MSFAM is connected with the P2 small target detection layer; the feature enhancement extraction network further comprises an improved bidirectional dense feature pyramid network, two MSFAMs, the first C3k2 and C2PSA in the main feature extraction network are connected with the improved bidirectional dense feature pyramid network, and the hierarchical expansion and cross-layer connection optimization of feature maps are performed through BiFPN2 and BiFPN3.

[0125] The data division module 203 is configured to divide the training image data in a preset format into a training data set, a verification data set and a test data set.

[0126] The model training module 204 is configured to train the improved YOLOv11n model using the training data set and the verification data set, and evaluate the improved YOLOv11n model using the test data set.

[0127] The target detection module 205 is configured to input image data to be detected into the improved YOLOv11n model after training, to obtain the class and position of the small target.

[0128] Optionally, the backbone feature extraction network comprises, in sequence, a first Conv, a second Conv, a first MSFAM, a third Conv, a second MSFAM, a fourth Conv, a first C3k2, a fifth Conv, a second C3k2, an SPPF and a C2PSA, the first MSFAM is connected with the P2 small target detection layer, and the first MSFAM, the second MSFAM, the first C3k2 and the C2PSA are respectively connected with the improved bidirectional dense feature pyramid network.

[0129] Optionally, the MSFAM comprises a main branch, a residual branch and a seventh 1x1 convolution module, and the input ends of the main branch and the residual branch are connected with the input end of the MSFAM.

[0130] The main branch comprises a first 1x1 convolution module, three sub-branches, a first splicing module and a fifth 1x1 convolution module, the first sub-branch comprises, in sequence, a first 3x3 convolution module and a second 1x1 convolution module, the second sub-branch comprises, in sequence, a first 5x5 convolution module and a third 1x1 convolution module, the third sub-branch comprises a fourth 1x1 convolution module, the output ends of the three sub-branches are connected with the first splicing module, and the output end of the first splicing module is connected with the fifth 1x1 convolution module.

[0131] The residual branch comprises a sixth 1x1 convolution module, the output end of the sixth 1x1 convolution module and the output end of the fifth 1x1 convolution module are connected with a second splicing module, the output end of the second splicing module is connected with the input end of a seventh 1x1 convolution module, and the output end of the seventh 1x1 convolution module is connected with the output end of the MSFAM.

[0132] Optionally, the P2 small target detection layer comprises a third BIFPN2, a fifth C3k2, a fourth BIFPN2, a sixth C3k2 and a first Detect in the detection head network, the third BIFPN2, the fifth C3k2, the fourth BIFPN2 and the sixth C3k2 are connected in sequence, and an output end of the sixth C3k2 is further connected with the first Detect, and output ends of the first MSFAM are respectively connected with the third BIFPN2, the fourth BIFPN2 and the first BIFPN3.

[0133] Optionally, the improved bidirectional dense feature pyramid network comprises a sixth Conv, a first Upsample, a first BIFPN2, a third C3k2, a second Upsample, a second BIFPN2, a fourth C3k2, a third Upsample, a third BIFPN2, a fifth C3k2, a fourth BIFPN2, a sixth C3k2, a seventh Conv, a first BIFPN3, a seventh C3k2, a fifth BIFPN2, an eighth C3k2, an eighth Conv, a second BIFPN3, a ninth C3k2, a sixth BIFPN2, a tenth C3k2, a ninth Conv, a seventh BIFPN2, an eleventh C3k2, an eighth BIFPN2 and a twelfth C3k2 connected in sequence.

[0134] Output ends of the first MSFAM are respectively connected with the third BIFPN2, the fourth BIFPN2 and the first BIFPN3, output ends of the second MSFAM are respectively connected with the second BIFPN2 and the second BIFPN3, an output end of the first C3k2 is further connected with the first BIFPN2, output ends of the C2PSA are respectively connected with the sixth Conv, the seventh BIFPN2 and the eighth BIFPN2, an output end of the third C3k2 is further respectively connected with the second BIFPN3 and the sixth BIFPN2, an output end of the fourth C3k2 is further respectively connected with the first BIFPN3 and the fifth BIFPN2, an output end of the sixth C3k2 is further connected with a first Detect of the detection head network, an output end of the eighth C3k2 is further connected with a third Detect of the detection head network, an output end of the tenth C3k2 is further connected with a fourth Detect of the detection head network, and an output end of the twelfth C3k2 is further connected with a second Detect of the detection head network.

[0135] Optionally, the BIFPN2 fuses two input feature maps, and a fusion formula is as follows:

[0136] ,

[0137] and Given two feature maps of BIFPN2 as input, For feature map The fusion weight parameters, For feature map The fusion weight parameters are calculated using the following formula:

[0138] ,

[0139] This represents the original learnable weights of the i-th feature map. This represents the normalized weights of the i-th feature map. It is a constant.

[0140] Optionally, BIFPN3 fuses the three input feature maps using the following formula:

[0141] ,

[0142] , and The input consists of three feature maps from BIFPN3. For feature map The fusion weight parameters, For feature map The fusion weight parameters, For feature map The fusion weight parameters are calculated using the following formula:

[0143] ,

[0144] This represents the original learnable weights of the i-th feature map. This represents the normalized weights of the i-th feature map. It is a constant.

[0145] Figure 8 This is a schematic diagram of an electronic device provided according to an embodiment of the present invention. For example... ​ As shown, the electronic device 300 of this embodiment includes a processor 310 and a memory 320. The memory 320 stores a computer program that can run on the processor 310, such as a small target detection program based on UAV aerial images. When the processor 310 executes the computer program, it implements the steps in the above-described embodiment of the small target detection method based on UAV aerial images, for example... ​ As shown in 101 to 105. Alternatively, when the processor 310 executes the computer program, it implements the functions of each module in the above-described device embodiments, for example... ​The functions of the image acquisition module 201 to the target detection module 205 are shown.

[0146] The electronic device 300 can be a desktop computer, a notebook computer, a palm computer, a cloud server, and the like. The electronic device can include, but is not limited to, a processor 310 and a memory 320. Those skilled in the art can understand that the electronic device 300 can include more or fewer components than those shown, or can combine some components, or include different components, for example, the electronic device can also include an input / output device, a network access device, a bus, and the like. ​ The electronic device 300 is only an example and does not constitute a limitation on the electronic device 300, and can include more or fewer components than those shown, or can combine some components, or include different components, for example, the electronic device can also include an input / output device, a network access device, a bus, and the like.

[0147] The processor 310 can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gates or transistor logic components, discrete hardware components, or the like. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor.

[0148] The memory 320 can be an internal storage unit of the electronic device 300, such as a hard disk or a memory of the electronic device 300. The memory 320 can also be an external storage device of the electronic device 300, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, and the like. Further, the memory 320 can include both the internal storage unit and the external storage device of the electronic device 300. The memory 320 is used to store the computer program and other programs and data required by the electronic device. The memory 320 can also be used to temporarily store data that has been output or will be output.

[0149] The above-described embodiments are only used to illustrate the technical solutions of the present application, and are not intended to limit the present application; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.

Claims

1. A method for detecting small targets based on aerial images of unmanned aerial vehicles, characterized in that, The method comprises the following steps: acquiring training image data and converting the training image data into a preset format; constructing an improved YOLOv11n model, wherein the improved YOLOv11n model comprises a backbone feature extraction network, a feature enhancement extraction network and a detection head network, MSFAM is used to replace the first two C3k2 in the backbone feature extraction network, a P2 small target detection layer is added in the detection head network and the feature enhancement extraction network, and the first MSFAM is connected with the P2 small target detection layer; the feature enhancement extraction network further comprises an improved bidirectional dense feature pyramid network, and the two MSFAMs, the first C3k2 and the C2PSA in the backbone feature extraction network are connected with the improved bidirectional dense feature pyramid network respectively, and hierarchical expansion and cross-layer connection optimization are performed through BiFPN2 and BiFPN3; dividing the training image data in the preset format into a training data set, a verification data set and a test data set; training the improved YOLOv11n model by using the training data set and the verification data set, and evaluating the improved YOLOv11n model by using the test data set; inputting to-be-detected image data into the improved YOLOv11n model after training to obtain the class and position of a small target; the backbone feature extraction network comprises a first Conv, a second Conv, a first MSFAM, a third Conv, a second MSFAM, a fourth Conv, a first C3k2, a fifth Conv, a second C3k2, an SPPF and a C2PSA connected in sequence, the first MSFAM is connected with the P2 small target detection layer, and the first MSFAM, the second MSFAM, the first C3k2 and the C2PSA are connected with the improved bidirectional dense feature pyramid network respectively; the improved bidirectional dense feature pyramid network comprises a sixth Conv, a first Upsample, a first BIFPN2, a third C3k2, a second Upsample, a second BIFPN2, a fourth C3k2, a third Upsample, a third BIFPN2, a fifth C3k2, a fourth BIFPN2, a sixth C3k2, a seventh Conv, a first BIFPN3, a seventh C3k2, a fifth BIFPN2, an eighth C3k2, an eighth Conv, a second BIFPN3, a ninth C3k2, a sixth BIFPN2, a tenth C3k2, a ninth Conv, a seventh BIFPN2, an eleventh C3k2, an eighth BIFPN2 and a twelfth C3k2 connected in sequence; The output ends of the first MSFAM are connected with the third BIFPN2, the fourth BIFPN2 and the first BIFPN3 respectively, the output ends of the second MSFAM are connected with the second BIFPN2 and the second BIFPN3 respectively, the output end of the first C3k2 is further connected with the first BIFPN2, the output ends of the C2PSA are connected with the sixth Conv, the seventh BIFPN2 and the eighth BIFPN2 respectively, the output ends of the third C3k2 are further connected with the second BIFPN3 and the sixth BIFPN2 respectively, the output ends of the fourth C3k2 are further connected with the first BIFPN3 and the fifth BIFPN2 respectively, the output end of the sixth C3k2 is further connected with the first Detect of the detection head network, the output end of the eighth C3k2 is further connected with the third Detect of the detection head network, the output end of the tenth C3k2 is further connected with the fourth Detect of the detection head network, and the output end of the twelfth C3k2 is further connected with the second Detect of the detection head network. 2.The small target detection method based on UAV aerial images according to claim 1, characterized in that, The MSFAM comprises a main branch and a residual branch and a seventh 1*1 convolution module, and the input ends of the main branch and the residual branch are connected with the input end of the MSFAM; The main branch comprises a first 1*1 convolution module, three sub-branches, a first splicing module and a fifth 1*1 convolution module, the first sub-branch comprises a first 3*3 convolution module and a second 1*1 convolution module connected in sequence, the second sub-branch comprises a first 5*5 convolution module and a third 1*1 convolution module connected in sequence, the third sub-branch comprises a fourth 1*1 convolution module, the output ends of the three sub-branches are connected with the first splicing module, and the output end of the first splicing module is connected with the fifth 1*1 convolution module; The residual branch comprises a sixth 1*1 convolution module, the output end of the sixth 1*1 convolution module and the output end of the fifth 1*1 convolution module are connected with a second splicing module, the output end of the second splicing module is connected with the input end of the seventh 1*1 convolution module, and the output end of the seventh 1*1 convolution module is connected with the output end of the MSFAM. 3.The small target detection method based on UAV aerial image of claim 1, characterized in that, The P2 small target detection layer comprises a third BIFPN2, a fifth C3k2, a fourth BIFPN2, a sixth C3k2 and a first Detect in the detection head network, the third BIFPN2, the fifth C3k2, the fourth BIFPN2 and the sixth C3k2 are connected in sequence, and the output end of the sixth C3k2 is further connected with the first Detect, and the output ends of the first MSFAM are connected with the third BIFPN2 and the fourth BIFPN2 respectively. 4.The method for detecting small targets based on aerial images captured by UAVs according to claim 1, characterized in that, The BIFPN2 fuses two input feature maps, and the fusion formula is: , and are fusion weight parameters of the two feature maps input into the BIFPN2, are fusion weight parameters of the two feature maps input into the BIFPN2, are fusion weight parameters of the two feature maps input into the BIFPN2, are fusion weight parameters of the two feature maps input into the BIFPN2, are fusion weight parameters of the two feature maps input into the BIFPN2, and a calculation formula of the fusion weight parameters is , denotes the original learnable weights of the i-th feature map, denotes the normalized weights of the i-th feature map, is a constant. 5.The small target detection method based on UAV aerial image of claim 1, characterized in that, The BIFPN3 fuses three input feature maps, and the fusion formula is: , , and The input consists of three feature maps from BIFPN3. For feature map The fusion weight parameters, For feature map The fusion weight parameters, For feature map The fusion weight parameters are calculated using the following formula: , denotes the original learnable weight of the i-th feature map, denotes the normalized weight of the i-th feature map, is a constant.

6. An apparatus for detecting small targets based on aerial images of unmanned aerial vehicles, characterized by The method comprises the following steps: The image acquisition module is configured to acquire training image data and convert the training image data into a preset format. The model construction module is configured to construct an improved YOLOv11n model, the improved YOLOv11n model comprising a backbone feature extraction network, a feature enhancement extraction network and a detection head network, MSFAM is used to replace the first two C3k2 in the backbone feature extraction network, a P2 small target detection layer is added in the detection head network and the feature enhancement extraction network, and the first MSFAM is connected with the P2 small target detection layer; the feature enhancement extraction network further comprises an improved bidirectional dense feature pyramid network, two MSFAMs, the first C3k2 and the C2PSA in the backbone feature extraction network are connected with the improved bidirectional dense feature pyramid network respectively, and the hierarchical expansion and cross-layer connection optimization of feature maps are performed through BiFPN2 and BiFPN3; The data division module is configured to divide the training image data in a preset format into a training data set, a verification data set and a test data set; The model training module is configured to train the improved YOLOv11n model by using the training data set and the verification data set, and evaluate the improved YOLOv11n model by using the test data set; The target detection module is configured to input the to-be-detected image data into the improved YOLOv11n model after training, and obtain the class and position of the small target; The backbone feature extraction network comprises a first Conv, a second Conv, a first MSFAM, a third Conv, a second MSFAM, a fourth Conv, a first C3k2, a fifth Conv, a second C3k2, an SPPF and a C2PSA connected in sequence, the first MSFAM is connected with the P2 small target detection layer, and the first MSFAM, the second MSFAM, the first C3k2 and the C2PSA are connected with the improved bidirectional dense feature pyramid network respectively; The improved bidirectional dense feature pyramid network comprises a sixth Conv, a first Upsample, a first BIFPN2, a third C3k2, a second Upsample, a second BIFPN2, a fourth C3k2, a third Upsample, a third BIFPN2, a fifth C3k2, a fourth BIFPN2, a sixth C3k2, a seventh Conv, a first BIFPN3, a seventh C3k2, a fifth BIFPN2, an eighth C3k2, an eighth Conv, a second BIFPN3, a ninth C3k2, a sixth BIFPN2, a tenth C3k2, a ninth Conv, a seventh BIFPN2, an eleventh C3k2, an eighth BIFPN2 and a twelfth C3k2 connected in sequence; The output end of the first MSFAM is connected with the third BIFPN2, the fourth BIFPN2 and the first BIFPN3 respectively, the output end of the second MSFAM is connected with the second BIFPN2 and the second BIFPN3 respectively, the output end of the first C3k2 is further connected with the first BIFPN2, the output end of the C2PSA is connected with the sixth Conv, the seventh BIFPN2 and the eighth BIFPN2 respectively, the output end of the third C3k2 is further connected with the second BIFPN3 and the sixth BIFPN2 respectively, the output end of the fourth C3k2 is further connected with the first BIFPN3 and the fifth BIFPN2 respectively, the output end of the sixth C3k2 is further connected with the first Detect of the detection head network, the output end of the eighth C3k2 is further connected with the third Detect of the detection head network, the output end of the tenth C3k2 is further connected with the fourth Detect of the detection head network, and the output end of the twelfth C3k2 is further connected with the second Detect of the detection head network.

7. An electronic device comprising a memory and a processor, said memory having stored a computer program executable on said processor, characterized in that, The processor executes the computer program to realize the steps of the small target detection method based on the unmanned aerial vehicle aerial image in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Small target detection method and device and terminal equipment

    CN118397253A

  • DA-YOLOv11-based unmanned aerial vehicle aerial image target detection method

    CN120014487A