Target detection method and system under view angle of unmanned aerial vehicle based on improved YOLOv8n

By introducing a convolution module based on the receptive field attention mechanism in the drone image object detection, the problem of small-scale target recognition and complex scene processing in the drone image object detection is solved, and higher detection accuracy and robustness are achieved.

CN119723065AInactive Publication Date: 2025-03-28CHANGCHUN INST OF OPTICS FINE MECHANICS & PHYSICS CHINESE ACAD OF SCI
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510230929.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-28
Publication Date
2025-03-28
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

UAV image target detection faces problems such as the increase in the proportion of small targets, dense distribution of targets, serious occlusion phenomenon, and interference from background noise, resulting in problems such as false detection and missed detection.

Method used

Using the object detection method based on improved YOLOv8n, the accuracy and diversity of feature extraction are improved by introducing a convolution module based on the receptive field attention mechanism into the backbone network, combining the receptive field attention convolution and the convolution attention module.

Benefits of technology

It improves the model's sensitivity to details in complex scenarios, enhances the feature expression ability of large-scale or low-contrast targets, and reduces false detection and missed detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119723065A_ABST
    Figure CN119723065A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of target detection, and discloses an improved YOLOv8n-based target detection method and system under the view angle of an unmanned aerial vehicle, and the method comprises the steps: obtaining an image under the view angle of the unmanned aerial vehicle; inputting the collected image in the view angle of the unmanned aerial vehicle into the target detection model, and outputting a detection result; the target detection model comprises a backbone network which is used for carrying out feature extraction on an original feature map and is provided with a receptive field attention mechanism-based convolution module, and the receptive field attention mechanism-based convolution module fuses receptive field attention convolution and a convolution attention module. And using receptive field attention convolution to extract receptive field spatial features of the original feature map. According to the method, the convolution module based on the receptive field attention mechanism is used for replacing a traditional convolution layer in a backbone, the accuracy and diversity of feature extraction are improved, the sensitivity of the model to details in a complex scene is enhanced, and higher feature expression ability can be shown when a large-range or low-contrast target is processed.
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 technology, and in particular to a target detection method and system based on improved YOLOv8n from the perspective of an unmanned aerial vehicle. Background Art

[0002] In recent years, drone technology has developed rapidly, and using drones for aerial target detection has become a general trend and is widely used in fields such as power inspection, ecological protection, and urban traffic monitoring.

[0003] Target detection in drone images is different from that in conventional images and faces greater challenges. First, due to the significant changes in the flight altitude of drones, the scale of objects varies greatly, and the proportion of small targets increases significantly compared to natural scene images. Secondly, when drones fly at low altitudes, the environment is complex, resulting in dense distribution of targets. At the same time, there is a serious occlusion phenomenon, which makes the targets in the image discontinuous and incomplete. In addition, drones have a large field of view, and the captured images contain a lot of background information, which increases the noise interference in the detection. These problems greatly increase the difficulty of target detection in drone images, leading to problems such as false detection and missed detection. Therefore, more accurate target detection algorithms are needed to meet the needs of drone aerial images. Summary of the invention

[0004] The purpose of the present invention is to provide a method and system for detecting targets from the perspective of a drone based on an improved YOLOv8n, which can solve at least one of the above-mentioned technical problems. The specific solution is as follows: According to the specific implementation mode disclosed in the present invention, the first aspect of the present invention discloses a target detection method from the perspective of a drone based on an improved YOLOv8n, comprising: Get images from the drone’s perspective; Input the collected image from the perspective of the drone into the target detection model and output the detection result; The target detection model includes: a backbone network having a convolution module based on a receptive field attention mechanism for extracting features from an original feature map, a neck network for fusing the extracted features, and a head network for generating detection results based on the features fused by the neck network; The convolution module based on the receptive field attention mechanism integrates the receptive field attention convolution and the convolution attention module, utilizes the receptive field attention convolution to extract the receptive field spatial features of the original feature map, introduces the receptive field spatial features into the spatial attention module of the convolution attention module, and the channel attention module of the convolution attention module is parallel to the spatial attention module.

[0005] Preferably, the backbone network comprises: a first convolutional layer of the convolutional module based on the receptive field attention mechanism, four second convolutional layers stacked by the convolutional modules based on the receptive field attention mechanism and the improved C2f modules, and a spatial pyramid pooling module for enhancing the extraction of key features and introducing a large separable kernel attention module; The improved C2f module adopts the convolution module based on the receptive field attention mechanism to replace the second convolution layer in the Bottleneck structure of the original C2f module.

[0006] Preferably, the channel attention module comprises: a channel attention weighting module for generating a channel attention feature map, wherein the channel attention weighting module weights the original feature map and the feature map after global pooling processing to obtain the channel attention feature map; The spatial attention module includes: a grouped convolution for obtaining a receptive field spatial feature map, and a spatial attention map generation module for generating a spatial attention feature map in parallel with the grouped convolution; The feature map output module performs weighted calculation on the channel attention feature map, the receptive field space feature map and the spatial attention feature map, and outputs the feature map after a convolution operation.

[0007] Preferably, in the spatial pyramid pooling module that introduces the large separable kernel attention module, the features extracted by the second convolution layer are input into a 3x3 convolution layer for preliminary feature extraction, and then sequentially pass through three maximum pooling layers, and the output structures of the three maximum pooling layers are connected to form multi-scale features; the multi-scale features are sent to the attention module of the large separable kernel, and the long-range dependency and adaptability of the features are finely captured through the attention mechanism of the separable kernel.

[0008] Preferably, the neck network includes: using a re-parameterized generalized feature pyramid network to replace the PAN-FPN structure in the original neck network of YOLOv8.

[0009] Preferably, the SE attention mechanism is used to replace the channel attention mechanism of the convolutional attention module.

[0010] Preferably, the head network introduces a dynamic detection head based on the attention mechanism to replace the original detection head; The attention mechanism-based dynamic detection head uses the scale-aware feature layer-by-layer attention mechanism, the space-aware attention mechanism, and the task-aware attention mechanism to enhance the features and obtain an enhanced output.

[0011] According to the specific implementation mode disclosed in the present invention, the second aspect of the present invention discloses a target detection system under the perspective of a drone based on an improved YOLOv8n, including: an image acquisition module for acquiring an image under the perspective of a drone; A target detection module, used to input the collected image from the perspective of the drone into a target detection model and output a detection result; The target detection model includes: a backbone network having a convolution module based on a receptive field attention mechanism for extracting features, a neck network for fusing the extracted features, and a head network for generating detection results according to the features fused by the neck network; The convolution module based on the receptive field attention mechanism integrates the receptive field attention convolution and the convolution attention module, utilizes the receptive field attention convolution to extract the receptive field spatial features of the original feature map, introduces the receptive field spatial features into the spatial attention module of the convolution attention module, and the channel attention module of the convolution attention module is parallel to the spatial attention module.

[0012] According to the specific embodiments disclosed in the present invention, the third aspect of the present invention discloses a computer-readable storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the method for editing the content in a document as described in any one of the above items is implemented.

[0013] According to the specific embodiments disclosed in the present invention, in a fourth aspect, the present invention discloses an electronic device, comprising: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the method for editing the content in a document as described in any one of the above items.

[0014] Compared with the prior art, the above solution disclosed in the present invention has at least the following beneficial effects: The present invention replaces the traditional convolutional layer in the backbone with a convolutional module based on the receptive field attention mechanism. The convolutional module based on the receptive field attention mechanism combines the advantages of the receptive field attention convolution and the convolutional attention module. By introducing the receptive field spatial features and the spatial attention mechanism, the accuracy and diversity of feature extraction are improved, and the model's sensitivity to details in complex scenes is enhanced. It can show stronger feature expression capabilities when processing large-scale or low-contrast targets. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the disclosure of the present invention, and together with the specification, are used to explain the principles disclosed in the present invention. Obviously, the drawings described below are only some embodiments disclosed in the present invention, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings: Figure 1 It is a structural schematic diagram of a target detection model from the perspective of a drone based on improved YOLOv8n of the present invention; Figure 2 Schematic diagram of a convolution module based on a receptive field attention mechanism according to an embodiment of the present invention; Figure 3 is a schematic diagram of an improved C2f module according to an embodiment of the present invention; Figure 4 A schematic diagram of a spatial pyramid pooling module of an attention module that introduces a large separable kernel according to an embodiment of the present invention; Figure 5 A schematic diagram of a CSPStage module according to an embodiment of the present invention; Figure 6 A schematic diagram of a reparameterized generalized feature pyramid network according to an embodiment of the present invention; Figure 7 A schematic diagram of introducing a dynamic detection head module based on an attention mechanism according to an embodiment of the present invention; Figure 8 A comparison chart of the detection results of YOLOv8n and the convolution module based on the receptive field attention mechanism of the present invention for a road scene in a low-light environment; Fig. 9 A comparison chart of the detection results of YOLOv8n and the convolution module based on the receptive field attention mechanism of the present invention for a road scene under a complex background; Fig.10 A schematic diagram of the structure of an electronic device provided in this embodiment; Fig.11 It is a schematic diagram of a target detection system from the perspective of a drone based on improved YOLOv8n of the present invention. DETAILED DESCRIPTION

[0016] In order to make the purpose, technical scheme and advantages disclosed in the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments disclosed in the present invention, rather than all the embodiments. Based on the embodiments disclosed in the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection disclosed in the present invention.

[0017] The terms used in the embodiments disclosed in the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the disclosure of the present invention. The singular forms "a", "said" and "the" used in the embodiments disclosed in the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings, and "multiple" generally includes at least two.

[0018] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0019] It should be understood that although the terms first, second, third, etc. may be used to describe in the disclosed embodiments of the present invention, these descriptions should not be limited to these terms. These terms are only used to distinguish the descriptions. For example, without departing from the scope of the disclosed embodiments of the present invention, the first may also be referred to as the second, and similarly, the second may also be referred to as the first.

[0020] It should also be noted that the term "includes", "comprising" or any other variation thereof is intended to cover non-exclusive inclusion, so that a commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprising a ..." do not exclude the existence of other identical elements in the commodity or device including the elements.

[0021] The following is combined with Figure 1-11 Detailed description of the alternative embodiments of the present disclosure. Example

[0022] YOLOv8n is a lightweight version of the YOLOv8 series, including: backbone network, neck network and head network. Among them, the backbone network adopts the C2f module, which combines rich gradient flow information to improve feature extraction capabilities; the C2f module includes multiple Bottleneck modules. The neck network adopts a feature fusion architecture that combines the path aggregation network (PAN) and the feature pyramid network (FPN) to reduce feature loss by fusing multi-scale features; the head network introduces the design of anchor-free and decoupled head, separating the classification and detection heads, and improving the detection accuracy of objects of different scales and shapes.

[0023] Due to the problems of complex background interference, large scale variation of small targets, dense distribution of multiple targets, etc. in drone aerial images, it is necessary to improve the YOLOv8n model and use the improved model for target detection. Therefore, the present invention provides a target detection method from the perspective of a drone based on improved YOLOv8n, comprising the following steps: Step S1: Acquire an image from the perspective of a drone.

[0024] Step S2: input the collected image from the perspective of the drone into the target detection model and output the detection result.

[0025] Among them, the target detection model includes: a backbone network with a convolution module based on a receptive field attention mechanism for extracting features of the original feature map, a neck network for fusing the extracted features, and a head network for generating detection results based on the features fused by the neck network.

[0026] Specifically, the convolution module RFCBAMConv based on the receptive field attention mechanism integrates the receptive field attention convolution RFAConv and the convolution attention module CBAM. The receptive field attention convolution is used to extract the receptive field spatial features of the image from the drone's perspective, and the receptive field spatial features are introduced into the spatial attention channel of the convolution attention module. At the same time, in order to reduce the computational overhead, the SE attention mechanism (Squeeze-and-Excitation) is used to replace the channel attention mechanism of the convolution attention module.

[0027] Furthermore, in the UAV target detection task, facing the challenges of complex scenes and small target detection, the model needs to have stronger feature extraction capabilities, especially when dealing with multi-scale targets and background interference. Traditional convolution operations share the same convolution kernel parameters within the receptive field, which easily ignores the feature differences at different positions, thereby affecting the model's ability to capture details and affecting detectability. Therefore, in order to improve the accuracy and robustness of target detection, the present invention adopts a convolution module RFCBAMConv based on the receptive field attention mechanism and embeds it into the backbone network of YOLOv8n to enhance the effectiveness of feature extraction.

[0028] like Figure 1 As shown in the figure, the backbone network includes: the first convolution layer P1, which processes the image obtained from the drone's perspective to obtain the original feature map and inputs it into the P1 layer for feature extraction. The first convolution layer is a convolution module based on the receptive field attention mechanism, namely the RFCBAMConv module.

[0029] The P2-P5 layers are the second convolutional layers C2f_RFCBAMConv, which are composed of the RFCBAMConv module based on the receptive field attention mechanism and the improved C2f module stacked together.

[0030] The spatial pyramid pooling module SPPF-LSKA of the attention module with a large separable kernel is introduced to enhance the extraction of key features.

[0031] Figure 2 The structure of the RFCBAMConv module is shown, including: a parallel channel attention module and a spatial attention module.

[0032] Specifically, in the channel attention module, the input original feature map first calculates the global information of the input feature map through the global average pooling layer, providing a global semantic description for the channel attention mechanism. On this basis, after linear transformation and activation function, the channel attention weight is generated to weight different channels.

[0033] Furthermore, in addition to the features obtained through global pooling, the original input feature map also directly enters the channel attention weighting module Re-weight. This design allows the model to weight each channel or spatial position according to the original information and global information of the input features, making the weighting process more flexible and having stronger representation capabilities. In this way, the model can fully utilize global information in the weighting process of channel attention and spatial attention without losing the detailed features of the original input, thereby optimizing feature representation and improving model performance.

[0034] In the spatial attention module, a group convolution Group Conv with the same size as the receptive field is used to dynamically generate the expanded features of the receptive field. Group convolution divides the input channels into several groups, and then performs convolution operations on each group independently. The convolution kernel of each group only acts on the input channels of the group and does not operate across groups. Although the group convolution performs convolutions relatively independently within each group, it still generates a spatial feature map. The convolution operation of each group calculates a different spatial feature map, and then these feature maps are combined to form the final output. This operation can effectively extract information from local areas while reducing the amount of calculation.

[0035] Next, average pooling (AvgPool) is used on the input feature map to aggregate the global features of each receptive field, thereby capturing the main patterns and information within the receptive field. In addition, the size of the feature map is adjusted by adjusting the shape operation. The spatial attention mechanism is then used to help the network focus on the key areas in the image and suppress unimportant spatial information.

[0036] Finally, in the feature map output module, the channel attention feature map, the receptive field space feature map and the spatial attention feature map are weighted and calculated, and the output feature map is obtained through a convolution operation with a step size equal to the convolution kernel size.

[0037] Therefore, compared with the original CBAM (Convolutional Block Attention Module) module, the convolutional RFCBAMConv module based on the receptive field attention mechanism optimizes the operation process of the attention mechanism and reduces the computational overhead. Unlike the CBAM module, which performs channel and spatial attention in sequence, the convolutional module based on the receptive field attention mechanism performs weighted processing on both at the same time, enhancing the effectiveness of feature fusion and the focus on key features.

[0038] To further improve efficiency, the convolution module based on the receptive field attention mechanism adopts the Squeeze-and-Excitation attention mechanism to replace the channel-space attention mechanism in CBAM, and removes the global average pooling branch to reduce unnecessary calculations. At the same time, the RFCBAMConv module further optimizes the weighted processing by performing Re-weight operations on the channel attention and spatial attention parts respectively, ensuring that the channel and spatial features can focus on key areas more accurately, thereby improving the overall performance of the model.

[0039] C2f_RFCBAMConv is an improved C2f module, such as Figure 3 As shown in the figure, it contains two convolutional layers: the first convolutional layer is a standard convolution, and in the second convolutional layer, the convolutional module RFCBAMConv module based on the receptive field attention mechanism is used to replace the original Bottleneck structure. This design enhances the ability to capture multi-scale features, and implements adaptive weighting in the channel and spatial dimensions, highlighting important features and reducing the interference of irrelevant information.

[0040] In the C2f_RFCBAMConv module, first, multi-scale features are generated through standard convolution operations; then the channel weights are calculated using the SE attention mechanism, and the spatial features of the receptive field are extracted in combination with grouped convolution for weighted processing. Finally, the weighted features are further processed by the second convolutional layer RFCBAMConv to achieve more efficient feature fusion. This design not only improves the expressiveness of the receptive field features, but also reduces redundant features and improves the overall network efficiency.

[0041] Furthermore, the spatial pyramid pooling SPPF structure adopted in the YOLOv8n architecture lays the foundation for improving the multi-scale feature extraction and target detection performance. This module extracts features through continuous maximum pooling operations, thereby speeding up the processing speed. However, in drone aerial photography applications, due to the complex image features and the presence of small targets, the original model is prone to partial spatial information loss and false detection. Therefore, the present invention introduces a large separable kernel attention module LSKA in the spatial pyramid pooling SPPF module of the YOLOv8n backbone network to enhance the model's attention to key feature information.

[0042] LSKA efficiently captures long-range dependencies and adaptability by decomposing large kernel convolutions, thereby improving the model's ability to process complex spatial and semantic information. The core idea of ​​this module is to decompose the traditional two-dimensional large kernel convolution into a series of horizontal one-dimensional convolutions and vertical one-dimensional convolutions. This decomposition method converts the standard depth convolution (DW-C-Conv) and extended depth convolution (DW-D-Conv) into more efficient separable depth convolution and extended separable depth convolution, which significantly reduces the computational complexity and memory requirements.

[0043] The LSKA module combines the advantages of large kernel convolution and attention mechanism, so that the model can not only capture long-range dependencies over long distances, but also adaptively adjust the importance of different regions and fully tap into global contextual information. In this way, the LSKA module can more accurately model the spatial relationship and semantic information between targets, improve the perception and robustness of the model, and especially enhance the ability to capture target features in complex scenarios. The introduction of this module effectively improves the computational efficiency of the network, while enhancing the ability to model global information, thereby improving the performance of target detection and other visual tasks.

[0044] The first step of the LSKA attention mechanism is to implement spatial separation convolution using a one-dimensional convolution kernel. Specifically, the input feature map is first processed by horizontal one-dimensional convolution and vertical one-dimensional convolution to complete the separation of spatial features, which can not only retain local information but also significantly reduce the computational complexity. Then, the generated feature map is used to create an attention map, which reflects the relative importance of different spatial positions by capturing spatial dependencies. Finally, the generated attention map is applied to the original feature map to adjust the feature weights channel by channel, thereby enhancing the network's ability to process large-scale spatial information.

[0045] Based on the SPPF (Spatial Pyramid Pooling Fast) structure of the original YOLOv8 model, the LSKA module is added after all maximum pooling layers (MaxPool 2d) operations are completed and between the second convolutional layer to further improve the feature extraction capability.

[0046] The specific process is as follows: the input first passes through a convolutional layer for preliminary feature extraction, and then passes through three maximum pooling layers in sequence. The output results of these maximum pooling layers are connected together to form a multi-scale feature representation. Then, the entire connected output is sent to the LSKA module, which uses the attention mechanism of its separable kernel to finely capture long-range dependencies and adaptability, and enhances the modeling ability of global context information. The processed output is then sent to the last convolutional layer for final feature extraction.

[0047] The improved SPPF module, such as Figure 4 As shown in the figure, by introducing the LSKA attention mechanism, the SPPF layer can obtain richer receptive field information from multi-scale features while maintaining the original computational efficiency and parameter quantity. This design can not only effectively improve the model's ability in long-range dependency modeling, but also enable the network to adaptively focus on important features at different spatial locations.

[0048] Therefore, the present invention introduces the LSKA attention mechanism into the SPFF module of YOLOv8, so that the model can capture the spatial relationships in complex scenes more finely, thereby achieving better performance in various visual tasks, especially when processing images with a large receptive field, which can make more full use of global information and improve the overall performance of the model.

[0049] The PAN-FPN structure of YOLOv8 reduces feature loss by fusing multi-scale features. However, PAN-FPN is limited to feature aggregation between adjacent scales during feature fusion, ignoring features between distant scales. As the number of network layers increases, key information of small objects is easily lost. Figure 2 In the neck network shown in the figure, the original PAN-FPN structure is replaced by the RepGFPN structure based on the reparameterized generalized feature pyramid network. In the UAV target detection task, due to factors such as long imaging distance, fast speed and low-altitude flight, small targets account for a small proportion of pixels in the image and are easily ignored or misjudged. In order to improve the model's ability to detect small targets, a small target detection layer is also added to the RepGFPN structure based on the reparameterized generalized feature pyramid network.

[0050] The core idea of ​​the re-parameterized generalized feature pyramid network is to use different numbers of channels for features of different scales under the constraint of lightweight computing, so as to flexibly adjust the expressive power of high-level and low-level features. This design effectively improves the flexibility of feature fusion, enabling the network to optimize the accuracy and efficiency of feature extraction under limited computing resources. Compared with the traditional GFPN structure, RepGFPN improves the real-time performance of the model by removing the additional upsampling operation in queen-fusion, avoiding unnecessary computing overhead, while maintaining a high detection accuracy. In terms of feature fusion, RepGFPN uses the CSPStage module to replace the traditional convolutional feature fusion.

[0051] The structure of CSPStage is as follows Figure 5As shown in the figure, the input is first divided into two branches after the Concat operation. The first branch is processed by 1x1 convolution, and the second branch is further processed by the ELAN (Efficient Layer Aggregation Network) feature aggregation module, and finally a convolution is performed to obtain the fused feature map.

[0052] The ELAN module consists of N RepConv3x3 convolutional layers and 3x3 convolutional layers, which are designed to enhance the expressiveness of features and efficiently aggregate information of different scales. Finally, the outputs of these two branches are merged again through the Concat operation and convolution processing is performed to generate the final feature map. In this way, RepGFPN can effectively improve the feature expression ability of the network while maintaining a low parameter amount, thereby achieving higher accuracy.

[0053] In order to further improve the model's ability to detect small targets, this patent introduces the P2 small target detection layer in the RepGFPN network. The small target detection layer has a higher feature map resolution and adapts to small-sized targets by adjusting the anchor frame. In this way, the model can detect and locate small targets more sensitively, significantly improving the detection accuracy of small targets.

[0054] Combined with the RepGFPN structure of the small target layer, such as Figure 6 As shown in the figure, by fusing feature information at different levels, the model can not only obtain high-resolution feature maps, but also realize multi-scale learning, which further improves the detection effect of the model, especially the positioning and recognition capabilities of small targets in complex scenarios.

[0055] Although YOLOv8n uses a decoupled head structure to separate the classification and detection tasks, it is still a challenge to detect and locate small objects because aerial images usually have a large perception range and low resolution. Figure 2 As shown in the figure, the Dynamic Head module is introduced into the head network to enhance the feature expression ability of the detection head and improve the detection accuracy. The attention mechanism is used to integrate information between different levels to further improve the adaptability and overall performance of the model.

[0056] The Dynamic Head framework uses an attention mechanism between scale-aware feature levels, which enables the network to better identify and process objects of different scales, especially those that are easily overlooked at smaller scales. By introducing multi-scale object recognition capabilities, the model can more accurately process cross-scale object information, thereby improving the robustness of detection.

[0057] At the same time, the Dynamic Head module also enhances the accurate capture of target location information through the spatial awareness attention mechanism. This mechanism can dynamically adjust the degree of attention to the spatial position, helping the network to locate the target more accurately, especially in complex backgrounds or low-resolution situations. In order to further improve the adaptability of the model, the Dynamic Head module also introduces a task-aware output channel attention mechanism, which enables the model to adjust its feature extraction and processing methods according to the needs of different tasks and optimize the detection results.

[0058] like Figure 7 As shown in the figure, by introducing three attention mechanisms: scale awareness, space awareness, and task awareness, the features are comprehensively enhanced to obtain the optimized output.

[0059] In other embodiments, the VisDrone2019 dataset is used, and the target detection model is trained on a system equipped with an NVIDIA RTX4090D graphics card (24GB) and an Intel(R) Xeon(R) Platinum 8474C processor with 16 virtual CPUs (vCPUs).

[0060] Convert the object detection annotation format in the VisDrone dataset to the format required by YOLO. During the conversion process, the label information of each object is accurately mapped to the format required by the YOLO model, including the object category and normalized bounding box coordinates. The coordinates of the bounding box represent the center position, width, and height of the object, and are normalized to ensure that the coordinate range is between [0, 1] to meet the input requirements of the YOLO model.

[0061] During the training process, the present invention uses accuracy, recall and mean average precision (mAP) as evaluation indicators of the model. When evaluating the target detection performance, mAP is calculated at an IoU threshold of 0.5 and in the range of 0.5 to 0.95. The higher the value, the better the detection effect of the model.

[0062] The data were input into the YOLOv8n model and the RLRD-YOLO model of the present invention for comparative experiments, and the results shown in the following table were obtained:

[0063] As can be seen from the table, the model proposed in the present invention has improved accuracy, recall, mAP@50 and mAP@50:95 by 11.9%, 9.5%, 12.2% and 8.4% respectively compared with YOLOv8n. The optimized algorithm has been greatly improved in all aspects of performance indicators, proving the effectiveness of the present invention.

[0064] In order to further verify the effectiveness of the present invention, it is also compared with other methods in the YOLO series, as shown in Table 2. The initial version of YOLOv3 is not suitable for resource-constrained application scenarios due to its complicated structure and large consumption of computing resources. In the subsequent YOLO series algorithms, YOLOv5 and YOLOv8 have attracted widespread attention due to their excellent performance. The main features of YOLOv5 are lightweight network structure and efficient performance, while YOLOv8 improves detection accuracy and robustness through further optimization. The model proposed in the present invention achieves a good balance between accuracy and model efficiency. Compared with YOLOv5s, mAP@50 and mAP@50:95 are increased by 9.4% and 6.5% respectively. Compared with YOLOv8s, the present invention shows obvious advantages in model scale, computational complexity and detection accuracy. At the same time, compared with YOLOv8l, the present invention improves mAP@50 by 1.7%, and the model scale is only 9.2% of YOLOv8l. In addition, compared with the latest YOLOv9s and YOLOv10s proposed in 2024, RLRD-YOLO achieves higher performance indicators while maintaining a lower number of parameters, showing better small target detection capabilities.

[0065]

[0066] Finally, the processed test set images are input into the YOLOv8n model and the RLRD-YOLO model for detection. Some of the detection results are shown in the figure. Fig. 9 and Fig.10 As shown in the figure. The left one is the undetected image, the middle one is the YOLOv8n detection result, and the right one is the RLRD-YOLO detection result. Fig. 9 It can be seen that the baseline algorithm YOLOv8n is easily affected by background noise and has difficulty in accurately identifying targets in dark areas. The RLRD-YOLO algorithm effectively improves the problem of missed detection of targets and can still detect targets well in low-light environments. Fig.10 Due to the dense small targets, the baseline algorithm YOLOv8n has many missed detection problems. The improved RLRD-YOLO algorithm shows stronger recognition ability when processing images with complex backgrounds, effectively reducing false detection and missed detection.

[0067] Example 2 The present invention also provides an apparatus embodiment that is consistent with the above embodiment, which is used to implement the method steps described in the above embodiment. The explanation based on the same name meaning is the same as the above embodiment, and has the same technical effect as the above embodiment, which will not be repeated here.

[0068] like Fig.11As shown, the present invention discloses a target detection system based on an improved YOLOv8n under the perspective of a drone, comprising: An image acquisition module 302 is used to acquire images from the perspective of the drone; The target detection module 304 is used to input the collected image from the perspective of the drone into the target detection model and output the detection result.

[0069] The target detection model includes: a backbone network having a convolution module based on a receptive field attention mechanism for extracting features, a neck network for fusing the extracted features, and a head network for generating detection results according to the features fused by the neck network; The convolution module based on the receptive field attention mechanism integrates the receptive field attention convolution and the convolution attention module, uses the receptive field attention convolution to extract the receptive field spatial features of the image from the perspective of the drone, introduces the receptive field spatial features into the spatial attention mechanism of the convolution attention module, and uses the SE attention module to replace the channel attention mechanism of the convolution attention module.

[0070] Example 3 like Fig.10 As shown, this embodiment provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method steps described in the above embodiment.

[0071] Example 4 The disclosed embodiment of the present invention provides a non-volatile computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions can execute the method steps described in the above embodiment.

[0072] Example 5 Reference below Fig.10 , which shows a schematic diagram of the structure of an electronic device suitable for implementing the disclosed embodiment of the present invention. The terminal device in the disclosed embodiment of the present invention may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig.10 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments disclosed in the present invention.

[0073] like Fig.10As shown, the electronic device may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage device 408 to a random access memory (RAM) 403. In RAM 403, various programs and data required for the operation of the electronic device are also stored. The processing device 401, ROM 402, and RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.

[0074] Typically, the following devices may be connected to the I / O interface 405: an input device 406 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 407 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 408 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 409. The communication device 409 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although Fig.10 An electronic device having various devices is shown, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0075] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 409, or installed from the storage device 408, or installed from the ROM 402. When the computer program is executed by the processing device 401, the above-mentioned functions defined in the method of the embodiment disclosed in the present invention are executed.

[0076] It should be noted that the computer-readable medium disclosed in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0077] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0078] Computer program code for performing the operations disclosed in the present invention may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0079] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to the various embodiments disclosed in the present invention. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0080] The units involved in the embodiments disclosed in the present invention may be implemented by software or hardware, wherein the name of a unit does not limit the unit itself in some cases.

Claims

1. A target detection method based on improved YOLOv8n, characterized in that: include: Get images from the drone’s perspective; Input the collected image from the perspective of the drone into the target detection model and output the detection result; The target detection model includes: a backbone network having a convolution module based on a receptive field attention mechanism for extracting features from an original feature map, a neck network for fusing the extracted features, and a head network for generating detection results based on the features fused by the neck network; The convolution module based on the receptive field attention mechanism integrates the receptive field attention convolution and the convolution attention module, utilizes the receptive field attention convolution to extract the receptive field spatial features of the original feature map, introduces the receptive field spatial features into the spatial attention module of the convolution attention module, and the channel attention module of the convolution attention module is parallel to the spatial attention module.

2. The method according to claim 1, characterized in that The backbone network includes: a first convolution layer of the convolution module based on the receptive field attention mechanism, four second convolution layers stacked by the convolution modules based on the receptive field attention mechanism and the improved C2f modules, and a spatial pyramid pooling module for enhancing the extraction of key features and introducing a large separable kernel attention module; The improved C2f module adopts the convolution module based on the receptive field attention mechanism to replace the second convolution layer in the Bottleneck structure of the original C2f module.

3. The method according to claim 1 or 2, characterized in that: The channel attention module includes: a channel attention weighting module for generating a channel attention feature map, wherein the channel attention weighting module weights the original feature map and the feature map after global pooling processing to obtain the channel attention feature map; The spatial attention module includes: a grouped convolution for obtaining a receptive field spatial feature map, and a spatial attention map generation module for generating a spatial attention feature map in parallel with the grouped convolution; The feature map output module performs weighted calculation on the channel attention feature map, the receptive field space feature map and the spatial attention feature map, and outputs the feature map after a convolution operation.

4. The method according to claim 2, characterized in that: In the spatial pyramid pooling module that introduces the large separable kernel attention module, the features extracted by the second convolution layer are input into a 3x3 convolution layer for preliminary feature extraction, and then pass through three maximum pooling layers in sequence, and the output structures of the three maximum pooling layers are connected to form multi-scale features; the multi-scale features are sent to the attention module of the large separable kernel, and the long-range dependency and adaptability of the features are finely captured through the attention mechanism of the separable kernel.

5. The method according to claim 1, characterized in that The neck network includes: using a re-parameterized generalized feature pyramid network to replace the PAN-FPN structure in the original neck network of YOLOv8.

6. The method according to claim 3, characterized in that The SE attention mechanism is used to replace the channel attention mechanism of the convolutional attention module.

7. The method according to claim 1, characterized in that The head network introduces a dynamic detection head based on the attention mechanism to replace the original detection head; The attention mechanism-based dynamic detection head uses the scale-aware feature layer-by-layer attention mechanism, the space-aware attention mechanism, and the task-aware attention mechanism to enhance the features and obtain an enhanced output.

8. A target detection system based on improved YOLOv8n from the perspective of a drone, characterized in that: include: Image acquisition module, used to obtain images from the perspective of the drone; A target detection module, used to input the collected image from the perspective of the drone into a target detection model and output a detection result; The target detection model includes: a backbone network having a convolution module based on a receptive field attention mechanism for extracting features from an original feature map, a neck network for fusing the extracted features, and a head network for generating detection results based on the features fused by the neck network; The convolution module based on the receptive field attention mechanism integrates the receptive field attention convolution and the convolution attention module, utilizes the receptive field attention convolution to extract the receptive field spatial features of the original feature map, introduces the receptive field spatial features into the spatial attention module of the convolution attention module, and the channel attention module of the convolution attention module is parallel to the spatial attention module.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

10. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to implement the method according to any one of claims 1 to 7.

Citation Information

Cited By

  • TSAS-YOLOv8 small target detection method based on multi-module collaboration

    CN120411616A

  • Infrared target detection method based on bidirectional receptive field attention feature network

    CN121305046A