Target detection method based on YOLO model, electronic equipment and storage medium

By introducing a dual-branch architecture attention mechanism into the YOLO model for multi-scale feature extraction and fusion, the accuracy problem of small target detection in UAV aerial photography scenarios is solved, and efficient detection of small targets is achieved.

CN121280952APending Publication Date: 2026-01-06HUNAN UNIV OF TECH
View PDF 0 Cites 5 Cited by

Patent Information

Application Number
CN202511661358.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-13
Publication Date
2026-01-06

AI Technical Summary

Technical Problem

Existing YOLO models lack the ability to extract features from small targets in drone aerial photography scenarios, making it difficult to effectively distinguish small targets from complex backgrounds, resulting in poor detection accuracy.

Method used

A dual-branch architecture attention mechanism is used for multi-scale feature extraction. Local texture features and global context features are extracted by depthwise separable convolutions and attention branches in the backbone network, respectively. Feature fusion is performed through the neck network, and finally, the target detection result is generated in the head network.

Benefits of technology

It significantly improves the accuracy and robustness of small target detection, better distinguishes small targets from complex backgrounds, and improves detection precision and recall.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121280952A_ABST
    Figure CN121280952A_ABST
Patent Text Reader

Abstract

The invention discloses a target detection method based on a YOLO model, electronic equipment and a storage medium, and relates to the technical field of target detection. Comprising the following steps: inputting an aerial image of an unmanned aerial vehicle into a trained target YOLO model; the target YOLO model comprises a backbone network, a neck network and a head network, and a feature extraction module in the backbone network performs multi-scale feature extraction by adopting a double-branch architecture attention mechanism; performing multi-scale feature extraction on the aerial image by adopting a dual-branch architecture attention mechanism through a feature extraction module in the backbone network, and constructing to obtain a plurality of layers of first comprehensive image features of the aerial image; performing feature fusion on the first comprehensive image features of different levels through a neck network to obtain second comprehensive image features of multiple levels; and inputting the multiple levels of second comprehensive image features into a head network to obtain a target detection result of the aerial image. According to the invention, the accuracy of small target detection can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of target detection technology, and in particular relates to a target detection method, electronic device and storage medium based on the YOLO model. Background Technology

[0002] With the rapid development of drone aerial photography technology, aerial images are widely used in fields such as security monitoring, agricultural plant protection, and geographic surveying. Accurate target detection in aerial images has become a key requirement. However, in drone aerial photography scenarios, targets are often small in size and easily affected by complex backgrounds, which significantly increases the difficulty of target detection.

[0003] Among existing target detection technologies, the YOLO series models are widely used because they balance detection accuracy and speed.

[0004] However, the feature extraction modules of existing YOLO models mostly adopt traditional single-path or simple residual structures, which are insufficient for extracting features of small targets and have difficulty effectively distinguishing small targets from complex backgrounds, resulting in poor accuracy in small target detection. Summary of the Invention

[0005] This application provides a target detection method, electronic device, and storage medium based on the YOLO model, which can improve the accuracy of small target detection.

[0006] A first aspect of this application provides a target detection method based on the YOLO model, comprising: inputting an aerial image of a UAV into a trained target YOLO model; the target YOLO model includes a backbone network, a neck network, and a head network, wherein the feature extraction module in the backbone network uses a dual-branch architecture attention mechanism to perform multi-scale feature extraction; through the feature extraction module in the backbone network, multi-scale feature extraction of the aerial image is performed using a dual-branch architecture attention mechanism to construct a first comprehensive image feature at multiple levels of the aerial image; through the neck network, the first comprehensive image features at different levels are fused to obtain a second comprehensive image feature at multiple levels; and the second comprehensive image features at multiple levels are input into the head network to obtain the target detection result of the aerial image.

[0007] Furthermore, this application proposes a dual-branch architecture attention mechanism comprising a first feature extraction layer and a second feature extraction layer; using the feature extraction module in the backbone network, the dual-branch architecture attention mechanism is employed to perform multi-scale feature extraction on the aerial image, constructing a first comprehensive image feature at multiple levels of the aerial image, including: splitting the aerial image into a first feature map and a second feature map using the feature extraction module in the backbone network; inputting the first feature map into the first feature extraction layer, and extracting local features of the first feature map through depthwise separable convolution; inputting the first feature map into the second feature extraction layer, and extracting global features of the first feature map through the attention mechanism; fusing the local features and global features to obtain the target fused feature of the first feature map; and concatenating the target fused feature with the second feature map to construct the first comprehensive image feature of the aerial image.

[0008] Furthermore, this application proposes to fuse first comprehensive image features at different levels through a neck network to obtain second comprehensive image features at multiple levels, including: performing a first feature fusion on the first comprehensive image features at different levels sequentially through a selective boundary aggregation module in the order of upsampling from high levels to low levels to obtain initial fused image features at multiple levels; and performing a second feature fusion on the initial fused image features at different levels sequentially through a selective boundary aggregation module in the order of downsampling from low levels to high levels to obtain second comprehensive image features at multiple levels.

[0009] Furthermore, this application proposes that the selective boundary aggregation module includes a first calibration attention unit and a second calibration attention unit; the selective boundary aggregation module sequentially performs a first feature fusion on the first comprehensive image features at different levels to obtain initial fused image features at multiple levels, including: using the first input feature as the boundary feature and the second input feature as the semantic feature, passing through the first calibration attention unit to obtain the first calibration feature; the first input feature and the second input feature are two first comprehensive image features at different levels for the first feature fusion; using the second input feature as the boundary feature and the first input feature as the semantic feature, passing through the second calibration attention unit to obtain the second calibration feature; and concatenating the first calibration feature and the second calibration feature to obtain the initial fused image features.

[0010] Furthermore, this application also proposes that the initial fused image features at multiple levels include: initial fused image features from the second level to the (N-1)th level; N is the total number of feature extraction layers of the backbone network.

[0011] Furthermore, this application also proposes that the head network includes a detail enhancement convolution module; inputting multiple levels of second comprehensive image features into the head network to obtain the target detection result of the aerial image, including: inputting the multiple levels of second comprehensive image features into the detail enhancement convolution module respectively, and obtaining multiple levels of third comprehensive image features through a shared convolution mechanism; and determining the aerial target detection result of the aerial image based on the multiple levels of third comprehensive image features.

[0012] Furthermore, this application also proposes that the detail enhancement convolution module adopts a group normalization strategy.

[0013] Furthermore, this application also proposes that the third comprehensive image features include target regression features and target classification features; based on the third comprehensive image features at multiple levels, the aerial target detection result of the aerial image is determined, including: inputting the target regression features at multiple levels into the scale adjustment layer respectively to obtain the corrected regression features at multiple levels; and based on the corrected regression features at multiple levels and the target classification features at multiple levels, the aerial target detection result of the aerial image is determined.

[0014] A second aspect of this application provides an electronic device, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described target detection method based on the YOLO model.

[0015] A third aspect of the embodiments of this application provides a readable storage medium on which a program or instructions are stored, and when the program or instructions are executed by a processor, the above-described target detection method based on the YOLO model is implemented.

[0016] In the target detection method based on the YOLO model provided in this application embodiment, the feature extraction module in the backbone network adopts a dual-branch architecture attention mechanism for multi-scale feature extraction. The dual-branch architecture can capture image features from different angles and scales, while the attention mechanism can focus on key features, enhancing the ability to extract features from small targets and effectively distinguishing small targets from complex backgrounds. After constructing multiple levels of first comprehensive image features of the aerial image through the backbone network, the neck network fuses the first comprehensive image features from different levels, further integrating information to obtain a more representative second comprehensive image feature. Finally, the head network outputs the target detection result based on the fused second comprehensive image feature. The entire process is interconnected, from feature extraction to fusion to detection, comprehensively improving the processing capability for small targets and enhancing the accuracy of small target detection. Attached Figure Description

[0017] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a flowchart illustrating a target detection method based on the YOLO model provided in one embodiment of this application; Figure 2 This is a schematic diagram of a dual-branch architecture attention mechanism provided in one embodiment of this application; Figure 3 This is a schematic diagram of the structure of a selective boundary aggregation module provided in one embodiment of this application; Figure 4 This is a schematic diagram of the structure of a header network provided in one embodiment of this application; Figure 5 This is a schematic diagram of the structure of a target YOLO model provided in one embodiment of this application; Figure 6 This is a schematic diagram of the structure of a target detection device based on the YOLO model provided in one embodiment of this application. Detailed Implementation

[0019] The features and exemplary embodiments of various aspects of this application will be described in detail below. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain this application and not to limit it. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples.

[0020] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes said element.

[0021] In traditional UAV aerial target detection methods, the backbone network feature extraction module uses single-path convolution or simple residual structures, which limits its multi-scale feature extraction capabilities. This architecture struggles to effectively capture the local details and global context of small targets, and is prone to feature confusion under complex background interference, reducing target localization accuracy and classification confidence.

[0022] For example, in security monitoring scenarios, drones acquire 4K resolution aerial images at a rate of 30 frames per second, requiring real-time detection of moving targets on the ground ranging in size from 20×20 pixels to 200×200 pixels. Existing methods use the C3 module of the YOLOv5 backbone network for feature extraction. Its single-branch convolutional structure, after three downsampling operations, retains only 4×4 pixels of effective information in the feature map of small targets. At this point, the texture features of adjacent buildings and vehicle outlines couple in the feature space, causing target bounding box regression offset. Simultaneously, local high-contrast areas formed by foliage shadows during low-altitude flight are misidentified as valid targets, leading to an increased false alarm rate.

[0023] If the aforementioned issues are not addressed, the average accuracy of target detection methods will be limited by both missed detections of small targets and false detections of the background, leading to the failure of keyframe analysis in surveillance videos. Aerial equipment cannot accurately generate heatmaps of target motion trajectories, affecting the quality of input data for intrusion detection and behavior analysis algorithms. Furthermore, feature confusion exacerbates the uncertainty of detection results, causing non-maximum suppression algorithms to erroneously eliminate predicted bounding boxes of real targets, reducing recall rates in dense target scenarios. These problems will directly impact the reliability of UAV inspection systems in critical tasks such as emergency response and infrastructure maintenance.

[0024] To address the aforementioned issues, this application first analyzes the limitations of traditional single-path convolutional structures in UAV aerial photography scenarios. Research reveals that after three downsampling iterations, the effective feature information of small targets in a single-branch feature extraction layer suffers severe attenuation, leading to a break in the connection between local details and global semantics. To resolve this, this application considers introducing a multi-branch architecture at the bottleneck layer of the backbone network, attempting to enhance feature representation capabilities through parallel feature paths. Further investigation reveals that while simply adding convolutional branches can improve local feature capture capabilities, it introduces redundant computation and weakens global context modeling. To resolve this contradiction, this application proposes constructing a dual-branch structure combining depthwise separable convolution and an attention mechanism. The depthwise separable convolution branch is responsible for extracting local texture features, while the attention branch focuses on establishing cross-regional semantic connections. Experimental verification demonstrates that the dual-branch architecture effectively suppresses feature confusion under complex background interference while maintaining computational efficiency.

[0025] In this regard, such as Figure 1The diagram illustrates a flowchart of a target detection method based on the YOLO model. This YOLO-based target detection method can be applied to electronic devices and may include the following steps S110 to S140: S110 inputs aerial images from the drone into the trained target YOLO model; the target YOLO model includes a backbone network, a neck network, and a head network. The feature extraction module in the backbone network uses a dual-branch architecture attention mechanism to extract features at multiple scales.

[0026] In this step, the aerial images captured by the drone refer to image data collected during flight by the camera mounted on the drone. This type of image data typically features a high-altitude perspective and wide coverage. Targets in the images may appear small (e.g., distant vehicles, pedestrians, or small structures), and the background may be complex (e.g., vegetation, buildings, terrain). The acquisition of aerial images is affected by factors such as flight altitude, angle, and lighting conditions, which may lead to blurred, occluded, or scale-changed targets, posing a challenge to the robustness of target detection algorithms.

[0027] A well-trained target YOLO model is a deep learning-based object detection model trained on a large amount of labeled aerial image data. Based on the YOLO series architecture, this model optimizes feature extraction, feature fusion, and detection head design, enabling it to efficiently handle small object detection tasks in aerial images. The training process uses backpropagation to adjust model parameters, minimizing the error between the predicted results and the true labels. Ultimately, the target YOLO model possesses the ability to locate and classify objects in aerial images.

[0028] S120 uses a dual-branch architecture attention mechanism to extract multi-scale features from aerial images through the feature extraction module in the backbone network, thereby constructing the first comprehensive image features of the aerial images at multiple levels.

[0029] In this step, the backbone network refers to the core part of the target YOLO model responsible for initial feature extraction, typically composed of stacked convolutional layers and feature extraction modules. The feature extraction module of the backbone network employs a dual-branch attention mechanism, extracting features of different dimensions through two parallel paths and fusing multi-scale information. This design enhances the target YOLO model's ability to capture small target features while suppressing interference from complex backgrounds, providing richer semantic and detailed features for subsequent networks.

[0030] The dual-branch architecture attention mechanism refers to a feature processing architecture consisting of two parallel branches. One branch extracts local detail features through depthwise separable convolution, while the other branch captures global context features through an attention mechanism. The fusion of the two enhances the ability to focus on small target features, thereby reducing interference from complex backgrounds.

[0031] Multi-scale feature extraction refers to capturing feature information of targets of different sizes in aerial images through convolution operations of feature maps at different levels or different receptive fields. Specifically, it can be implemented using structures such as hierarchical convolution to improve the sensitivity to small targets.

[0032] The first comprehensive image feature refers to the image features extracted and fused by the backbone network through a two-branch architecture attention mechanism, which can more comprehensively describe the target features in aerial images. The first comprehensive image feature is the foundation for subsequent feature fusion and detection, and its quality directly affects the detection accuracy of the target YOLO model.

[0033] S130 uses a neck network to fuse first comprehensive image features at different levels to obtain second comprehensive image features at multiple levels.

[0034] In this step, the neck network refers to the intermediate layer located between the backbone network and the head network. It is responsible for further fusing and optimizing the multi-level first comprehensive features extracted by the backbone network. The neck network can typically adopt a feature pyramid network or similar structure. Through upsampling, downsampling, or lateral connections, it can achieve interaction and enhancement of features at different levels, generating more representative second comprehensive image features and improving the target YOLO model's ability to detect small and occluded targets.

[0035] Feature fusion refers to integrating the first comprehensive image features from different levels in the backbone network through upsampling, downsampling, or splicing operations. Specifically, it can employ fusion strategies such as cross-layer connections, adaptive weight allocation, or attention-guided fusion to enhance target representation by aggregating multi-level semantic and detailed information.

[0036] The second comprehensive image feature refers to the image features fused by the neck network. Compared to the first comprehensive image feature, the second comprehensive image feature further enhances the expressive power of image features through cross-level information interaction (such as the combination of high-level semantic features and low-level detail features), especially showing stronger discriminative power for small targets and targets in complex backgrounds. These features are the direct inputs for the head network to perform the final detection.

[0037] S140 inputs the second comprehensive image features from multiple levels into the head network to obtain the target detection results of the aerial image.

[0038] In this step, the head network refers to the final output layer of the target YOLO model, which is responsible for mapping the second synthesized image features to the target detection result. For example, the head network can contain multiple detection heads, each corresponding to a feature map of a specific scale, which generate prediction results through convolution operations.

[0039] This application embeds a dual-branch architecture attention mechanism into the bottleneck layer of the backbone network. By using a dual-branch structure that extracts local details and global context features in parallel, combined with the multi-level feature fusion mechanism of the neck network, a collaborative optimization framework for small targets and complex backgrounds in aerial images is formed, thereby significantly improving detection accuracy.

[0040] The working process and principle of this application are as follows: aerial images taken by a drone are input into a pre-trained target YOLO model. The target YOLO model includes a backbone network, a neck network, and a head network. The feature extraction module in the backbone network uses a two-branch architecture attention mechanism for multi-scale feature extraction. Through the feature extraction module in the backbone network, the aerial images are extracted at multiple scales using the two-branch architecture attention mechanism, constructing a first comprehensive image feature at multiple levels of the aerial images. Specifically, the two-branch architecture attention mechanism includes a depthwise separable convolutional branch and an attention branch. The depthwise separable convolutional branch is responsible for extracting local texture features, while the attention branch focuses on establishing semantic relationships across regions. This two-branch structure can effectively suppress feature confusion under complex background interference while maintaining computational efficiency.

[0041] Furthermore, the neck network fuses the first comprehensive image features from different levels to obtain a second comprehensive image feature at multiple levels. The role of the neck network is to fuse the multi-scale features extracted by the backbone network to obtain a richer and more comprehensive image representation.

[0042] Finally, the second comprehensive image features from multiple levels are input into the head network to obtain the target detection results of the aerial image. The head network is responsible for transforming the fused features into the final target detection results, including information such as the target's location, size, and category.

[0043] Therefore, this application enhances the feature extraction capability for small targets and complex backgrounds by introducing a dual-branch architecture attention mechanism into the backbone network, and achieves accurate target detection in aerial images through the processing of the neck network and head network.

[0044] As an example, firstly, 4K resolution aerial images captured by a drone are input into a pre-trained target YOLO model. The target YOLO model consists of a backbone network, a neck network, and a head network. The bottleneck layer of the feature extraction module in the backbone network uses a two-branch architecture attention mechanism.

[0045] In the feature extraction process of the backbone network, the aerial image first passes through an initial convolutional layer and a downsampling layer, and then enters the bottleneck layer of the dual-branch attention mechanism. The bottleneck layer divides the input feature map into two branches for processing: the first branch uses depthwise separable convolution to extract local texture features; the second branch uses spatial attention and channel attention mechanisms to extract global contextual information. The output features of the two branches are fused to obtain the output feature map of this layer.

[0046] After processing through multiple bottleneck layers, the backbone network outputs first-level composite image features at multiple scales, such as 1 / 8, 1 / 16, and 1 / 32 scales. These first-level composite image features are then fed into the neck network for further fusion. The neck network employs a feature pyramid structure, fusing features at different scales through upsampling and skip connections to obtain second-level composite image features at multiple levels.

[0047] Finally, the second comprehensive image features are input into the head network. The head network can contain multiple detectors, each responsible for predicting targets at a specific scale. The detectors convert the feature maps into prediction tensors containing target location, size, and class probabilities through convolutional layers. These predictions are processed by a non-maximum suppression algorithm, ultimately outputting the target information detected in the aerial image.

[0048] In this embodiment, the feature extraction module in the backbone network employs a dual-branch architecture attention mechanism for multi-scale feature extraction. The dual-branch architecture captures image features from different angles and scales, while the attention mechanism focuses on key features, enhancing the extraction capability for small target features and effectively distinguishing small targets from complex backgrounds. After constructing multiple levels of first comprehensive image features for the aerial image through the backbone network, the neck network fuses these different levels of first comprehensive image features, further integrating information to obtain a more representative second comprehensive image feature. Finally, the head network outputs the target detection result based on the fused second comprehensive image feature. The entire process is interconnected, from feature extraction to fusion to detection, comprehensively improving the processing capability for small targets and enhancing the accuracy of small target detection.

[0049] In some of the schemes mentioned above in this application, the feature extraction module of the backbone network adopts a dual-branch architecture attention mechanism for multi-scale feature extraction. However, in practical applications, a single feature extraction path is difficult to capture both the local details and global context information of a small target at the same time, which limits the feature expression capability and affects the subsequent detection accuracy.

[0050] In response, this application further proposes a dual-branch architecture attention mechanism including a first feature extraction layer and a second feature extraction layer; S120 includes: The aerial image is divided into a first feature map and a second feature map by the feature extraction module in the backbone network; The first feature map is input into the first feature extraction layer, and local features of the first feature map are extracted through depthwise separable convolution. The first feature map is input into the second feature extraction layer, and global features of the first feature map are extracted through an attention mechanism; The local features and global features are fused to obtain the target fused features of the first feature map; The target fusion feature is stitched together with the second feature map to construct the first comprehensive image feature of the aerial image.

[0051] In this embodiment, the dual-branch architecture attention mechanism CloAtt adopts a unique dual-path design. The first feature extraction layer of the local branch reduces computational overhead and enhances local feature extraction through depthwise separable convolution, while the second feature extraction layer of the global branch uses the attention mechanism to capture global context information. Finally, feature fusion is used to achieve organic complementarity between local and global features.

[0052] The feature fusion stage employs channel-dimensional concatenation, which preserves the diversity of the original features while further enhancing feature representation through fully connected layers. The convolutional kernel size can be flexibly set to 3×3 or 5×5 according to task requirements, and the channel attention weights are dynamically calculated and generated through global average pooling and multiple fully connected layers.

[0053] Specifically, after the aerial image is processed by the backbone network feature extraction module, it is first split into a first feature map and a second feature map. Then, the first feature map is split into two parallel branches at the bottleneck layer. The first feature map enters the depthwise separable convolutional layer of the local branch: first, 3×3 channel-wise convolution is used to extract independent spatial features of each channel, and then 1×1 pointwise convolution is used to realize cross-channel information interaction, effectively preserving the target edge details; at the same time, in order to obtain context-aware weights between -1 and 1, Hadamard product operation and linear transformation are performed on the channel-wise convolution results, and finally, the local features are enhanced by the context-aware weights. The first feature map then enters the attention mechanism layer of the global branch: the spatial attention module focuses on the spatial location information of the target region, and the channel attention module strengthens important feature channels and suppresses background interference. The channel attention weights are generated by global average pooling followed by two fully connected layers. In the fusion stage, the local features output by the local branch and the global features output by the global branch are concatenated in the channel dimension, and feature dimensionality reduction and information integration are achieved through fully connected layers to form a target fusion feature containing multi-dimensional information. Finally, the target fusion feature is combined with the original second feature map through channel stitching to construct the first comprehensive image feature of the aerial image.

[0054] like Figure 2The diagram illustrates a dual-branch architecture attention mechanism. In this mechanism, the first feature map of CloAtt first passes through two convolutional layers (Conv) for initial feature extraction and adjustment of the number of channels. Subsequently, the first feature map undergoes layer normalization (LN) processing to stabilize the training process and accelerate convergence.

[0055] Then, in the GlobalBranch branch, the first feature map, after layer normalization, is first processed by a fully connected (FC) layer. This step performs a linear transformation on the first feature map, extracting a higher-level feature representation. Subsequently, the result after the FC layer processing undergoes a global average pooling (Pool) operation. This step compresses the spatial dimension of the first feature map into a vector, extracting global information. The result of the global average pooling operation is then multiplied by the result of the FC layer processing using a matrix multiplication (MatMul) operation, and attention weights are generated using the Softmax function. Finally, the attention weights are multiplied by the result of the global average pooling operation again using a matrix multiplication (MatMul) operation, thus obtaining the global features of the global branch.

[0056] Then, in the LocalBranch branch, the first feature map, after layer normalization, is processed by a fully connected (FC) layer. This step performs a linear transformation on the first feature map, extracting a higher-level feature representation. Subsequently, the result after the FC layer processing is processed by a depthwise separable convolution (DWconv). This step effectively reduces computation and preserves local details by separating spatial and channel convolution operations. Specifically, the results after two DWconv layers are processed by a Hadamard product and then by a fully connected FC layer, with non-linearity introduced by the Swish activation function. Through further FC layers and tanh activation, context-aware weights between -1 and 1 are generated. Subsequently, these context-aware weights are weighted with the result of the remaining DWconv layer to enhance attention to important local regions.

[0057] Finally, the outputs of the local and global branches are concatenated along the channel dimension using a concat operation to fuse local and global features. The concatenated target fused features are then processed by a fully connected (FC) layer for further integration and refinement of feature information. Subsequently, the target fused features are added to the second feature map of the aerial image using an addition operation to construct the first comprehensive image feature of the aerial image. This step helps to preserve the original feature information and enhance the model's expressive power.

[0058] As an example, the dual-branch architecture attention mechanism includes a first feature extraction layer and a second feature extraction layer. By leveraging the bottleneck layer of the feature extraction module in the backbone network, the dual-branch architecture attention mechanism performs multi-scale feature extraction on the aerial image, constructing a first comprehensive image feature at multiple levels. Specifically, the feature extraction module in the backbone network splits the aerial image into a first feature map and a second feature map. Further, the first feature map is input into the first feature extraction layer, where local features are extracted using depthwise separable convolution. Simultaneously, the first feature map is input into the second feature extraction layer, where global features are extracted using the attention mechanism. Thus, the local and global features are fused to obtain the target fused feature of the first feature map. Finally, the target fused feature is concatenated with the second feature map to construct the first comprehensive image feature of the aerial image.

[0059] This embodiment effectively extracts local and global features of small targets in aerial images, enhancing the ability to represent the features of small targets. Furthermore, by fusing local and global features, the expressive and discriminative capabilities of the features are further improved, contributing to more accurate detection and identification of small targets in aerial images. In addition, the dual-branch attention mechanism maintains computational efficiency while improving the quality and effectiveness of feature extraction, thereby enhancing the overall accuracy and robustness of target detection.

[0060] In some of the schemes described above in this application, when fusing the first comprehensive image features at different levels through the neck network, traditional methods may result in the loss of boundary information or insufficient semantic information due to the unidirectional fusion order, thereby affecting the accuracy of small target detection.

[0061] In this regard, this application further proposes that S130 includes: Following the order of upsampling from high level to low level, the first feature fusion is performed on the first comprehensive image features at different levels sequentially through the selective boundary aggregation module to obtain initial fused image features at multiple levels. Following the order of downsampling from low level to high level, the selective boundary aggregation module sequentially performs a second feature fusion on the initial fused image features at different levels to obtain a second comprehensive image feature at multiple levels.

[0062] In this embodiment, the first feature fusion uses a bottom-up upsampling path to transfer low-resolution semantic information from high-level features to low-level features; the second feature fusion uses a top-down downsampling path to transfer high-resolution detail information from low-level features to high-level features. During both fusion processes, the selective boundary aggregation module can dynamically adjust feature weights through an attention mechanism.

[0063] Specifically, in the first feature fusion stage, high-level features are upsampled and then concatenated with low-level features, inputting into the selective boundary aggregation module. The selective boundary aggregation module includes a first-level calibration attention unit and a second-level calibration attention unit, used to process boundary and semantic information of different input features, respectively. The first-level calibration attention unit uses high-level features as boundary features and low-level features as semantic features, generating an attention mask through a convolutional layer to obtain weighted features. The second-level calibration attention unit uses low-level features as boundary features and high-level features as semantic features, generating another set of attention masks using the same mechanism to obtain weighted features. The two sets of weighted features are fused element-wise, outputting the initial fused image features. In the second feature fusion stage, the low-level initial fused features are downsampled and concatenated with high-level features, repeating the above attention weighting process, finally outputting a second comprehensive image feature containing multi-level details. Through this bidirectional feature fusion path, the boundary details and semantic context information of small targets are effectively preserved, improving the detection accuracy of small targets in complex backgrounds.

[0064] As an example, a neck network is used to fuse first-level comprehensive image features from different levels to obtain second-level comprehensive image features. Specifically, firstly, following the order of upsampling from high-level to low-level, a selective boundary aggregation module sequentially performs a first feature fusion on the first-level comprehensive image features from different levels, resulting in initial fused image features at multiple levels. Here, high-level features are expanded to the same spatial size as low-level features through an upsampling operation. Further, following the order of downsampling from low-level to high-level, a second feature fusion is performed on the initial fused image features from different levels through a selective boundary aggregation module, resulting in second-level comprehensive image features at multiple levels. Thus, low-level features are reduced to the same spatial size as high-level features through a downsampling operation.

[0065] For example, suppose the backbone network contains 5 feature extraction layers, and the first comprehensive image feature contains feature maps from the 2nd to the 5th feature extraction layers, totaling 4 different levels. In the first feature fusion process, starting from the 5th layer, the features of the 5th layer are sequentially upsampled and fused with the features of the 4th layer to obtain the initial fused features of the 4th layer; the initial fused features of the 4th layer are then upsampled and fused with the features of the 3rd layer to obtain the initial fused features of the 3rd layer; and so on, until the initial fused features of the 2nd layer are obtained. In the second feature fusion process, starting from the 2nd layer, the initial fused features of the 2nd layer are sequentially downsampled and fused with the initial fused features of the 3rd layer to obtain the second comprehensive feature of the 3rd layer; the second comprehensive feature of the 3rd layer is then downsampled and fused with the initial fused features of the 4th layer to obtain the second comprehensive feature of the 4th layer; and so on, until the second comprehensive feature of the 5th layer is obtained.

[0066] This embodiment achieves bidirectional fusion of features at different levels. High-level features are upsampled and fused into low-level features, enhancing the semantic information of the low-level features; conversely, low-level features are downsampled and fused into high-level features, enhancing the spatial detail information of the high-level features. This bidirectional feature fusion mechanism effectively improves feature representation capabilities, enabling the model to better capture the features of targets at different scales, thereby improving the accuracy of target detection, especially for small targets.

[0067] In some of the solutions described above in this application, when feature fusion is performed through the selective boundary aggregation module, the interaction between boundary features and semantic features between different levels of the first integrated image features is insufficient, resulting in an imbalance between boundary clarity and semantic integrity in the initial fused image features, which affects the accuracy of subsequent target detection.

[0068] In this regard, this application further proposes that the selective boundary aggregation module includes a first calibration attention unit and a second calibration attention unit; The selective boundary aggregation module sequentially performs the first feature fusion on the first comprehensive image features at different levels to obtain initial fused image features at multiple levels, including: Using the first input feature as the boundary feature and the second input feature as the semantic feature, the first calibration feature is obtained through the first calibration attention unit; the first input feature and the second input feature are two different levels of first comprehensive image features for the first feature fusion. Using the second input feature as the boundary feature and the first input feature as the semantic feature, the second calibration feature is obtained through the second calibration attention unit; The first calibration feature and the second calibration feature are concatenated to obtain the initial fused image features.

[0069] In this embodiment, the first calibration attention unit is configured to calculate spatial dimension attention weights on the input boundary features to extract salient region information related to semantic features from the boundary features; the second calibration attention unit is configured to calculate channel dimension attention weights on the input semantic features to enhance the key channel responses associated with the boundary features in the semantic features. The first input features and the second input features are respectively derived from first comprehensive image features at different levels, and the level difference is between adjacent levels.

[0070] Specifically, in the first feature fusion process, the first input feature is input as a boundary feature into the first recalibration attention unit, which generates a spatial weight matrix through a spatial attention mechanism to spatially recalibrate the semantic features of the second input feature, highlighting local details related to the boundary. At the same time, the second input feature is input as a boundary feature into the second recalibration attention unit, which generates a channel weight vector through a channel attention mechanism to channel recalibrate the semantic features of the first input feature, strengthening the global context related to the semantics.

[0071] Through these two reverse attention recalibration operations, boundary features and semantic features achieve complementary enhancement in both spatial and channel dimensions. Specifically, the first recalibration highlights local details related to the boundary, while the second recalibration strengthens global contextual information related to semantics. Finally, the results of the two recalibrations are concatenated along the channel dimension to form an initial fused image feature that simultaneously preserves boundary details and semantic information.

[0072] This process, through a bidirectional attention interaction mechanism, not only effectively mitigates the feature representation bias that may result from a single attention path, but also significantly improves the feature discrimination of small targets in complex backgrounds. Furthermore, it greatly enhances the recall rate of small target detection and effectively suppresses false detections due to background noise, providing richer and more accurate feature representations for subsequent small target detection.

[0073] like Figure 3 The diagram illustrates the structure of a selective boundary aggregation module. This module receives first comprehensive image features at different levels as input, denoted as boundary features and semantic features, respectively. First, the first input features... As the boundary feature input, the first calibration attention unit generates a spatial weight matrix through a spatial attention mechanism, which is then applied to the second input feature. Spatial recalibration is performed, and boundary salient region information related to semantic features is extracted to obtain the first recalibrated feature; simultaneously, the second input feature is used. As the boundary feature input, the second calibration attention unit generates a channel weight vector through a channel attention mechanism, which is applied to the first input feature. Channel recalibration is performed to enhance the responses of key channels associated with boundary features in semantic features, resulting in a second-level calibrated feature. Then, the first and second-level calibrated features are concatenated using a Concat operation. The concatenated result is then subjected to a 3×3 Convolution Conv operation, batch normalization (BN), and finally processed by the ReLU activation function to output the initial fused image feature Z.

[0074] As an example, firstly, the first input feature is used as the boundary feature, and the second input feature is used as the semantic feature, and these are input into the first calibration attention unit. The first and second input features are two different levels of first comprehensive image features for the first feature fusion. The first calibration attention unit processes the input features to obtain the first calibration feature.

[0075] Next, the second input feature is used as the boundary feature, and the first input feature is used as the semantic feature, and then input into the second calibration attention unit. The second calibration attention unit processes the input features to obtain the second calibration feature.

[0076] Finally, the first calibration feature and the second calibration feature are concatenated to obtain the initial fused image features.

[0077] Specifically, the first and second calibration attention units can be implemented using attention mechanisms. For example, self-attention or channel attention mechanisms can be used. Attention mechanisms can adaptively adjust the weights of features, highlighting important features and suppressing unimportant features.

[0078] This embodiment achieves effective fusion of features at different levels. The selective boundary aggregation module recalibrates the input features from both boundary and semantic perspectives using a dual-calibration attention unit, extracting richer and more refined feature information. This bidirectional feature fusion method enhances the model's ability to perceive target boundaries and semantic information, helping to improve the accuracy of target detection, especially for small targets and targets in complex backgrounds. Simultaneously, this method maintains computational efficiency, making it suitable for real-time detection scenarios.

[0079] In some of the solutions described above in this application, deep convolutional structures encounter significant challenges in small object detection tasks. As the number of network layers increases, the fine-grained features of small objects are gradually lost during multiple downsampling processes, leading to a decline in detection performance.

[0080] In this regard, this application further proposes that the initial fused image features at multiple levels include: initial fused image features from the second level to the (N-1)th level; N is the total number of feature extraction layers of the backbone network.

[0081] In this embodiment, the total number of feature extraction layers N in the backbone network is set to an integer greater than or equal to 3, and the initial fused image feature layer range is limited to the intermediate layers. For example, when N is 5, the first comprehensive image feature of the second layer is fused with the first comprehensive image feature of the third layer to obtain the initial fused image feature of the second layer; the first comprehensive image feature of the third layer is fused with the first comprehensive image feature of the fourth layer to obtain the initial fused image feature of the third layer; and the first comprehensive image feature of the fourth layer is fused with the first comprehensive image feature of the fifth layer to obtain the initial fused image feature of the fourth layer. By excluding only the features of the first layer and retaining the upsampling reconstruction of other layers, the information attenuation of small targets in the downsampling stage can be alleviated, thereby optimizing the detection performance of small targets.

[0082] Specifically, during feature fusion, features from the first layer, being close to the input layer, may contain excessive background noise or local detail interference, and are therefore excluded from fusion. Features from other layers participate in the fusion, fully utilizing information from different levels. For example, when the backbone network contains five feature extraction layers, features from layers 2, 3, 4, and 5 participate in the fusion operation, avoiding the influence of noise interference from the first layer on the fusion result. The features from each participating layer interact across layers through a selective boundary aggregation module, further strengthening the complementarity between boundary and semantic information, thereby improving the accuracy of subsequent object detection.

[0083] As an example, the initial fused image features across multiple levels include those from the second level to the (N-1)th level, where N is the total number of feature extraction layers in the backbone network. Specifically, the total number of feature extraction layers N in the backbone network can be set to 5. In this case, the initial fused image features across multiple levels include those from the second, third, and fourth levels, while the first-level features do not participate in the fusion.

[0084] Furthermore, the initial fused image features of the second level can be obtained by fusing the first comprehensive image features of the second and third levels adjacent to the first level; the initial fused image features of the third level can be obtained by fusing the first comprehensive image features of the third and fourth levels; and the initial fused image features of the fourth level can be obtained by fusing the first comprehensive image features of the fourth and fifth levels.

[0085] This embodiment performs multi-level feature fusion (excluding the first level), preserving useful information at each level while reducing the adverse effects of noise in the first level, thus improving the effectiveness of feature fusion for small target detection. This embodiment fully utilizes the advantages of different levels of features to ensure target detection performance, especially for small target detection, mitigating information attenuation issues through multi-level fusion and upsampling reconstruction. This method, while ensuring target detection performance, adapts to the needs of small target detection, making it particularly suitable for UAV aerial target detection scenarios with high real-time requirements.

[0086] In some of the solutions described above in this application, when the head network generates target detection results, the image features after feature fusion may lose detailed information about small targets, resulting in insufficient detection accuracy.

[0087] In this regard, this application further proposes that the head network includes a detail-enhancing convolutional module; S140 includes: The second comprehensive image features at multiple levels are input into the detail enhancement convolution module, and the third comprehensive image features at multiple levels are obtained through a shared convolution mechanism; Based on the third comprehensive image features at multiple levels, the aerial target detection results of the aerial image are determined.

[0088] In this embodiment, the detail enhancement convolution module employs multiple sets of differential convolutions (such as central differential convolution, angular differential convolution, horizontal differential convolution, vertical differential convolution, etc.) in parallel with ordinary convolutions to process the input second comprehensive image features, thereby enhancing the extraction of detail information. Ordinary convolutions are responsible for basic feature extraction, while differential convolutions, by capturing pixel gradient changes in multiple directions, focus on extracting edge features and texture details, enhancing the capture of subtle structures of small targets.

[0089] Meanwhile, a reparameterization technique is introduced. This technique uses multi-branch differential convolution and ordinary convolution to extract features in parallel during training. During inference, it can be equivalently converted into a single convolutional layer, ensuring that the model does not need to add extra parameters and significantly reducing inference time. It is very suitable for scenarios with high real-time requirements, such as drone aerial target detection.

[0090] Specifically, after the second comprehensive image feature is input into the detail enhancement convolutional module, multi-dimensional feature extraction is performed, followed by multiple sets of differential convolutions and ordinary convolutions in parallel. For example, parallel differential convolutions (such as horizontal and vertical differential convolutions) are based on convolutional kernels of the same size, capturing pixel gradient changes in different directions to enhance details such as the horizontal and vertical edges of the target, respectively. Ordinary convolutions are responsible for integrating basic features, providing key clues for accurate target recognition. After multiple sets of second comprehensive image features are concatenated along the channel dimension, they are further integrated and optimized through convolutional layers to generate the third comprehensive image feature.

[0091] like Figure 4 The diagram illustrates the structure of a head network. The input second-level synthesized image features are labeled P2, P3, P4, and P5. These second-level synthesized image features are first subjected to 1×1 convolution and group normalization, a step that initially adjusts information such as the number of channels in the second-level synthesized image features.

[0092] Subsequently, these processed second-synthesized image features are fed into a detail-enhancing convolutional module, which consists of one standard convolutional layer and four parallel differential convolutional layers. The standard convolutional layer collects the intensity level information of the second-synthesized image features, i.e., the actual brightness or color value of the pixels; the differential convolutional layers capture multi-directional pixel gradient changes of the second-synthesized image features, focusing on extracting edge features and texture details. Furthermore, the detail-enhancing convolutional module employs a reparameterization technique, using a multi-branch structure during training and equivalently converting it to a single convolutional layer during inference. This ensures that the model requires no additional parameters and significantly reduces inference time, making it suitable for lightweight scenarios.

[0093] After processing by the detail enhancement convolutional module, it continues into subsequent branches. Each branch contains Conv-Reg and Scale, and Conv-Cls structures. Conv-Reg is used for object regression to predict the position and size of the object bounding box; Conv-Cls is used for object classification to predict the object category; and the Scale operation is used to adjust the feature scale and optimize the feature representation.

[0094] This embodiment effectively enhances the detail features of small targets in aerial images, improving the accuracy of small target detection. The shared convolution mechanism reduces the number of model parameters and improves computational efficiency. The fusion of multi-dimensional features enhances the robustness of target detection.

[0095] In some of the solutions described above in this application, when the detail enhancement convolution module processes multi-level second comprehensive image features, the distribution differences of feature maps at different levels may lead to unstable training or difficulty in convergence, affecting the accuracy of aerial target detection results.

[0096] In this regard, this application further proposes that the detail enhancement convolution module adopts a group normalization strategy.

[0097] In this embodiment, the group normalization strategy divides the channels of the input second comprehensive image features into multiple groups, and performs independent normalization processing on the second comprehensive image features within each group, reducing the distribution differences between second comprehensive image features at different levels. The group normalization strategy can work in conjunction with reparameterization techniques. Reparameterization extracts features during training through parallel extraction of features using multi-branch differential convolutions and ordinary convolutions, and during inference, it is equivalently converted to a single convolutional layer for lightweighting. The group normalization strategy adjusts the feature distribution through group normalization, providing a more stable input for subsequent feature extraction. The number of groups in the group normalization strategy is dynamically adjusted according to the number of channels in the second comprehensive image features; for example, each group contains 32 channels, ensuring that the normalization process adapts to the channel dimensions of second comprehensive image features at different levels.

[0098] Specifically, in the detail enhancement convolution module, the group normalization strategy is applied to the feature maps after the 1×1 convolution and before the differential convolution and the regular convolution. When the second comprehensive image features from multiple levels are input into the detail enhancement convolution module, the number of channels is first adjusted through 1×1 convolution, and then group normalization is performed on the feature maps. This divides the channels of each feature map into a fixed number of groups, calculates the mean and variance of the features within each group, and standardizes the feature values. This process eliminates the scale differences between feature maps at different levels, alleviates the vanishing or exploding gradient problem, and makes the training process more stable. For example, in aerial image processing, low-level feature maps contain more detailed information but have a larger numerical range, while high-level feature maps have rich semantic information but a smaller numerical range. The group normalization strategy adjusts the distribution of features at each level independently through grouping, ensuring the consistency of multi-scale features in subsequent target regression and classification, and improving the accuracy of small target detection.

[0099] As an example, the detail enhancement convolutional module employs a group normalization strategy. Specifically, in this module, the input feature map is divided into multiple groups, with each group undergoing independent normalization. Group normalization reduces the impact of batch size on model performance and improves model stability. For instance, the input feature map can be evenly divided into four groups along the channel dimension (or dynamically adjusted based on the number of channels, such as a default of 32 channels per group). The mean and variance are calculated independently within each group, followed by normalization. After group normalization, differential convolution, regular convolution, and non-linear activation are performed to enhance the detailed features.

[0100] This embodiment effectively improves the model's ability to detect small targets. Group normalization reduces the impact of batch size on model performance and improves model stability under different batch sizes. Simultaneously, group normalization can alleviate internal covariate shift issues to some extent, helping the model better learn and preserve detailed features. Therefore, the detail enhancement convolution module can more effectively extract and enhance the features of small targets, improving the model's accuracy in detecting small targets.

[0101] In some of the schemes described above in this application, the head network generates multiple levels of third comprehensive image features through detail enhancement convolution modules. However, the target regression features at different levels have scale differences in spatial dimensions. Directly using the original regression features may lead to target localization deviation and affect the accuracy of small target detection.

[0102] In response, this application further proposes a third comprehensive image feature, including target regression features and target classification features; Based on multi-level third-level comprehensive image features, the aerial target detection results of the aerial image are determined, including: The target regression features at multiple levels are input into the scale adjustment layer to obtain modified regression features at multiple levels. Based on multi-level modified regression features and multi-level target classification features, the aerial target detection results of aerial images are determined.

[0103] In this embodiment, the scaling layer uses a learnable scaling factor and offset for each channel to adjust the numerical range of the target regression features, eliminating inconsistencies in feature responses caused by differences in receptive field and semantic intensity between different feature maps, thus enhancing the discriminative power of the regression features. The target regression features include the center point coordinates, width, and height information of the target bounding box, with each level of feature map corresponding to a preset baseline anchor box size. The modified regression features enhance the regression information of key channels (such as the detail channel of small target bounding boxes) through scaling factors and fine-tune the feature distribution through offsets, achieving cross-level regression feature adaptability optimization. The target classification features are processed by a softmax function to generate a target category probability distribution, which, together with the modified regression features, is input into the prediction layer to generate the final detection box and its confidence score.

[0104] Specifically, after the head network outputs the third comprehensive image features, target regression features and target classification features are processed through parallel branches. For target regression features at each level, the scale adjustment layer dynamically learns the scaling factor and offset based on the feature response intensity of the feature map at that level. For example, for low-level regression features containing small target details, a larger scaling factor is assigned to its key channels to enhance the response. The modified regression features amplify important regression information through scaling factors and adjust the feature distribution through offsets, making the regression features at different levels more adaptable to the subsequent prediction process in terms of numerical dynamic range. After normalization, the target classification features and the modified regression features are input into the classification branch and regression branch respectively for independent processing. Candidate boxes with confidence scores higher than a threshold are selected, and then overlapping detection boxes are removed using a non-maximum suppression algorithm to output the aerial target detection results. This scheme effectively reduces the localization error of small targets and improves the detection robustness in complex backgrounds through hierarchical scale calibration and collaborative optimization of classification-regression branches.

[0105] As an example, the three-level feature maps output from the backbone network are input into the head network. The third-level feature map is upsampled by a factor of 2 through a deconvolution layer, the second-level feature map has its channel count adjusted through a 1×1 convolution, and the first-level feature map is downsampled through a max-pooling layer. The adjusted regression feature maps at each level are then passed through a scale adjustment layer to generate corrected regression features containing optimization information for the corresponding level. The corrected regression features at each level are spatially aligned with the target classification feature map at the corresponding level and used for bounding box regression and class prediction at that level, respectively. Finally, the prediction results from each level are summarized to generate bounding box coordinate regression values ​​and class probability distributions. A non-maximum suppression algorithm is then used to output the target detection boxes and class labels in the aerial image.

[0106] This embodiment effectively enhances the localization accuracy of small targets in a multi-level feature space. Through the channel-level feature scaling and offset mechanism of the scale adjustment layer, the network can adaptively capture the geometric feature changes of targets at different scales. By combining the branch co-optimization of classification features and regression features, the interference of complex backgrounds on localization accuracy is significantly reduced, improving the detection accuracy of small targets in UAV aerial photography scenarios while maintaining real-time detection speed.

[0107] The following example uses the YOLOv8 network structure to provide a specific illustration of the object detection method based on the YOLO model proposed in this application.

[0108] like Figure 5 The diagram illustrates the structure of a target YOLO model. The target YOLO model comprises three parts: a backbone network, a neck network, and a head network.

[0109] In the backbone network, the input aerial image first undergoes multiple convolutional Conv operations to progressively extract basic features. Next, the feature extraction module C2f further refines the features, enhancing their expressive power. Subsequently, the feature extraction module C2f-C1oAtt, employing a dual-branch architecture with an attention mechanism, splits the aerial image using a Split operation. Then, the Bottleneck-C1oAtt attention module with multiple bottleneck layers performs multi-scale feature extraction, fine-tuning the features and focusing on important information. Finally, the SPPF layer fuses feature information from different scales through spatial pyramid pooling, providing rich multi-scale feature representations for subsequent processing.

[0110] Then, in the neck part of the network, a combination of the Selective Boundary Aggregation (SBA) module and the feature extraction module C2f is mainly used. The SBA module and the C2f module work alternately to perform multi-level feature fusion and optimization on the features from the backbone part of the network, respectively, in the order of upsampling from high level to low level and downsampling from low level to high level. This further integrates semantic and detailed information from different levels, improving the quality and discriminative power of the features.

[0111] Finally, in the Head section of the network, the Detect_LSDECD head is used to detect targets based on the multi-level features processed by the Neck network. The Detect_LSDECD head is responsible for classifying and regressing the features to determine the location (bounding box) and category of the target. The entire process, through the synergistic effect of each module, fully utilizes multi-scale features, ensuring detection accuracy while enhancing the model's target perception ability through attention mechanisms and feature fusion strategies. This makes it suitable for target detection tasks in complex scenarios such as drone aerial photography.

[0112] Based on the target detection method based on the YOLO model provided in this application, correspondingly, this application also provides specific embodiments of a target detection device based on the YOLO model.

[0113] Figure 6 A schematic diagram of the hardware structure of a target detection device based on the YOLO model provided in an embodiment of this application is shown.

[0114] The target detection device based on the YOLO model may include a processor 601 and a memory 602 storing computer program instructions.

[0115] Specifically, the processor 601 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.

[0116] Memory 602 may include mass storage for data or instructions. For example, and not limitingly, memory 602 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 602 may include removable or non-removable (or fixed) media. Where appropriate, memory 602 may be internal to an integrated gateway disaster recovery device. In a particular embodiment, memory 602 is non-volatile solid-state memory.

[0117] The processor 601 reads and executes computer program instructions stored in the memory 602 to implement any of the target detection methods based on the YOLO model in the above embodiments.

[0118] In one example, the YOLO-based target detection device may further include a communication interface 603 and a bus 610. Wherein, as... Figure 6 As shown, the processor 601, memory 602, and communication interface 603 are connected through bus 610 and complete communication with each other.

[0119] The communication interface 603 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.

[0120] Bus 610 includes hardware, software, or both, that couples components of a YOLO-based target detection device together. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 610 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, any suitable bus or interconnect is contemplated herein.

[0121] Furthermore, in conjunction with the YOLO-based target detection method in the above embodiments, this application embodiment can provide a computer storage medium for implementation. This computer storage medium stores computer program instructions; when these computer program instructions are executed by a processor, they implement any of the YOLO-based target detection methods in the above embodiments.

[0122] In addition, in conjunction with the target detection method based on the YOLO model in the above embodiments, this application embodiment can provide a computer program product for implementation. When the instructions in the computer program product are executed by the processor of an electronic device, the electronic device performs the target detection method based on the YOLO model provided in any aspect of the above embodiments of this application.

[0123] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.

[0124] The functional blocks shown in the above-described structural diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.

[0125] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.

[0126] The aspects of this disclosure have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by special-purpose hardware performing the specified functions or actions, or can be implemented by a combination of special-purpose hardware and computer instructions.

[0127] The above description is merely a specific implementation of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.

Claims

1. A target detection method based on a YOLO model, characterized in that, The method comprises: inputting a drone aerial image into a trained target YOLO model; the target YOLO model comprises a backbone network, a neck network and a head network, and a feature extraction module in the backbone network adopts a double-branch architecture attention mechanism for multi-scale feature extraction; through the feature extraction module in the backbone network, multi-scale feature extraction is performed on the aerial image by adopting the double-branch architecture attention mechanism, and a plurality of levels of first comprehensive image features of the aerial image are constructed; through the neck network, the first comprehensive image features of different levels are fused to obtain a plurality of levels of second comprehensive image features; the plurality of levels of second comprehensive image features are input into the head network to obtain a target detection result of the aerial image.

2. The method of claim 1, wherein, The double-branch architecture attention mechanism comprises a first feature extraction layer and a second feature extraction layer; the double-branch architecture attention mechanism comprises a first feature extraction layer and a second feature extraction layer; through the feature extraction module in the backbone network, multi-scale feature extraction is performed on the aerial image by adopting the double-branch architecture attention mechanism, and a plurality of levels of first comprehensive image features of the aerial image are constructed, comprising: the first feature map is input into the first feature extraction layer, and the local features of the first feature map are extracted by depth separable convolution; the first feature map is input into the second feature extraction layer, and the global features of the first feature map are extracted by the attention mechanism; the local features and the global features are fused to obtain target fusion features of the first feature map; the target fusion features and the second feature map are spliced to construct the first comprehensive image features of the aerial image.

3. The method of claim 1, wherein, the double-branch architecture attention mechanism comprises a first feature extraction layer and a second feature extraction layer; in order from high level to low level, the first feature fusion of the first comprehensive image features of different levels is sequentially performed by the selective boundary aggregation module to obtain a plurality of levels of initial fusion image features; in order from the low level to the high level, the second feature fusion of the initial fusion image features of different levels is sequentially performed by the selective boundary aggregation module to obtain the plurality of levels of second comprehensive image features.

4. The method of claim 3, wherein, the selective boundary aggregation module comprises a first re-calibration attention unit and a second re-calibration attention unit; the double-branch architecture attention mechanism comprises a first feature extraction layer and a second feature extraction layer; the double-branch architecture attention mechanism comprises a first feature extraction layer and a second feature extraction layer; the double-branch architecture attention mechanism comprises a first feature extraction layer and a second feature extraction layer; The second re-calibration attention unit is used to obtain a second re-calibration feature by taking the second input feature as a boundary feature and the first input feature as a semantic feature. The first re-calibration feature and the second re-calibration feature are spliced to obtain the initial fusion image feature.

5. The method of claim 3, wherein, The multiple levels of initial fusion image features include the initial fusion image features from the second level to the N-1 level, where N is the total number of feature extraction layers of the backbone network.

6. The method of claim 1, wherein, The head network includes a detail enhancement convolution module. The multiple levels of second comprehensive image features are input into the head network to obtain the aerial image target detection result, including: The multiple levels of second comprehensive image features are input into the detail enhancement convolution module respectively to obtain multiple levels of third comprehensive image features through a shared convolution mechanism. The aerial image target detection result is determined based on the multiple levels of third comprehensive image features.

7. The method of claim 6, wherein, The detail enhancement convolution module adopts a group normalization strategy.

8. The method of claim 6, wherein, The third comprehensive image features include target regression features and target classification features. The aerial image target detection result is determined based on the multiple levels of third comprehensive image features, including: The multiple levels of target regression features are input into a scale adjustment layer respectively to obtain multiple levels of corrected regression features. The aerial image target detection result is determined based on the multiple levels of corrected regression features and the multiple levels of target classification features. 9.An electronic device comprising a memory and a processor, the memory storing a computer program, wherein, The processor executes the computer program to implement the target detection method based on the YOLO model according to any one of claims 1 to 8.

10. A readable storage medium, a program or instructions are stored on the readable storage medium, and the program or instructions are executed by a processor to implement the target detection method based on the YOLO model according to any one of claims 1 to 8.

Citation Information

Cited By

  • Multi-label image identification method and system based on three-dimensional attention and dynamic grouping

    CN121982332A

  • A multi-label image recognition method and system based on three-dimensional attention and dynamic grouping

    CN121982332B

  • Aerial photography unmanned aerial vehicle small target detection method based on context dynamic space enhancement

    CN122157037A

  • Aerial unmanned vehicle small target detection method based on context dynamic spatial enhancement

    CN122157037B

  • Agricultural machine autonomous navigation method and device, electronic equipment and storage medium

    CN122429826A