Target detection network for small target and training method and detection method thereof

Through the hierarchical bidirectional interactive fusion network of the dual-branch hybrid encoder structure, the accuracy and robustness problems of infrared small target detection in complex backgrounds are solved, the optimization of local details and global semantic features is achieved, and the detection accuracy is improved.

CN120599386AActive Publication Date: 2025-09-05NAT SPACE SCI CENT CAS

Patent Information

Application Number
CN202511100238.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-07
Publication Date
2025-09-05
Estimated Expiration
2045-08-07

AI Technical Summary

Technical Problem

Existing infrared small target detection methods have poor detection consistency and high missed detection rate under complex backgrounds, and are unable to cope with the challenges of dynamic changes in target size, shape and background. In addition, traditional methods rely on fixed templates and thresholds, making it difficult to achieve accurate detection.

Method used

A dual-branch hybrid encoder structure is adopted, including a Transformer encoder branch and a CNN encoder branch. Hierarchical bidirectional interaction between CNN and Transformer is realized through an interactive fusion module. Combined with the cross-attention mechanism and shared projection alignment features, the feature expression capability is enhanced and local details and global semantic features are optimized.

Benefits of technology

Accurate detection of small infrared targets is achieved in complex backgrounds, overcoming the limitations of single-branch and loosely coupled double-branch structures and improving detection accuracy and robustness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120599386A_ABST
    Figure CN120599386A_ABST
Patent Text Reader

Abstract

The invention provides a small target-oriented target detection network and a training method and a detection method thereof. The small target-oriented target detection network comprises an encoder structure and a decoder structure, the encoder structure comprises a double-branch hybrid encoder, wherein the double-branch hybrid encoder comprises a Transform encoder branch and a CNN encoder branch; the Transform encoder branch comprises a plurality of Transform modules, and the CNN encoder branch comprises a plurality of first cascade convolution residual blocks; an interactive fusion module is arranged aiming at each group of Transform modules and the first cascade convolution residual error blocks corresponding to the positions; the interactive fusion module is used for receiving the first processing results output by the corresponding groups and fusing the first processing results; the obtained fusion result and the first processing result are input into a next adjacent group of Transform modules and a first cascade convolution residual block; and the decoder structure is used for performing up-sampling and restoration reconstruction on the features extracted and fused by the encoder structure, and outputting a detection result of the small target in the image. And the detected small target is more accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of image recognition technology, and in particular to a target detection network for small targets and a training method and a detection method thereof. Background Art

[0002] Detecting small targets in images or videos (for example, infrared small targets) is a challenging task in computer vision. Small targets occupy a small proportion of pixels in an image, have a low signal-to-noise ratio, and lack distinctive features such as color, shape, and texture, making them less distinct and susceptible to interference from background noise. Small target detection technology is used in key areas such as airspace surveillance, precision guidance, and maritime search and rescue. These applications place extremely high demands on the detection accuracy and false alarm rate of infrared small targets.

[0003] Early infrared small target detection methods were primarily based on traditional image processing and machine learning techniques and can be categorized into three main categories: filtering methods, which exploit the global discontinuity between the target and background through spatial filtering operations to suppress background noise; human visual system methods, which leverage biological visual contrast mechanisms and enhance the brightness difference between small regions and the surrounding background through local saliency metrics for detection; and low-rank decomposition methods, which decompose infrared images into low-rank background and sparse target subspaces and utilize matrix decomposition techniques to separate the target from structured clutter. While these methods have achieved some success in improving target-background separability, they all suffer from inherent limitations, including reliance on mathematical priors and handcrafted features, as well as sensitivity to parameter variations. Filter effectiveness is limited in complex textured backgrounds; the performance of the human visual model degrades in scenes with faint targets; and low-rank methods are prone to false alarms when dealing with morphologically diverse targets. Furthermore, these methods typically rely on fixed templates and thresholds, making them difficult to address the challenges posed by dynamic changes in target size, shape, and background in real-world scenarios, leading to poor detection consistency and high missed detection rates. Summary of the Invention

[0004] The embodiments of the present disclosure provide a target detection network for small targets and a training method and a detection method thereof, so as to solve the existing problem of inaccurate detection of small targets.

[0005] Based on the above problems, in the first aspect, a target detection network for small targets is provided, comprising: an encoder structure and a decoder structure connected in sequence; the encoder structure comprises a two-branch hybrid encoder; the two-branch hybrid encoder comprises a Transformer encoder branch and a CNN encoder branch; The Transformer encoder branch includes a plurality of Transformer modules, and the CNN encoder branch includes a plurality of first cascaded convolutional residual blocks. The number of the Transformer modules and the first cascaded convolutional residual blocks are the same and their positions correspond to each other. For each group of Transformer modules and first cascaded convolutional residual blocks with corresponding positions, an interactive fusion module is provided for the group of Transformer modules and the first cascaded convolutional residual blocks. The interactive fusion module is configured to receive the first processing results output by the corresponding group of Transformer modules and the first cascaded convolutional residual block, fuse the first processing results by sharing the projection alignment features and utilizing the cross-attention mechanism; and input the obtained fusion result and the first processing result into the next adjacent group of Transformer modules and the first cascaded convolutional residual block; The decoder structure is used to upsample and restore the features extracted and fused by the encoder structure, and output the results of identifying small targets in the image data input to the encoder structure.

[0006] In a second aspect, a method for training a target detection network for small targets is provided, comprising: Constructing the target detection network as described in the first aspect; The training sample image data is used as input, and the recognition results of small targets in the corresponding training sample image data are used as true values ​​to train the target detection network to obtain a trained target detection network.

[0007] A third aspect provides a target detection method, comprising: Obtaining image data to be detected; Inputting the image data to be detected into a trained target detection network, wherein the target detection network has the structure of the target detection network as described in the first aspect; Output the small target detection result of the image data to be detected.

[0008] The beneficial effects of the embodiments of the present disclosure include: The embodiment of the present disclosure provides a target detection network for small targets, a training method thereof, and a detection method thereof. The target detection network includes: an encoder structure and a decoder structure connected in sequence; the encoder structure includes a dual-branch hybrid encoder; the dual-branch hybrid encoder includes a Transformer encoder branch and a CNN encoder branch; the Transformer encoder branch includes a plurality of Transformer modules, the CNN encoder branch includes a plurality of first cascaded convolution residual blocks, the number of the Transformer modules and the first cascaded convolution residual blocks are the same and the positions correspond; for each group of Transformer modules and cascaded The convolution residual block is provided with an interactive fusion module for the group of Transformer modules and the first cascade convolution residual block; the interactive fusion module is used to receive the first processing results output by the corresponding group of Transformer modules and the first cascade convolution residual block, fuse the first processing results by sharing projection alignment features and utilizing a cross-attention mechanism; and input the obtained fusion results and the first processing results into the next adjacent group of Transformer modules and the first cascade convolution residual block; the decoder structure is used to upsample and restore the features extracted and fused by the encoder structure, and output the results of identifying small targets in the image data input to the encoder structure. The target detection network provided by the embodiment of the present disclosure has an encoder structure including a dual-branch structure of a CNN encoder branch and a Transformer encoder branch, which can enhance feature expression capabilities by expanding the receptive field by stacking convolution layers of a convolutional neural network, model global dependencies through the self-attention mechanism of the Transformer, and effectively couple the convolution and Transformer paths through a hierarchical bidirectional interaction mechanism. Different from the hybrid architecture in related technologies, the dual-branch interactive fusion network proposed in this disclosure realizes bidirectional information flow between the two branches in each encoding stage, so that the local details of CNN and the global semantic features of Transformer are mutually optimized, thereby making the small targets detected by the target detection network more accurate. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] Figure 1 This is one of the schematic diagrams of the target detection network structure provided by the embodiment of the present disclosure; Figure 2 A schematic diagram of the interactive fusion module structure provided in an embodiment of the present disclosure; Figure 3 Schematic diagram of the encoder structure and HDSA structure provided by the embodiment of the present disclosure; Figure 4 The second schematic diagram of the target detection network structure provided by the embodiment of the present disclosure; Figure 5The third schematic diagram of the target detection network structure provided by the embodiment of the present disclosure; Figure 6 A schematic diagram of the top-down fusion block structure provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0010] The embodiments of the present disclosure provide a small-target target detection network and its training method and detection method. The preferred embodiments of the present disclosure are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only intended to illustrate and explain the present disclosure and are not intended to limit the present disclosure. Furthermore, the embodiments and features of the embodiments in this application may be combined with each other unless there is a conflict.

[0011] The present disclosure provides a target detection network for small targets, such as Figure 1 As shown, it includes: an encoder structure 11 and a decoder structure 12 connected in sequence; the encoder structure 11 includes a dual-branch hybrid encoder; the dual-branch hybrid encoder includes a Transformer encoder branch 111 and a CNN encoder branch 112; The Transformer encoder branch 111 includes a plurality of Transformer modules 1111, and the CNN encoder branch 112 includes a plurality of first cascaded convolution residual blocks 1121. The number of the Transformer modules 1111 and the first cascaded convolution residual blocks 1121 is the same and their positions correspond to each other. For each group of Transformer modules 1111 and first cascaded convolution residual blocks 1121 corresponding to each other in position, an interactive fusion module 113 is provided for the group of Transformer modules 1111 and the first cascaded convolution residual blocks 1121. The interactive fusion module 113 is configured to receive the first processing results output by the corresponding group of Transformer modules 1111 and the first cascaded convolutional residual block 1121, fuse the first processing results by sharing the projection alignment features and utilizing the cross-attention mechanism; and input the obtained fusion result and the first processing result into the next adjacent group of Transformer modules 1111 and the first cascaded convolutional residual block 1121; The decoder structure 12 is used to upsample and restore the features extracted and fused by the encoder structure 11, and output the results of identifying small objects in the image data input to the encoder structure 11.

[0012] In the embodiments disclosed herein, small infrared target detection is used as an example. Due to their inherently small size, low signal-to-noise ratio, and lack of distinctive features such as color, shape, and texture, small infrared targets are often obscured by complex and changing backgrounds. This makes accurately identifying and extracting small targets in interfering environments a significant technical challenge. In the prior art, even when combining convolutional neural network (CNN) technology with Transformer networks for target detection, the CNN is used to extract multi-layer features before the Transformer is introduced for modeling at a specific stage. This unidirectional pipeline lacks feedback and interaction between intermediate stages, making it difficult to fully exploit the complementary advantages of the two architectures. The object detection network for small targets (also known as DIFTransNet) provided in this disclosure is a novel dual-branch interactive fusion network that effectively couples convolutional and Transformer paths through a hierarchical, bidirectional interaction mechanism. Unlike previous hybrid architectures, DIFTransNet implements bidirectional information flow between the two branches at each encoding stage, mutually optimizing the local details of the CNN with the global semantic features of the Transformer.

[0013] A schematic diagram of the DIFTransNet structure proposed in this disclosure is as follows Figure 1 As shown in Figure 2, the network adopts a dual-branch hybrid encoding structure, fusing CNN and Transformer to simultaneously capture local details and global context. The core of this design lies in achieving efficient interaction and feature fusion between the two branches, thereby fully leveraging the advantages of their respective structures. Figure 1 In the example, the Transformer encoder branch 111 (Transformer Encoder) includes four Transformer modules 1111 (corresponding to Figure 1 MST Block1~MST Block4), the CNN encoder branch 112 (Convolution Encoder) includes four first cascade convolution residual blocks 1121 (corresponding to Figure 1 CNN Block1~CNN Block4), corresponding to the four interactive fusion modules 113 (corresponding to Figure 1 IFM1~IFM4).

[0014] When performing object detection or network training, the image to be processed can be initially processed and then fed into the CNN encoder branch 112 (Convolution Encoder) and the Transformer encoder branch 111 (Transformer Encoder). CNN encoder branch 112 uses cascaded convolutional residual blocks to gradually extract hierarchical features, focusing on local intensity variations and spatial details (local features) to accurately locate small targets. Meanwhile, Transformer encoder branch 111 divides the input image (e.g., the input feature map) into patches and uses the Hierarchical Decoupled Sparse Attention mechanism (HDSA) to model multi-scale global context, thereby distinguishing targets from background clutter.

[0015] At each encoding stage (i.e., encoding the group consisting of the Transformer module 1111 and the first cascaded convolutional residual block 1121 corresponding to each position; for example, MST Blockn and CNN Blockn can be considered a group corresponding to each position, with n ranging from 1 to 4 in this example), the outputs of both branches are input into the corresponding interactive fusion module 113 (for example, IFMn is the interactive fusion module for MST Blockn and CNN Blockn). These features are then fused using a cross-attention mechanism by aligning shared projections. The fused features are then fed into the next stage along with the original outputs from the previous stage of each branch, achieving dynamic feature balancing. Residual connections preserve the proprietary feature modeling capabilities of each branch, while the fused features enable complementary optimization between paths, effectively alleviating the feature incompatibility and lack of interaction present in traditional dual-branch architectures. In this example, after four levels of encoding, the output of the Transformer module 1111 corresponding to the last group of positions and the first cascade convolution residual block 1121 (i.e., MSTBlock4 and CNN Block4) are fused through the corresponding interactive fusion module (i.e., IFM4) 113 to obtain the output of the encoder structure 11. The output result is input to the decoder structure 12 (Decoder), which gradually restores the spatial resolution by upsampling, and finally outputs a pixel-level segmentation map (e.g., size 1) generated by the fully convolutional network head structure (FCN Head). H×W× 1) Accurately mark small infrared targets. Essentially, the core challenge of infrared small target detection lies in the need to be highly sensitive to faint local features in order to detect dim targets, while also being robust to complex backgrounds to reduce false alarms. DIFTransNet effectively bridges the gap between the two through hierarchical interaction optimization between CNN and Transformer. Specifically, IFM enables the two branches to achieve complementary enhancement: local features guide the Transformer to focus on potential target areas, while global semantics helps CNN suppress pseudo-targets that are locally similar but semantically irrelevant. Through hierarchical interaction and adaptive feature reorganization, the proposed framework can achieve accurate detection even in strongly interfering backgrounds, overcoming the limitations of single-branch or loosely coupled dual-branch structures.

[0016] In addition, the preliminary processing of the image to be processed may include: performing preliminary processing through the stem module to generate the initial feature maps of the CNN and Transformer branches. Figure 1 As shown, assuming the input size is H×W× 3 infrared image, the stem module can first extract local features in the image to be processed through 3×3 convolution, accelerate the training process and improve stability through batch normalization (BN), and introduce nonlinearity through the ReLU activation function; then, the features of the feature map obtained by the 3×3 convolution are recombined and reduced in dimension through 1×1 convolution, and BN+ReLU is also used to accelerate training and nonlinearity. Figure 1 The manner in which the stem module performs preliminary image processing is merely an example and does not limit the present disclosure.

[0017] The following is an explanation of the legends in the embodiments of the present disclosure: They represent the extracted feature layers corresponding to MST Block1~MST Block4, respectively. T Characterized by Features extracted by feature layers; They represent the extracted feature layers corresponding to CNN Block1~CNN Block4, respectively. C Characterized by Features extracted by feature layers; Respectively represent the extraction feature layers corresponding to IFM1~IFM4, F H Characterized by Features extracted by feature layers; Representation by element-wise addition (Element-wise Addition); Characterize the top-down fusion block (Top-Down Fusion Block); Characterize the bottom-up fusion block (Bottom-Up Fusion Block); Represents channel concatenation; the thick solid arrow represents group normalization.

[0018] In another embodiment provided by the present disclosure, Figure 2 As shown, the interactive fusion module (IFM) 113 includes: a compression module 1131, a projection module 1132 and an information cross module 1133; Compression module 1131 is used to perform spatial compression operation using global average pooling to convert CNN features into and Transformer features Compressed into a compact descriptor in the channel dimension and : Formula (1) Formula (2) in, Represent the spatial dimension of CNN feature maps; The number of channels representing the CNN feature map; Represents the spatial dimension of the Transformer feature map; The number of channels representing the Transformer feature map; The projection module 1132 is used to transform the channel descriptor into and Spliced ​​and projected into a shared latent space , to achieve alignment and fusion of local and global semantics: Formula (3) Formula (4) Formula (5) in, Characterization channel Feature representation of Characterization channel Feature representation of 、 、 Representation weight matrix; 、 、 Characterization bias; Information cross-module 1133 is used to and After Sigmoid activation, they are respectively 、 Perform element-wise multiplication to obtain preliminary optimized features: Formula (6) Formula (7) And based on the following cross attention mechanism, the information exchange between the two branches is realized to obtain the cross attention feature and : Formula (8) Formula (9) After concatenating the cross-attention features, the channels are compressed through 1×1 convolution to generate the fused output: Formula (10) in, Characterization The query matrix obtained by linear transformation; Characterization The key matrix obtained by linear transformation and transposed; Characterization The value matrix obtained by linear transformation; Characterization bond matrix Dimensions; Characterization The query matrix obtained by linear transformation; Characterization The key matrix obtained by linear transformation and transposed; Characterization The value matrix obtained by linear transformation; Characterization bond matrix dimension.

[0019] In the disclosed embodiment, the IFM module serves as a key bridge for the bidirectional complementary information flow between the CNN branch and the Transformer branch. Based on the differences between the two structures in feature dimensions and semantic space, a series of efficient interaction strategies are designed to achieve effective feature fusion.

[0020] like Figure 2 As shown, in order to eliminate spatial redundancy and focus on the most discriminative feature information, the compression module 1131 first uses global average pooling to perform spatial compression operations, and converts the features output by the first cascade convolution residual block 1121 corresponding to CNN (corresponding to Figure 2 CNN features in And the corresponding Transformer module output features (corresponding to Figure 2 MST feature in Squeeze into a compact descriptor in the channel dimension and (The Excite operation is used to perform nonlinear transformation on the compressed features to generate the weight of each channel, which will not be described here.) Next, the projection module 1132 converts the channel descriptor into and After stitching, project it into the shared latent space (Shared Latent Space) , achieving the alignment and fusion of local and global semantics.

[0021] Furthermore, in order to perform weighted adjustment on the original features, the information cross module 1133 uses Equation (6) and Equation (7) and By Sigmoid (i.e. ) after activation and 、 Perform element-wise multiplication to obtain preliminary optimized features and Then, through equations (8) and (9), the information exchange between the two branches is realized based on the cross attention mechanism (corresponding to Figure 2 Linear Projection (Liear Projection) to Q, K T , and V, and Softmax processing), and finally the cross-attention features are spliced ​​through formula (10) (corresponding to Figure 2 The concatenation and projection (Concat&Projection) in the image are compressed by 1×1 convolution to generate the fusion output (corresponding to Figure 2 The fused features output by each interactive fusion module 113 except the last interactive fusion module 113 are concatenated with the original features output by the Transformer module 1111 and the first cascade convolution residual block 1121 corresponding to the interactive fusion module 113, and are input into the next-level encoder 1111 and the first cascade convolution residual block 1121, respectively.

[0022] in addition, 、 、 、 、 、 The representation bias can be automatically learned through the neural network training process and can be initialized and optimized using existing deep learning training methods, which will not be described here.

[0023] The IFM module proposed in the embodiment of the present disclosure establishes a deep interactive path between CNN and Transformer features through shared spatial alignment, attention recalibration and cross-attention mechanisms, dynamically adjusts local and global semantic distributions during the fusion process, and improves the perception ability of the entire network in complex infrared backgrounds.

[0024] In another embodiment provided by the present disclosure, Figure 3 As shown, Transformer module 1111 (corresponding to Figure 3 The Multi-Scale Transformer Block (MST Block) includes a feature map processing module 11111, an attention module 11112, a feedforward module 11113, and a feature output module 11114. A feature map processing module 11111 is used to divide the input feature map into multiple tiles and embed position information for each tile to obtain a serialized embedded representation; Attention module 11112, used to capture the relationship between features of serialized embedding representations at different scales through a hierarchical decoupled sparse attention mechanism; The feedforward module 11113 is used to perform a residual connection between the output features of the attention module 11112 and the serialized embedding representation as input, and perform a nonlinear transformation on the features through a feedforward neural network; The feature output module 11114 is used to perform a residual connection between the result after the nonlinear transformation and the input of the feedforward module 11113, reshape and merge the information containing long-distance features, and generate an output feature map.

[0025] In the embodiment of the present disclosure, the feature map processing module 11111 divides the input feature map into multiple small blocks (corresponding to Figure 3 Patch Embedding in ), each patch can be a fixed-size area, these patches can be converted into multiple embedding vectors (for example: one-dimensional vectors), in order to retain the position information of each patch in the original feature map, a position embedding can be added to each patch embedding vector (corresponding to Figure 3 Position encoding (PositionEmbedding) in the attention module 11112 (corresponding to Figure 3The HDSA layer and Layer Norm layer in the feedforward module are as follows: The HDSA layer is a multi-scale Transformer module that constructs a multi-level perceptual subspace through a hierarchical decoupled sparse semantic modeling strategy to capture the relationship between features of the serialized embedding representation at different scales; the Layer Norm layer is a normalization layer used to stabilize the training process and accelerate convergence. Figure 3 The MLP layer and Layer Norm layer in the training process are shown in Figure 11. The MLP (Multi-layer Perceptron) is a feedforward neural network used to perform nonlinear transformations on features. The Layer Norm layer also performs normalization to stabilize the training process and accelerate convergence. The attention module 11112 effectively captures and utilizes the long-distance features in the feature map. The feature output module 11114 performs a residual connection between the result of the nonlinear transformation and the input of the feedforward module 11113, reshaping and merging the information containing the long-distance features to generate the desired shape of the output feature map, and then outputs the feature map.

[0026] In another embodiment provided by the present disclosure, Figure 3 As shown, the attention module 11112 includes: a subspace division module 111121, a multi-level perception module 111122 and a splicing module 111123; Subspace partitioning module 111121 is used to transform the input features Divided along the channel dimension into subspaces, each subspace independently completes regional feature extraction and reconstruction, forming Level multi-scale representation hierarchy: in, The number of channels representing each group of subspaces; for each subspace Perform non-overlapping window division, window size As the scale increases: Formula (11) Formula (12) in, Characterization The number of windows in the layer decreases as the window size increases; it should be noted that the feature Number of channels Depending on the configuration of network parameters, the number of channels of the original input image can be The same can also be different.

[0027] Multi-level perception module 111122 is used to In the expansion ratio Uniform selection sampling points to ensure consistent sampling density across scales: Formula (13); Sparse sampling generates coordinate tensor ; Calculate the attention output for each subspace, where the query vector is generated by the original window features and the key value vector is generated by the aggregated features: Formula (14) Formula (15) Formula (16) Formula (17) Formula (18) in, 、 and all , represents the learnable projection matrix; Characterize the scaling factor; The concatenation module 111123 is used to concatenate the outputs of all subspaces along the channel dimension (Channel Concat) to obtain the final output features: Formula (19).

[0028] In the disclosed embodiment, the attention module 11112 is centered around the Hierarchical Decoupled Sparse Attention (HDSA) mechanism. During implementation, the HDSA layer can be divided into a subspace partitioning module 111121, a multi-level perception module 111122, and a splicing module 111123. The traditional Transformer architecture has significant limitations in infrared small target detection: the multi-head self-attention (MHSA) mechanism suffers from cross-scale semantic coupling and feature response dispersion, making it difficult to adapt to weak target saliency and low signal-to-noise ratio characteristics; while the improved sliding-window multi-head attention (SW-MSA) mechanism, due to its rigid single-scale partitioning, weakens the semantic association between sub-pixel targets and long-range context. To address these issues, the present disclosure proposes HDSA, which constructs a multi-level perception subspace through a hierarchical decoupled sparse semantic modeling strategy: fine-grained small windows employ dense sampling to preserve weak feature information, while coarse-grained large windows utilize adaptive sparse sampling to capture cross-region context. Combined with a cross-window feature sharpening mechanism to suppress background noise, the design achieves a dynamic balance between local saliency and global consistency, thereby effectively alleviating the semantic masking problem of small infrared targets in complex backgrounds.

[0029] During implementation, the subspace partitioning module 111121 will input the features According to the channel dimension division (ChannelSplitting) subspaces (corresponding to Figure 3 From the first subspace to the The G-th subspace), in order to strike a balance between local accuracy and global modeling, for each subspace Perform non-overlapping window division, and the window size increases with the scale (e.g.: , The larger the scale, the smaller the window, and vice versa. Small windows are used to capture local details, while large windows are used to model macroscopic semantics. For example: divide the first subspace into Partition into windows), the Subspace partitioning Partition into windows).

[0030] In addition, in order to ensure consistent sampling density across scales, the multi-level perception module 111122 needs to use an expansion rate Uniform selection Sampling points, default . Sparse sampling generates coordinate tensors , retaining channel dimension information. For small windows, Corresponding to dense sampling, for large windows, The context is captured efficiently through sparse sampling. To expand the receptive field between windows, the features of all windows at the same spatial position are aggregated using maximum pooling using Equations (15) and (16) to enhance the robustness to noise. Subsequently, the attention output is calculated for each subspace (corresponding to Figure 3 Dot-Product Attention in ), query vector Generated by the original window features, the key-value vector is generated by the aggregated features.

[0031] In the disclosed embodiments, HDSA resolves multi-scale feature conflicts through a scale decoupling mechanism: fine-grained windows preserve high-frequency details through dense sampling, while coarse-grained windows model global semantics through sparse sampling. Its orthogonal subspace design avoids cross-scale interference and, combined with a cross-window sharpening mechanism, enhances discriminative capabilities. It emphasizes pixel-level localization at the shallow level and aggregates semantic information at the deep level. Through structured multi-scale feature recombination, it achieves the coordinated optimization of local discriminability and global consistency, accurately separating sparse, low-contrast small objects.

[0032] In another embodiment provided by the present disclosure, Figure 4 As shown, the decoder structure 12 includes multiple second cascade convolution residual blocks 121, the number of the multiple second cascade convolution residual blocks 121 is consistent with the number of Transformer modules 1111 and the positions are corresponding; the input end of each second cascade residual module 121 is jump-connected to the output end of the corresponding interactive fusion module 113 of the corresponding position Transformer module 1111; The second cascade convolution residual block 121 is used to upsample the input data and transmit it to the next second cascade convolution residual block 121; the input data is the spliced ​​data obtained by channel splicing the output data of the previous level and the fusion features output by the jump-connected interactive fusion module 113.

[0033] In the disclosed embodiment, the decoder structure 12 includes a plurality of second cascade convolution residual blocks 121 connected in sequence, which are upsampled according to the levels corresponding to the levels of the Transformer module 1111 (and / or the first cascade residual module 1121) to gradually restore the feature map to the same spatial resolution as the input image. In order to pass the low-level detail information extracted from the encoder structure 11 to the decoder structure 12, so that the details of the image can be better restored during the upsampling process of the decoder structure 12, a skip connection structure is adopted. The feature maps output by each level in the encoder structure 11 (in this example, the fused feature maps output by the IFM corresponding to each level) are connected. ) will be directly passed to the feature map of the corresponding position decoder 121 in the decoder structure 12 through the jump connection.

[0034] Since the Transformer module 1111 and the first cascaded residual module 121 in the encoder structure 11 both adopt a hierarchical structure from shallow to deep layers according to the feature processing order, that is, the earlier the layer in the processing order, the shallower the extracted features (i.e., low-level features), such as edges, textures, etc.; and the later the layer in the processing order, the deeper the extracted features (i.e., higher-level semantic features), such as the shape and category of the object, through the multi-level structure, the network can gradually refine the features and complete the task more accurately. Similarly, the second cascaded convolution residual block 121 in the decoder structure 12 is also upsampled through such a hierarchical structure to gradually restore the feature map. The second cascaded convolution residual block 121 corresponds to the position of the Transformer module 1111, and can be understood as the "corresponding layer" in the encoder structure 11 and the decoder structure 12, that is, the layer in the decoder that matches a certain layer of the encoder in terms of function or spatial resolution. Therefore, if Figure 4As shown in the figure, the Transformer modules MST Block1 to MST Block4, or IFM modules IFM1 to IFM4, correspond to the second cascade residual modules Layer1 to Layer4, respectively. For example, for decoder Layer 4, the fused features output by IFM4 are concatenated with the features output by the bottleneck module and then input to decoder Layer 4 for upsampling, and then input to the next layer, Layer 3. For decoder Layer 1, the fused features output by IFM1 are concatenated with the features output by Layer 2 and then input to decoder Layer 1 for upsampling.

[0035] In another embodiment provided by the present disclosure, Figure 5 As shown, the decoder structure 12 includes multiple second cascade convolution residual blocks 121, and the number of the multiple second cascade convolution residual blocks 121 is consistent with the number of Transformer modules 1111 and the positions correspond; The network further includes: a reconstruction jump enhancement module 13; the reconstruction jump enhancement module 13 includes a top-down fusion block 131 and a bottom-up fusion block 132 with symmetrical structures; The top-down fusion block 131 is used to fuse the fusion features output by the interactive fusion module 113 from shallow layers to deep layers in sequence until the fusion with the deepest fusion features is completed, thereby obtaining enhanced features corresponding to the deepest fusion features; The bottom-up fusion block 132 is used to use the enhanced features as a starting point and sequentially fuse them with the fused features from the deepest layer to the shallowest layer, except for the deepest layer, to obtain enhanced features corresponding to the fused features of each layer; The second cascade residual module 121 is used to upsample the input data and transmit it to the next second cascade convolution residual block; the input data is the spliced ​​data obtained by channel splicing the output data of the previous level and the enhanced features of the output fusion features of the corresponding interactive fusion module 113.

[0036] In the embodiment of the present disclosure, taking the infrared imaging scene as an example, the traditional U-Net jump connection faces the following three major problems: 1) Shallow features lack high-level semantic guidance and are prone to misjudging high-noise areas as targets; 2) Deep features will cause serious loss of pixel-level details of small targets after multiple downsampling; 3) Directly transferring single-layer features is difficult to achieve dynamic cross-scale feature calibration. To solve the above problems, the present disclosure proposes a reconstruction jump enhancement module 13 (RSAM), which realizes the complementary fusion of shallow and deep features through a two-way interactive mechanism. Figure 5As shown in Figure 2, this module combines top-down semantic guidance with bottom-up detail compensation to form a closed-loop optimization path. RSAM consists of two functionally complementary modules: the Top-Down Fusion Block 131 (TDFB) and the Bottom-Up Fusion Block 132 (BUFB). Both modules have symmetrical structures and employ local attention convolutions, combined with an inverse feature reconstruction strategy to achieve cross-layer bidirectional information exchange.

[0037] In the embodiment of the present disclosure, the jump connection is not realized by directly connecting the interactive fusion module 113 with the corresponding second cascade residual module 121, but a reconstruction jump enhancement module 13 (RSAM) is introduced to perform top-down semantic guidance on the fusion features obtained by the interactive fusion module 113 at each level through RSAM (such as Figure 5 H1 to H4) and bottom-up detail compensation (such as Figure 5 In the process from A4 to A1, the enhanced features generated in this process are skip-connected to the corresponding second cascade residual module 121. This further enhances the information expression capability of the skip connection and recombines shallow spatial information with deep semantic features through a bidirectional feature refinement mechanism, compensating for information loss during the downsampling process.

[0038] As mentioned above, due to the setting of the hierarchical relationship, the fusion features output by each interactive fusion module 113 are consistent with the level of the Transformer module 1111 (and / or the first cascade convolution residual block 1121) corresponding to the interactive fusion module 113. In other words, it can be considered that the earlier the interactive fusion module 113 is in the processing order, the shallower the level of the output fusion features, and the deeper the level of the output fusion features. Taking the four encoders as an example, the levels from shallow to deep are: IFM1 outputs the fusion feature F extracted by the H1 layer. H1 , IFM2 outputs the fusion feature F extracted by the H1 layer H2 , IFM3 outputs the fusion feature F extracted by the H3 layer H3 The fusion feature of IFM4 output is the feature F extracted by H4 layer H4. Therefore, the top-down fusion block 131 can first fuse the corresponding features of H1 and H2, and fuse the result with the corresponding features of H3, and then fuse the result with the corresponding features of H4, that is, to obtain the enhanced feature A4 corresponding to the deepest fusion feature H4. The enhanced feature A4 is used as the input of the bottom-up fusion block 132, and is fused with the corresponding features of H3 in turn (to obtain the enhanced feature A3 corresponding to H3), and the result is fused with the corresponding features of H2 (to obtain the enhanced feature A2 corresponding to H2), and the result is fused with the corresponding features of H1 (to obtain the enhanced feature A1 corresponding to H1). Then, according to the corresponding relationship of the "corresponding layers" in the encoder structure 11 and the decoder structure 12, the enhanced features A1, A2, A3, and A4 corresponding to H1, H2, H3, and H4, respectively, are channel-spliced ​​with the output data of the corresponding upper layer of Layer1~Layer4 to generate the corresponding input data. Taking Layer 4 as an example, the output of Bottleneck is concatenated with A4 and used as the input data of Layer 4. The result obtained after upsampling is concatenated with A3 and used as the input of Layer 3, and so on.

[0039] In another embodiment provided by the present disclosure, Figure 6 As shown, the top-down fusion block 131 is used to combine the current fusion features and adjacent features to be fused Through the space-to-channel reorganization operation, Each The pixels of the local window are rearranged into four independent channels. Convert to : Formula (20) in, Represents the index within the window; Characterize channel index; Characterize the height index; Characterization width index; Maintain local structural relationships and align channels through group convolution: Formula (21) in, Characterization has The convolution operation of the group Number of channels from down to ; is the weight matrix of the group convolution, each group processes the original Local neighborhood information; The deep semantics are integrated with the shallow details through the convolutional attention module to obtain : Formula (22) in, Represents a 3×3 convolution operation; and Characterization weight coefficient; The bottom-up fusion module 132 is used to combine the current fusion features and adjacent features to be fused Through the space-to-channel reorganization operation, Each The pixels of the local window are rearranged into four independent channels. Convert to : Formula (23) in, Represents the index within the window; Characterize channel index; Characterize the height index; Characterization width index; Maintain local structural relationships and align channels through group convolution: Formula (24) in, Characterization has The convolution operation of the group Number of channels from down to ; is the weight matrix of the group convolution, each group processes the original Local neighborhood information; The deep semantics are integrated with the shallow details through the convolutional attention module to obtain : Formula (25) in, Represents a 3×3 convolution operation; and Characterize the weight coefficient.

[0040] In the embodiment of the present disclosure, the top-down fusion block 131 performs fusion in the order from shallow to deep layers. is the fusion feature output by the shallow IFM (corresponding to Figure 6 in ), adjacent fusion features is the fusion feature output by adjacent IFMs (corresponding to Figure 6 in ).in, is the output of the feature map of the deeper level in the encoder, whose spatial size is , the number of channels is twice the number of channels in the current layer due to the design of enhanced semantic expression after the network deepens layer by layer, that is, ,This setting complies with the general rule of “space halved and channel doubled” in the ,mainstream feature pyramid structure, and helps to achieve effective ,alignment and fusion between features of different scales.

[0041] TDFB performs a space-to-channel reorganization operation (corresponding to Figure 6 Reorganize feature map in the downsampling process to retain small target details. Convert to , and no information is lost. Group Conv is performed by formula (21) to maintain local structural relationships and align channels. Using formula (22) to fuse deep semantics with shallow details through the convolutional attention module (corresponding to Figure 6 3×3Conv, layer normalization (Layer Norm), ReLU, as well as channel attention module (Channel attention module) and spatial attention module (SpatialAttention Module)), to obtain the enhanced features corresponding to the deepest IFM output fusion features (corresponding to Figure 6 middle )). Finally, the Convolutional Block Attention Module (CBAM) plays a key role in the fusion of deep semantics and shallow details, focusing on the channel and spatial dimensions respectively to improve the discriminability of the fused features. The weight coefficient is, for example, α = 0 . 75, β = 0 . 25, compensating for position information while emphasizing deep features.

[0042] The bottom-up fusion module 132 is based on As the starting point, the fusion is carried out in the order from deep to shallow, then the current fusion feature is the fusion feature output by deep IFM, adjacent fusion feature is the fusion feature output by the adjacent shallow IFM, Figure 6 middle and By exchanging the positions, we get the corresponding processing flow, which will not be described here.

[0043] In the disclosed embodiments, RSAM constructs a closed-loop feature enhancement framework through a cross-layer, bidirectional interaction mechanism. Its top-down branch encodes shallow spatial details into channel semantic information, while its bottom-up branch leverages local context to compensate for missing deep semantics. Local group convolution ensures structural consistency during the transformation process, while a CBAM-driven calibration mechanism aligns feature distributions across scales, effectively mitigating the information gap between the encoder and decoder.

[0044] In another embodiment provided by the present disclosure, Figure 5 As shown, the decoder structure 12 further includes: a connection module 14; The connection module 14 is used to connect the output of the encoder structure 11 and the second cascaded convolution residual block 121 in the decoder structure 12.

[0045] In the embodiment of the present disclosure, the fusion features of the final stage of the encoder structure 11 are passed to the connection module 14 (corresponding to Figure 5 The bottleneck layer in the network is a residual convolution block that is the same as that in the CNN branch, which is used to integrate high-level semantic representations and then enter the decoder.

[0046] The decoder structure 12 uses the features output by the deepest layer (i.e., the connection module 14) as the core input, and receives the fused features output by each stage of the encoder as auxiliary input, performs step-by-step reconstruction, and finally outputs the detection results of small objects in the image; among them, the input of the Bottleneck layer is the feature map generated by the fusion processing of the last group of Transformer modules and the convolutional residual module in the encoder structure. Figure 5 In the figure, the Bottleneck layer receives the data output by the encoder structure 11 and transmits it to the first layer second cascade convolution residual block 121 (Layer 4) in the decoder structure 12 after convolution processing.

[0047] The present disclosure also provides a small target-oriented target detection network training method, comprising the following steps: Step 1: Construct a target detection network as described in any of the above embodiments; Step 2: Taking the training sample image data as input and the recognition results of small targets in the corresponding training sample image data as true values, the target detection network is trained to obtain a trained target detection network.

[0048] In one possible embodiment, network training may be performed according to the following configuration: Input processing: input image I∈R 256×256×3 Normalize to grayscale image; randomly crop 128×128 patches according to the data preprocessing process in the training phase of Algorithm 2; Parameter configuration: Optimizer: Adam (lr=0.001), cosine annealing to 10 -5 ; Loss function: binary cross entropy; Batch size = 8, iteration 1000 rounds; Module hyperparameters: IFM: channel compression rate 0.5, number of attention heads 4; HDSA: window group G=4, sampling points s=7; RSAM: number of group convolution channels C=64.

[0049] The data preprocessing process in the training phase of Algorithm 2 can include the following steps: Require: image I, mask M, patch size P, normalization parameters (μ, σ) Ensure: Normalized and enhanced image patch I patch and mask patch M patch 1: Convert image I to grayscale; 2: Normalize the mask M to M = M / 255; 3: Normalize the image using mean μ and standard deviation σ: I = (I-μ) / σ; 4: if min(H,W) <P then 5: Fill the boundaries of I and M to ensure that the minimum size is not less than P; 6: end if 7: Randomly select the starting coordinates of the patch (h start ,w start ); 8: Extract the patch: 9: I patch = I[h start : h end ,w start : w end ]; 10: M patch = M[h start : h end ,w start : w end ]; 11: if M patch If the preset conditions are met then 12: Jump out of the loop; 13: end if 14: With a 50% chance of patch and M patch Perform data augmentation (flip, transpose); 15: return Ipatch ,M patch The present disclosure also provides a target detection method, comprising the following steps: Step 1: Obtain image data to be detected; Step 2: inputting the image data to be detected into a trained object detection network, wherein the object detection network has a structure as described in any of the above embodiments; Step 3: Output the small target detection result of the image data to be detected.

[0050] In the embodiment of the present disclosure, the image data to be detected may be a picture or a frame in a video.

[0051] In a possible embodiment, single-frame detection may be performed according to the following settings: Preprocessing: pad the input image to a minimum size ≥ 128; Forward propagation: The input image first passes through the CNN branch and the Transformer branch for multi-scale feature extraction. The CNN branch uses a four-layer cascaded residual convolution module to gradually extract local spatial details, with channel dimensions of [32, 64, 128, 256]. The Transformer branch uses a four-layer HDSA (Hierarchical Dilated Self-Attention) module to perform long- and short-range dependency modeling based on a window partitioning strategy, with window sizes of [8, 16, 24, 32], generating multi-scale global semantic features.

[0052] The two branches above achieve feature fusion at each corresponding level through an interactive fusion module (IFM). Based on channel attention and cross-modal attention mechanisms, the IFM module co-calibrates the features of the CNN and Transformer branches to generate fused features for subsequent processing.

[0053] At the deepest layer of the encoder, the fused features are passed to the Bottleneck module, which further compresses and integrates high-level semantic features. The decoder then performs upsampling and reconstruction layer by layer: Each decoding layer receives the fused features from the decoding results of the previous layer and the output of the corresponding encoding layer's IFM, and merges the features through channel concatenation. The decoder restores spatial resolution using upsampling and a second cascaded residual module, restoring the localization information of objects in the image layer by layer.

[0054] Finally, the decoder outputs the feature map to generate a prediction mask through the FCN Head layer, and outputs the detection results of small objects in the image.

[0055] CNN branch: 4-level residual convolution (channel number [32, 64, 128, 256]); Transformer branch: 4-level HDSA (window size [8, 16, 24, 32]); Output: The decoder is upsampled and then passed through the FCN Head to generate a detection mask.

[0056] In order to verify the effectiveness of the target detection method (DIFTransNet) proposed in this paper, DIFTransNet was compared with several advanced models, covering traditional model-driven methods (such as top-hat transformation (Tophat, Top-hatTransformation), maximum median filtering (Max-Median), multi-scale patch contrast measure (MPCM, MultiscalePatch-basedContrastMeasure), weighted enhanced local contrast measure (WSLCM, WeightedStrengthenedLocalContrastMeasure), IPI and partial sum of tensor nuclear norm (PSTNN)) and deep learning-based methods (such as missed detection and false alarm (MDvsFA, MissDetection vs.False Alarm), Asymmetric Contextual Modulation Network (ACMNet), Attentional Local Contrast Network (ALCNet), Infrared Small Target Detection Network (ISNet), Feature Compensation and Cross-Level Correlation Network (FC3-Net), Dense Nested Attention Network (DNANet), U-Net in U-Net for Infrared Small Object Detection (UIUNet), Multi-level TransUNet for Space Infrared Small Ship Detection (MTU-Net), Segment Anything Model for Infrared Small Target Detection (IRSAM), Simple Baseline for Infrared Small Target Detection (SimIRSTD) All comparison methods use the parameters in their original papers. A systematic quantitative analysis is conducted on the National University of Defense Technology Single-frame Infrared Small Target Detection (NUDT-SIRST), Single-frame Infrared Small Target Detection (SIRST), and IRSTD-1K datasets.

[0057] Table 1 shows the performance comparison of various methods under different indicators on the three datasets NUDT-SIRST, SIRST and IRSTD-1K:

[0058] As shown in Table 1, deep learning methods generally outperform traditional algorithms in detection accuracy and background suppression. In particular, DIFTransNet outperforms existing methods on all three public datasets, accurately depicting object contours while significantly reducing false positives. It leads in both pixel-level metrics (mIoU) and object-level metrics (Pd and Fa). For example, on the NUDT-SIRST dataset, DIFTransNet achieves an mIoU of 96.31%, an improvement of over 2% over the previous best SCTransNet, and reduces Fa to 1.891×10 -6 , almost half that of SCTransNet. Although IRSAM achieved the lowest Fa value on the SIRST dataset, its overall performance was inferior to DIFTransNet, with lower mIoU and Pd. Compared to SimIRSTD, which performed well on the IRSTD-1K dataset, DIFTransNet still led in all metrics. These results demonstrate that DIFTransNet has a significant advantage in maintaining the integrity of target outlines and identifying pixel-level differences, achieving an excellent balance between detection performance and false positive reduction.

[0059] Through the above description of the embodiments, those skilled in the art will clearly understand that the embodiments of the present disclosure can be implemented through hardware or through software plus the necessary general-purpose hardware platform. Based on this understanding, the technical solutions of the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, or mobile hard drive) and includes a number of instructions for causing a computer device (such as a personal computer, server, or network device) to execute the methods described in the various embodiments of the present disclosure.

[0060] Those skilled in the art will understand that the accompanying drawings are merely schematic diagrams of a preferred embodiment, and the modules or processes in the accompanying drawings are not necessarily required for implementing the present disclosure.

[0061] Those skilled in the art will appreciate that the modules in the devices of the embodiments may be distributed in the devices of the embodiments as described in the embodiments, or may be located in one or more devices different from the embodiments with corresponding changes. The modules of the above embodiments may be combined into one module or further split into multiple submodules.

[0062] The serial numbers of the above-mentioned embodiments of the present disclosure are for description only and do not represent the advantages or disadvantages of the embodiments.

[0063] Obviously, those skilled in the art may make various changes and modifications to the present disclosure without departing from the spirit and scope of the present disclosure. Thus, if these modifications and variations of the present disclosure fall within the scope of the claims of the present disclosure and their equivalents, the present disclosure is intended to include these modifications and variations.

Claims

1. A target detection network for small targets, characterized by: include: An encoder structure and a decoder structure connected in sequence; the encoder structure includes a dual-branch hybrid encoder; The dual-branch hybrid encoder includes a Transformer encoder branch and a CNN encoder branch; The Transformer encoder branch includes a plurality of Transformer modules, and the CNN encoder branch includes a plurality of first cascaded convolutional residual blocks. The number of the Transformer modules and the first cascaded convolutional residual blocks are the same and their positions correspond to each other. For each group of Transformer modules and first cascaded convolutional residual blocks with corresponding positions, an interactive fusion module is provided for the group of Transformer modules and the first cascaded convolutional residual blocks. The interactive fusion module is configured to receive the first processing results output by the corresponding group of Transformer modules and the first cascaded convolutional residual block, fuse the first processing results by sharing the projection alignment features and utilizing the cross-attention mechanism; and input the obtained fusion result and the first processing result into the next adjacent group of Transformer modules and the first cascaded convolutional residual block; The decoder structure is used to upsample and restore the features extracted and fused by the encoder structure, and output the results of identifying small targets in the image data input to the encoder structure.

2. The network according to claim 1, wherein The interactive fusion module includes a compression module, a projection module, an activation module and an information cross module; The compression module is used to perform spatial compression operation using global average pooling to convert CNN features into and Transformer features Compressed into a compact descriptor in the channel dimension and : ; ; in, Represent the spatial dimension of CNN feature maps; The number of channels representing the CNN feature map; Represents the spatial dimension of the Transformer feature map; The number of channels representing the Transformer feature map; The projection module is used to convert the channel descriptor into and Spliced ​​and projected into a shared latent space , to achieve alignment and fusion of local and global semantics: ; ; ; in, Characterization channel Feature representation of Characterization channel Feature representation of 、 、 Representation weight matrix; 、 、 Characterization bias; The activation module is used to and After Sigmoid activation, they are respectively 、 Perform element-wise multiplication to obtain preliminary optimized features: ; ; The information cross module is used to realize information exchange between the two branches based on the following cross attention mechanism to obtain the cross attention feature and : ; ; After concatenating the cross-attention features, the channels are compressed through 1×1 convolution to generate the fused output: ; in, Characterization The query matrix obtained by linear transformation; Characterization The key matrix obtained by linear transformation and transposed; Characterization The value matrix obtained by linear transformation; Characterization bond matrix Dimensions; Characterization The query matrix obtained by linear transformation; Characterization The key matrix obtained by linear transformation and transposed; Characterization The value matrix obtained by linear transformation; Characterization bond matrix dimension.

3. The network according to claim 1, wherein The Transformer module includes: a feature map processing module, an attention module, a feedforward module and a feature output module; The feature map processing module is used to divide the input feature map into multiple tiles and embed position information for each tile to obtain a serialized embedded representation; The attention module is used to capture the relationship between features of serialized embedding representations at different scales through a hierarchical decoupled sparse attention mechanism; The feedforward module is configured to perform a residual connection between the output features of the attention module and the serialized embedding representation as input, and perform a nonlinear transformation on the features through a feedforward neural network; The feature output module is used to perform a residual connection between the result after the nonlinear transformation and the input of the feedforward module, reshape and merge the information containing long-distance features, and generate an output feature map.

4. The network according to claim 3, wherein The attention module includes: a subspace division module, a multi-level perception module and a splicing module; The subspace partitioning module is used to transform the input features Divided along the channel dimension into subspaces, each subspace independently completes regional feature extraction and reconstruction, forming Level multi-scale representation hierarchy: ;in, The number of channels representing each group of subspaces; for each subspace Perform non-overlapping window division, window size As the scale increases: ; ; in, Characterization The number of windows in a layer decreases as the window size increases; The multi-level perception module is used to In the expansion ratio Uniform selection sampling points to ensure consistent sampling density across scales: ; Sparse sampling generates coordinate tensors ; Calculate the attention output for each subspace, where the query vector is generated by the original window features and the key value vector is generated by the aggregated features: ; ; ; ; ; in, 、 and all , represents the learnable projection matrix; Characterize the scaling factor; The splicing module is used to splice the outputs of all subspaces along the channel dimension to obtain the final output features: .

5. The network according to claim 1, wherein The decoder structure includes a plurality of second cascade convolution residual blocks, the number of the plurality of second cascade convolution residual blocks is consistent with the number of the Transformer modules and the positions are corresponding; the input end of each second cascade residual module is jump-connected to the output end of the corresponding interactive fusion module of the corresponding position Transformer module; The second cascade convolution residual block is used to upsample the input data and transmit it to the next second cascade convolution residual block; the input data is the spliced ​​data obtained by channel splicing the fusion features output by the interactive fusion module of the previous level and the jump connection.

6. The network according to claim 1, wherein The decoder structure includes a plurality of second cascaded convolution residual blocks, the number of the plurality of second cascaded convolution residual blocks being consistent with the number of the Transformer modules and the positions corresponding thereto; The network further comprises: a reconstruction jump enhancement module; the reconstruction jump enhancement module comprises a top-down fusion block and a bottom-up fusion block with symmetrical structures; The top-down fusion block is used to fuse the fusion features output by the interactive fusion module from shallow to deep layers in sequence until the fusion with the deepest fusion features is completed, thereby obtaining enhanced features corresponding to the deepest fusion features; The bottom-up fusion block is used to take the enhanced feature as the starting point and sequentially fuse with the fusion features from the deepest layer to the shallowest layer except the deepest layer, to obtain the enhanced features corresponding to the fusion features of each layer; The second cascade convolution residual block is used to upsample the input data and transmit it to the next second cascade convolution residual block; the input data is the spliced ​​data obtained by channel splicing the output data of the previous level and the enhanced features of the output fusion features of the corresponding interactive fusion module.

7. The network according to claim 6, wherein: The top-down fusion block is used to combine the current fusion features and adjacent features to be fused Through the space-to-channel reorganization operation, Each The pixels of the local window are rearranged into four independent channels. Convert to : ; in, Represents the index within the window; Characterize channel index; Characterize the height index; Characterization width index; Maintain local structural relationships and align channels through group convolution: ; in, Characterization has The convolution operation of the group Number of channels from down to ; is the weight matrix of the group convolution, each group processes the original Local neighborhood information; The deep semantics are integrated with the shallow details through the convolutional attention module to obtain : ; in, Represents a 3×3 convolution operation; and Characterization weight coefficient; The bottom-up fusion block is used to combine the current fusion features and adjacent features to be fused Through the space-to-channel reorganization operation, Each The pixels of the local window are rearranged into four independent channels. Convert to : ; in, Represents the index within the window; Characterize channel index; Characterize the height index; Characterization width index; Maintain local structural relationships and align channels through group convolution: ; in, Characterization has The convolution operation of the group Number of channels from down to ; is the weight matrix of the group convolution, each group processes the original Local neighborhood information; The deep semantics are integrated with the shallow details through the convolutional attention module to obtain : ; in, Represents a 3×3 convolution operation; and Characterize the weight coefficient.

8. The network according to claim 1, wherein The decoder structure further includes: a connection module; The connection module is used to connect the output of the encoder structure and the second cascaded convolution residual block in the decoder structure.

9. A target detection network training method for small targets, characterized in that: include: Constructing a target detection network according to any one of claims 1 to 8; The training sample image data is used as input, and the recognition results of small targets in the corresponding training sample image data are used as true values ​​to train the target detection network to obtain a trained target detection network.

10. A target detection method, characterized in that: include: Obtaining image data to be detected; Inputting the image data to be detected into a trained target detection network, wherein the target detection network has a structure of the target detection network according to any one of claims 1 to 8; Output the small target detection result of the image data to be detected.

Citation Information

Patent Citations

  • Small-size target detection method based on dynamic anchor frame and Transform

    CN116403090A

  • Hierarchical gating cross Transform infrared dim target detection method

    CN116912660A

  • Deep and far space small target detection method and system based on multi-scale feature pyramid

    CN118212505A

  • Infrared weak and small target detection method based on multi-dimensional information cross enhancement

    CN118691916A

  • Optical remote sensing image salient target detection method based on double-branch progressive interaction and multi-direction feature enhancement

    CN119992068A

Cited By

  • Method and terminal for detecting small target in electrical equipment

    CN121010939A

  • A method and terminal for detecting small targets in electrical equipment

    CN121010939B

  • Infrared weak and small target detection method based on double-granularity semantic prompt

    CN121459031A

  • Device anomaly detection method, device, system and readable storage medium

    CN122493170A