Unmanned aerial vehicle aerial image target detection method based on improved YOLOv8

By improving the YOLOv8 model, the RepNCSPELAN4 module, the GAM attention mechanism and the small object detection head were introduced, and the MPDIoU loss function was used to solve the problems of low and slow detection accuracy and speed in drone aerial images, and the detection accuracy and robustness were improved .

CN119295969APending Publication Date: 2025-01-10SHANGHAI INST OF TECH
View PDF 0 Cites 7 Cited by

Patent Information

Application Number
CN202411172040.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-26
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

The existing drone aerial image object detection methods have low detection accuracy, slow detection speed, and insufficient bounding box regression performance due to the existence of a large number of small targets.

Method used

Using the improved YOLOv8 model, by introducing the RepNCSPELAN4 module and the GAM attention mechanism, a detection head specifically targeted at small targets was added, and a MPDIoU loss function was used to optimize feature extraction and bounding box regression.

Benefits of technology

It improves detection accuracy and accuracy of bounding box regression, enhances the expression ability and robustness of the model, and improves the detection speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119295969A_ABST
    Figure CN119295969A_ABST
Patent Text Reader

Abstract

The invention discloses an unmanned aerial vehicle aerial image target detection method based on improved YOLOv8, and relates to the technical field of target detection, and the method comprises the steps: collecting image data of unmanned aerial vehicle aerial photography, inputting the image data into a backbone network of an improved YOLOv8 model, and extracting features; transmitting the feature map to a neck network for feature processing and fusion, and carrying out target classification and bounding box prediction in a head network by using a detection head specially aiming at a small target and a multi-scale feature map; and calculating the difference between a predicted bounding box and a real bounding box by using an MPDIOU loss function, updating model parameters in a back propagation manner, and outputting a detected target category and bounding box coordinates. According to the method, a C2f module is replaced by RepNCSPELAN4, a GAM attention mechanism is introduced, a small-scale feature detection head is added, an MPDIOU loss function is adopted, feature extraction and fusion are optimized, and the detection precision and bounding box regression accuracy are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of target detection, and in particular to a method for detecting targets in unmanned aerial vehicle (UAV) aerial images based on improved YOLOv8. Background Art

[0002] At present, the difficulties faced in the research of drone datasets include a large number of small targets, complex image backgrounds, large changes in target scales, and targets that are easily covered. In order to solve these problems, many researchers have proposed improvement mechanisms. Sun R, Fan H, Tang Y, et al. proposed a new CNN module SPD-Conv specifically for low-resolution images and small objects: it consists of a space-to-depth (SPD) layer and a non-strided convolution (Conv). Although the use of SPD-Conv does improve the inspection performance of small targets, experiments on the VisDrone 2019 dataset show that the inspection performance does not improve after using SPD-Conv. Some researchers have also proposed reducing the number of Backbone layers of YOLOv8 and increasing the size of the feature map to be detected in the Head part to improve the detection accuracy of small targets. However, reducing the number of backbone network layers of YOLOv8 will inevitably lead to a weakening of the expression ability. In order to reduce the regression positioning loss, Wang G, Chen Y, An P, et al. al. introduced the WIoUv3 loss function, which makes the model pay more attention to anchoring common quality targets and improves positioning ability. However, for objects with smaller proportions, it increases the difficulty of detection in drone aerial photography scenes. In order to better capture important information in the image and improve the expression ability of the model, Gao Z, Yang Z, Han Z. introduced the CBAM attention mechanism, but its computational complexity is high and requires more computing resources.

[0003] In recent years, drones have made important achievements in various fields. Traditional target detection methods have low accuracy and insufficient robustness. Target detection technology based on deep learning has become a research focus. At present, mainstream deep learning methods are mainly divided into two categories: two-stage and one-stage. R-CNN is the pioneering work of the two-stage target detection algorithm and the pioneering work of introducing deep learning into target detection. Although it has high detection accuracy, it has slow detection speed, is difficult to train, difficult to optimize, and lacks robustness. The single-stage target detection algorithm based on convolutional neural network has gradually replaced the traditional target detection algorithm. Summary of the invention

[0004] In view of the above-mentioned problems, the present invention is proposed.

[0005] Therefore, the technical problem solved by the present invention is: the existing UAV aerial image target detection method has low detection accuracy and speed due to the presence of a large number of small targets, and how to improve the bounding box regression performance.

[0006] To solve the above technical problems, the present invention provides the following technical solutions: a method for detecting targets in aerial images taken by unmanned aerial vehicles based on improved YOLOv8, comprising collecting image data taken by unmanned aerial vehicles, inputting the image data into the backbone network of the improved YOLOv8 model to extract features; transferring the feature map to the neck network for feature processing and fusion, using a detection head specifically for small targets and a multi-scale feature map to perform target classification and bounding box prediction in the head network; using the MPDIoU loss function to calculate the difference between the predicted bounding box and the true bounding box, back-propagating to update the model parameters, and outputting the detected target category and bounding box coordinates.

[0007] As a preferred solution of the drone aerial image target detection method based on improved YOLOv8 described in the present invention, wherein: the improved YOLOv8 model includes a backbone network, a neck network, and a head network; the backbone network includes a convolution layer, an activation function layer, a pooling layer, a batch normalization layer, and a GAM attention mechanism module, which is responsible for extracting features from the input image; the neck network includes a multi-scale feature fusion layer, an upsampling layer, and a downsampling layer, which is responsible for further processing and fusing features from the head; the head network includes a detection head, a classification layer, a bounding box regression layer, and a prediction layer, which is responsible for generating the final detection result.

[0008] As a preferred solution of the drone aerial image target detection method based on improved YOLOv8 described in the present invention, the backbone network also includes introducing the RepNCSPELAN4 module and the GAM attention mechanism.

[0009] As a preferred solution of the unmanned aerial image target detection method based on improved YOLOv8 described in the present invention, wherein: the RepNCSPELAN4 module includes a dual-path design and a multi-scale feature extraction strategy, the RepNCSPELAN4 module is a new module in YOLOv9, and the RepNCSPELAN4 module is introduced into the YOLOv8 model to replace the C2f module in the original YOLOv8 model; the dual-path design is that when the feature map is input into the RepNCSPELAN4 module, the dual-path design divides the feature map into two parts, which are processed through different paths respectively; multi-scale feature extraction is a combination of a series of convolutional layers of the RepNCSP module and the backbone network.

[0010] As a preferred solution of the drone aerial image target detection method based on improved YOLOv8 described in the present invention, the GAM attention mechanism includes a channel attention submodule Mc and a spatial attention submodule Ms; the channel attention submodule uses a three-dimensional arrangement to retain information in three dimensions, and amplifies the cross-dimensional channel-space dependency through a two-layer MLP multi-layer perceptron; the spatial attention submodule performs spatial information fusion through two convolutional layers; in the YOLOv8 model, the GAM attention mechanism is integrated after the key layer of the backbone network, and the weight of each channel is adaptively calculated to capture the global features according to the weight ratio, and the weight expression of each channel is adaptively calculated, which is expressed as:

[0011]

[0012] Among them, F1 represents the input feature, F2 represents the intermediate feature, F3 represents the output feature, and M c represents the channel sub-attention module, M s represents the spatial word attention module;

[0013] As a preferred solution of the drone aerial image target detection method based on improved YOLOv8 described in the present invention, the detection head specifically for small targets includes an additional 160*160 detection head that focuses on processing smaller-scale feature maps on the basis of the original YOLOv8 model. The newly added detection head branch adopts a parallel processing strategy with the original detection head of the model. The newly added detection head is specifically responsible for processing the small-scale feature map after upsampling and feature fusion;

[0014] As a preferred solution of the drone aerial image target detection method based on improved YOLOv8 described in the present invention, the MPDIoU loss function is included in the detection head part of the YOLOv8 model, the MPDIoU loss function replaces the original CIoU loss function in the model, and the MPDIoU loss function is used to calculate the difference between the predicted bounding box and the true bounding box, and the model parameters are updated by back propagation; the MPDIoU loss function calculates the ratio of the intersection area and the union area of ​​the predicted bounding box and the true bounding box, which is expressed as:

[0015]

[0016] Among them, d1 represents the distance between the left corner of the predicted box and the left corner of the real box, d2 represents the distance between the right corner of the predicted box and the right corner of the real box, w represents the width of the input feature map, h represents the height of the input feature map, IoU represents the intersection over union ratio, A and B represent the detection boxes of any two drone aerial photography targets; the distance between the left corner of the predicted box and the left corner of the real box is calculated as:

[0017]

[0018] Calculate the distance between the right corner of the predicted box and the right corner of the real box, expressed as:

[0019]

[0020] in, Represents the left and right corner coordinates of the prediction box, Represents the left and right corner coordinates of the real box.

[0021] Another object of the present invention is to provide a drone aerial image target detection system based on improved YOLOv8, which can identify and detect small targets in drone aerial image data, thereby solving the problems of slow detection accuracy and speed caused by the presence of a large number of small targets in the current drone aerial image target detection method.

[0022] As a preferred solution of the drone aerial image target detection system based on improved YOLOv8 described in the present invention, it includes: a feature extraction module, a target classification and bounding box prediction module, and an output module; the feature extraction module is used to collect image data of drone aerial photography, and input the image data into the backbone network of the improved YOLOv8 model to extract features; the target classification and bounding box prediction module is used to transfer the feature map to the neck network for feature processing and fusion, and use a detection head specifically for small targets and a multi-scale feature map to perform target classification and bounding box prediction in the head network; the output module is used to calculate the difference between the predicted bounding box and the real bounding box using the MPDIoU loss function, back-propagate to update the model parameters, and output the detected target category and bounding box coordinates.

[0023] A computer device includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement a method for detecting targets in drone aerial images based on improved YOLOv8.

[0024] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of a method for detecting targets in drone aerial images based on improved YOLOv8.

[0025] Beneficial effects of the present invention: The target detection method for drone aerial images based on improved YOLOv8 provided by the present invention replaces the C2f module in the YOLOv8 model with the RepNCSPELAN4 module, and the RepNCSPELAN4 module adopts a unique dual-path design to extract features from the input image, which not only optimizes the performance of feature extraction, but also effectively extracts and fuses multi-scale features; by introducing the GAM attention mechanism, the improved model adaptively calculates the weight of each channel, effectively captures global features, and reduces information diffusion; by additionally adding a detection head specifically responsible for processing smaller-scale feature maps, the detection accuracy is effectively improved; by replacing the original loss function with the MPDIoU loss function, not only can the accuracy of bounding box regression be effectively improved by calculating the difference between the predicted bounding box and the true bounding box, but also the model parameters can be updated through back propagation to reduce the loss value. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0027] Figure 1 An overall flow chart of a method for detecting targets in drone aerial images based on improved YOLOv8 is provided for the first embodiment of the present invention.

[0028] Figure 2 An experimental data graph of the YOLOv8s model in map@50 for a drone aerial image target detection system based on improved YOLOv8 provided in the second embodiment of the present invention.

[0029] Figure 3 An experimental data graph of an improved YOLOv8 graph in map@50 for a drone aerial image target detection system based on improved YOLOv8 provided in the second embodiment of the present invention.

[0030] Figure 4 Experimental data graph of mAP@50 and mAP@0.5@95 of an improved YOLOv8 model of a drone aerial image target detection method based on improved YOLOv8 provided in the second embodiment of the present invention.

[0031] Figure 5 An overall flow chart of a drone aerial image target detection system based on improved YOLOv8 provided for the third embodiment of the present invention. DETAILED DESCRIPTION

[0032] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.

[0033] Example 1, reference Figure 1 , is an embodiment of the present invention, and provides a method for detecting targets in drone aerial images based on improved YOLOv8, comprising:

[0034] S1: Collect image data taken by drones and input the image data into the backbone network of the improved YOLOv8 model to extract features.

[0035] Furthermore, the improved YOLOv8 model includes a backbone network, a neck network, and a head network; the backbone network includes a convolution layer, an activation function layer, a pooling layer, a batch normalization layer, and a GAM attention mechanism module, which is responsible for extracting features from the input image; the neck network includes a multi-scale feature fusion layer, an upsampling layer, and a downsampling layer, which is responsible for further processing and fusing features from the head; the head network includes a detection head, a classification layer, a bounding box regression layer, and a prediction layer, which is responsible for generating the final detection results.

[0036] It should be noted that the backbone network also includes the introduction of the RepNCSPELAN4 module and the GAM attention mechanism.

[0037] It should also be noted that the RepNCSPELAN4 module includes a dual-path design and a multi-scale feature extraction strategy. The RepNCSPELAN4 module is a new module in YOLOv9. The RepNCSPELAN4 module is introduced into the YOLOv8 model to replace the C2f module in the original YOLOv8 model. The dual-path design is that when the feature map is input into the RepNCSPELAN4 module, the dual-path design divides the feature map into two parts, which are processed through different paths respectively. Multi-scale feature extraction is a combination of a series of convolutional layers of the RepNCSP module and the backbone network.

[0038] It should also be noted that the GAM attention mechanism includes a channel attention submodule Mc and a spatial attention submodule Ms; the channel attention submodule uses a three-dimensional arrangement to retain information in three dimensions and amplifies the cross-dimensional channel-space dependency through a two-layer MLP multi-layer perceptron; the spatial attention submodule performs spatial information fusion through two convolutional layers; in the YOLOv8 model, the GAM attention mechanism is integrated after the key layer of the backbone network, and the weight of each channel is adaptively calculated to capture global features according to the weight ratio, and the weight expression of each channel is adaptively calculated, which is expressed as:

[0039]

[0040] Among them, F1 represents the input feature, F2 represents the intermediate feature, F3 represents the output feature, and M c represents the channel sub-attention module, M s represents the spatial word attention module;

[0041] It should also be noted that the C2f module is replaced by the RepNCSPELAN4 module. The main implementation steps include: first, in-depth understanding of the role and structure of the C2f module in YOLOv8. The C2f module is usually used for feature extraction and enriches feature representation through cross-layer connections and gradient parallelization. Secondly, the structure and function of the RepNCSPELAN4 module are studied. The RepNCSPELAN4 module is introduced in YOLOv9 and combines the advantages of RepNCSP and ELAN networks. It aims to simplify the feature extraction process and optimize gradient flow and feature reuse. Third, ensure that there is a deep learning suitable for model modification. Learn the framework and programming environment, prepare the YOLOv8 code base or pre-trained model, fourth, open the YOLOv8 network definition file, find the part that defines the C2f module, and replace the definition of the C2f module with the definition of the RepNCSPELAN4 module, fifth, test the modified model on a small batch of data to verify whether it can run normally without introducing new errors, observe the output of the model, and ensure that the size and number of channels of the feature map are consistent with expectations, finally, use the complete dataset to train the modified model, observe the changes in indicators such as the loss function and accuracy, and adjust the hyperparameters as needed to optimize the model performance.

[0042] S2: The feature map is passed to the neck network for feature processing and fusion, and the head network is used to perform target classification and bounding box prediction using a detection head specifically for small targets and multi-scale feature maps.

[0043] Furthermore, the detection head specifically for small targets includes an additional 160*160 detection head that focuses on processing smaller-scale feature maps based on the original YOLOv8 model. The newly added detection head branch adopts a parallel processing strategy with the original detection head of the model. The newly added detection head is specifically responsible for processing small-scale feature maps after upsampling and feature fusion.

[0044] It should be noted that feature maps usually use convolutional neural networks to extract image features. Convolutional neural networks generally extract features of different levels from the original image through operations such as convolution layers and pooling layers. In the present invention, the backbone network of the improved YOLOv8 model is used as a feature extraction module. The convolution layer, activation function layer, pooling layer, batch normalization layer, and GAM attention mechanism module included in the backbone network can effectively extract features of different levels from drone aerial images. The extracted feature map will be passed to the neck network of the module for further processing and fusion to obtain a multi-scale feature map. The neck network includes a multi-scale feature fusion layer, an upsampling layer, and a downsampling layer, which can effectively fuse feature information of different scales and enhance the feature expression ability of the model.

[0045] S3: Use the MPDIoU loss function to calculate the difference between the predicted bounding box and the true bounding box, back-propagate to update the model parameters, and output the detected target category and bounding box coordinates.

[0046] Furthermore, the MPDIoU loss function is included in the detection head of the YOLOv8 model. The MPDIoU loss function replaces the original CIoU loss function in the model, and the MPDIoU loss function is used to calculate the difference between the predicted bounding box and the true bounding box, and the model parameters are updated by back propagation; the MPDIoU loss function calculates the ratio of the intersection area and the union area of ​​the predicted bounding box and the true bounding box, which is expressed as:

[0047]

[0048] Among them, d1 represents the distance between the left corner of the predicted box and the left corner of the real box, d2 represents the distance between the right corner of the predicted box and the right corner of the real box, w represents the width of the input feature map, h represents the height of the input feature map, IoU represents the intersection over union ratio, A and B represent the detection boxes of any two drone aerial photography targets; the distance between the left corner of the predicted box and the left corner of the real box is calculated as:

[0049]

[0050] Calculate the distance between the right corner of the predicted box and the right corner of the real box, expressed as:

[0051]

[0052] in, Represents the left and right corner coordinates of the prediction box, Represents the left and right corner coordinates of the real box.

[0053] It should be noted that the original loss function is replaced by the MPDIoU loss function to solve the problems existing in bounding box regression, especially for bounding boxes with the same aspect ratio but completely different width and height values. It aims to solve the problems existing in the traditional loss function when dealing with bounding boxes with the same aspect ratio but different width and height values. MPDIoU makes full use of the geometric features of horizontal rectangles and proposes a new bounding box similarity comparison metric, which comprehensively considers the overlapping or non-overlapping areas, center point distances, and width and height deviations, while simplifying the calculation process.

[0054] It should also be noted that the model outputs the classification results and bounding box coordinate information. The prediction results contain multiple target boxes, each of which contains information such as target category, bounding box coordinates, and confidence. The confidence indicates the model's confidence in the target detection results. The higher the confidence, the more reliable the detection results.

[0055] Example 2, reference Figure 2-Figure 4 , is an embodiment of the present invention, and provides a target detection method for drone aerial images based on improved YOLOv8. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through economic benefit calculation and simulation experiments.

[0056] Before the experiment started, the VisDrone2019 dataset was used for training and testing. The hyperparameters were set, the number of epochs was set to 200, the batch size was set to 8, no pre-training weights were set, and the experimental environment was configured, as shown in Table 1.

[0057] Table 1 Experimental environment hardware and software configuration

[0058]

[0059] After configuring the experimental environment, the VisDrone2019 dataset is used to train the YOLOv8-rgm model. In order to verify the effectiveness of each improved component, an ablation experiment is carried out. By gradually adding small target detection head, GAM attention mechanism, MPDIoU loss function and RepNCSPELAN4 module, the impact of each addition on the model performance is observed and analyzed. At the same time, the YOLOv8-rgm model is compared with YOLOv5s, YOLOv7, YOLOv8m, YOLOv9c and YOLOv8-smr mainstream target detection algorithms to evaluate the performance advantage of the YOLOv8-rgm model in the drone image target detection task.

[0060] The ablation experiment results are Figure 2-Figure 3 It can be seen that after adding the small object detection head, the mAP@50% of the model is effectively improved. After further introducing the GAM attention mechanism and MPDIoU loss function, the precision, recall and mAP values ​​of the model are all improved. Finally, after adding the RepNCSPELAN4 module, the model improves the mAP@50% and mAP@0.5@95% indicators by 9.2% and 6.6% respectively, showing the best performance.

[0061] Comparative experimental results: Figure 4 It can be seen that the mAP@50% and mAP@0.5@95% values ​​of the YOLOv8-rgm model on the VisDrone2019 dataset are 48.2% and 29.7% respectively, which are better than other comparison algorithms. The experimental results show that the YOLOv8-rgm model not only improves the detection accuracy, but also has better robustness and generalization ability under the optimization of the new loss function and attention mechanism.

[0062] Example 3, reference Figure 5 , is an embodiment of the present invention, and provides a drone aerial image target detection system based on improved YOLOv8, including a feature extraction module, a target classification and bounding box prediction module, and an output module.

[0063] The feature extraction module is used to collect image data from drone aerial photography, and input the image data into the backbone network of the improved YOLOv8 model to extract features; the target classification and bounding box prediction module is used to transfer the feature map to the neck network for feature processing and fusion, and use a detection head specifically for small targets and multi-scale feature maps to perform target classification and bounding box prediction in the head network; the output module is used to calculate the difference between the predicted bounding box and the true bounding box using the MPDIoU loss function, back-propagate to update the model parameters, and output the detected target category and bounding box coordinates.

[0064] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0065] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.

[0066] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering, or processing in another suitable manner as necessary, and then stored in a computer memory.

[0067] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc. It should be noted that the above embodiments are only used to illustrate the technical solution of the present invention and are not limited. Although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention, which should be included in the scope of the claims of the present invention.

[0068] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

Claims

1. A method for detecting targets in drone aerial images based on improved YOLOv8, characterized in that: include: Collect image data taken by drones and input the image data into the backbone network of the improved YOLOv8 model to extract features; The feature map is passed to the neck network for feature processing and fusion, and the head network uses a detection head specifically for small objects and multi-scale feature maps to perform object classification and bounding box prediction; The MPDIoU loss function is used to calculate the difference between the predicted bounding box and the true bounding box, and the model parameters are updated by backpropagation to output the detected target category and bounding box coordinates.

2. The method for detecting targets in unmanned aerial images based on improved YOLOv8 as claimed in claim 1, characterized in that: The improved YOLOv8 model includes a backbone network, a neck network, and a head network; The backbone network includes convolutional layers, activation function layers, pooling layers, batch normalization layers, and GAM attention mechanism modules, which are responsible for extracting features from the input image; The neck network includes a multi-scale feature fusion layer, an upsampling layer, and a downsampling layer, which are responsible for further processing and fusing features from the head; The head network includes the detection head, classification layer, bounding box regression layer, and prediction layer, which is responsible for generating the final detection results.

3. The method for detecting targets in unmanned aerial images based on improved YOLOv8 as claimed in claim 2, characterized in that: The backbone network also includes the introduction of the RepNCSPELAN4 module and the GAM attention mechanism.

4. The method for detecting targets in unmanned aerial images based on improved YOLOv8 as claimed in claim 3, characterized in that: The RepNCSPELAN4 module includes a dual-path design and a multi-scale feature extraction strategy. The RepNCSPELAN4 module is a new module in YOLOv9. The RepNCSPELAN4 module is introduced into the YOLOv8 model to replace the C2f module in the original YOLOv8 model. The dual-path design is that when the feature map is input into the RepNCSPELAN4 module, the dual-path design divides the feature map into two parts, which are processed through different paths respectively; Multi-scale feature extraction is a combination of a series of convolutional layers in the RepNCSP module and the backbone network.

5. The method for detecting targets in unmanned aerial images based on improved YOLOv8 as claimed in claim 4, characterized in that: The GAM attention mechanism includes a channel attention submodule Mc and a spatial attention submodule Ms; The channel attention submodule uses a three-dimensional arrangement to retain information in three dimensions and amplifies the cross-dimensional channel-space dependency through a two-layer MLP multi-layer perceptron; The spatial attention submodule performs spatial information fusion through two convolutional layers; In the YOLOv8 model, the GAM attention mechanism is integrated after the key layer of the backbone network. It adaptively calculates the weight of each channel, captures global features according to the weight ratio, and adaptively calculates the weight expression of each channel, which is expressed as: Among them, F1 represents the input feature, F2 represents the intermediate feature, F3 represents the output feature, and M c represents the channel sub-attention module, M s Represents the spatial word attention module.

6. The method for detecting targets in drone aerial images based on improved YOLOv8 as claimed in claim 5, characterized in that: The detection head specifically for small targets includes an additional 160*160 detection head that focuses on processing smaller-scale feature maps on the basis of the original YOLOv8 model. The newly added detection head branch adopts a parallel processing strategy with the original detection head of the model. The newly added detection head is specifically responsible for processing small-scale feature maps after upsampling and feature fusion.

7. The method for detecting targets in unmanned aerial images based on improved YOLOv8 as claimed in claim 6, characterized in that: The MPDIoU loss function is included in the detection head part of the YOLOv8 model. The MPDIoU loss function replaces the original CIoU loss function in the model, and the MPDIoU loss function is used to calculate the difference between the predicted bounding box and the true bounding box, and the model parameters are updated by back propagation; The MPDIoU loss function calculates the ratio of the intersection area and the union area of ​​the predicted bounding box and the true bounding box, expressed as: Where d1 represents the distance between the left corner of the predicted box and the left corner of the real box, d2 represents the distance between the right corner of the predicted box and the right corner of the real box, w represents the width of the input feature map, h represents the height of the input feature map, IoU represents intersection over union, and A and B represent the detection boxes of any two drone aerial photography targets; Calculate the distance between the left corner of the predicted box and the left corner of the real box, expressed as: Calculate the distance between the right corner of the predicted box and the right corner of the real box, expressed as: in, Represents the left and right corner coordinates of the prediction box, Represents the left and right corner coordinates of the real box.

8. A system using the unmanned aerial image target detection method based on improved YOLOv8 as claimed in any one of claims 1 to 7, characterized in that: It includes feature extraction module, target classification and bounding box prediction module, and output module; The feature extraction module is used to collect image data taken by drones, and input the image data into the backbone network of the improved YOLOv8 model to extract features; The target classification and bounding box prediction module is used to transfer the feature map to the neck network for feature processing and fusion, and use a detection head specifically for small targets and a multi-scale feature map to perform target classification and bounding box prediction in the head network; The output module is used to calculate the difference between the predicted bounding box and the true bounding box using the MPDIoU loss function, back-propagate to update the model parameters, and output the detected target category and bounding box coordinates.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method for detecting targets in drone aerial images based on improved YOLOv8 are implemented as described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for detecting targets in drone aerial images based on improved YOLOv8 are implemented as described in any one of claims 1 to 7.

Citation Information

Cited By

  • Garbage detection method, system and equipment of YOLO model, product and medium

    CN119540782A

  • Rail transit personnel detection method and device and storage medium

    CN119964090A

  • Failure spacecraft component detection network and method based on YOLOv8 network

    CN120070965A

  • Small target detection method and system for aerial photography of unmanned aerial vehicle

    CN121353280A

  • Rice disease and pest grade monitoring method, device and equipment based on YOLOv8s algorithm and medium

    CN121504927A