A transformer model for real-time image detection and application thereof

By using a Transformer model with a bidirectional receptive field optimization module, a deformable attention mechanism, and an attention upsampling module, the problem of weak features of complex backgrounds and small targets in SAR images is solved, and high-precision multi-scale target detection is achieved.

CN120708081BActive Publication Date: 2025-11-28ANHUI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510803697.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-16
Publication Date
2025-11-28
Estimated Expiration
2045-06-16

AI Technical Summary

Technical Problem

The problem of decreased recognition accuracy in SAR image target detection caused by complex background interference, weak features of small targets, and coexistence of targets at multiple scales.

Method used

The Transformer model employs a bidirectional receptive field optimization module, a deformable attention mechanism module, and an attention upsampling module. By efficiently fusing local details with global contextual information, it dynamically adjusts the position of feature sampling points and combines multi-path parallel processing to improve the accuracy of feature extraction and detection.

Benefits of technology

It significantly improves the recognition accuracy and robustness of SAR image target detection, especially the ability to recognize small targets in complex backgrounds, and reduces missed detections and false detections.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120708081B_ABST
    Figure CN120708081B_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of computer vision and remote sensing, and particularly relates to a real-time image detection Transform model and application thereof, which mainly comprises a bidirectional receptive field optimization module, a deformable attention mechanism module and an attention upsampling module. The bidirectional receptive field optimization module enhances the key feature expression capability through the combination of feature extraction and attention mechanism. The deformable attention mechanism module adopts a dynamic sampling strategy to adaptively focus on the target area. The attention upsampling module maintains the detail information through multi-path feature fusion. The model effectively solves the problems of complex background interference, weak small target feature and multi-scale target detection in SAR images, significantly improves the detection accuracy and robustness, and can be widely applied to the remote sensing field such as military reconnaissance and marine monitoring.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of computer vision and remote sensing, and particularly relates to a real-time image detection Transformer model and application thereof. BACKGROUND

[0002] SAR images have important applications in the fields of ocean monitoring and military reconnaissance due to their ability to penetrate clouds and observe all-weather. SAR image target detection technology has always been a research hotspot in this field. In the early stage, the constant false alarm rate algorithm based on statistical modeling relies on manual feature design and has limited generalization ability, making it difficult to adapt to complex backgrounds and multi-scale targets. In recent years, deep learning technology has made significant progress in SAR image target detection. Researchers have mainly focused on multi-scale modeling and dynamic attention mechanisms to improve detection accuracy and robustness. For example, two-stage target detection algorithms such as Faster R-CNN and Mask R-CNN use region proposal networks and feature pyramid networks to achieve end-to-end detection, significantly improving accuracy and speed. In addition, single-stage target detection algorithms such as YOLOv5 and DETR further improve detection speed and efficiency through anchor box mechanisms and Transformer structures. The application of attention mechanism modules such as CBAM and Swin Transformer also effectively improves the model's focus on key features and suppresses noise interference.

[0003] SAR images are easily contaminated by natural environmental noise such as clouds, shadows, rain, and fog, resulting in blurred target edges and lost texture information, making it difficult for models to accurately identify targets. In addition, due to the limited resolution of SAR imaging, distant targets occupy a very small proportion in the image, and their feature information is sparse, making them easily ignored or misjudged by algorithms. At the same time, the scale of targets in SAR images varies greatly, and traditional detection algorithms are difficult to adaptively capture features of different scales, leading to missed or false detections. These problems jointly constrain the accuracy and robustness of SAR detection algorithms, especially in complex scenarios. SUMMARY

[0004] The purpose of the present application is to provide a real-time image detection Transformer model and its application to solve the problem of reduced recognition accuracy caused by complex background interference, weak small target features, and coexistence of multi-scale targets in SAR image target detection.

[0005] The present application achieves the above-mentioned purposes through the following technical solutions:

[0006] The present application proposes a real-time image detection Transformer model, which includes:

[0007] The bidirectional receptive field optimization module is configured to extract spatial features of the input image, convert the dimension to form a first feature map, multiply the first feature map with an attention map, generate a second feature map through grouping convolution and normalization operation, and generate a first to-be-processed feature map by performing residual connection between the second feature map and the input image.

[0008] The deformable attention mechanism module is configured to generate N uniform grid points as reference points in the first to-be-processed feature map, predict the offset of each reference point through a lightweight subnetwork to obtain a deformed point position, sample features at the deformed point position by using a bilinear interpolation function to generate keys and values, and form a second to-be-processed feature map.

[0009] The attention upsampling module is configured to divide the second to-be-processed feature map into three paths, perform transpose convolution operation on the first path to improve the resolution of the feature map, perform upsampling and convolution on the second path to compensate and refine the details in the feature map, extract global features by using global pooling on the third path, and calibrate the feature weight by using a channel attention mechanism, multiply the output of the first path and the second path with the weight of the third path, and output a target feature map through convolution.

[0010] Preferably, the bidirectional receptive field optimization module comprises:

[0011] The first convolution unit is configured to extract spatial features by using a k×k convolution kernel, and convert the input dimension from C×H×W to C'×H×W to form a first feature map.

[0012] The feature adjustment unit is configured to multiply the first feature map with an attention map in a matrix manner.

[0013] The second convolution unit is configured to perform grouping convolution and normalization on the multiplication result, and output a second feature map with a dimension of C×H×W.

[0014] The residual connection unit is configured to add the input feature map and the output of the second convolution unit to form a forward-backward feature interaction mechanism, and generate a first to-be-processed feature map with a dimension of 2C×H×W.

[0015] Preferably, the deformable attention mechanism module comprises:

[0016] The reference point generation unit is configured to generate N uniform grid points as reference points in the first to-be-processed feature map, and the grid size is determined based on a downsampling factor.

[0017] The offset prediction unit is configured to predict the offset of each reference point through a lightweight subnetwork, and scale the offset by a predefined factor to obtain a deformed point position.

[0018] The feature sampling unit is configured to sample features at the deformed point position by using a bilinear interpolation function to generate keys and values.

[0019] a multi-head attention unit, configured to perform multi-head attention calculation on the sampled features and introduce a relative position offset to form a second to-be-processed feature map.

[0020] Preferably, in the reference point generation unit:

[0021] The reference points are linearly spaced two-dimensional coordinates normalized to the range of [-1, 1];

[0022] The grid size satisfies the formula s = H / d x W / d, where d is a down-sampling factor, and H and W are the height and width of the feature map, respectively.

[0023] Preferably, in the multi-head attention unit, the multi-head attention calculation on the sampled features and the introduction of the relative position offset include:

[0024] A plurality of attention heads are set, and each attention head independently predicts a deformation offset and an attention weight;

[0025] A locality constraint is introduced to limit the sampling range of each reference point to a 3x3 neighborhood;

[0026] An absolute position encoding and a relative position deviation table are fused in the attention calculation.

[0027] Preferably, in the attention up-sampling module:

[0028] The first path processing adopts 1x1 transpose convolution to improve feature resolution;

[0029] The second path processing sequentially performs up-sampling operation and 1x1 convolution operation;

[0030] The third path processing sequentially performs global pooling, 1x1 convolution, and Hardsigmoid activation function processing.

[0031] Preferably, the method further comprises a hybrid aggregation network module, which enhances multi-scale feature fusion in the following manner:

[0032] A multi-level feature pyramid structure is deployed to fuse semantic information of different scales;

[0033] Cross-layer skip connections are adopted to reduce feature degradation problems of deep networks;

[0034] An adaptive weight distribution mechanism is used to optimize the gradient propagation efficiency of the feature pyramid.

[0035] Preferably, in the hybrid aggregation network module, the cross-layer skip connection is specifically:

[0036] The shallow feature map is added to the deep feature map element by element after aligning the channel dimension by 1*1 convolution;

[0037] The weight of the skip connection is dynamically adjusted by a learnable gating mechanism to suppress redundant feature interference.

[0038] The fused feature map is further optimized for spatial information expression by 3*3 convolution.

[0039] The application further provides an application of the real-time image detection Transformer model to SAR image target detection.

[0040] S1. input the SAR image into the bidirectional receptive field optimization module, extract spatial features by a k*k convolution kernel, suppress sea wave clutter interference by using a residual connection unit, and output a first to-be-processed feature map with a dimension of 2C*H*W;

[0041] S2. input the first to-be-processed feature map into the deformable attention mechanism module, generate reference points normalized to the range of [-1, 1], focus on the scattering area of the ship, airplane or vehicle target by bilinear interpolation sampling, and output a second to-be-processed feature map dynamically adjusted;

[0042] S3. perform three-way processing on the dynamically adjusted second to-be-processed feature map by the attention upsampling module;

[0043] S4. input the target feature map processed in step S3 into the hybrid aggregation network module, fuse multi-scale features by cross-layer skip connection, and output a final detection result, wherein the detection result comprises a target category and a bounding box coordinate.

[0044] The application has the following beneficial effects:

[0045] The real-time detection Transformer model based on a SAR complex background provided by the application has significant technical advantages and practical value. The bidirectional receptive field optimization module realizes efficient fusion of local detail features and global context information, effectively overcomes the defects of insufficient feature extraction capability of traditional methods in a complex background, and significantly improves the expression capability of target key features. The deformable attention mechanism module dynamically adjusts the feature sampling point position, so that the network can adaptively focus on the effective scattering area of the target, and especially solves the problem that small target features are weak and easy to be overwhelmed by the background. The attention upsampling module adopts a multi-path parallel processing architecture, combines transposed convolution, upsampling compensation and channel attention weighting, maximally retains the detail features of the target, and improves the reconstruction quality of edge information. BRIEF DESCRIPTION OF DRAWINGS

[0046] Figure 1 is a structural schematic diagram of the real-time image detection Transformer model of the present application;

[0047] Figure 2 is a structural schematic diagram of the BRFbo module in the embodiment of the present application;

[0048] Figure 3 is a structural schematic diagram of the DeformableAIFI module in the embodiment of the present application;

[0049] Figure 4 is a structural schematic diagram of the AttUp module in the embodiment of the present application;

[0050] Figure 5 is a structural schematic diagram of the SA-RTDETR model in the embodiment of the present application;

[0051] Figure 6 is an application flow schematic diagram of the real-time image detection Transformer model of the present application in SAR image target detection;

[0052] Figure 7 is a comparison diagram of ship target detection results in the embodiment of the present application;

[0053] Figure 8 is a comparison diagram of aircraft target detection results in the embodiment of the present application;

[0054] Figure 9 is a comparison diagram of automobile target detection results in the embodiment of the present application. DETAILED DESCRIPTION

[0055] The following description provides specific application scenarios and requirements of the present specification, with the purpose of enabling those skilled in the art to manufacture and use the contents of the present specification. Various local modifications of the disclosed embodiments are obvious to those skilled in the art, and the general principles defined herein can be applied to other embodiments and applications without departing from the spirit and scope of the present specification. Therefore, the present specification is not limited to the shown embodiments, but is consistent with the widest range of claims.

[0056] The terminology used herein is for the purpose of describing particular example embodiments only and is not intended to be limiting. For example, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. As used herein the terms "includes", "including", "has", "have", "contains" or "containing" or the like means that there are included, but does not 'or will not exclude, one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0057] These and other features, and characteristics of the present specification, as well as the methods of operation and functions of the related elements of structure and the combination of parts and economies of manufacture, will become more apparent upon consideration of the following description and the appended claims with reference to the accompanying drawings. The drawings are intended for illustrative purposes and are not intended to limit the scope of the present specification. It should be understood that the drawings are not drawn to scale.

[0058] The flow diagrams herein illustrate the operations according to some embodiments of the present specification in terms of a system implementing the operations. It should be understood that the operations of the flow diagrams can be implemented in order. Alternatively, the operations can be implemented in reverse order or at the same time. Additionally, one or more other operations can be added to the flow diagrams. One or more operations can be removed from the flow diagrams.

[0059] The present application designs a real-time detection model based on SAR complex targets, aiming to enhance the extraction ability of target features to improve the accuracy of detection in SAR images. The model is named Synthetic Aperture-optimized Real-Time Detection Transformer (SA-RTDETR) model based on synthetic aperture radar image optimization. The model fuses local details and global context information through the Bidirectional Receptive Field Boosting (BRFbo) module, significantly improves the key feature extraction ability while maintaining the feature resolution. The Deformable Attention-based Intra-scale Feature Interaction (DeformableAIFI) module adaptively samples key feature points, so that the network focuses on the effective scattering area of small targets. The Attention Upsampling (AttUp) module solves the problem of detail loss and image distortion through feature compensation strategy.

[0060] Embodiment 1

[0061] Please see Figures 1-5 A Transformer model for real-time image detection is proposed, including:

[0062] The bidirectional receptive field optimization module (BRFbo module) is used to extract the spatial features of the input image, perform dimensionality transformation to form the first feature map, multiply the first feature map with the attention map, generate the second feature map through group convolution and normalization operations, and perform residual connection between the second feature map and the input image to generate the first feature map to be processed.

[0063] The Deformable AIFI module is used to generate N uniform grid points as reference points in the first feature map to be processed. The offset of the reference points is predicted through a lightweight sub-network to obtain the position of the deformable point. Bilinear interpolation is used to sample features at the position of the deformable point to generate keys and values, forming the second feature map to be processed.

[0064] Understandably, in the deformable attention mechanism module, the sampling results are calculated using a multi-head attention mechanism, where each attention head independently predicts the deformation offset and weight, and a 3×3 neighborhood locality constraint is introduced. The attention calculation integrates absolute position encoding and a relative position deviation table, ultimately outputting a dynamically adjusted second feature map to be processed. This mechanism significantly improves the localization accuracy of small targets (such as ship wingtips).

[0065] The Attention Upsampling Module (AttUp Module) is used to divide the second feature map to be processed into three paths: the first path improves the resolution of the feature map through transposed convolution operation; the second path further compensates and refines the detailed information in the feature map by combining upsampling and convolution; and the third path extracts global features using global pooling and calibrates the feature weights through a channel attention mechanism. The outputs of the first and second paths are concatenated and multiplied with the weights of the third path, and then convolved to output the final feature map.

[0066] More specifically, the bidirectional receptive field optimization module (BRFbo module) achieves efficient fusion of local details and global context information through a dual-path collaborative working mechanism. This module further includes:

[0067] The first convolutional unit is used to extract spatial features through a k×k convolutional kernel, transforming the input dimension from C×H×W to a first feature map of C'×H×W; the formula is as follows:

[0068] FConv=ReLU(Norm(g k×k (X)))

[0069] In the formula g k×kdenotes a convolution with a kernel size of k x k, Norm denotes normalization, and ReLU denotes a ReLU activation function.

[0070] a feature adjustment unit configured to perform matrix multiplication between a first feature map output by the first convolution unit and an attention map, according to the following formula:

[0071] TConv = FConv x Softmax(g 1×1 (AvgPool(X))

[0072] a second convolution unit configured to perform group convolution and normalization on the multiplication result, and output a second feature map with a dimension of C x H x W.

[0073] SConv = Conv(TConv)

[0074] a residual connection unit configured to add the input feature map and the output of the second convolution unit, form a feedforward-feedback feature interaction mechanism, and finally generate a first to-be-processed feature map with a dimension of 2C x H x W.

[0075] BRFbo = SConv + X

[0076] When the scheme is implemented, the working process of the bidirectional receptive field optimization module is as follows:

[0077] First, the input SAR image (with a dimension of C x H x W) is processed by the first convolution unit. The unit uses a k x k convolution kernel (preferably k = 3) to extract spatial features, expands the input channel number from C to C' (typically C' = 2C) through convolution operation, while keeping the feature map size H x W unchanged. After convolution, batch normalization (BatchNorm) and ReLU activation function are connected. This step can effectively capture multi-scale context information, especially for the edge texture of the ship target and the highlight area of the aircraft tail flame in the SAR image, which has a significant feature enhancement effect.

[0078] Then, the feature adjustment unit performs matrix multiplication between the first feature map and the attention map. The attention map is generated by an additional branch network, and its dimension is consistent with that of the first feature map (C' x H x W). The multiplication operation is essentially a spatial weight distribution of the features, which enables the network to adaptively focus on the effective scattering area of the target (such as the ship deck or vehicle tail light), while suppressing background interference such as sea wave clutter.

[0079] Subsequently, the second convolution unit performs group convolution (GroupConvolution) and normalization on the weighted feature map. The group convolution uses a group number G = 8, which reduces the parameter amount while maintaining the feature interaction capability. The output feature map dimension is restored to C x H x W.

[0080] Finally, the residual connection unit adds the original input feature map and the second convolution unit output to form a forward-backward feature interaction mechanism. This design has double advantages: one is to alleviate the gradient vanishing problem of deep network through jump connection, and the other is to retain the bottom scattering characteristics (such as the strong reflection area of the ship) of the original SAR image. The output feature map dimension is expanded to 2CxHxW.

[0081] More specifically, the deformable attention mechanism module further comprises:

[0082] The reference point generation unit is configured to generate N uniformly distributed grid points in the first to-be-processed feature map as reference points, and the grid size is determined by a down-sampling factor;

[0083] In specific implementation, the input first to-be-processed feature map (dimension 2CxHxW) is first divided into a regular grid. The grid size is determined by a down-sampling factor d (typical value d = 16), and the calculation formula is s = H / d x W / d. Each grid point generates a linearly spaced two-dimensional coordinate (for example, 25 reference points corresponding to a 5x5 grid), and the coordinate value is normalized to the range [-1, 1]. This design enables the reference points to cover target regions of different scales, especially for ship targets (occupying 0.5%-5% of the image area).

[0084] The offset prediction unit is configured to predict the offset of each reference point through a lightweight sub-network, and scale the offset through a predefined factor to obtain the deformed point position;

[0085] In specific implementation, the feature map generates a query token Q through linear projection where N is the number of reference points, and C_q is the number of query channels (default 256). The lightweight sub-network (composed of two 1x1 convolution layers) predicts the offset of each reference point according to Q To avoid unstable training, the offset is scaled by a predefined factor λ (empirical value λ = 0.1).

[0086] The feature sampling unit is configured to sample the features at the deformed point position using a bilinear interpolation function to generate keys and values.

[0087] The multi-head attention unit is configured to perform multi-head attention calculation on the sampled features and introduce a relative position offset to form a second to-be-processed feature map.

[0088] More specifically, in the reference point generation unit: the reference points take linearly spaced two-dimensional coordinates, normalized to the range [-1, 1]; and the grid size satisfies the formula s = H / d x W / d, where d is the down-sampling factor, and H and W are the height and width of the feature map, respectively.

[0089] More specifically, in the offset prediction unit: the feature map is linearly projected to the query token q = xW q ; the query token is input into a lightweight subnetwork θ offset (·) to generate the offset Δp = θ offset (q) ; the scaling factor s scales the amplitude of Δp to obtain the warped point position, i.e., Δp ← stanh(Δp).

[0090] More specifically, in the feature sampling unit: let the sampling function φ(·;·) be a differentiable bilinear interpolation function, i.e.,

[0091]

[0092] where g(a,b) = max(0,1-|a-b|), (r x ,r y ) represents all positions on .

[0093] The sampling result is taken as the key and value, i.e.,

[0094]

[0095] where and represent the warped key and value respectively, and φ(·;·) is the sampling function.

[0096] More specifically, in the multi-head attention unit: multi-head attention calculation is performed on the sampled features, and relative position offset is introduced, including: setting multiple attention heads, each attention head independently predicting the deformation offset and the attention weight; introducing a locality constraint to limit the sampling range of each reference point to a 3x3 neighborhood; and fusing absolute position encoding and relative position deviation table in attention calculation.

[0097] More specifically, in the attention upsampling module:

[0098] The first path processing adopts 1x1 transpose convolution to improve the feature resolution;

[0099] Y1 = ConvTranspose(X)

[0100] The second path processing sequentially performs upsampling operation and 1x1 convolution operation;

[0101] Y2 = Conv(Upsample(X))

[0102] The third path processing sequentially performs global pooling, 1x1 convolution and Hardsigmoid activation function processing.

[0103] Y3 = Hardsigmoid(Conv(Globalpool(X)))

[0104] The output of the first path and the second path is spliced and multiplied by the third path weight through the channel attention mechanism, and then the target feature map is output through convolution.

[0105]

[0106] More specifically, it also includes a hybrid aggregation network module that enhances multi-scale feature fusion by deploying a multi-level feature pyramid structure to fuse semantic information of different scales, using cross-layer skip connections to reduce feature degradation problems in deep networks, and optimizing the gradient propagation efficiency of the feature pyramid through an adaptive weight distribution mechanism.

[0107] In the present embodiment, the above-mentioned modules are combined with a hybrid aggregation network (MANet) to form a complete model. The input SAR image is sequentially subjected to noise suppression by the BRFbo module, dynamic focusing of the target area by the DeformableAIFI module, and detail reconstruction by the AttUp module, and finally the multi-scale features are fused through cross-layer skip connections to output the target category and bounding box.

[0108] More specifically, in the hybrid aggregation network module, the cross-layer skip connection is as follows: the shallow feature map is aligned in channel dimension through 1x1 convolution and then added element by element with the deep feature map; the weight of the skip connection is dynamically adjusted through a learnable gating mechanism to suppress redundant feature interference; and the fused feature map is further optimized in spatial information expression through 3x3 convolution.

[0109] Embodiment 2

[0110] Please refer to Figure 6 The present embodiment proposes an application of the real-time image detection Transformer model in embodiment 1 to SAR image target detection. When the model is applied to SAR image target detection, the following steps are included:

[0111] S1. Input the SAR image into the bidirectional receptive field optimization module, extract the spatial features through a kxk convolution kernel, and suppress the sea clutter interference using a residual connection unit to output an optimized feature map with a dimension of CxHxW;

[0112] S2. Input the optimized feature map into the deformable attention mechanism module to generate a reference point normalized to the range [-1, 1], focus on the scattering area of the ship, airplane or vehicle target through bilinear interpolation sampling, and output a dynamically adjusted feature map;

[0113] S3. The dynamically adjusted feature map is processed in three ways through the attention upsampling module;

[0114] S4. Input the feature map processed in step S3 into the hybrid aggregation network module, fuse multi-scale features through cross-layer skip connections, and output the final detection result, which includes the target category and bounding box coordinates.

[0115] It is understood that the Transformer model described above is applicable to at least one of the following application scenarios: target identification in military reconnaissance; ship detection in marine monitoring; and all-weather remote sensing image analysis.

[0116] After completing the above module design, combined with the benchmark model, a real-time monitoring Transformer model based on complex SAR backgrounds can be obtained.

[0117] In this embodiment, a neural network model is built using the PyTorch framework. Figure 5 A schematic diagram of the SA-RTDETR model network architecture in an embodiment of the present invention is shown. Figure 5 As shown, the SA-RTDETR model takes a SAR image as input. First, it employs cascaded 3×3 convolutional blocks (3×3Conv) and max pooling for feature extraction, and retains large-scale information through a bidirectional receptive field optimization (BRFbo) module. Next, it uses an internal scale feature interaction mechanism based on deformable attention (DeformableAIFI) to dynamically adjust the important regions of target features in the SAR image. Then, it utilizes an attention upsampling (AttUp) module combined with a hybrid aggregation network (MANet) to reduce feature information loss, improving the baseline model's ability to perceive small targets in complex backgrounds and increasing the model's recognition accuracy. Finally, an IoU-aware Query Selection mechanism is introduced at the decoding end to significantly compress the model's parameter size while maintaining detection accuracy. Combining these modules, the model generates target prediction results through the decoder head.

[0118] The above scheme will be explained and analyzed in conjunction with a specific simulation experiment.

[0119] To compare the performance of the SA-RTDETR model, seven other models were built: Faster R-CNN, RetinaNet, FCOS, YOLOv12-L, DETR, Swin Transformer, and RT-DETR50.

[0120] Simulation Experiment 1

[0121] The model provided by this invention is used to identify three types of targets: ships, aircraft, and vehicles. The detection performance of SA-RTDETR is verified by comparing the detection results of different models.

[0122] The input image size is uniformly adjusted to 256x256 during the training process; the AdamW optimizer is adopted, the initial learning rate is set to 1x10 -4 , the training period is 300; the non-maximum suppression is used to screen the candidate frame, and the intersection over union threshold is set to 0.5.

[0123] Figure 7 The ship target comparison test result graph in the embodiment of the application is shown. In a complex nearshore scene containing 6 ship targets, Figure 7 The SA-RTDETR algorithm shown in (b) exhibits a significant advantage, and all ships are accurately detected (confidence 0.75-0.89). Compared with the detection result of the YOLOv12-L algorithm shown in (g), the forward-backward feature interaction mechanism formed by the two-layer convolution blocks of the BRFbo module designed by the algorithm effectively suppresses the sea clutter interference, and through residual connection fusion, the left lower ship is accurately identified, avoiding misidentification. It needs to be highlighted that Figure 7 The RT-DETR50 model detection result shown in (c) is misidentified as a ship due to the loss of local features caused by the global attention mechanism without introducing spatial offset, which makes the sea wave texture. The AttUp module significantly improves the sawtooth problem of the ship edge through three-way up-sampling fusion. In summary, it can be known that the model accurately identifies all ship models in this detection task, verifying the reliability of the model in small target recognition in complex background. Figure 7

[0124] The aircraft target comparison test result graph in the embodiment of the application is shown. SA-RTDETR accurately detects all targets in the aircraft target detection test, and the probability is greater than 0.9, and the detection accuracy is significantly improved. This is mainly due to the double-layer residual feedback mechanism of the BRFbo module, which can strengthen the dark background noise suppression, so that Figure 8 The aircraft plume area in (b) is accurately distinguished, while Figure 8 (d) and Figure 8 (e) misjudges the high-brightness cloud layer as an aircraft. In addition, the dynamic attention mechanism of the DeformableAIFI module can accurately locate the small-scale features of the aircraft wingtip; the three-way up-sampling strategy of the AttUp module effectively preserves the sawtooth features of the aircraft edge. The above data show that the multi-scale up-sampling and multi-branch convolution fusion of the model in the extreme dark background can effectively reduce the target edge texture blur, verifying the effectiveness of the multi-module collaborative optimization. Figure 8

[0125] Figure 9 ​The vehicle target contrast test result graph in the embodiment of the application is shown. The SA-RTDETR accurately detects 4 vehicle targets in a dark environment, and the probabilities are all close to 0.9, which is significantly better than other models. It can be found that Figure 9 The vehicle taillight area in (b) is accurately distinguished, which benefits from the forward-feedback feature interaction mechanism formed by the BRFbo module through two convolution blocks, which can effectively suppress dark background noise, and there is no situation similar to the DETR misdetecting the target as a ship. In addition, the FCOS model also completely detects without error, but its detection probability is not as good as the model. Overall, the noise suppression of the BRFbo module and the edge reconstruction capability of the AttUp module make the model significantly improve the detection accuracy of low-contrast targets.

[0126] As shown in Table 1, the SA-RTDETR shows a significant advantage in global performance comparison, and its recall rate (R=84.7%), mAP50 (90.1%), and mAP50-95 (56.0%) are the highest among all models, which are 2.2, 2.7 and 2.6 percentage points higher than the RT-DETR50 model (R=82.5%, mAP50=87.4%, mAP50-95=53.4%). Test data show that the BRFbo module effectively suppresses complex background interference and reduces missed detection through feature extraction by convolution blocks and dynamic focusing capability of DeformableAIFI, and the three-way feature reconstruction capability of AttUp. Although the recall P is slightly lower than the FCOS model, the remaining indicators are much better than the FCOS. Therefore, the SA-RTDETR model has the best performance, high accuracy and strong generalization ability.

[0127] Table 1

[0128]

[0129]

[0130] By comparing other models, the SA-RTDETR model has the highest average precision in different target detection results, and has less missed detection and misdetection, and has no obvious detection error. This shows that the SA-RTDETR model has high prediction accuracy in various targets, further proving the reliability and stability of the model.

[0131] In summary, the SA-RTDETR model proposed in the embodiment of the present application captures the key features of the SAR image through the BRFbo module, adjusts the important area of the target feature in the SAR image through the DeformableAIFI attention mechanism, and reduces the information feature loss of the up-sampling through the AttUp attention up-sampling operator, thereby improving the multi-scale recognition capability of the SAR image. The reliability and prediction accuracy of the model are verified by comparison with RTDETR-50, Faster R-CNN, RetinaNet, FCOS, YOLOv12-L, DETR and SwinTransformer. At the same time, three typical target instances of ships, aircrafts and vehicles are analyzed. The results show that the mAP50 of the SA-RTDETR reaches 90.1%, the mAP50-95 reaches 56.0%, and the recall rate R is improved to 84.7%. Compared with other deep learning models, the SA-RTDETR has higher detection accuracy and precision, avoids the phenomenon of high multi-target missed detection and false detection in the SAR image, and provides a new technical paradigm for all-weather, all-day remote sensing target detection.

[0132] The above description is merely the preferred embodiments of the present disclosure and the explanation of the principles of the applied technology. It should be understood by those skilled in the art that the disclosed range of the present disclosure is not limited to the technical solutions formed by the specific combinations of the above technical features, and also covers other technical solutions formed by any combination of the above technical features or equivalent features without departing from the disclosed concept. For example, the technical solutions formed by replacing the above features with the technical features disclosed in the present disclosure (but not limited to) having similar functions.

[0133] In addition, although each operation is described in a specific order, this should not be understood as requiring the operations to be performed in the specific order shown or in a sequential order. In certain circumstances, multitasking and parallel processing can be advantageous. Similarly, although several implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Certain features described in the context of separate embodiments can also be combined in a single embodiment. Conversely, various features described in the context of a single embodiment can also be separated and implemented in multiple embodiments.

[0134] The above-described embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as limiting the scope of the patent of the present application. It should be noted that, for those skilled in the art, without departing from the concept of the present application, several modifications and improvements can be made, which are within the protection scope of the present application.

Claims

1. A real-time image detection Transformer model, characterized in that, The method comprises the following steps: A bidirectional receptive field optimization module is used to extract spatial features of an input image, perform dimension conversion to form a first feature map, multiply the first feature map with an attention map, generate a second feature map through grouping convolution and normalization operation, perform residual connection between the second feature map and the input image, and generate a first to-be-processed feature map; A deformable attention mechanism module is used to generate N uniform grid points in the first to-be-processed feature map as reference points, predict the offset of the reference points through a lightweight subnetwork and obtain the position of the deformation points, sample the features at the deformation point positions by using bilinear interpolation to generate keys and values, and form a second to-be-processed feature map; An attention upsampling module is used to divide the second to-be-processed feature map into three paths, the first path is used to improve the resolution of the feature map through transpose convolution operation, the second path is used to compensate and refine the detailed information in the feature map through upsampling combined with convolution, the third path is used to extract global features by using global pooling, and the feature weights are calibrated through channel attention mechanism, the outputs of the first path and the second path are spliced and multiplied with the weight of the third path, and the target feature map is output through convolution.

2. The real-time image detection Transformer model according to claim 1, wherein, The bidirectional receptive field optimization module comprises: A first convolution unit is used to extract spatial features through a k×k convolution kernel, and the input dimension is converted from C×H×W to C′×H×W of the first feature map; A feature adjustment unit is used to multiply the first feature map with the attention map in matrix form; A second convolution unit is used to perform grouping convolution and normalization on the multiplication result, and the output dimension is C×H×W of the second feature map; A residual connection unit is used to add the input feature map and the output of the second convolution unit to form a forward-backward feature interaction mechanism, and generate the first to-be-processed feature map with a dimension of 2C×H×W. 3.The real-time image detection Transformer model of claim 1, wherein, The deformable attention mechanism module comprises: A reference point generation unit is used to generate N uniformly distributed grid points in the first to-be-processed feature map as reference points, and the grid size is determined based on a downsampling factor; An offset prediction unit is used to predict the offset of each reference point through a lightweight subnetwork, and the offset is scaled through a predefined factor to obtain the position of the deformation points; A feature sampling unit is used to sample the features at the deformation point positions by using a bilinear interpolation function to generate keys and values; A multi-head attention unit is used to perform multi-head attention calculation on the sampled features, and a relative position offset is introduced to form the second to-be-processed feature map.

4. The real-time image detection Transformer model of claim 3, wherein, In the reference point generation unit: The values of the reference points are linearly spaced two-dimensional coordinates, which are normalized to the range of [-1, 1]; The grid size satisfies the formula s=H / d×W / d, wherein d is the downsampling factor, and H and W are the height and width of the feature map, respectively.

5. The real-time image detection Transformer model according to claim 3, wherein, In the multi-head attention unit, the multi-head attention calculation is performed on the sampled features, and a relative position offset is introduced, which comprises: A plurality of attention heads are set, and each attention head independently predicts the deformation offset and the attention weight; A locality constraint is introduced to limit the sampling range of each reference point to a 3×3 neighborhood; An absolute position encoding and a relative position deviation table are fused in the attention calculation.

6. The real-time image detection Transformer model of claim 1, wherein, In the attention upsampling module: The first path processing adopts 1×1 transpose convolution for feature resolution improvement; The second path processing sequentially performs an upsampling operation and a 1*1 convolution operation; The third path processing sequentially performs global pooling, 1*1 convolution and Hardsigmoid activation function processing.

7. The real-time image detection Transformer model of claim 1, wherein, Further comprising a hybrid aggregation network module, which enhances multi-scale feature fusion in the following ways: Deploying a multi-level feature pyramid structure to fuse semantic information of different scales; Using cross-layer skip connections to reduce feature degradation problems in deep networks; Optimizing the gradient propagation efficiency of the feature pyramid through an adaptive weight allocation mechanism.

8. The real-time image detection Transformer model of claim 7, wherein, In the hybrid aggregation network module, the cross-layer skip connection is specifically: After the channel dimension of the shallow feature map is aligned through 1*1 convolution, it is added element by element with the deep feature map; The weight of the skip connection is dynamically adjusted through a learnable gating mechanism to suppress redundant feature interference; The fused feature map is further optimized for spatial information expression through 3*3 convolution.

9. The application of the real-time image detection Transformer model according to any one of claims 1-8 in SAR image target detection, characterized in that, When the model is applied to SAR image target detection, the following steps are included: S1. Input the SAR image into the bidirectional receptive field optimization module, extract spatial features through a k* k convolution kernel, and use a residual connection unit to suppress sea clutter interference, output a first to-be-processed feature map with a dimension of 2C*H*W; S2. Input the first to-be-processed feature map into the deformable attention mechanism module to generate a reference point normalized to the range [-1, 1], focus on the scattering area of the ship, aircraft or vehicle target through bilinear interpolation sampling, and output a dynamically adjusted second to-be-processed feature map; S3. Perform three-way processing on the dynamically adjusted second to-be-processed feature map through the attention upsampling module; S4. Input the target feature map processed in step S3 into the hybrid aggregation network module, fuse multi-scale features through cross-layer skip connections, and output the final detection result, which includes target categories and bounding box coordinates.

Citation Information

Patent Citations

  • SAR image small-size ship detection method based on end-to-end Transform architecture

    CN118351453A

  • Improved target detection method in automatic driving scene based on RT-DETR

    CN118644824A