A target detection method, system, device, and storage medium

By generating multi-scale feature representations through a self-attention mechanism and an adaptive fusion strategy, the problem of insufficient accuracy in small target detection in UAV aerial images is solved, achieving high-precision and robust target detection.

CN121564594BActive Publication Date: 2026-04-17HUNAN NORMAL UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HUNAN NORMAL UNIVERSITY
Filing Date
2026-01-23
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

In target detection in UAV aerial images, existing detection methods struggle to simultaneously meet the requirements of high accuracy and real-time performance, exhibiting issues such as high false negative rates for small targets and insufficient feature discrimination in complex backgrounds.

Method used

By generating multi-scale feature representations with significantly stronger discriminative power and higher robustness, a self-attention mechanism is used for global context modeling. Combined with an adaptive fusion strategy, the detailed information of shallow features is enhanced, and deep and shallow features are processed in a decoupled and collaborative manner.

Benefits of technology

It significantly improves target detection accuracy in complex scenes, reduces the false negative rate of small targets, and suppresses noise interference in complex backgrounds.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121564594B_ABST
    Figure CN121564594B_ABST
Patent Text Reader

Abstract

This application discloses a target detection method, system, device, and storage medium. Through decoupled shallow-deep collaborative processing, firstly, targeted detail enhancement and supplementation are performed independently at the shallow level, compensating for the loss of small target information caused by downsampling at the source, significantly strengthening the representation ability of small target textures and boundaries, thereby effectively reducing the false negative rate. Secondly, by introducing an adaptive fusion strategy, the enhanced shallow features and deep features rich in global semantics are dynamically fused, overcoming information conflicts between multi-scale features and effectively suppressing noise interference in complex backgrounds. Finally, it can generate multi-scale feature representations with significantly stronger discriminative power and higher robustness, significantly improving target detection accuracy in complex scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer vision technology, and in particular to a target detection method, system, device and storage medium. Background Technology

[0002] In target detection tasks using drone aerial images, due to the high shooting angle, small target size, and complex background, the performance of existing detection methods often fails to meet the dual requirements of high accuracy and real-time performance.

[0003] Existing general object detection frameworks suffer from two prominent contradictions when processing such images: First, in order to extract discriminative features from the image, multiple downsampling operations are required, but this downsampling process will severely lose key details of small targets, resulting in a high false negative rate for small targets; Second, in order to comprehensively utilize feature information at different levels, features at different resolutions are usually fused. However, simple combination methods are difficult to effectively reconcile the inherent differences in details and semantics between features at different levels, resulting in insufficient discriminative power of the fused features. In complex backgrounds, they are easily interfered with by irrelevant information (noise), thus limiting the accuracy of localization and recognition of multi-scale targets. Summary of the Invention

[0004] In view of this, this application provides a target detection method, system, device, and storage medium. The target detection method, system, device, and storage medium provided by this application can generate multi-scale feature representations with significantly stronger discriminative power and higher robustness, thereby significantly improving the target detection accuracy in complex scenes.

[0005] This application provides a target detection method, including:

[0006] Obtain the input image to be detected;

[0007] The input image is processed to obtain a set of multi-scale feature maps with decreasing resolution;

[0008] Global context modeling is performed on the deep feature map with the lowest resolution in the multi-scale feature map to obtain the deep feature map after global context modeling;

[0009] Detail features are extracted from the first shallow feature map with the highest resolution in the multi-scale feature map to obtain detail features, and the detail features are fused with the second shallow feature map with the second highest resolution in the multi-scale feature map to obtain a shallow feature map with supplemented details.

[0010] The shallow feature map with added details is then enhanced to obtain a shallow feature map with enhanced details.

[0011] The deep feature map after global context modeling and the shallow feature map after detail enhancement are adaptively fused to obtain a fused multi-scale feature representation.

[0012] The target detection result is obtained based on the fused multi-scale feature representation.

[0013] Optionally, the step of performing global context modeling on the deep feature map with the lowest resolution among the multi-scale feature maps to obtain a deep feature map after global context modeling includes:

[0014] A self-attention mechanism is applied to the deep feature map with the lowest resolution in the multi-scale feature map to perform global context modeling, thereby obtaining the deep feature map after global context modeling.

[0015] Optionally, the step of extracting detail features from the first shallow feature map with the highest resolution in the multi-scale feature map to obtain detail features, and fusing the detail features with the second shallow feature map with the second highest resolution in the multi-scale feature map to obtain a shallow feature map with added details, includes:

[0016] A spatial-to-depth transformation is performed on the first shallowest feature map with the highest resolution in the multi-scale feature map to obtain the detailed features of the channel dimension.

[0017] The detailed features of the channel dimension are fused with the second shallow feature map with the second highest resolution in the multi-scale feature map to obtain a shallow feature map with added details.

[0018] Optionally, the step of enhancing the details of the shallow feature map after detail supplementation to obtain a shallow feature map with enhanced details includes:

[0019] The shallow feature map, after being supplemented with the details, is refined by multi-scale convolution in the spatial domain to obtain the refined features in the spatial domain.

[0020] The spatial domain refined features are then divided into blocks and adaptively filtered in the frequency domain to obtain multiple frequency domain filtered block features.

[0021] The multiple frequency-domain filtered block features are transformed to the spatial domain to obtain multiple spatial domain block features;

[0022] The spatial domain block features are spliced ​​together to obtain the spliced ​​spatial domain features.

[0023] The features refined in the spatial domain and the features concatenated in the spatial domain are residually connected to obtain a shallow feature map with enhanced details.

[0024] Optionally, the shallow feature map after supplementing the details is refined by multi-scale convolution in the spatial domain to obtain refined features in the spatial domain, including:

[0025] Based on at least two parallel depthwise separable convolutional branches, the shallow feature map after detail supplementation is processed to obtain at least two convolutional features, wherein the at least two parallel depthwise separable convolutional branches use different convolutional kernel sizes.

[0026] Based on the gating mechanism, the features after at least two convolutional processing are adaptively weighted and fused to obtain the features after spatial domain refinement.

[0027] Optionally, the refined features in the spatial domain are further segmented and adaptively filtered in the frequency domain to obtain multiple frequency-domain filtered segmented features, including:

[0028] The refined features of the spatial domain are divided into blocks to obtain multiple block features;

[0029] Each of the block features is transformed to the frequency domain to obtain the frequency domain block features;

[0030] Based on the routing mechanism, filter weights corresponding to each frequency domain block feature are dynamically generated, and the corresponding frequency domain block features are modulated using each filter weight to obtain multiple frequency domain filtered block features.

[0031] Optionally, the adaptive fusion of the deep feature map after global context modeling and the shallow feature map after detail enhancement to obtain the fused multi-scale feature representation includes:

[0032] Based on the deep feature map after global context modeling and the shallow feature map after detail enhancement, a spatial attention weight map is generated through a spatial attention mechanism;

[0033] Based on the spatial attention weight map, the deep feature map after global context modeling and the shallow feature map after detail enhancement are weighted and fused to obtain the fused multi-scale feature representation.

[0034] This application also provides a target detection system, including:

[0035] The acquisition module is used to acquire the input image to be detected;

[0036] The processing module is used to process the input image to obtain a set of multi-scale feature maps with decreasing resolution;

[0037] The modeling module is used to perform global context modeling on the deep feature map with the lowest resolution in the multi-scale feature map to obtain the deep feature map after global context modeling.

[0038] The detail enhancement module is used to extract detail features from the first shallow feature map with the highest resolution in the multi-scale feature map, obtain detail features, and fuse the detail features with the second shallow feature map with the second highest resolution in the multi-scale feature map to obtain a shallow feature map with enhanced details.

[0039] The enhancement module is used to enhance the details of the shallow feature map after the details are supplemented, so as to obtain a shallow feature map with enhanced details.

[0040] The fusion module is used to adaptively fuse the deep feature map after global context modeling and the shallow feature map after detail enhancement to obtain a fused multi-scale feature representation.

[0041] The detection module is used to obtain the target detection result based on the fused multi-scale feature representation.

[0042] This application also provides an electronic device, including: a processor, a memory, and a communication bus;

[0043] The communication bus is used to realize the connection and communication between the processor and the memory;

[0044] The processor is used to execute the target detection processing program stored in the memory to implement the steps of the target detection method as described in any of the above.

[0045] This application also provides a readable storage medium storing computer-executable instructions, which, when loaded and executed by a processor, implement the steps of the target detection method as described in any of the preceding claims.

[0046] Compared with existing technologies, the object detection method, system, device, and storage medium provided in this application acquire an input image to be detected, process the input image to obtain a set of multi-scale feature maps with decreasing resolution, perform global context modeling on the deep feature map with the lowest resolution in the multi-scale feature maps to obtain a deep feature map after global context modeling, extract detail features from the first shallow feature map with the highest resolution in the multi-scale feature maps to obtain detail features, fuse the detail features with the second shallow feature map with the second highest resolution in the multi-scale feature maps to obtain a shallow feature map with added details, enhance the details of the shallow feature map with added details to obtain a shallow feature map with enhanced details, and combine the deep feature map with the deep feature map after global context modeling and the shallow feature map with enhanced details. Adaptive fusion is performed to obtain a fused multi-scale feature representation. Based on the fused multi-scale feature representation, the target detection result is obtained. This application adopts a decoupled shallow-deep collaborative processing. First, targeted detail enhancement and supplementation are performed independently in the shallow layer, which makes up for the loss of small target information caused by downsampling from the source, significantly enhancing the representation ability of small target texture and boundary, thereby effectively reducing the false detection rate. Second, by introducing an adaptive fusion strategy, the shallow features with enhanced details and the deep features rich in global semantics are dynamically fused, which not only overcomes the information conflict between multi-scale features, but also effectively suppresses noise interference in complex backgrounds. Finally, it can generate a multi-scale feature representation with significantly stronger discriminative power and higher robustness, which significantly improves the target detection accuracy in complex scenes. Attached Figure Description

[0047] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0048] Figure 1 This is a flowchart illustrating a target detection method provided in an embodiment of this application;

[0049] Figure 2 This is a schematic diagram of the structure of a target detection system provided in an embodiment of this application;

[0050] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0051] To enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0052] It should be noted that when a component is referred to as "fixed to" or "set on" another component, it can be directly on or indirectly set on the other component; when a component is referred to as "connected to" another component, it can be directly connected to or indirectly connected to the other component.

[0053] It should be understood that the terms "length", "width", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application.

[0054] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "a plurality of" or "several" means two or more, unless otherwise explicitly specified.

[0055] It should be noted that the structures, proportions, sizes, etc., shown in the accompanying drawings of this specification are only for the purpose of assisting those skilled in the art in understanding and reading the content disclosed in the specification, and are not intended to limit the conditions under which this application can be implemented. Therefore, they have no substantial technical significance. Any modifications to the structure, changes in the proportions, or adjustments to the size should still fall within the scope of the technical content disclosed in this application, provided that they do not affect the effects and purposes that this application can produce.

[0056] like Figure 1 As shown in the figure, this application provides a target detection method, including:

[0057] S1. Obtain the input image to be detected;

[0058] In this embodiment, the input image can be an aerial image captured by a drone.

[0059] S2. Process the input image to obtain a set of multi-scale feature maps with decreasing resolution;

[0060] In this embodiment, features can be extracted from the input image using a pre-trained convolutional neural network (such as ResNet) to obtain an initial feature map. The initial feature map is then downsampled at least twice to obtain at least three feature maps with different resolutions, forming a set of multi-scale feature maps with decreasing resolution. Specifically, the initial feature map can be downsampled four times to obtain a first shallow feature map, a second shallow feature map, a first deep feature map, and a second deep feature map with resolutions of 1 / 4, 1 / 8, 1 / 16, and 1 / 32 of the input image, respectively, forming a set of multi-scale feature maps with decreasing resolution.

[0061] This step preserves complete information from high-resolution details to low-resolution semantics by constructing feature maps with multiple scales, laying the data foundation for subsequent decoupled shallow-deep collaborative processing. In particular, it preserves high-resolution shallow feature maps, which contain key texture and boundary information of small targets in UAV images, providing raw materials for subsequent targeted detail enhancement, thereby alleviating the problem of detail loss caused by single deep feature extraction from the source.

[0062] S3. Perform global context modeling on the deep feature map with the lowest resolution in the multi-scale feature map to obtain the deep feature map after global context modeling;

[0063] In this embodiment, specifically, the deep feature map with the lowest resolution in the multi-scale feature map is the second deep feature map. Global context modeling can be implemented in various ways. As a preferred implementation, a self-attention mechanism (such as the self-attention mechanism in the Transformer encoder) can be applied to the deep feature map. Since the resolution of deep features is low, the computational cost of introducing self-attention operations at this stage is relatively controllable. This mechanism can effectively capture long-distance dependencies by calculating the correlation between any positions in the deep feature map, thereby understanding the global association between targets and between targets and the background. This step aims to inject rich contextual semantic information into the deep features to compensate for the limitations of the receptive field of convolution, laying a semantic foundation for subsequent complementary fusion with shallow features rich in detail.

[0064] S4. Extract detailed features from the first shallow feature map with the highest resolution in the multi-scale feature map to obtain detailed features, and then fuse the detailed features with the second shallow feature map with the second highest resolution in the multi-scale feature map to obtain a shallow feature map with supplemented details.

[0065] In this embodiment, this step aims to independently enhance the information of small targets in the shallow feature stage. The core principle is that the first shallow feature map, with the highest resolution, contains the richest spatial details but may be accompanied by noise. By extracting and reconstructing detailed features for small targets, key local patterns related to small targets can be filtered and strengthened. Subsequently, the extracted and purified detailed information is fused with the second shallow feature map, which has a slightly lower resolution. Essentially, this injects high-frequency detail priors into the shallow features with preliminary semantics. This operation constructs a detail enhancement loop in the shallow network, aiming to repair and enhance the small target details that have been attenuated due to earlier downsampling, thereby improving the detail quality and target saliency of the features. This provides a more solid processing foundation for the subsequent detail enhancement step (S5). This is a key practice in the decoupled collaborative design concept of curbing the attenuation of small target information from the source.

[0066] S5. Perform detail enhancement on the shallow feature map after detail supplementation to obtain a shallow feature map with enhanced details;

[0067] In this embodiment, this step performs specialized enhancement processing on the shallow feature map that has been supplemented with details. This aims to address the issue of rich detail but insufficient representational power. For small targets in UAV images, key information such as edges and textures is enhanced while noise is suppressed to compensate for information attenuation caused by downsampling. This forms a collaborative division of labor with the global modeling of deep features: this step focuses on seeing local details clearly, while deep modeling focuses on understanding global semantics. Enhancing shallow features is crucial to ensuring their high discriminative power before fusion with deep semantic features, laying a solid foundation for the final high complementarity fusion of details and semantics.

[0068] S6. Adaptively fuse the deep feature map after global context modeling and the shallow feature map after detail enhancement to obtain the fused multi-scale feature representation.

[0069] In this embodiment, specifically, the deep feature map after global context modeling (i.e., the feature map after global context modeling of the second deep feature map), the first deep feature map, and the shallow feature map after detail enhancement can be fused in an adaptive manner. Adaptive fusion can be top-down or bottom-up. Since deep features are rich in semantics and global context, and shallow features contain fine details and spatial information, simple splicing or addition operations can easily lead to feature conflicts or amplify shallow noise. Therefore, this step adopts an adaptive fusion strategy to dynamically and selectively integrate information according to the relative importance of the two types of features in different spatial locations. This ensures that the fusion process is reliably guided by deep semantics while ensuring that key shallow details are preserved and enhanced. The resulting multi-scale feature representation has both strong semantic discriminative power and accurate detail perception, especially improving the representation ability of small-scale targets in UAV images, laying the foundation for high-precision detection.

[0070] S7. Based on the fused multi-scale feature representation, the target detection result is obtained.

[0071] In this embodiment, the fused multi-scale feature representation is used as encoded features and input to the object detection decoder to generate the final object bounding boxes and class labels. In a specific implementation, a decoder based on the Transformer architecture (e.g., a standard Transformer decoder with 5 decoding layers) can be used. This decoder receives learnable object queries and interacts with the multi-scale encoded features through a cross-attention mechanism to iteratively refine the query representation. Finally, it outputs the class confidence and precise coordinates of each object through a prediction head (including a classification branch and a bounding box regression branch).

[0072] It should be noted that the decoder in this step can adopt a mature end-to-end detection decoder structure in the existing technology (such as the decoder used in RT-DETR), which is not the focus of improvement in this invention. The core advantage of this invention is that the fused multi-scale feature representation generated by the aforementioned steps (S1 to S6) already has extremely strong discriminative power and robustness, especially in the balanced representation of small target details and global semantics. Inputting this high-quality feature representation into any standard end-to-end detection decoder can significantly reduce the optimization difficulty of the decoder, improve the quality of query initialization, and thus stably obtain higher accuracy and stronger robustness detection results, especially in complex scenarios such as UAV aerial images.

[0073] Compared with existing technologies, the object detection method, system, device, and storage medium provided in this application acquire an input image to be detected, process the input image to obtain a set of multi-scale feature maps with decreasing resolution, perform global context modeling on the deep feature map with the lowest resolution in the multi-scale feature maps to obtain a deep feature map after global context modeling, extract detail features from the first shallow feature map with the highest resolution in the multi-scale feature maps to obtain detail features, fuse the detail features with the second shallow feature map with the second highest resolution in the multi-scale feature maps to obtain a shallow feature map with added details, enhance the details of the shallow feature map with added details to obtain a shallow feature map with enhanced details, and combine the deep feature map with the deep feature map after global context modeling and the shallow feature map with enhanced details. Adaptive fusion is performed to obtain a fused multi-scale feature representation. Based on the fused multi-scale feature representation, the target detection result is obtained. This application adopts a decoupled shallow-deep collaborative processing. First, targeted detail enhancement and supplementation are performed independently in the shallow layer, which makes up for the loss of small target information caused by downsampling from the source, significantly enhancing the representation ability of small target texture and boundary, thereby effectively reducing the false detection rate. Second, by introducing an adaptive fusion strategy, the shallow features with enhanced details and the deep features rich in global semantics are dynamically fused, which not only overcomes the information conflict between multi-scale features, but also effectively suppresses noise interference in complex backgrounds. Finally, it can generate a multi-scale feature representation with significantly stronger discriminative power and higher robustness, which significantly improves the target detection accuracy in complex scenes.

[0074] As one implementation method, in this embodiment of the application, global context modeling is performed on the deep feature map with the lowest resolution in the multi-scale feature map to obtain a deep feature map after global context modeling, including:

[0075] A self-attention mechanism is applied to the deep feature map with the lowest resolution in the multi-scale feature map to perform global context modeling, resulting in a deep feature map after global context modeling.

[0076] In this embodiment, the self-attention mechanism of the Transformer encoder can be applied to the deepest feature map with the lowest resolution in the multi-scale feature map to perform global context modeling. This mechanism generates attention weights by calculating the correlation between any positions in the feature map, thereby aggregating global information and integrating the feature representation of each position into the contextual semantics. Specifically, the deepest feature with the lowest resolution in the multi-scale feature map is X5, and its feature representation after self-attention calculation is as follows: The deep feature map after global context modeling in this step It can be obtained through residual join, and the process is expressed as follows:

[0077] ,

[0078] in, The global context information, represented by self-attention modeling, is added to the original features in the original feature map, i.e., the deep feature map X5, which stably incorporates global dependencies while preserving the original features. This design fully leverages the strong semantics and low resolution of deep features, significantly enhancing the global representation capability of features at a controllable computational cost, and providing a feature foundation rich in semantic context for subsequent feature fusion.

[0079] As one implementation method, in this embodiment of the application, step S4 includes:

[0080] S41. Perform a spatial-to-depth transformation on the first shallowest feature map with the highest resolution in the multi-scale feature map to obtain the detailed features of the channel dimension.

[0081] In this embodiment, the spatial-to-depth transformation is a lossless feature recombination operation. Its core purpose is to rearrange and integrate the information of adjacent spatial positions in the high-resolution feature map (the first shallow feature map) into the channel dimension. Specifically, this operation divides the input feature map into non-overlapping local blocks (e.g., a 2×2 grid) and concatenates the feature values ​​of all positions within each block along the channel direction. This significantly reduces the spatial resolution of the feature map (as in downsampling) while preserving all spatial details completely within the channels. This process is equivalent to a parameter-free downsampling. Although the spatial size of the output channel dimension's detailed features is reduced, the number of channels increases exponentially. The channels encapsulate the finest local spatial context of the original high-resolution image, providing a dense and unlost source of detail for subsequent detail supplementation and enhancement.

[0082] S42. The detailed features of the channel dimension are fused with the second shallow feature map with the second highest resolution in the multi-scale feature map to obtain a shallow feature map with supplemented details.

[0083] In this embodiment, the fusion operation aims to organically combine the high-density detail features obtained through space-to-depth transformation with the second-highest resolution shallow feature map. The second shallow feature map already possesses a certain semantic abstraction capability, but its details are relatively blurry. During fusion, the detail features with dramatically increased channel dimensions are typically compressed and adjusted first using methods such as 1×1 convolution to align them with the channel dimensions of the second shallow feature map. Subsequently, they are combined using methods such as feature addition or channel concatenation. The essence of this step is to supplement the next level of feature representation with the purest detail information from the highest resolution in a fusionable form. The result is a shallow feature map with supplemented details: its spatial dimensions are similar to the second shallow feature map. Figure 1While the quality of the material is not perfect, the richness of detail and clarity of texture within the channel are significantly enhanced, providing a better input foundation for the subsequent S5 steps to perform more in-depth detail enhancement and noise filtering. This is a key step in completing the acquisition and transmission of shallow internal details.

[0084] As one implementation method, in this embodiment of the application, step S5 includes:

[0085] S51. The shallow feature map after detail supplementation is refined by multi-scale convolution in the spatial domain to obtain the refined features in the spatial domain.

[0086] In this embodiment, multi-scale convolutional refinement is performed in the spatial domain to capture and enhance detailed information in shallow features from different receptive fields. By applying spatial transformations at multiple scales to the input features, local fine structures and their surrounding context can be extracted simultaneously, thereby enhancing the feature's ability to represent details such as target boundaries and textures. This step can adaptively fuse feature responses from different scales, ensuring that the fused features contain both details and local context, significantly improving the ability to distinguish small targets and complex shapes.

[0087] S52. The features refined in the spatial domain are divided into blocks and adaptively filtered in the frequency domain to obtain multiple frequency domain filtered block features.

[0088] In this embodiment, frequency domain segmentation and adaptive filtering are performed to enhance details and suppress noise using frequency domain analysis. By segmenting the feature map and converting it to the frequency domain, high-frequency components representing details and low-frequency components representing the overall structure can be distinguished in the frequency band. Adaptive filtering dynamically adjusts the filtering strategy according to the content of each segment feature, selectively enhancing the frequency bands related to the target and weakening the background or noise frequency bands, thereby sharpening edges and highlighting textures while preserving the main structure. This step is particularly beneficial for recovering high-frequency details lost due to downsampling and enhancing the discriminability of small targets.

[0089] S53. Transform the block features after multiple frequency domain filtering to the spatial domain to obtain the block features after multiple spatial domain filtering.

[0090] In this embodiment, each frequency-domain filtered block feature can be independently subjected to a fast inverse Fourier transform to efficiently and accurately reconstruct it back to the spatial domain. This transformation process is mathematically reversible and fidelity-preserving, ensuring that targeted enhancements performed in the frequency domain (such as high-frequency detail sharpening and noise suppression) can be losslessly mapped back to the spatial domain, forming spatial features with clearer edges and more prominent textures.

[0091] S54. Concatenate the features of multiple spatial domain blocks to obtain the features after spatial domain concatenation.

[0092] In this embodiment, multiple spatial domain feature maps can be stitched together along the channel dimension. This operation aggregates complementary detail representations generated by different filtering focuses (such as edge enhancement, texture enhancement, or noise suppression) to form a composite feature map with several times the number of channels. The technical advantage of this stitching strategy is that it achieves the integration and preservation of multi-angle detail information in a simple and efficient way, avoiding the information limitations that may be caused by a single filtering strategy. It constructs a feature representation with denser and more diverse detail information, providing a richer and more discriminative information foundation for subsequent fusion with features refined from the spatial domain.

[0093] S55. Perform residual connection between the features refined in the spatial domain and the features spliced ​​in the spatial domain to obtain a shallow feature map with enhanced details.

[0094] In this embodiment, specifically, the features refined in the spatial domain and the features concatenated in the spatial domain are subjected to residual connection to obtain a shallow feature map with enhanced details. The process is represented as follows:

[0095] ,

[0096] in, Features refined from the spatial domain; Features are obtained after splicing spatial domains; This is a shallow feature map with enhanced details.

[0097] This step aims to integrate the enhanced local structure and texture information from the spatial domain with the recovered and sharpened high-frequency details and edge information from the frequency domain, allowing the two to complement each other. Through this fusion, the resulting shallow feature map with enhanced details significantly improves the edge clarity and detail richness of the features while preserving key spatial context, thus providing a higher-quality and more discriminative shallow feature representation for subsequent adaptive fusion with deep semantic features.

[0098] As one implementation method, in this embodiment of the application, step S51 includes:

[0099] S511. Based on at least two parallel depthwise separable convolution branches, the shallow feature map after detail supplementation is processed to obtain at least two convolutional features, wherein the at least two parallel depthwise separable convolution branches use different convolution kernel sizes.

[0100] In this embodiment, a dual-branch parallel structure is used to perform multi-scale spatial enhancement on the shallow feature map after detail supplementation. Specifically, for the input feature map... Where B is the batch size, C is the number of channels, and H and W are the feature map height and width, respectively. First, channel expansion is performed using two independent 1×1 convolutions to obtain two intermediate features X1 and X2. The process is represented as follows:

[0101] ,

[0102] in, , where r is the channel expansion factor.

[0103] The first branch further divides the first intermediate feature X1 into two equal parts along the channel dimension, and feeds them into 5×5 and 3×3 depthwise separable convolutional layers respectively for feature extraction, in order to capture both broad contextual information and fine local details. After passing through the ReLU activation function, the two parts of features are obtained. The process is represented as follows:

[0104] ,

[0105] in, Features are fed into a 5×5 depth-separable convolutional layer; Features extracted from a 5×5 depth separable convolutional layer and activated by the ReLU function; Features are fed into a 3×3 depth-separable convolutional layer; Features are extracted from a 3×3 depth separable convolutional layer and activated by the ReLU function.

[0106] Then, consider the two features... and The data is then concatenated and channel fusion and dimensionality reduction are performed using 1×1 convolution to obtain multi-scale fused features, i.e., the features after the first convolution processing. The process is represented as follows:

[0107] .

[0108] The second branch directly applies a 3×3 depthwise separable convolution to the second intermediate feature X2, obtaining fine local features, which are the features processed by the second convolution. The process can be represented as follows:

[0109] .

[0110] This multi-scale parallel structure effectively enhances the module's ability to perceive targets of different sizes, and is particularly beneficial for distinguishing small targets from complex backgrounds in UAV imagery.

[0111] S512. Based on the gating mechanism, adaptive weighted fusion is performed on the features after at least two convolutional processing to obtain the features after spatial domain refinement.

[0112] In this embodiment, based on the gating mechanism, the specific process of adaptively weighting and fusing at least two convolutional features to obtain spatially refined features is as follows: The fine local features output from the second branch, i.e., the features G after the second convolution, are used as the gating signal. First, the signal passes through the GELU activation function, and then it is multiplied element-wise with the multi-scale fusion features output from the first branch, i.e., the features M after the first convolution, to obtain the gated features. X gatel, the procedure is represented as:

[0113] .

[0114] Subsequently, the gated features are projected back to the original channel dimension through a 1×1 convolution layer to obtain the spatially refined features. The process is represented as follows:

[0115] .

[0116] This gating mechanism enables the network to dynamically adjust the contribution of multi-scale information based on the local context of the input features, thereby enhancing target-related features while suppressing irrelevant background noise, improving the discriminative power and flexibility of feature representation, and is particularly suitable for enhancing and preserving details of small targets in UAV images.

[0117] As one implementation method, in this embodiment of the application, step S52 includes:

[0118] S521. Divide the refined features of the spatial domain into blocks to obtain multiple block features;

[0119] In this embodiment, firstly, to facilitate fixed-size block operations and reduce boundary effects, the features refined in the spatial domain are filled with reflections to ensure that their height and width W are divisible by a preset block size p. The process of obtaining the filled feature map is represented as follows:

[0120] ,

[0121] in, This is the filled feature map.

[0122] Then Divide into multiple p×p blocks that do not overlap (or can be designed to overlap as needed). These blocks are rearranged in spatial dimensions.

[0123] This block-based strategy decomposes global frequency domain operations into processing multiple local regions. Its core lies in reducing the computational complexity from a high-order relationship related to the overall area of ​​the image to an approximately linear relationship with the number of blocks. This enables efficient computation on resource-constrained platforms and significantly reduces the computational overhead and memory usage of subsequent frequency domain transformations and filtering while preserving the local spectral characteristics of the image. This lays the foundation for implementing refined, region-adaptive frequency analysis.

[0124] S522. Transform each block feature to the frequency domain to obtain the frequency domain block features;

[0125] In this embodiment, each block feature obtained in step S521 Applying the Fast Fourier Transform independently to transform it from the spatial domain to the frequency domain yields the corresponding frequency domain block features Xf. This transformation process is expressed as:

[0126] .

[0127] Fourier transform can decouple the spatial information (pixel intensity variation) of a block feature map into the sum of sinusoidal components of different frequencies, directions and amplitudes. The low-frequency components correspond to the smooth regions and main structure within the block, while the high-frequency components correspond to detailed information such as edges and textures.

[0128] This step extends feature enhancement from the spatial domain to the frequency domain, enabling direct manipulation of frequency components representing different semantic components (such as details corresponding to high frequencies), providing a direct and operable mathematical representation for subsequent accurate, content-adaptive spectral enhancement.

[0129] S523. Based on the routing mechanism, dynamically generate filtering weights corresponding to each frequency domain block feature, and use each filtering weight to modulate the corresponding frequency domain block feature to obtain multiple frequency domain filtered block features.

[0130] In this embodiment, to achieve adaptive frequency response adjustment of the input content, a lightweight routing mechanism is designed to dynamically generate filter weights. This mechanism first performs global average pooling (GAP) on the features Xf of each frequency domain block to extract channel-level global context descriptors. Subsequently, the descriptors are processed by a small multilayer perceptron (MLP) and Softmax normalized along a learnable filter library dimension to generate routing weights R. This process is represented as follows:

[0131] .

[0132] This process enables the model to assign appropriate filtering biases to different feature channels based on the global content of the input image.

[0133] Next, using the Einstein summation convention, the routing weight R is converted into a complex number format. Dynamic filter weights are constructed by combining Einstein summation with learnable complex basis functions. .

[0134] For each frequency domain block feature The corresponding dynamic filtering weights are used for complex element-wise multiplication (i.e., modulation) to obtain the frequency domain filtered features. This process is represented as:

[0135] .

[0136] This step uses a data-driven approach to customize the filtering kernel for each block feature, which can selectively enhance high-frequency components related to the target (especially the edges and textures of small targets) while suppressing frequency components representing background noise or smooth regions without information. This significantly improves the feature's ability to represent small targets and complex details. The adaptive spectral enhancement directly compensates for the high-frequency information lost during network downsampling, thereby enhancing the discriminative power of the features. Moreover, the entire process benefits from the block-based and lightweight routing design, maintaining low computational overhead.

[0137] As one implementation method, in this embodiment of the application, step S6 includes:

[0138] S61. Based on the deep feature map after global context modeling and the shallow feature map after detail enhancement, a spatial attention weight map is generated through a spatial attention mechanism.

[0139] In this embodiment, the spatial attention mechanism aims to automatically learn and quantify the relative importance of deep and shallow feature maps at each spatial location. By comparing the channel statistics (such as mean and maximum value) of the two feature maps, it captures the spatial distribution differences in semantic saliency and detail richness. The spatial attention weight map output by this mechanism is a single-channel matrix with a value range between (0,1). The position with a higher weight value indicates that the feature should focus more on high-resolution shallow details, while the position with a lower weight value indicates that low-resolution deep semantics should be trusted more.

[0140] This step provides a data-driven, pixel-level fusion guide for subsequent feature fusion, thereby avoiding information conflicts or noise amplification problems that may arise from manually setting fixed fusion rules (such as direct addition or splicing).

[0141] S62. Based on the spatial attention weight map, the deep feature map after global context modeling and the shallow feature map after detail enhancement are weighted and fused to obtain the fused multi-scale feature representation.

[0142] In this embodiment, the spatial attention weight map θ is used to process the high-resolution feature map, i.e., the shallow feature map after detail enhancement. and low-resolution features, i.e., deep features after global context modeling. Spatial adaptive weighted fusion is performed, specifically the fusion process is as follows: the attention weight map θ is combined with shallow features Element-wise multiplication, while simultaneously multiplying (1) θ) and deep features Multiply each element-wise, then add the two weighted results together to obtain the preliminary fused features. The process is represented as:

[0143] .

[0144] Subsequently, the initially fused features are further refined by depthwise separable convolution and group normalization to obtain the fused multi-scale feature representation. Depthwise separable convolution is used to reduce computational cost while maintaining the interaction between channels, while group normalization is used to stabilize the training process and improve feature consistency.

[0145] This step enables intelligent and adaptive integration of deep strong semantic information with shallow high-resolution details. In feature conflict areas (such as where background noise and target edges intersect), the information source can be dynamically adjusted, effectively suppressing noise and redundancy in the fusion process, thereby generating a multi-scale fusion feature representation with stronger discriminative power and higher robustness.

[0146] As one implementation method, in this embodiment of the application, step S61 includes:

[0147] S611. The deep feature map after global context modeling and the shallow feature map after detail enhancement are concatenated to obtain the concatenated features.

[0148] In this embodiment, the deep feature map after global context modeling is first... and shallow feature maps with enhanced details The feature Z is obtained by stitching along the channel dimension.

[0149] By aggregating all the information from the two features, a complete context is provided for subsequent calculations. This allows for the simple and lossless preservation of all the original information of the two features, providing a rich data foundation for the accurate calculation of attention weights.

[0150] S612. Perform average pooling and max pooling on the concatenated features in the channel dimension to obtain average pooling feature maps and max pooling feature maps.

[0151] In this embodiment, global average pooling and global max pooling are performed on the concatenated feature Z along the channel dimension to obtain the average pooled feature map. and max pooling feature map The process is represented as:

[0152] .

[0153] Average pooling extracts the average response across channels at each spatial location, reflecting the general activation level of the feature; max pooling extracts the strongest response across channels at each spatial location, reflecting the most significant feature. These two statistics characterize the intensity distribution of the feature from different perspectives.

[0154] S613. Concatenate the average pooling feature map and the max pooling feature map to obtain a dual-channel feature map;

[0155] In this embodiment, two single-channel feature maps are used. and The feature maps are stitched together along the channel dimension to form a dual-channel feature map. .

[0156] By combining two complementary statistical information representing average and peak intensity, a compact yet informative intermediate representation is constructed, which integrates the central and discrete trends of the feature distribution, providing a key input for generating sophisticated spatial attention.

[0157] S614. The dual-channel feature map is convolved based on a convolutional layer with a preset kernel size, and a spatial attention weight map is obtained by applying the sigmoid activation function.

[0158] In this embodiment, a two-dimensional convolutional layer with a kernel size of k×k (e.g., k=7) is used to process the dual-channel feature map. Convolution is performed to obtain a single-channel feature map. Then, the Sigmoid activation function is applied to each element of the single-channel feature map output by convolution, mapping the value of each position to the interval (0, 1) to generate the final spatial attention weight map θ.

[0159] The purpose of this convolutional layer is to generate a preliminary spatial importance map from the average-maximum statistic pair. By leveraging the local perceptual nature of convolution, it aggregates statistical information within the neighborhood to smooth and refine the importance estimate, avoiding overly isolated attention responses. Then, through the non-linear saturation property of the Sigmoid function, the importance score is normalized into a clear probabilistic form (weight), resulting in a normalized and interpretable weight matrix. This matrix can be directly used to softly weight the two input features, guiding the model to focus more on shallow details in which spatial locations and to trust deeper semantics in which locations.

[0160] like Figure 2 As shown in the illustration, this application also provides a target detection system, including:

[0161] The acquisition module 21 is used to acquire the input image to be detected;

[0162] Processing module 22 is used to process the input image to obtain a set of multi-scale feature maps with decreasing resolution;

[0163] Modeling module 23 is used to perform global context modeling on the deep feature map with the lowest resolution in the multi-scale feature map to obtain the deep feature map after global context modeling.

[0164] The detail supplementation module 24 is used to extract detail features from the first shallow feature map with the highest resolution in the multi-scale feature map, obtain detail features, and fuse the detail features with the second shallow feature map with the second highest resolution in the multi-scale feature map to obtain the shallow feature map after detail supplementation.

[0165] Enhancement module 25 is used to enhance the details of the shallow feature map after detail supplementation, so as to obtain a shallow feature map with enhanced details;

[0166] The fusion module 26 is used to adaptively fuse the deep feature map after global context modeling and the shallow feature map after detail enhancement to obtain the fused multi-scale feature representation;

[0167] The detection module 27 is used to obtain the target detection result based on the fused multi-scale feature representation.

[0168] like Figure 3 As shown, this application embodiment also provides an electronic device, including: a processor 31, a memory 32, and a communication bus 33;

[0169] Communication bus 33 is used to realize the connection and communication between processor 31 and memory 32;

[0170] The processor 31 is used to execute the target detection processing program stored in the memory 32 to implement the steps of any of the target detection methods described above.

[0171] This application also provides a readable storage medium storing computer-executable instructions, which, when loaded and executed by a processor, implement the steps of any of the target detection methods described above.

[0172] This application also provides a readable storage medium storing computer-executable instructions, which, when loaded and executed by a processor, implement the steps of any of the above-described far-field speech recognition methods.

[0173] It should be understood that the use of terms such as "system," "device," "unit," and / or "module" in this application is merely one method of distinguishing different components, elements, parts, sections, or assemblies at different levels. However, if other terms can achieve the same purpose, they may be replaced by other expressions.

[0174] The embodiments in this specification are described in a progressive manner, with each embodiment focusing on the related aspects.

[0175] For any differences between the embodiments, or for the same or similar parts between the embodiments, please refer to each other.

[0176] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A target detection method characterized by, include: Obtain the input image to be detected; The input image is processed to obtain a set of multi-scale feature maps with decreasing resolution; Global context modeling is performed on the deep feature map with the lowest resolution in the multi-scale feature map to obtain the deep feature map after global context modeling; Detail features are extracted from the first shallow feature map with the highest resolution in the multi-scale feature map to obtain detail features, and the detail features are fused with the second shallow feature map with the second highest resolution in the multi-scale feature map to obtain a shallow feature map with supplemented details. The shallow feature map with added details is then enhanced to obtain a shallow feature map with enhanced details. The deep feature map after global context modeling and the shallow feature map after detail enhancement are adaptively fused to obtain a fused multi-scale feature representation. The target detection result is obtained based on the fused multi-scale feature representation; The process of enhancing the details of the shallow feature map after adding details to obtain a shallow feature map with enhanced details includes: The shallow feature map, after being supplemented with the details, is refined by multi-scale convolution in the spatial domain to obtain the refined features in the spatial domain. The spatial domain refined features are then divided into blocks and adaptively filtered in the frequency domain to obtain multiple frequency domain filtered block features. The multiple frequency-domain filtered block features are transformed to the spatial domain to obtain multiple spatial domain block features; The spatial domain block features are spliced ​​together to obtain the spliced ​​spatial domain features. The features refined in the spatial domain and the features concatenated in the spatial domain are residually connected to obtain a shallow feature map with enhanced details.

2. The method of claim 1, wherein, The step of performing global context modeling on the deep feature map with the lowest resolution among the multi-scale feature maps to obtain a deep feature map after global context modeling includes: A self-attention mechanism is applied to the deep feature map with the lowest resolution in the multi-scale feature map to perform global context modeling, thereby obtaining the deep feature map after global context modeling.

3. The method of claim 1, wherein, The step involves extracting detail features from the first shallow feature map with the highest resolution in the multi-scale feature map, obtaining detail features, and then fusing these detail features with the second shallow feature map with the second highest resolution in the multi-scale feature map to obtain a shallow feature map with added details. A spatial-to-depth transformation is performed on the first shallowest feature map with the highest resolution in the multi-scale feature map to obtain the detailed features of the channel dimension. The detailed features of the channel dimension are fused with the second shallow feature map with the second highest resolution in the multi-scale feature map to obtain a shallow feature map with added details.

4. The method of claim 1, wherein, The shallow feature map, after being supplemented with details, is refined through multi-scale convolution in the spatial domain to obtain refined features in the spatial domain, including: Based on at least two parallel depthwise separable convolutional branches, the shallow feature map after detail supplementation is processed to obtain at least two convolutional features, wherein the at least two parallel depthwise separable convolutional branches use different convolutional kernel sizes. Based on the gating mechanism, the features after at least two convolutional processing are adaptively weighted and fused to obtain the features after spatial domain refinement.

5. The method of claim 1, wherein, The spatially refined features are then segmented and adaptively filtered in the frequency domain to obtain multiple frequency-domain filtered segmented features, including: The refined features of the spatial domain are divided into blocks to obtain multiple block features; Each of the block features is transformed to the frequency domain to obtain the frequency domain block features; Based on the routing mechanism, filter weights corresponding to each frequency domain block feature are dynamically generated, and the corresponding frequency domain block features are modulated using each filter weight to obtain multiple frequency domain filtered block features.

6. The method according to any one of claims 1 to 5, characterized in that, The adaptive fusion of the deep feature map after global context modeling and the shallow feature map after detail enhancement to obtain the fused multi-scale feature representation includes: Based on the deep feature map after global context modeling and the shallow feature map after detail enhancement, a spatial attention weight map is generated through a spatial attention mechanism; Based on the spatial attention weight map, the deep feature map after global context modeling and the shallow feature map after detail enhancement are weighted and fused to obtain the fused multi-scale feature representation.

7. A target detection system, characterized in that, include: The acquisition module is used to acquire the input image to be detected; The processing module is used to process the input image to obtain a set of multi-scale feature maps with decreasing resolution; The modeling module is used to perform global context modeling on the deep feature map with the lowest resolution in the multi-scale feature map to obtain the deep feature map after global context modeling. The detail enhancement module is used to extract detail features from the first shallow feature map with the highest resolution in the multi-scale feature map, obtain detail features, and fuse the detail features with the second shallow feature map with the second highest resolution in the multi-scale feature map to obtain a shallow feature map with enhanced details. The enhancement module is used to enhance the details of the shallow feature map after the details are supplemented, so as to obtain a shallow feature map with enhanced details. The fusion module is used to adaptively fuse the deep feature map after global context modeling and the shallow feature map after detail enhancement to obtain a fused multi-scale feature representation. The detection module is used to obtain the target detection result based on the fused multi-scale feature representation; When the enhancement module performs detail enhancement on the shallow feature map after adding details to obtain a shallow feature map with enhanced details, it is specifically used for: The shallow feature map, after being supplemented with the details, is refined by multi-scale convolution in the spatial domain to obtain the refined features in the spatial domain. The spatial domain refined features are then divided into blocks and adaptively filtered in the frequency domain to obtain multiple frequency domain filtered block features. The multiple frequency-domain filtered block features are transformed to the spatial domain to obtain multiple spatial domain block features; The spatial domain block features are spliced ​​together to obtain the spliced ​​spatial domain features. The features refined in the spatial domain and the features concatenated in the spatial domain are residually connected to obtain a shallow feature map with enhanced details.

8. An electronic device, characterized in that, include: Processor, memory, and communication bus; The communication bus is used to realize the connection and communication between the processor and the memory; The processor is used to execute the target detection processing program stored in the memory to implement the steps of the target detection method as described in any one of claims 1-6.

9. A readable storage medium, characterized in that, The readable storage medium stores computer-executable instructions, which, when loaded and executed by a processor, implement the steps of the target detection method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Automatic driving small target detection method based on multi-scale feature fusion optimization

    CN120852742A

  • Automatic focus identification system for endoscopy of digestive system department

    CN121236011A