Construction, training and detection method of small target-oriented target detection network

By combining a dual-branch hybrid encoder structure and a hierarchical bidirectional interaction mechanism with Transformer and CNN, the accuracy and robustness of infrared small target detection are improved, solving the problems of poor detection consistency and high false negative rate in existing technologies.

CN120599386BActive Publication Date: 2025-12-26NAT SPACE SCI CENT CAS
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing infrared small target detection methods suffer from poor consistency and high false negative rates in complex backgrounds, making it difficult to cope with dynamic changes in target size, shape, and background. Furthermore, their reliance on fixed templates and thresholds leads to inaccurate detection.

Method used

A dual-branch hybrid encoder structure is adopted, combining a Transformer encoder and a CNN encoder. A hierarchical bidirectional interaction mechanism is used to optimize the local details of the CNN and the global semantic features of the Transformer. Feature fusion is performed using an interactive fusion module, and upsampling and reconstruction are performed through a decoder structure.

Benefits of technology

It improves the accuracy and robustness of infrared small target detection, enabling precise detection of weak targets in complex backgrounds, reducing false alarms, and fully leveraging the advantages of CNN and Transformer.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120599386B_ABST
    Figure CN120599386B_ABST
Patent Text Reader

Abstract

The present disclosure provides a small target-oriented target detection network and a training method and a detection method thereof, comprising an encoder structure and a decoder structure; the encoder structure comprises a double-branch hybrid encoder, which comprises a Transformer encoder branch and a CNN encoder branch; the Transformer encoder branch comprises a plurality of Transformer modules, and the CNN encoder branch comprises a plurality of first cascaded convolution residual blocks; an interaction fusion module is arranged for each group of Transformer modules and first cascaded convolution residual blocks corresponding to a position; the interaction fusion module is used for receiving a first processing result output by the corresponding group, fusing the first processing result, and inputting the obtained fusion result and the first processing result into the adjacent next group of Transformer modules and first cascaded convolution residual blocks; the decoder structure is used for up-sampling and restoring the features extracted and fused by the encoder structure, and outputting the detection result of the small target in the image, so that the detected small target is more accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of image recognition technology, and in particular to a method for constructing, training, and detecting a target detection network for small targets. Background Technology

[0002] Small target detection in images or videos (e.g., infrared small target detection) is a challenging task in computer vision because small targets occupy a small proportion of pixels in an image, have a low signal-to-noise ratio, and lack significant features such as color, shape, and texture, making them inconspicuous and easily affected by background noise. Small target detection technology has applications in key areas such as airspace surveillance, precision guidance, and maritime search and rescue, which place extremely high demands on the detection accuracy and false alarm rate of infrared small targets.

[0003] Early infrared small target detection methods were mainly based on traditional image processing and machine learning techniques, and can be broadly categorized into three types: filtering methods, which use spatial filtering operations to suppress background noise by leveraging the global discontinuity between the target and the background; human visual system methods, which draw on biological visual contrast mechanisms to enhance the brightness difference between small regions and the surrounding background through local saliency measurements; and low-rank decomposition methods, which decompose infrared images into low-rank background and sparse target subspaces and use matrix factorization techniques to separate targets from structured clutter. While these methods have achieved some success in improving the separability of targets and background, they all have inherent limitations, including reliance on mathematical priors and manually designed features, and sensitivity to parameter changes. In complex textured backgrounds, filter effectiveness is limited; human visual models perform poorly in scenes with weak targets; and low-rank methods are prone to false alarms when dealing with targets of diverse shapes. Furthermore, these methods typically rely on fixed templates and thresholds, making it 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 false negative rates. Summary of the Invention

[0004] This disclosure provides a method for constructing, training, and detecting small targets using a target detection network, in order to solve the problem of inaccurate detection of small targets in existing methods.

[0005] To address the aforementioned issues, firstly, a method for constructing a target detection network for small targets is provided, comprising: a sequentially connected encoder structure and a decoder structure; the encoder structure includes a dual-branch hybrid encoder; the dual-branch hybrid encoder includes a Transformer encoder branch and a CNN encoder branch;

[0006] The Transformer encoder branch includes multiple Transformer modules, and the CNN encoder branch includes multiple first-cascaded convolutional residual blocks. The number of Transformer modules and the first-cascaded convolutional residual blocks are the same and their positions correspond. For each group of Transformer modules and first-cascaded convolutional residual blocks corresponding to the position, an interactive fusion module is set for that group of Transformer modules and first-cascaded convolutional residual blocks.

[0007] The interactive fusion module is used to receive the first processing result output by the corresponding group of Transformer modules and the first cascaded convolutional residual block, fuse the first processing result by sharing projection alignment features and using a 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.

[0008] The decoder structure is used to upsample and reconstruct the features extracted and fused by the encoder structure, and output the result of identifying small targets in the image data input to the encoder structure.

[0009] Secondly, a method for training a target detection network for small targets is provided, including:

[0010] Construct the object detection network according to the construction method described in the first aspect;

[0011] The target detection network is trained by taking the training sample image data as input and the recognition results of small targets in the corresponding training sample image data as ground values.

[0012] Thirdly, a target detection method is provided, including:

[0013] Acquire the image data to be detected;

[0014] The image data to be detected is input into the trained target detection network, which is constructed according to the target detection network construction method described in the first aspect.

[0015] Output the small target detection results of the image data to be detected.

[0016] The beneficial effects of the embodiments disclosed herein include:

[0017] This disclosure provides a method for constructing, training, and detecting a target detection network for small targets. The construction method includes: a sequentially connected encoder structure and a decoder structure; 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 multiple Transformer modules, and the CNN encoder branch includes multiple first-cascaded convolutional residual blocks, the number of Transformer modules and the positions of the first-cascaded convolutional residual blocks are the same; for each group of Transformer modules and the cascaded... The convolutional residual block is equipped with an interactive fusion module for the group of Transformer modules and the first cascaded convolutional residual block. This interactive fusion module receives the first processing result output by the corresponding group of Transformer modules and the first cascaded convolutional residual block, fuses the first processing result through shared projection alignment features and a cross-attention mechanism, and inputs the fused result and the first processing result into the next adjacent group of Transformer modules and the first cascaded convolutional residual block. The decoder structure upsamples and reconstructs the features extracted and fused by the encoder structure, outputting the result of identifying small targets in the image data input to the encoder structure. The target detection network provided in this embodiment has an encoder structure comprising a dual-branch structure of a CNN encoder branch and a Transformer encoder branch. It can enhance feature representation by stacking convolutional layers in a convolutional neural network to expand the receptive field, model global dependencies through the Transformer's self-attention mechanism, and effectively couple the convolutional and Transformer paths through a hierarchical bidirectional interaction mechanism. Unlike the hybrid architectures in related technologies, the dual-branch interactive fusion network proposed in this disclosure enables bidirectional information flow between the two branches at each encoding stage, allowing the local details of the CNN and the global semantic features of the Transformer to mutually optimize each other, thereby making the small targets detected by this object detection network more accurate. Attached Figure Description

[0018] Figure 1 This is one of the schematic diagrams of the target detection network structure provided in the embodiments of this disclosure;

[0019] Figure 2 This is a schematic diagram of the interactive fusion module structure provided in an embodiment of this disclosure;

[0020] Figure 3 This is a schematic diagram of the encoder structure and a schematic diagram of the HDSA structure provided in the embodiments of this disclosure;

[0021] Figure 4This is a second schematic diagram of the target detection network structure provided in the embodiments of this disclosure;

[0022] Figure 5 This is the third schematic diagram of the target detection network structure provided in the embodiments of this disclosure;

[0023] Figure 6 This is a schematic diagram of a top-down fusion block structure provided in an embodiment of this disclosure. Detailed Implementation

[0024] This disclosure provides a method for constructing, training, and detecting targets using a target detection network for small targets. Preferred embodiments of this disclosure are described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustrative and explanatory purposes only and are not intended to limit the scope of this disclosure. Furthermore, the embodiments and features described herein can be combined with each other unless otherwise specified.

[0025] This disclosure provides a method for constructing 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;

[0026] Transformer encoder branch 111 includes multiple Transformer modules 1111, and CNN encoder branch 112 includes multiple first-cascaded convolutional residual blocks 1121. The number of Transformer modules 1111 and the first-cascaded convolutional residual blocks 1121 are the same and their positions correspond. For each group of Transformer modules 1111 and first-cascaded convolutional residual blocks 1121 with corresponding positions, an interactive fusion module 113 is provided for that group of Transformer modules 1111 and first-cascaded convolutional residual blocks 1121.

[0027] The interactive fusion module 113 is used to receive the first processing result output by the corresponding group of Transformer modules 1111 and the first cascaded convolutional residual block 1121, fuse the first processing result by sharing projection alignment features and using 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.

[0028] The decoder structure 12 is used to upsample and reconstruct the features extracted and fused by the encoder structure 11, and output the result of identifying small targets in the image data of the input encoder structure 11.

[0029] In this embodiment, infrared small target detection is taken as an example. Because infrared small targets are tiny, have low signal-to-noise ratios, and lack significant features such as color, shape, and texture, they are often obscured by complex and varied backgrounds. Therefore, accurately identifying and extracting small targets in interference environments is a significant technical challenge in this field. Even in related technologies that combine Convolutional Neural Network (CNN) and Transformer networks for target detection, the CNN first extracts multiple layers of features, and then introduces the Transformer at a specific stage for modeling. This unidirectional pipeline lacks feedback and interaction in intermediate stages, making it difficult to fully leverage the complementary advantages of the two structures. The target detection network for small targets provided in this disclosure (also known as DIFTransNet) is a novel dual-branch interactive fusion network that effectively couples the convolutional and Transformer paths through a hierarchical bidirectional interaction mechanism. Unlike previous hybrid architectures, DIFTransNet achieves bidirectional information flow between the two branches at each encoding stage, enabling mutual optimization of the local details of the CNN and the global semantic features of the Transformer.

[0030] A schematic diagram of a DIFTransNet structure proposed in this disclosure is shown below. Figure 1 As shown, this network employs 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 each structure. Figure 1 Taking the Transformer encoder branch 111 (Transformer Encoder) as an example, which includes four Transformer modules 1111 (corresponding to...) Figure 1 In the MST Block1~MST Block4, the CNN encoder branch 112 (Convolution Encoder) includes four first-cascade convolutional residual blocks 1121 (corresponding to...). Figure 1 In the CNN Blocks 1 through 4, there are four interactive fusion modules 113 (corresponding to...). Figure 1 (IFM1~IFM4).

[0031] When performing object detection or network training, the image to be processed can be initially processed and then input into the CNN encoder branch 112 (Convolution Encoder) and the Transformer encoder branch 111 (Transformer Encoder), respectively. The CNN encoder branch 112 uses cascaded convolutional residual blocks to progressively extract hierarchical features, focusing on local intensity changes and spatial details to accurately locate small targets. At the same time, the Transformer encoder branch 111 divides the input image (e.g., the input feature map) into patches and models multi-scale global context through a hierarchical decoupled sparse attention mechanism (HDSA) to distinguish targets from clutter backgrounds.

[0032] In each encoding stage (i.e., the stage where the group consisting of the Transformer module 1111 corresponding to each position and the first concatenated convolutional residual block 1121 is encoded, for example, MST Block n and CNN Block n can be regarded as a group corresponding to the position, where n is 1~4 in this example), the outputs of both branches are input to the corresponding interactive fusion module 113 (for example, IFMn is an interactive fusion module set for MST Block n and CNN Block n), and fusion is performed by sharing projection alignment features and using cross-attention mechanism. The fused features will be input into the next stage together with the original output of each branch in the previous stage to achieve dynamic feature balancing. The residual connection retains the proprietary feature modeling capability of each branch, while the fused features realize complementary optimization between paths, effectively alleviating the feature incompatibility and insufficient interaction problems existing in the traditional dual-branch structure. 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 cascaded convolutional 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 encoder structure 11. This output is then input into decoder structure 12. Decoder structure 12 gradually restores the spatial resolution through upsampling, and the final output is processed by the head structure of the fully convolutional network (FCN Head) to generate a pixel-level segmentation map (e.g., size 10). H×W× 1) Accurately mark small infrared targets.

[0033] Essentially, the core challenge of infrared small target detection lies in two aspects: on the one hand, it needs to maintain high sensitivity to weak local features to detect faint targets, and on the other hand, it needs to be robust to complex backgrounds to reduce false alarms. DIFTransNet effectively bridges these two challenges through hierarchical interaction optimization between CNN and Transformer. Specifically, IFM enables complementary enhancement between the two branches: local features guide the Transformer to focus on potential target regions, while global semantics helps the CNN suppress locally similar but semantically unrelated false targets. 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.

[0034] Additionally, preliminary processing of the image to be processed may include: preliminary processing using the stem module to generate initial feature maps for both the CNN and Transformer branches. For example... Figure 1 As shown, assuming the input size is H×W× For 3×3 infrared images, the stem module can first extract local features from the image to be processed through 3×3 convolution, and 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 3×3 convolution are recombined and dimensionality reduced through 1×1 convolution, and BN+ReLU is used to accelerate training and introduce nonlinearity. Figure 1 The method of initial image processing in the stem module is merely an example and does not limit this disclosure.

[0035] The following is a description of the illustrations in the embodiments of this disclosure: The accompanying drawings provided in this disclosure... These represent the feature extraction layers corresponding to MST Block1 to MST Block4, respectively. T Characterized as Features extracted by each feature layer; These represent the feature extraction layers corresponding to CNN Block 1 through CNN Block 4, respectively. C Characterized as Features extracted by each feature layer; These represent the feature extraction layers corresponding to IFM1 through IFM4, respectively. H Characterized as Features extracted by each feature layer; Represents element-wise addition; represents top-down fusion blocks; represents bottom-up fusion blocks; represents channel concatenation; and thick solid arrows represent group normalization.

[0036] In yet another embodiment provided in this disclosure, such as Figure 2 As shown, the interactive fusion module (IFM) 113 includes: a compression module 1131, a projection module 1132, and an information cross-connection module 1133;

[0037] Compression module 1131 is used to perform spatial compression operations using global average pooling to compress CNN features. and Transformer features Compressed into a compact descriptor in the channel dimension and :

[0038] Equation (1)

[0039] Equation (2)

[0040] in, Spatial dimension representing CNN feature maps; The number of channels representing the feature map of a CNN; The spatial dimension representing the Transformer feature map; The number of channels representing the feature map of a Transformer;

[0041] Projection module 1132 is used to project the channel descriptor using the following formula. and After being pieced together, the image is projected onto a shared potential space. This enables the alignment and fusion of local and global semantics.

[0042] Equation (3)

[0043] Equation (4)

[0044] Equation (5)

[0045] in, Characterization channels Feature representation; Characterization channels Feature representation; , , Characterizing the weight matrix; , , Characterization bias;

[0046] Information cross module 1133, used to... and After activation by Sigmoid, respectively with , Element-wise multiplication yields preliminary optimized features:

[0047] Equation (6)

[0048] Equation (7)

[0049] Based on the following cross-attention mechanism, information exchange between the two branches is achieved, resulting in cross-attention features. and :

[0050] Equation (8)

[0051] Equation (9)

[0052] The cross-attention features are concatenated and then compressed using a 1×1 convolution to generate a fused output.

[0053] Equation (10)

[0054] in, Characterization The query matrix obtained through linear transformation; Characterization The key matrix is ​​obtained through linear transformation and then transposed. Characterization The value matrix obtained through linear transformation; Characteristic Key Matrix The dimension; Characterization The query matrix obtained through linear transformation; Characterization The key matrix is ​​obtained through linear transformation and then transposed. Characterization The value matrix obtained through linear transformation; Characteristic Key Matrix Dimensions.

[0055] In this embodiment, the IFM module serves as a key bridge for bidirectional complementary information flow between the CNN branch and the Transformer branch. It designs a series of efficient interaction strategies to achieve effective feature fusion, taking into account the differences between the two structures in feature dimension and semantic space.

[0056] like Figure 2 As shown, in order to eliminate spatial redundancy and focus on the most discriminative feature information, the compression module 1131 first performs a spatial compression operation using global average pooling, and then uses equations (1) and (2) to compress the features output by the first convolutional residual block 1121 corresponding to the CNN (corresponding to...). Figure 2 CNN features and the corresponding features output by the Transformer module (corresponding) Figure 2 MST features in Squeeze is a compact descriptor in the channel dimension. and (The Excite operation is used to perform a nonlinear transformation on the compressed features to generate the weights for each channel, which will not be elaborated here.) Next, the projection module 1132 projects the channel descriptors using equations (3) to (5). and After being stitched together, the image is projected onto the shared latent space. This enables the alignment and fusion of local and global semantics.

[0057] Furthermore, in order to perform weighted adjustments on the original features, the information cross-module 1133 uses equations (6) and (7) to... and via Sigmoid (i.e.) After activation, respectively with , Element-wise multiplication yields preliminary optimized features. and Then, information exchange between the two branches is achieved through equations (8) and (9) based on the cross-attention mechanism (corresponding to...). Figure 2 Linear projection to Q and K T , and V, and Softmax processing), and finally the cross-attention features are concatenated by equation (10) (corresponding to Figure 2 The concat and projection in the model uses 1×1 convolution to compress channels and generate a fused output (corresponding to...). Figure 2The hybrid features are concatenated with the original features output by each interactive fusion module 113 (except for the last interactive fusion module 113) and the original features output by the Transformer module 1111 and the first concatenated convolutional residual block 1121 group, respectively, and then input into the next level encoder 1111 and the first concatenated convolutional residual block 1121 group respectively.

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

[0059] The IFM module proposed in this embodiment establishes a deep interaction path between CNN and Transformer features through shared space alignment, attention recalibration, and cross-attention mechanisms. During the fusion process, it dynamically adjusts the local and global semantic distribution, thereby improving the perception capability of the entire network in complex infrared backgrounds.

[0060] In yet another embodiment provided in this disclosure, such as 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.

[0061] The feature map processing module 11111 is used to divide the input feature map into multiple patches and embed position information into each patch to obtain a serialized embedding representation;

[0062] Attention module 11112 is used to capture the relationships between features of serialized embedding representations at different scales by hierarchically decoupling the sparse attention mechanism;

[0063] 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 to perform a nonlinear transformation on the features through the feedforward neural network;

[0064] The feature output module 11114 is used to perform residual connection between the result of the nonlinear transformation and the input of the feedforward module 11113, reshaping and merging information containing long-range features to generate an output feature map.

[0065] In this embodiment of the disclosure, the feature map processing module 11111 divides the input feature map into multiple small blocks (corresponding to...). Figure 3 In patch embedding, each patch can be a fixed-size region. These patches can be converted into multiple embedding vectors (e.g., one-dimensional vectors). To preserve the positional information of each patch in the original feature map, positional embeddings (corresponding to...) can be added to each patch embedding vector. Figure 3 Position embedding is used to help the model understand the relative position of the patch in the feature map. Attention module 11112 (corresponding to...) Figure 3 The module consists of an HDSA layer and a Layer Norm layer. The HDSA layer is a multi-scale Transformer module that constructs a multi-level perceptual subspace through a hierarchical decoupling sparse semantic modeling strategy, capturing the relationships between features of sequentially embedded representations at different scales. The Layer Norm layer is used for normalization to stabilize the training process and accelerate convergence. The feedforward module 11113 (corresponding to...) Figure 3 The system consists of an MLP (Multilayer Perceptron) layer and a Layer Norm layer. The MLP is a feedforward neural network used to perform nonlinear transformations on the features, while the Layer Norm layer is used for normalization to stabilize the training process and accelerate convergence. The attention module 11112 effectively captures and utilizes 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 long-distance features to generate the desired shape of the output feature map and output the feature map.

[0066] In yet another embodiment provided in this disclosure, such as Figure 3 As shown, the attention module 11112 includes: a subspace partitioning module 111121, a multi-level perception module 111122, and a splicing module 111123;

[0067] Subspace partitioning module 111121 is used to partition the input features Divided along the channel dimension Each subspace independently completes region feature extraction and reconstruction, forming... Multi-scale representation hierarchy: in, Represents the number of channels in each subspace; for each subspace Perform non-overlapping window partitioning, window size As scale increases:

[0068] Equation (11)

[0069] Equation (12)

[0070] in, Characterizing the first The number of windows in a layer decreases as the window size increases; it should be noted that the feature... Number of channels Depending on the user-configured network parameters, the number of channels in the input raw image can be adjusted. They can be the same or different.

[0071] Multi-level perception module 111122, used in each window In the middle, the expansion rate is used. Uniform selection A total of 100 sampling points are used to ensure a consistent sampling density across scales. Equation (13); Sparse sampling generates coordinate tensors Attention outputs are computed for each subspace, where the query vector is generated from the original window features and the key-value vector is generated from the aggregated features.

[0072] Equation (14)

[0073] Equation (15)

[0074] Equation (16)

[0075] Equation (17)

[0076] Equation (18)

[0077] in, , and all , representing the learnable projection matrix; Characterizes the scaling factor;

[0078] The concatenation module 111123 is used to concatenate the outputs of all subspaces along the channel dimension to obtain the final output features. Equation (19).

[0079] In this embodiment, the attention module 11112 is based on a Hierarchical Decoupled Sparse Attention (HDSA) mechanism. In implementation, the HDSA layer can be divided into a subspace partitioning module 111121, a multi-level perception module 111122, and a stitching module 111123. Traditional Transformer structures have significant limitations in infrared small target detection tasks: Multi-head Self-Attention (MHSA) 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 mechanism (SW-MSA), due to its rigid single-scale partitioning, weakens the semantic association between sub-pixel targets and long-range context. To address these issues, this disclosure proposes HDSA, which constructs a multi-level perception subspace through a hierarchical decoupled sparse semantic modeling strategy: fine-grained small windows use dense sampling to retain weak feature information, while coarse-grained large windows obtain cross-regional context through adaptive sparse sampling. By combining a cross-window feature sharpening mechanism to suppress background noise, this design achieves a dynamic balance between local saliency and global consistency, thereby effectively alleviating the semantic occlusion problem of small infrared targets in complex backgrounds.

[0080] During implementation, the subspace partitioning module 111121 will input features Divided according to channel dimension (ChannelSplitting) Subspace (corresponding to) Figure 3 From the first subspace to the... To achieve a balance between local accuracy and global modeling, each subspace (G-th subspace) is further divided into several subspaces. Perform non-overlapping window partitioning, and the window size increases with scale (e.g.: , (e.g., larger scales result in smaller windows, and vice versa). Small windows are used to capture local details, while large windows are used to model macroscopic semantics. For example, dividing the first subspace... Partition into Windows), will the first Subspace partitioning Partition into Windows).

[0081] In addition, to ensure consistent sampling density across scales, the multi-level sensing module 111122 needs to employ a dilation rate. Uniform selection Number of sampling points, default Sparse sampling generates coordinate tensors. Preserve channel dimension information. For small windows, For dense sampling, for large windows, This method efficiently captures context through sparse sampling. To expand the receptive field between windows, maximum pooling is used to aggregate features of all windows at the same spatial location using equations (15) and (16), enhancing robustness to noise. Subsequently, attention output (corresponding to) is calculated for each subspace. Figure 3 The dot-product attention mechanism in the query vector The key-value vector is generated from the original window features, while the key-value vector is generated from the aggregated features.

[0082] In this embodiment, HDSA resolves multi-scale feature conflicts through a scale decoupling mechanism: fine-grained windows maintain 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, it enhances discriminative ability. The shallow layer emphasizes pixel-level localization, while the deep layer aggregates semantic information. Through structured multi-scale feature recombination, it achieves synergistic optimization of local discriminability and global consistency, accurately separating sparse, low-contrast small targets.

[0083] In yet another embodiment provided in this disclosure, such as Figure 4 As shown, the decoder structure 12 includes multiple second-cascaded convolutional residual blocks 121. The number of the multiple second-cascaded convolutional residual blocks 121 is the same as the number of Transformer modules 1111 and their positions correspond. The input end of each second-cascaded residual module 121 is connected to the output end of the corresponding interactive fusion module 113 of the Transformer module 1111 at the corresponding position.

[0084] The second-level convolutional residual block 121 is used to upsample the input data and then transmit it to the next second-level convolutional residual block 121. The input data is the spliced ​​data obtained by channel splicing of the fusion features output by the previous level output data and the interactive fusion module 113 of the skip connection.

[0085] In this embodiment, the decoder structure 12 includes multiple sequentially connected second-cascaded convolutional residual blocks 121. Upsampling is performed according to the levels corresponding to those of the Transformer module 1111 (and / or the first-cascaded residual module 1121) to progressively restore the feature maps to the same spatial resolution as the input image. To enable the transfer of low-level detail information extracted by the encoder structure 11 to the decoder structure 12, thereby better recovering image details 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 features output by the IFM corresponding to each level) are... It will be directly passed to the feature map of the corresponding position of decoder 121 in decoder structure 12 through a skip connection.

[0086] Since both the Transformer module 1111 and the first-cascaded residual module 121 in encoder structure 11 adopt a hierarchical structure from shallow to deep according to the feature processing order, the earlier the processing order, the shallower the extracted features (i.e., low-level features), such as edges and textures; while the later the processing order, the deeper the extracted features (i.e., higher-level semantic features), such as the shape and category of objects. Through this multi-level structure, the network can gradually refine the features, thereby completing the task more accurately. Similarly, the second-cascaded convolutional residual block 121 in decoder structure 12 also uses this hierarchical structure for upsampling, gradually recovering the feature map. The second-cascaded convolutional residual block 121 corresponds to the Transformer module 1111 in position and can be understood as the "corresponding layer" in encoder structure 11 and 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, as Figure 4 As shown, the Transformer modules MST Block1~MST Block4, or the IFM modules IFM1~IFM4, correspond to the second-level cascaded residual modules Layer1~Layer4, respectively. For example, for decoder Layer4, the fused features output by IFM4 are concatenated with the features output by the bottleneck module and then input into decoder Layer4 for upsampling processing before being input into the next level Layer3; for decoder Layer1, the fused features output by IFM1 are concatenated with the features output by Layer2 and then input into decoder Layer1 for upsampling processing.

[0087] In yet another embodiment provided in this disclosure, such as Figure 5 As shown, the decoder structure 12 includes multiple second-cascaded convolutional residual blocks 121. The number of the multiple second-cascaded convolutional residual blocks 121 is the same as the number of Transformer modules 1111 and their positions correspond.

[0088] The network further includes: a reconstructed jump enhancement module 13; the reconstructed jump enhancement module 13 includes a top-down fusion block 131 and a bottom-up fusion block 132 with symmetrical structure;

[0089] The top-down fusion block 131 is used to fuse the fusion features output by the interactive fusion module 113 from shallow to deep layers until the fusion with the deepest fusion feature is completed, so as to obtain the enhanced feature corresponding to the deepest fusion feature.

[0090] The bottom-up fusion block 132 is used to fuse with the fusion features from deep to shallow layers, except for the deepest layer, starting from the above-mentioned enhancement features, to obtain the enhancement features corresponding to the fusion features of each layer.

[0091] The second-level concatenated residual module 121 is used to upsample the input data and then transmit it to the next second-level concatenated convolutional residual block. The input data is the concatenated data obtained by concatenating the enhanced features of the previous-level output data and the corresponding interactive fusion module 113 output fusion features through channel concatenation.

[0092] In this embodiment of the disclosure, taking an infrared imaging scenario as an example, the skip connections of traditional U-Net face the following three main problems: 1) Shallow features lack high-level semantic guidance, easily misclassifying high-noise areas as targets; 2) Deep features, after multiple downsampling, lead to severe loss of pixel-level details of small targets; 3) Directly transmitting single-layer features makes it difficult to achieve dynamic cross-scale feature calibration. To solve the above problems, this disclosure proposes a Reconstruction Skip Enhancement Module 13 (RSAM), which achieves complementary fusion of shallow and deep features through a bidirectional interaction mechanism. Figure 5 As shown, this module combines top-down semantic guidance with bottom-up detail compensation to form a closed-loop optimization path. RSAM consists of two complementary modules: Top-Down Fusion Block 131 (TDFB) and Bottom-Up Fusion Block 132 (BUFB). Both have symmetrical structures, employ local attention convolution, and combine a reverse feature recombination strategy to achieve cross-layer bidirectional information interaction.

[0093] In this embodiment, the skip connection is not implemented by directly connecting the interactive fusion module 113 to the corresponding second-level cascaded residual module 121, but instead a reconstruction skip enhancement module 13 (RSAM) is introduced. RSAM provides top-down semantic guidance (e.g., ...) to the fused features obtained by each level of the interactive fusion module 113. Figure 5 (H1 to H4) and bottom-up detail compensation (such as Figure 5(A4 to A1) The enhanced features generated during this process are skipped and connected to the corresponding second-level concatenated residual module 121. This further enhances the information representation capability of the skip connections, and reorganizes shallow spatial information and deep semantic features through a bidirectional feature refinement mechanism to compensate for information loss during downsampling.

[0094] As mentioned above, due to the hierarchical structure, the fused features output by each interactive fusion module 113 are consistent with the layer of the corresponding Transformer module 1111 (and / or the first concatenated convolutional residual block 1121). In other words, it can be considered that the earlier the interactive fusion module 113 is processed, the shallower the corresponding layer of its output fused features, and vice versa. Taking four encoders as an example, the layers from shallowest to deepest are as follows: IFM1 outputs fused features extracted from layer H1 as F. H1 The IFM2 output fusion features are the features F extracted from layer H1. H2 The IFM3 output fusion features are the features F extracted from the H3 layer. H3 The features fused with the IFM4 output are the features F extracted from the H4 layer. H4 Therefore, the top-down fusion block 131 first fuses the corresponding features of H1 and H2, then fuses the result with the corresponding feature of H3, and finally fuses the result with the corresponding feature of H4, thus obtaining the enhanced feature A4 corresponding to the deepest fused feature H4. This enhanced feature A4 is then used as the input of the bottom-up fusion block 132, sequentially fused with the corresponding feature of H3 (to obtain the enhanced feature A3 corresponding to H3), fused with the corresponding feature of H2 (to obtain the enhanced feature A2 corresponding to H2), and finally fused with the corresponding feature of H1 (to obtain the enhanced feature A1 corresponding to H1). Based on the correspondence between 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 are respectively concatenated with the output data of the previous layer from Layer 1 to Layer 4 to generate the corresponding input data. Taking Layer4 as an example, the output of Bottleneck is concatenated with the channel of A4 and used as the input data of Layer4. The upsampled result is concatenated with the channel of A3 and used as the input of Layer3, and so on.

[0095] In yet another embodiment provided in this disclosure, such as Figure 6 As shown, the top-down fusion block 131 is used to fuse the current features. Features to be merged with adjacent features Through the reorganization operation from space to channel, Each The pixels of the local window are rearranged into four independent channels, Convert to :

[0096] Equation (20)

[0097] in, Represents the index within the window; Characterizing channel index; Characteristic height index; Characteristic width index;

[0098] Group convolution preserves local structural relationships and aligns channels:

[0099] Equation (21)

[0100] in, Characterization has The convolution operation of the group will The number of channels from Down to ; The weight matrix is ​​for each group of convolutions, and each group processes the original... Local neighborhood information;

[0101] By fusing deep semantics with shallow details through a convolutional attention module, we obtain... :

[0102] Equation (22)

[0103] in, Characterizes 3×3 convolution operations; and Characteristic weight coefficients;

[0104] Bottom-up fusion module 132 is used to integrate the current fusion features Features to be merged with adjacent features Through the reorganization operation from space to channel, Each The pixels of the local window are rearranged into four independent channels, Convert to :

[0105] Equation (23)

[0106] in, Represents the index within the window; Characterizing channel index; Characteristic height index; Characteristic width index;

[0107] Group convolution preserves local structural relationships and aligns channels:

[0108] Equation (24)

[0109] in, Characterization has The convolution operation of the group will The number of channels from Down to ; The weight matrix is ​​for each group of convolutions, and each group processes the original... Local neighborhood information;

[0110] By fusing deep semantics with shallow details through a convolutional attention module, we obtain... :

[0111] Equation (25)

[0112] in, Characterizes 3×3 convolution operations; and Characterizing weighting coefficients.

[0113] In this embodiment of the disclosure, the top-down fusion block 131 is fused in order from shallow to deep layers, and the current fused feature The fusion features output by the shallow IFM layer (corresponding to) Figure 6 In Adjacent fusion features The fusion features of adjacent IFM outputs (corresponding to) Figure 6 In ).in, It is output from deeper feature maps in the encoder, and its spatial size is determined by the downsampling operation. The number of channels is double that of the current layer due to the enhanced semantic expression design as the network deepens layer by layer. This setting conforms to the general rule of "halving the space and doubling the channels" in the mainstream feature pyramid structure, which helps to achieve effective alignment and fusion between features of different scales.

[0114] TDFB uses a space-to-channel reconfiguration operation (corresponding to...) Figure 6 The reorganized feature map in the model preserves details of small targets during downsampling. Convert to And no information is lost. Group convolution is performed by equation (21) to preserve local structural relationships and align channels. Deep semantics and shallow details are fused by the convolutional attention module using equation (22) (corresponding to...). Figure 6The deepest IFM output fusion features are obtained by using 3×3 Conv, Layer Normalization, ReLU, and channel and spatial attention modules to obtain the enhanced features. (corresponding to) Figure 6 middle Ultimately, the Convolutional Block Attention Module (CBAM) plays a crucial role in the fusion of deep semantics and shallow details, focusing on both channel and spatial dimensions to enhance the discriminative power of the fused features. Weight coefficients, for example... α = 0 . 75, β = 0 . 25. While emphasizing deep features, location information is compensated.

[0115] The bottom-up fusion module 132 is based on Starting from the deepest layer and proceeding to the shallowest layer, the current fused features are... The fused features of deep IFM output, adjacent fused features The fusion features of adjacent shallow IFM outputs will be Figure 6 middle and By swapping the positions, we obtain the corresponding processing flow, which will not be elaborated here.

[0116] In this embodiment, 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 uses local context to compensate for deep semantic gaps. Local group convolutions ensure structural consistency during the transformation process, and the CBAM-driven calibration mechanism achieves cross-scale feature distribution alignment, effectively mitigating the information gap problem between the encoder and decoder.

[0117] In yet another embodiment provided in this disclosure, such as Figure 5 As shown, the decoder structure 12 further includes: a connection module 14;

[0118] The connection module 14 is used to connect the output of the encoder structure 11 and the second cascaded convolutional residual block 121 in the decoder structure 12.

[0119] In this embodiment of the present disclosure, the fusion features of the final stage of the encoder structure 11 will be transmitted to the connection module 14 (corresponding to Figure 5The bottleneck layer (Bottleneck) is a residual convolutional block, the same as in the CNN branch, used to integrate high-level semantic representations before entering the decoder.

[0120] The decoder structure 12 takes the features output from the deepest layer (i.e., the connection module 14) as the core input, and simultaneously receives the fused features output from each stage of the encoder as auxiliary input, performs step-by-step reconstruction, and finally outputs the detection results of small targets 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 convolutional residual modules in the encoder structure. Figure 5 In the middle, the Bottleneck layer receives the data output by the encoder structure 11, performs convolution processing, and transmits it to the first layer second concatenated convolutional residual block 121 (Layer 4) in the decoder structure 12.

[0121] This disclosure also provides a method for training a target detection network for small targets, including the following steps:

[0122] Step 1: Construct the target detection network according to the construction method described in any of the above embodiments;

[0123] Step 2: Using the training sample image data as input and the recognition results of small targets in the corresponding training sample image data as ground values, train the target detection network to obtain the trained target detection network.

[0124] In one possible implementation, the network can be trained as follows:

[0125] Input processing: Input image I∈R 256×256×3 Normalize to grayscale; randomly crop 128×128 patches according to the data preprocessing flow of the training phase of Algorithm 2;

[0126] Parameter configuration: Optimizer: Adam (lr=0.001), cosine annealing to 10 -5 Loss function: binary cross-entropy; Batch size=8, 1000 iterations;

[0127] Module hyperparameters: IFM: channel compression ratio 0.5, number of attention heads 4; HDSA: window group G=4, sampling points s=7; RSAM: number of group convolution channels C=64.

[0128] The data preprocessing process during the training phase of Algorithm 2 may include the following steps:

[0129] Required: Image I, Mask M, Patch size P, Normalization parameters (μ, σ)

[0130] Ensure: Normalized and enhanced image patch I patch and mask patch M patch

[0131] 1: Convert image I to grayscale;

[0132] 2: Normalize the mask M to M = M / 255;

[0133] 3: Normalize the image using the mean μ and standard deviation σ: I = (I-μ) / σ;

[0134] 4: if min(H,W) <P then

[0135] 5: Fill the boundaries of I and M to ensure that the minimum size is not less than P;

[0136] 6: end if

[0137] 7: Randomly select the starting coordinates (h) of the patch. start ,w start );

[0138] 8: Extract the patch:

[0139] 9: I patch = I[h start : h end ,w start : w end ];

[0140] 10: M patch = M[h start : h end ,w start : w end ];

[0141] 11: if M patch Then meet the preset conditions

[0142] 12: Exit the loop;

[0143] 13: end if

[0144] 14: With a 50% probability, I patch and M patch Perform data augmentation (flip, transpose);

[0145] 15: return I patch M patch

[0146] This disclosure also provides a target detection method, including the following steps:

[0147] Step 1: Acquire the image data to be detected;

[0148] Step 2: Input the image data to be detected into the trained target detection network, which is constructed according to the target detection network construction method described in any of the above embodiments;

[0149] Step 3: Output the small target detection results of the image data to be detected.

[0150] In this embodiment of the disclosure, the image data to be detected can be either an image or a frame from a video.

[0151] In one possible implementation, single-frame detection can be performed with the following settings:

[0152] Preprocessing: Padded input image to a minimum size ≥128;

[0153] Forward Propagation: The input image is first processed through a CNN branch and a Transformer branch for multi-scale feature extraction. The CNN branch uses a 4-layer cascaded residual convolution module to progressively extract local spatial details, with channel dimensions of [32, 64, 128, 256] respectively. The Transformer branch uses a 4-layer HDSA (Hierarchical Dilated Self-Attention) module to perform long-range and short-range dependency modeling based on a window partitioning strategy, with window sizes of [8, 16, 24, 32] respectively, generating multi-scale global semantic features.

[0154] The two branches mentioned above achieve feature fusion at each corresponding layer through an Interactive Fusion Module (IFM). The IFM module, based on channel attention and cross-modal attention mechanisms, collaboratively calibrates the features of the CNN and Transformer branches to generate fused features for subsequent processing.

[0155] At the deepest layer of the encoder, the fused features are passed to the Bottleneck module for further compression and integration of high-level semantic features. Subsequently, the decoder performs upsampling reconstruction layer by layer: each decoding layer receives the fused features from the decoding results of the previous layer and the corresponding IFM output of the encoding layer, and merges these features through channel concatenation. The decoder uses upsampling and a second-cascaded residual module to restore spatial resolution, reconstructing the target location information in the image layer by layer.

[0156] Finally, the decoder output feature map generates a prediction mask through the FCN Head layer, outputting the detection results of small targets in the image.

[0157] CNN branch: Level 4 residual convolution (number of channels [32, 64, 128, 256]);

[0158] Transformer branch: Level 4 HDSA (window size [8,16,24,32]);

[0159] Output: The detector mask is generated by the FCN Head after upsampling by the decoder.

[0160] To verify the effectiveness of the object detection method (DIFTransNet) proposed in this disclosure, DIFTransNet was compared and evaluated with several state-of-the-art models, covering traditional model-driven methods (such as Top-hat Transformation, Max-Median filtering, Multiscale Patch-based Contrast Measure (MPCM), Weighted Strongthened Local Contrast Measure (WSLCM), Partial Sum of Tensor Nuclear Norm (PSTNN)) and deep learning-based methods (such as Miss Detection vs. False Alarms (MDvsFA)).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), and Simple Baseline Model for Infrared Small Target Detection (SimIRSTD). The comparison methods used were the Spatial-Channel Cross-Transformer Network for Infrared Small Target Detection (SCTransNet) and the Spatial-Channel Cross-Transformer Network for Infrared Small Target Detection (ISTD-1K). All comparison methods employed the parameter configurations from their original papers, and systematic quantitative analyses were performed 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.

[0161] Table 1 compares the performance of each method on different metrics across the NUDT-SIRST, SIRST, and IRSTD-1K datasets:

[0162]

[0163] As shown in Table 1, deep learning methods generally outperform traditional algorithms in terms of detection accuracy and background suppression. In particular, DIFTransNet outperforms existing methods on three public datasets, significantly reducing false positives while accurately depicting target contours. It achieves leading results in both pixel-level metrics (mIoU) and target-level metrics (Pd and Fa). For example, on the NUDT-SIRST dataset, DIFTransNet achieves an mIoU of 96.31%, more than 2% higher than the previous best, SCTransNet, and reduces Fa to 1.891 × 10⁻⁶. -6 The performance of DIFTransNet is 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 exceptionally well on the IRSTD-1K dataset, DIFTransNet still leads in all metrics. These results demonstrate that DIFTransNet has a significant advantage in maintaining target contour integrity and pixel-level differential recognition, achieving an excellent balance between detection performance and false alarm control.

[0164] Through the above description of the embodiments, those skilled in the art can clearly understand that the embodiments of this disclosure can be implemented in hardware or by means of software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solutions of the embodiments of this 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, mobile hard drive, etc.) and includes several instructions to cause a computer device (such as a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments of this disclosure.

[0165] 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 drawings are not necessarily essential for implementing this disclosure.

[0166] Those skilled in the art will understand that the modules in the apparatus of the embodiments can be distributed in the apparatus of the embodiments as described in the embodiments, or they can be located in one or more devices different from this embodiment with corresponding changes. The modules of the above embodiments can be combined into one module, or they can be further divided into multiple sub-modules.

[0167] The sequence numbers of the embodiments disclosed above are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0168] Obviously, those skilled in the art can make various modifications and variations to this disclosure without departing from its spirit and scope. Therefore, if such modifications and variations fall within the scope of the claims of this disclosure and their equivalents, this disclosure is also intended to include such modifications and variations.

Claims

1. A method for constructing a small target oriented target detection network, characterized in that, The method comprises the following steps: sequentially connecting an encoder structure and a decoder structure; the encoder structure comprises a double-branch hybrid encoder; the double-branch hybrid encoder comprises a Transformer encoder branch and a CNN encoder branch; the Transformer encoder branch comprises a plurality of Transformer modules, and the CNN encoder branch comprises a plurality of first cascaded convolution residual blocks; the Transformer modules are consistent in number and correspond in position with the first cascaded convolution residual blocks; for each group of Transformer modules and first cascaded convolution residual blocks corresponding in position, an interactive fusion module is arranged for the group of Transformer modules and first cascaded convolution residual blocks; the interactive fusion module is configured to receive first processing results output by the corresponding group of Transformer modules and first cascaded convolution residual blocks, fuse the first processing results by sharing projected alignment features and using a cross-attention mechanism, and input the obtained fusion results and the first processing results into an adjacent next group of Transformer modules and first cascaded convolution residual blocks; the decoder structure is configured to perform upsampling and restoration reconstruction on the features extracted and fused by the encoder structure, and output a result of identifying small targets in image data input into the encoder structure; the interactive fusion module comprises a compression module, a projection module, an activation module and an information cross module; The compression module is configured to perform a spatial compression operation using global average pooling to compress the CNN feature and the Transformer feature into compact descriptors in the channel dimension and : ; ; wherein, characterizing a spatial dimension of a CNN feature map; characterizing a number of channels of a CNN feature map; characterizing a spatial dimension of a Transformer feature map; characterizing a number of channels of a Transformer feature map; The projection module is configured to project the channel descriptor with after splicing to the shared latent space to realize the alignment and fusion of local and global semantics: ; ; ; wherein, characterizing the channel characterizing the channel characterizing the channel characterizing the channel , , characterizing the weight matrix , , characterizing the bias The activation module is configured to multiply the feature vector by With After sigmoid activation, respectively , Element-level multiplication is performed to obtain the preliminary optimization feature: ; ; The information cross module is configured to realize information intercommunication between the two branches based on a cross attention mechanism to obtain cross attention features. and : ; ; the cross-attention features are spliced and then compressed in channels by a 1x1 convolution to generate fusion output: ; wherein, characterizing the query matrix resulting from the linear transformation; characterizing the key matrix resulting from the linear transformation and transposing it; characterizing the value matrix resulting from the linear transformation; characterizing the dimension of the key matrix ; characterizing the query matrix resulting from the linear transformation; characterizing the key matrix resulting from the linear transformation and transposing it; characterizing the value matrix resulting from the linear transformation; characterizing the dimension of the key matrix .

2. The method of claim 1, wherein, the Transformer module comprises a feature map processing module, an attention module, a feedforward module and a feature output module; the feature map processing module is configured to divide an input feature map into a plurality of blocks and embed position information for each block to obtain a serialized embedded representation; the attention module is configured to capture relationships between features of the serialized embedded representation at different scales by using a hierarchical decoupling sparse attention mechanism; the feedforward module is configured to perform residual connection on the output features of the attention module and the serialized embedded representation as input, and perform nonlinear transformation on the features by using a feedforward neural network; the feature output module is configured to perform residual connection on the nonlinear transformed result and the input of the feedforward module, reshape and merge information containing long-distance features, and generate an output feature map.

3. The method of claim 2, wherein, the attention module comprises a subspace division module, a multi-level perception module and a splicing module; The subspace division module is configured to divide the input features into a plurality of subspaces along a channel dimension, each of which is configured to independently complete region feature extraction and reconstruction, thereby forming a multi-scale representation hierarchy with a plurality of levels. The subspaces are divided along a channel dimension. Each of the subspaces is independently configured to complete region feature extraction and reconstruction, thereby forming a multi-scale representation hierarchy with a plurality of levels. The multi-scale representation hierarchy has a plurality of levels. Each of the subspaces is independently configured to complete region feature extraction and reconstruction, thereby forming a multi-scale representation hierarchy with a plurality of levels. The number of channels of each group of subspaces is represented by N. Each of the subspaces is independently configured to complete region feature extraction and reconstruction, thereby forming a multi-scale representation hierarchy with a plurality of levels. The window size increases with the scale. ; ; wherein, characterizing the first the number of windows of the layer decreases with increasing window size; The multi-level perception module is used in each window In the middle, the expansion rate is used. Uniform selection A total of 100 sampling points are used to ensure a consistent sampling density across scales. Sparse sampling generates coordinate tensors Attention outputs are computed for each subspace, where the query vector is generated from the original window features and the key-value vector is generated from the aggregated features. ; ; ; ; ; wherein, , and all characterize a learnable projection matrix; characterize a scaling factor; The splicing module is configured to splice outputs of all subspaces along a channel dimension to obtain a final output feature. .

4. The method of claim 1, wherein, the decoder structure comprises a plurality of second cascaded convolution residual blocks, the number of the plurality of second cascaded convolution residual blocks is consistent with the number of the Transformer modules and corresponds in position; the input end of each second cascaded residual module is jump-connected with the output end of the corresponding position Transformer module corresponding interactive fusion module. The second cascaded convolution residual block is configured to transmit, after up-sampling processing of input data, to a next second cascaded convolution residual block; the input data is spliced data obtained by channel splicing of output data of a previous stage and fusion features output by an interactive fusion module of a jump connection.

5. The method of claim 1, wherein, The decoder structure comprises a plurality of second cascaded convolution residual blocks, the number of the plurality of second cascaded convolution residual blocks being consistent with and corresponding to the number of the Transformer modules in position; 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 in a symmetric structure; The top-down fusion block is configured to sequentially fuse fusion features output by the interactive fusion module from a shallow layer to a deep layer until fusion of the fusion features of the deepest layer is completed, to obtain enhancement features corresponding to the fusion features of the deepest layer; The bottom-up fusion block is configured to sequentially fuse, starting from the enhancement features, the fusion features from the deep layer to the shallow layer except the deepest layer, to respectively obtain enhancement features corresponding to the fusion features of each layer. The second cascaded convolution residual block is configured to transmit, after up-sampling processing of input data, to a next second cascaded convolution residual block; the input data is spliced data obtained by channel splicing of output data of a previous stage and enhancement features of fusion features output by a corresponding interactive fusion module.

6. The method of claim 5, wherein, The top-down fusion block is configured to fuse the current feature with the adjacent feature to be fused by a spatial-to-channel reorganization operation each of the local windows pixels of the local window are rearranged into four independent channels converted into : ; wherein, characterizing the window index; characterizing the channel index; characterizing the height index; characterizing the width index; Local structure relationships are maintained and channels are aligned through group convolution: ; wherein, characterized by having a group of convolution operations, will reduce the number of channels from to ; a weight matrix for group convolution, each group processing original local neighborhood information; The deep semantic and shallow details are fused by a convolution attention module to obtain : ; wherein, characterizing a 3x3 convolution operation; and characterizing a weight coefficient; The bottom-up fusion block is configured to fuse the current fusion feature with the adjacent features to be fused by a spatial-to-channel reorganization operation each of the local windows pixels of the local window are rearranged into four independent channels converted into : ; wherein, characterizing the index within the window; characterizing the index of the channel; characterizing the index of the height; characterizing the index of the width; Local structure relationships are maintained and channels are aligned through group convolution: ; wherein, characterized by having a group of convolution operations, will reduce the number of channels from to ; a weight matrix for group convolution, each group processing original local neighborhood information; The deep semantic and the shallow details are fused by a convolution attention module to obtain : ; wherein, characterizing a 3x3 convolution operation; and characterizing a weight coefficient.

7. The method of claim 1, wherein, The decoder structure further comprises a connection module. The connection module is configured to connect output of the encoder structure and the second cascaded convolution residual block in the decoder structure.

8. A small target-oriented target detection network training method, characterized in that, Comprise: constructing a target detection network according to the construction method in any one of claims 1-7; training the target detection network by taking training sample image data as input and taking a recognition result of a small target in the corresponding training sample image data as true value, to obtain a trained target detection network.

9. A target detection method characterized by, Comprise: obtain image data to be detected; input the image data to be detected into the target detection network that is constructed according to the construction method of the target detection network in any one of claims 1-7; output a small target detection result of the image data to be detected.

Citation Information

Patent Citations

  • 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