Small target detection method under aerial view angle of unmanned aerial vehicle and electronic equipment

By improving the YOLOv8 model, combining EE lightweight network and Biformer attention mechanism, the problems of small-scale object detection accuracy and efficiency in drone images are solved, and efficient detection in complex backgrounds are achieved.

CN119478357APending Publication Date: 2025-02-18XINJIANG UNIVERSITY
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411528678.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-30
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

The existing object detection algorithm is difficult to adapt to small targets and complex backgrounds in drone images, resulting in the detection accuracy and efficiency not reaching ideal results.

Method used

Improve the YOLOv8 model, replace the backbone network with EE lightweight network, add a small object detection layer to the neck structure, and add a small object detection head to the detection head, and combine it with the Biformer attention mechanism to improve detection performance.

Benefits of technology

In complex background and small object detection tasks, the detection accuracy is significantly improved, the number of model parameters and calculations is reduced, and the generalization ability and real-time detection performance of the model are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119478357A_ABST
    Figure CN119478357A_ABST
Patent Text Reader

Abstract

The invention provides a lightweight unmanned aerial vehicle small target detection method and electronic equipment, and belongs to the technical field of target detection. Firstly, a layer specially used for small target detection is added in a neck structure of a network so as to enhance semantic information of a small target. Secondly, according to the scheme, an EE lightweight network is provided to replace an original feature fusion module, so that the model is helped to better capture detail features of the target vehicle, and the overall performance of the neural network is improved. And finally, optimizing the backbone network by using a Biform attention mechanism, and further improving the positioning capability of the model. According to the scheme, compared with an original YOLOv8s model, mAP and Recall are improved by 1% and 2% respectively, meanwhile, the parameter quantity of the model is reduced by 28%, and the calculated amount is reduced by 28.7%. According to the scheme, a new thought can be provided for target detection under the aerial view angle of the unmanned aerial vehicle.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of target detection in image processing and computer vision, and in particular to a method and electronic equipment for detecting small targets of unmanned aerial vehicles based on an improved YOLOv8 model, which are mainly used in unmanned aerial vehicle application scenarios such as traffic monitoring and security patrol. Background Art

[0002] With the widespread application of drone technology, drones are playing an increasingly important role in urban management, traffic monitoring, intelligent inspection and other fields. Drone images have a bird's-eye view, and the targets are usually small in scale, with complex backgrounds, shadows, occlusions and other environmental interference factors, which makes detection difficult. Current target detection algorithms are mainly aimed at natural scenes shot from a horizontal perspective, and cannot adapt to small targets and complex backgrounds in drone images. Therefore, a more adaptive image processing and detection method is needed. Drones shoot various targets at high altitudes, such as pedestrians, bicycles, motorcycles, etc., which are small in size and easy to cause missed detection. The images shot by drones at high altitudes have complex backgrounds and dense target occlusions, which bring huge challenges to target detection.

[0003] Driven by deep learning, target detection algorithms can be divided into two categories. The first category is a two-stage detection algorithm, such as Faster R-CNN and Mask R-CNN. Its specific process is to use a candidate box generator to produce a series of candidate boxes. For each candidate box, its features are extracted and a classifier is used to determine whether it covers the target object. For the candidate boxes classified as containing the target object, a regressor is then used to make minor adjustments to it, thereby obtaining a more accurate target box. However, although the accuracy is high, the speed is slow, and it is not particularly suitable for target detection tasks from the perspective of drones.

[0004] The second category belongs to single-stage detection algorithms, such as SSD and YOLO. The specific operation process is to perform convolution and pooling operations on the input image to obtain a series of feature maps. For each position on each feature map, a classifier and regressor are used to simultaneously determine whether it contains the target object and obtain its precise position, which improves the speed of target detection to a certain extent.

[0005] The commonly used YOLO series models have good performance in large target detection, but for the detection of small targets taken by drones, the accuracy and efficiency of the existing models have not reached the ideal effect. Therefore, we propose a drone small target detection method that improves YOLOv8. Summary of the invention

[0006] In view of this, in order to address the problems existing in the small target detection method of drone images, the present invention is based on the small target detection method under the bird's-eye view of the drone, and provides a small target detection method and electronic equipment under the bird's-eye view of the drone. This scheme can effectively detect small targets in drone images.

[0007] Specifically, the present invention provides the following technical solutions:

[0008] On the one hand, the present invention provides a method for detecting small targets from a bird's-eye view of a drone, comprising the following steps:

[0009] Step 1: Data acquisition: Get the initial data set taken by the drone camera, which includes pictures taken in various environments. These data contain the target object.

[0010] Step 2: Data enhancement: Call the function in OpenCV to perform data enhancement on several images randomly selected from the initial data set;

[0011] Step 3: Build the EBO-YOLOv8 model:

[0012] Replace the backbone network with an EE lightweight network, add a small target detection layer to the neck structure, and add a small target detection head to the detection head to improve detection performance;

[0013] Add a small target detection layer to the neck structure of YOLOv8;

[0014] Add a small target detection head to the YOLOv8 detection head;

[0015] Add Biformer attention mechanism;

[0016] Step 4: Model training and model deployment:

[0017] Train the EBO-YOLOv8 model and deploy the trained model to mobile devices for object detection.

[0018] Preferably, the specific implementation of step 3 includes the following sub-steps:

[0019] Step 3.1 The backbone network includes an EE lightweight network, which contains 4 MBConv modules: MBConv includes two ordinary convolutional layers Conv, a depth-separable convolution, an EMA attention module and a Dropout layer; its implementation steps are:

[0020] First, perform a dimensionality increase operation, and then perform a depth-separable convolution on the obtained feature map; pass it into the EMA attention module for processing, and restore the number of channels to the number of channels before the MBConv input; finally, perform a Dropout operation and then splice the output;

[0021] The EMA attention module inputs a feature map of shape [C, H, W], and goes through the following steps: group the dimension C and divide the feature map into G groups; perform 3×3 convolution on the grouped feature map; perform global average pooling in the X direction to obtain a feature map of shape [C / / G, H, 1]; perform global average pooling in the Y direction to obtain a feature map of shape [C / / G, 1, W]; concatenate the average pooling results in the X and Y directions along the spatial dimension to obtain a shape of [C / / G, H+W, 1]; perform convolution on the concatenated result, and pass the Sigmoid activation function to generate a weight value; normalize each group, and then perform global average pooling AvgPool and Softmax operations; obtain the updated feature map through matrix multiplication, and concatenate all groups and pass the Sigmoid activation function to obtain the final output;

[0022] Step 3.2 The neck structure includes the following steps: the input image passes through the EE lightweight network, the obtained feature map passes through the SPPF and Biformer attention, and then is spliced ​​with the result of the fourth MBConv and input into a C2f module; the feature map is upsampled, spliced ​​with the result of the third MBConv, input into the C2f module, and then upsampled, spliced ​​with the result of the second MBConv, and passed through a C2f module to obtain the D1 feature map; the D1 feature map is input into the small target detection head, and the same At this time, the D1 feature map undergoes a convolution and is spliced ​​with the feature map obtained by the second C2f, and then passes through a C2f module to obtain the D2 feature map, which is input to the small and medium target detection head; the D2 feature map undergoes a convolution and is spliced ​​with the C2f spliced ​​by the fourth MBConv, and then is input to the C2f module to obtain the D3 feature map, which is input to the large and medium target detection head; finally, the D3 feature map undergoes a convolution and is spliced ​​with the feature map output by the backbone network Biformer, and then passes through a C2f module and is input to the large target detection head;

[0023] Step 3.3 Add Biformer attention after the backbone network SPPF: Biformer attention is calculated as follows: The two-dimensional input feature map given by region and linear: X∈R H*W*C , initially split it into S*S non-overlapping regions, covering feature vectors, H and W are the height and width of the feature map, and X is converted to Realize Q,K,V∈R H*W*C , R is the number of regions and C is the number of feature map channels, because:

[0024] Query matrix: Q = X r W q Key matrix: K = X r W k Value matrix: V = X r W v

[0025] Calculate the average values ​​of Q and K and get Perform matrix multiplication to obtain the adjacency matrix:

[0026] A r =Q r (K r ) T , matrix A r Indicates the degree of relevance;

[0027] I r =topIndex(A r ), I represents the most relevant region index, so I r The i-th row of contains the k most relevant indexes of the i-th region;

[0028] For each query in region i, it looks at key-value pairs that are in the union of k routing regions, indexed by give instructions;

[0029] Need to collect K and V:

[0030] Get the global key: K g =gather(K,I r ), global value: V g =gather(V,I r ),

[0031] Get attention O: O = Attention(Q,K g ,V g )+LCE(V).

[0032] Preferably, the EE lightweight network combines EMA attention with the EfficientNetV1 structure to reduce redundancy in convolution operations and improve feature extraction efficiency.

[0033] Preferably, the EBO-YOLOv8 is suitable for images taken from a bird's-eye view of a drone, and has significant advantages in detecting small targets in complex backgrounds.

[0034] On the other hand, the present invention also provides an electronic device, comprising: a memory and a processor; the memory is used to store programs; the processor is used to call the programs stored in the memory to execute the small target detection method under the bird's-eye view of a drone as described above.

[0035] Compared with the prior art, the technical solution of the present invention has the following beneficial effects: in the case of small high-altitude targets, high missed detection, presence of occluders, low resolution and limited resources: the present invention provides a lightweight YOLOv8 drone small target detection method. First, the improved algorithm adds a small target detection layer for the neck structure to enrich the semantic information of the small target, and the EE lightweight network replaces the original network, in which EfficientNetV1 uses a new method to scale the depth, width and resolution of the network to enhance the feature extraction capability. The EMA module recalibrates the channel weights in each parallel branch by encoding global information, and captures the pixel-level relationship through cross-dimensional interaction. The two are combined to improve the original module in a lightweight way. Finally, the addition of Biformer attention can have a good effect on the detection of dense and occluded targets, and enhances the generalization ability of the model. The improved model has a comprehensive improvement in Precision, Recall and mAP450 for YOLOv8n, and the number of parameters for the YOLOv8s model has decreased by 28% and 28.5% respectively. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0037] Figure 1 This is a flow chart of a small target detection method based on a drone’s bird’s-eye view;

[0038] Figure 2 To visualize the detection effect of the drone of the present invention;

[0039] Figure 3 This is the overall architecture diagram of the EBO-YOLOv8 model, where the gray part is the innovative part and the white part is the original YOLOv8 part;

[0040] Figure 4 Detailed structural diagram of the MBConv module;

[0041] Figure 5 This is a schematic diagram of the optimized MBConv module;

[0042] Figure 6 To add small target detection layer and small target detection head. DETAILED DESCRIPTION

[0043] The present invention is further explained below in conjunction with the accompanying drawings and specific embodiments. It should be clear that the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0044] Those skilled in the art should know that the following specific embodiments or specific implementations are a series of optimized settings listed by the present invention to further explain the specific content of the invention, and these settings can be combined or used in association with each other, unless the present invention clearly states that some or a specific embodiment or implementation cannot be associated or used together with other embodiments or implementations. At the same time, the following specific embodiments or implementations are only used as the most optimized settings, and are not to be understood as limiting the scope of protection of the present invention.

[0045] Example

[0046] Please see attached Figure 1 As shown, the present invention provides a lightweight UAV small target detection method, which specifically includes the following steps:

[0047] Step S1, data set preparation;

[0048] The VisDrone dataset was collected by the AISKYEYE team of the Machine Learning and Data Mining Laboratory of Tianjin University. It contains 288 video clips, consisting of 261,908 frames of video and 10,209 static images. These data cover different environments (urban and rural), different objects (pedestrians, vehicles, bicycles, etc.) and different densities (sparse and crowded scenes) in 14 different cities in China. 6,471 of the 10,209 static images are used for training, 548 for verification, and 3,190 for testing, including ten categories: pedestrian, person, car, van, bus, truck, motor, bicycle, awning-tricycle, and tricycle. This example uses 6,471 training sets and 548 verification set images with public labels, and writes the python script split.py to split the dataset, and modify the original dataset annotations to YOLO format, and put the corresponding labels into the corresponding folders;

[0049] Step S2, performing data enhancement processing on the initial data set;

[0050] 1) Rotation: Usually the rotation angle is randomly generated in the range of [-30°, 30°]. Use OpenCV to apply the rotation matrix to the original image. This operation will translate and rotate the pixels in the image accordingly according to the rotation matrix. For edge processing, after rotating the image, blank areas may appear at the four corners of the image, which are filled with black.

[0051] 2) Shearing: The shearing transformation applies stretching in the horizontal or vertical direction. Usually the shear factor is a decimal that determines the magnitude of the stretching. The common value range is [-0.3, 0.3]. The image is affine transformed using the shearing matrix. This operation is performed using the warpAffine function of OpenCV.

[0052] Step S3, improving the EBO-YOLOv8 model;

[0053] Step S3 includes the following steps to build the EBO-YOLOv8 model:

[0054] Step S31, replacing the backbone network of the YOLOv8 model with the EE lightweight network;

[0055] Step S32, adding a small target detection layer to the neck structure of YOLOv8;

[0056] Step S33, adding a small target detection head to the head structure of YOLOv8;

[0057] Step S34, add Biformer attention to the SPPF module of the YOLOv8 backbone network.

[0058] Among them, S31 replaces the backbone network of the YOLOv8 model with the EE lightweight network and adds Biformer attention after SPPF. Figure 3 As shown in the figure, the improved YOLOv8 includes four MBConv modules, one SPPF module, and one Biformer attention. The second MBConv module generates a feature map of size 160×160, and the C2f module in the neck network produces a P2 feature map of size 160×160, and adjusts the channel to 64. The 80×80 feature map produced by the third MBConv module is passed through C2f to obtain a P3 feature map of size 80×80. The 40×0 feature map produced by the fourth MBConv module is passed through C2f to obtain a P4 feature map of size 40×40. The 20×20 feature map is obtained through the EE lightweight network, and the P4 feature map of size 20×20 is obtained through C2f.

[0059] The MBConv module structure is as follows Figure 5 As shown in the figure, it first includes two convolutional layers, including a depthwise separable convolutional layer, an EMA attention module and a Dropout layer. In MBConv, the feature map is first subjected to a dimensionality-enhancing convolution operation, and then the obtained feature map is subjected to a depthwise separable convolution. Next, the result is passed to the EMA attention module for processing, the number of channels is restored to the number of channels before being passed to MBConv, and finally the result is output after the Dropout operation.

[0060] The changes to the neck network for S31 and S32 specifically include:

[0061] like Figure 5 As shown in the figure, we add a feature fusion layer to the neck network in order to better understand the semantic information of small targets. Finally, four detection heads of 160×160, 80×80, 40×40, and 20×20 are generated. Among them, the 160×160 detection head has the highest resolution and is more friendly to small targets, so it is called the small target detection head.

[0062] Specifically, the feature map of the input image after passing through the EE lightweight network module is passed through the SPPF and Biformer attention to obtain the P4 feature map, which is upsampled and concat with the fourth MBConv result, and then input into a C2f module. The feature map obtained after upsampling and concat is input into C2f for upsampling, and concat with the result of the second MBConv to obtain a 160×160 feature map, which is then passed through a C2f module to obtain the D1 feature map as a small target. At the same time, the feature map is convolved with the P2 feature map to obtain an 80×80 feature map, which is passed through a C2f module to obtain the D2 feature map, which is a small and medium-sized target; the D2 feature map is convolved with the previous P3 to obtain a 40×40 feature map, which is further input into the C2f module to obtain the D3 feature map, which is a medium and large target; at the same time, the D3 feature map is convolved with the feature map output by the backbone network Biformer to obtain a 20×20 feature map, which is then passed through a C2f module to obtain the D4 feature map, which is a large target.

[0063] Among them, S34 adds the Biformer attention mechanism to the SPPF module, which includes:

[0064] The two-dimensional input feature map given by region and linearity: X∈R H*W*C , divided into S*S areas, covering feature vectors, H and W are the height and width of the feature map, and X is converted to Realize Q,K,V∈R H*W*C , R is the number of regions and C is the number of feature map channels, then Q, K, and V are calculated as shown in formulas (1), (2), and (3):

[0065] Query matrix: Q = X r W q (1)

[0066] Key matrix: K = X r W k (2)

[0067] Value matrix: V = X r W v (3)

[0068] Calculate the average value of Q and K: Obtained the adjacency matrix: A r =Q r (K r ) T , A r For the degree of relevance.

[0069] I r =topIndex(A r )I represents the most relevant area index, so the i-th row contains the k most relevant indexes of the i-th area.

[0070] For each query in region i, it looks at key-value pairs that are in the union of k routing regions, indexed by Instructions are given. The calculation methods of collecting K and V are as shown in formulas (4) and (5):

[0071] Global Key: K g =gather(K,I r ) (4)

[0072] Global value: V g =gather(V,I r ) (5)

[0073] Get attention O: O = Attention(Q,K g ,V g )+LCE(V)

[0074] Step S4: model training;

[0075] Use the improved YOLOv8 model to train the dataset;

[0076] The training process uses the SGD (stochastic gradient descent) optimization algorithm;

[0077] After 300 rounds of training, the detection accuracy of the model gradually improved;

[0078] The GPU used is RTX3090, the size is adjusted to 640, the batch size is set to 8, and the learning rate is adjusted to 0.01;

[0079] Finally, a higher mAP value (average precision) was achieved on the test dataset.

[0080] In order to better judge the quality of the target detection algorithm, the detection results are evaluated through the following performance indicators:

[0081] 1. Accuracy

[0082] Accuracy refers to the ratio of the number of samples correctly predicted as positive samples to the number of samples predicted as positive samples. In the object detection task, accuracy is usually used to measure the model's ability to classify the background and foreground. The calculation formula for accuracy is as follows:

[0083]

[0084] 2. Average Precision (mAP)

[0085] Average precision is a commonly used evaluation indicator in object detection tasks. It calculates the average precision (AP) of each category and averages them to get the AP value. AP can be used to measure the detection accuracy of the model for different categories. The formula for calculating average precision is as follows:

[0086]

[0087] 3. Recall

[0088] Recall is the ratio of all true positive samples that the evaluation model can find. In object detection, if the true bounding box coincides with the predicted bounding box, the sample is considered to be correctly recalled. The calculation formula of recall is as follows:

[0089]

[0090] 4. Precision

[0091] Precision is the ratio of positive samples that are correctly predicted by the evaluation model. In object detection, if the bounding box predicted by the model coincides with the true bounding box, the prediction is considered correct. The calculation formula for precision is as follows:

[0092]

[0093] In the above formula, TP represents the number of correct targets in the detection results, FP represents the number of incorrect targets in the detection results, and FN represents the number of missing targets among the correct targets.

[0094] Table 1 shows the experimental results of the present invention compared with the two baseline models YOLOv8n and YOLOv8s. The results show that the model proposed in the present invention shows significant improvement in all indicators. Compared with the original YOLOv8n model, the improved algorithm has obvious improvements in key indicators such as precision (P), recall (R) and mAP50. This shows that by optimizing the model structure and introducing a new attention mechanism, the detection ability of the model in complex scenes is effectively enhanced and the overall performance is improved. Among them, the EBO-YOLOv8 proposed by us exceeds the YOLOv8s model in both Recall and mAP50. The following shows the performance measurement results between the developed model and the YOLOv8n and YOLOv8s models.

[0095] Table 1 Experimental results

[0096] Model Precision Recall mAP50 mAP50-95 Params(M) FLOPs(B) OURS 0.51 0.41 0.41 0.247 8 20.4 YOLOv8n 0.46 0.341 0.344 0.2 3.2 8.7 YOLOv8s 0.53 0.39 0.4 0.244 22.5 28.5

[0097] Step S5: deploy the trained model to the mobile device to perform real-time target detection;

[0098] After training, the EBO-YOLOv8 model is deployed to the drone platform. The drone captures images in real time through the camera. The model can automatically detect small targets in the image during flight and output the target's category and location. The EBO-YOLOv8 model shows excellent performance in real-time detection, especially in complex backgrounds and multi-target scenes, which can effectively reduce missed detections and false detections.

[0099] The UAV small target detection method based on the improved YOLOv8 model provided by the present invention greatly improves the detection accuracy by optimizing the structure and introducing the attention mechanism to address the shortcomings of the existing YOLOv8 model. It is suitable for resource-constrained devices, especially in complex background and small target detection tasks.

[0100] The present invention proposes the EBO-YOLOv8 model, which effectively improves the accuracy of target detection under high-altitude perspective and optimizes the robustness in complex situations. Three main contributions are listed: the first is to add a layer to the neck network part and a detection head to the detection head part to improve the accuracy of small target detection, better integrate multi-scale information, adapt to different levels of semantic information, and reduce false positives or negatives. The second contribution is to propose a new EE lightweight network to achieve the improvement of model performance and reduce the parameters and calculation amount of the model. The third point is to add an attention module to improve the detection ability of small targets of different scales, different densities and occluded targets. Experiments show that under the Visdrone2019 dataset, the detection effect of the EBO-YOLOv8 we proposed improves the Precision by 5% and the Recall by 7% for the original YOLOv8 model. mAP is increased by 6.6%. Figure 5 As shown in the figure, compared with YOLOv8s, the number of parameters is reduced by 28%, the amount of calculation is reduced by 28.7%, but the mAP50 is improved by 1% and the Recall is improved by 2%. Future work will focus on improving the generalization ability and operating efficiency of the model and deploying it in a wider range of practical applications.

[0101] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0102] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A small target detection method based on a drone's bird's-eye view, characterized in that: The specific steps include: Step 1: Data acquisition: Get the initial data set taken by the drone camera, which includes pictures taken in various environments. These data contain the target object. Step 2: Data enhancement: Call the function in OpenCV to perform data enhancement on several images randomly selected from the initial data set; Step 3: Build the EBO-YOLOv8 model: Replace the backbone network with an EE lightweight network, add a small target detection layer to the neck structure, and add a small target detection head to the detection head to improve detection performance; Add a small target detection layer to the neck structure of YOLOv8; Add a small target detection head to the YOLOv8 detection head; Add Biformer attention mechanism; Step 4: Model training and model deployment: Train the EBO-YOLOv8 model and deploy the trained model to mobile devices for object detection.

2. The small target detection method according to claim 1, characterized in that: The specific implementation of step 3 includes the following sub-steps: Step 3.1 The backbone network includes an EE lightweight network, which contains 4 MBConv modules: MBConv includes two ordinary convolutional layers Conv, a depth-separable convolution, an EMA attention module and a Dropout layer; its implementation steps are: First, perform a dimensionality increase operation, and then perform a depth-separable convolution on the obtained feature map; pass it into the EMA attention module for processing, and restore the number of channels to the number of channels before the MBConv input; finally, perform a Dropout operation and then splice the output; The EMA attention module inputs a feature map of shape [C, H, W], and goes through the following steps: grouping the dimension C into G groups; performing 3×3 convolution on the grouped feature maps; performing global average pooling in the X direction to obtain a feature map of shape [C / / G, H, 1]; performing global average pooling in the Y direction to obtain a feature map of shape [C / / G, 1, W]; concatenating the average pooling results in the X and Y directions along the spatial dimension to obtain a shape of [C / / G, H+W, 1]; Perform convolution operation on the concatenated result, and the output passes through the Sigmoid activation function to generate weight values; Each group is normalized, and then global average pooling AvgPool and Softmax operations are performed; the updated feature map is obtained by matrix multiplication, and all groups are concatenated and the final output is obtained by Sigmoid activation function; Step 3.2 The neck structure includes the following steps: the input image passes through the EE lightweight network, the obtained feature map passes through the SPPF and Biformer attention, and then is spliced ​​with the result of the fourth MBConv and input into a C2f module; the feature map is upsampled, spliced ​​with the result of the third MBConv, input into the C2f module, and then upsampled, spliced ​​with the result of the second MBConv, and passed through a C2f module to obtain the D1 feature map; the D1 feature map is input into the small target detection head, and the same At this time, the D1 feature map undergoes a convolution and is spliced ​​with the feature map obtained by the second C2f, and then passes through a C2f module to obtain the D2 feature map, which is input to the small and medium target detection head; the D2 feature map undergoes a convolution and is spliced ​​with the C2f spliced ​​by the fourth MBConv, and then is input to the C2f module to obtain the D3 feature map, which is input to the large and medium target detection head; finally, the D3 feature map undergoes a convolution and is spliced ​​with the feature map output by the backbone network Biformer, and then passes through a C2f module and is input to the large target detection head; Step 3.3 Add Biformer attention after the backbone network SPPF: Biformer attention is calculated as follows: The two-dimensional input feature map given by region and linear: X∈R H*W*C , initially split it into S*S non-overlapping regions, covering feature vectors, H and W are the height and width of the feature map, and X is converted to Realize Q,K,V∈R H*W*C , R is the number of regions and C is the number of feature map channels, because: Query matrix: Q = X r W q Key matrix: K = X r W k Value matrix: V = X r W v Calculate the average values ​​of Q and K and get Perform matrix multiplication to obtain the adjacency matrix: A r =Q r (K r ) T , matrix A r Indicates the degree of relevance; I r =topIndex(A r ), I represents the most relevant region index, so I r The i-th row of contains the k most relevant indexes of the i-th region; For each query in region i, it looks at key-value pairs that are in the union of k routing regions, indexed by give instructions; Need to collect K and V: Get the global key: K g =gather(K,I r ), global value: V g =gather(V,I r ), Get attention O: O = Attention(Q,K g ,V g )+LCE(V).

3. The method according to claim 1, characterized in that The EE lightweight network combines EMA attention and EfficientNetV1 structure to reduce redundancy in convolution operations and improve feature extraction efficiency.

4. The method according to claim 1, characterized in that: The EBO-YOLOv8 is suitable for images taken from a bird's-eye view of a drone, and has significant advantages in detecting small targets in complex backgrounds.

5. An electronic device, characterized in that: include: Memory and processor; The memory is used to store programs; The processor is used to call the program stored in the memory to execute the small target detection method from a bird's-eye view of a drone as described in any one of claims 1 to 4.

Citation Information

Cited By

  • Unmanned aerial vehicle near-ground target detection method based on deep learning

    CN121033600A