SAR image vehicle target detection method and device based on complex urban background

By enhancing feature representation through a lightweight Swin Transformer and PConv windmill convolution module, and optimizing the detection bounding box by combining a graph diffusion mechanism, the problem of complex backgrounds in SAR image vehicle target detection is solved, and high-precision vehicle target detection is achieved.

CN122199934APending Publication Date: 2026-06-12AEROSPACE INFORMATION TECH UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-22
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

Vehicle target detection in SAR images faces challenges in complex urban environments, including speckle noise interference, low target-background differentiation, poor detection box adaptability, and insufficient positioning accuracy for rotating targets, resulting in high rates of missed and false detections.

Method used

A lightweight Swin Transformer backbone network is used for multi-scale feature extraction, combined with the PConv windmill convolution module for feature adaptation enhancement, and the YOLO11-OBB detection head is trained by the auxiliary rotating box geometric constraint loss function. A directed edge matrix is ​​constructed and a graph diffusion mechanism is optimized to generate vehicle target detection results.

Benefits of technology

It significantly improves the feature discrimination capability of vehicle targets, reduces the risk of missed detection and false detection, improves the positioning accuracy and detection accuracy of rotating targets, and realizes high-precision SAR image vehicle target detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122199934A_ABST
    Figure CN122199934A_ABST
Patent Text Reader

Abstract

The application discloses a SAR image vehicle target detection method and device based on a complex urban background, which comprises the following steps: inputting a to-be-detected SAR image collected under a complex urban background into a lightweight Swin Transformer backbone network for multi-scale feature extraction to obtain corresponding vehicle multi-scale features; performing multi-directional feature adaptation enhancement on a target feature layer through a PConv windmill convolution module to obtain an enhanced feature map; performing bidirectional feature fusion on the enhanced feature map, and inputting the obtained fusion feature map into a YOLO11-OBB detection head trained by an auxiliary rotating frame geometric constraint loss function to generate a candidate detection frame corresponding to a vehicle target and a confidence thereof; constructing a directed edge matrix for representing overlapping relationships among the candidate detection frames; performing confidence diffusion and re-weighting optimization on the confidence corresponding to each candidate detection frame in the directed edge matrix to obtain an optimized confidence; and outputting a vehicle target detection result under the complex urban background according to the optimized confidence.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of target detection technology, specifically to a method and device for vehicle target detection based on SAR images with complex urban backgrounds. Background Technology

[0002] Synthetic Aperture Radar (SAR) is increasingly widely used in both military and civilian fields due to its all-weather, all-day imaging capabilities. Unlike traditional real aperture radar, SAR achieves high-resolution imaging through coherent imaging mechanisms without increasing antenna size, and its imaging quality is unaffected by aircraft altitude, providing a foundation for large-scale scene monitoring.

[0003] In recent years, with the increasing maturity of SAR imaging algorithms, SAR image data has grown exponentially. Due to high labor costs, low efficiency, and susceptibility to subjective factors, traditional manual interpretation can no longer meet the demands. Furthermore, speckle noise in SAR images suppresses target details, further increasing the difficulty of interpretation. SAR Automatic Target Recognition (SAR-ATR) technology has become a key research focus in this field. Its core process includes target detection, classification, and recognition, with target detection being the primary step that directly determines the performance of the entire system. Vehicle target detection is a core direction for automatic SAR image interpretation and has significant value in military reconnaissance, traffic control, and other military and civilian fields.

[0004] However, SAR image interpretation still faces many challenges due to the inherent characteristics of SAR images, the complexity of vehicle target scenes, and technological limitations. On the one hand, the inherent speckle noise in SAR images leads to non-uniform background texture, and the scattered signals of vehicle targets are weak, resulting in low distinction from the background. Traditional target detection methods based on convolutional neural networks are insufficient in global semantic modeling capabilities, making it difficult to effectively distinguish targets from complex backgrounds, leading to high rates of missed detections and false detections. On the other hand, vehicles in urban areas rotate randomly, and traditional detection methods have poor bounding box adaptability and insufficient bounding box positioning accuracy, easily resulting in problems such as multi-target detection in the same frame and angular offset of the detection box for rotated targets. Summary of the Invention

[0005] To address the aforementioned issues, this application proposes a vehicle target detection method based on SAR images with complex urban backgrounds, including: The SAR images to be detected, collected against a complex urban background, are input into a lightweight Swin Transformer backbone network for multi-scale feature extraction to obtain the corresponding multi-scale features of the vehicles. The target feature layer with the smallest downsampling ratio is selected from the multi-scale features of the vehicle and input into the PConv windmill convolution module. The target feature layer is then enhanced by multi-directional feature adaptation through the PConv windmill convolution module to obtain the enhanced feature map. The enhanced feature map is subjected to bidirectional feature fusion, and the resulting fused feature map is input into the YOLO11-OBB detection head trained by the auxiliary rotating box geometric constraint loss function to generate candidate detection boxes and their confidence scores corresponding to the vehicle target. Based on the rotation intersection-union ratio between the candidate detection boxes and the confidence level, a directed edge matrix is ​​constructed to characterize the overlap relationship between the candidate detection boxes. The confidence scores of each candidate detection box in the directed edge matrix are optimized by using a graph diffusion mechanism, and the confidence scores are then diffused and reweighted. Based on the optimized confidence level, the vehicle target detection results in the complex urban background are output.

[0006] This application provides a vehicle target detection device based on SAR images with complex urban backgrounds, the device comprising: At least one processor; And, a memory communicatively connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the vehicle target detection method based on SAR images with complex urban backgrounds as described above.

[0007] This application provides a non-volatile computer storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured as follows: The vehicle target detection method based on SAR images with complex urban backgrounds as described above.

[0008] The vehicle target detection method based on SAR images with complex urban backgrounds proposed in this application can bring the following benefits: A lightweight Swin Transformer backbone network is adopted to replace the traditional convolutional backbone, improving the feature discrimination capability of vehicle targets in complex backgrounds and significantly reducing the risk of missed and false detections caused by speckle noise interference. The multi-directional scattering features output by the backbone network are adapted and enhanced through the PConv windmill convolution module, improving the feature representation capability for small and rotating targets. Based on this, a YOLO11-OBB detection head trained with an auxiliary rotation box geometric constraint loss function is used to generate candidate detection boxes. This loss function constructs auxiliary rotation boxes through concentric and angular scaling and integrates rotation intersection-over-union ratio and corner distance constraints, amplifying small localization errors to accelerate model convergence and effectively alleviating the problems of detection box center drift and inaccurate angle regression, significantly improving the localization accuracy of rotating targets. Furthermore, a directed edge matrix is ​​constructed based on the rotation intersection-over-union ratio and confidence scores between candidate detection boxes. A graph diffusion mechanism is used to achieve directional flow and reweighting optimization of confidence scores from low-quality boxes to high-quality boxes, effectively suppressing fragment interference and refining the detection results, achieving high-precision detection of vehicle targets in SAR images. Attached Figure Description

[0009] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 A flowchart illustrating the vehicle target detection method based on complex urban backgrounds in SAR images provided in this application embodiment; Figure 2 A detection model structure diagram that integrates the YOLO11 model and the lightweight Swing Transformer architecture is provided for embodiments of this application; Figure 3 A schematic diagram of the structure of a vehicle target detection device based on a complex urban background provided in this application embodiment. Detailed Implementation

[0010] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0011] The technical solutions provided by the various embodiments of this application are described in detail below with reference to the accompanying drawings.

[0012] like Figure 1As shown in the embodiments of this application, the vehicle target detection method based on SAR images with complex urban backgrounds includes: S101: Input the SAR image to be detected collected in the complex urban background into the lightweight Swin Transformer backbone network for multi-scale feature extraction to obtain the corresponding vehicle multi-scale features.

[0013] The SAR images to be detected, acquired against a complex urban background, are input into the backbone network for multi-scale feature extraction, thereby obtaining the multi-scale features of the corresponding vehicle targets. Here, SAR images refer to radar images acquired by synthetic aperture radar through a coherent imaging mechanism, which are particularly suitable for vehicle target monitoring scenarios in complex urban environments.

[0014] This application proposes an end-to-end network architecture that integrates a lightweight Swing Transformer with the YOLO11-OBB detection framework. It replaces the backbone network in the traditional YOLO11 with a lightweight Swing Transformer, thereby enhancing global context modeling capabilities. Furthermore, it addresses the high computational complexity of the original YOLO11 architecture through multi-dimensional lightweight modifications, resulting in a detection network adapted to the characteristics of SAR images. It should be noted that while the Swing Transformer can balance local feature details and global semantic relationships through its window attention mechanism, its original architecture has a large number of parameters and low computational efficiency, making it difficult to adapt to the edge deployment requirements of SAR detection. To address this, this application implements multi-dimensional lightweight modifications to the Swin Transformer. The Swin Transformer backbone network is deeply pruned, reducing the depth of its four stages from the standard configuration [2, 2, 6, 2] to [2, 2, 2, 2]. Each stage retains only two Transformer Blocks, reducing the self-attention computation of the Swin Transformer by 67%. Simultaneously, a simplified version with 128 basic channels and a head configuration of [4, 8, 16, 32] is maintained. While preserving multi-scale feature levels, the number of backbone network parameters is compressed to less than one-third of the previous amount. This approach retains the attention modeling advantages of the Swin Transformer while achieving a significant efficiency leap through deep pruning, module simplification, and computational simplification. Ultimately, this enhances the feature discrimination ability of the detection network in complex contexts and increases the model's contextual reasoning capabilities.

[0015] In one embodiment, such as Figure 2As shown, the SAR image to be detected is input into a lightweight Swin Transformer backbone network. The backbone network maps the image into feature vectors through embedding layers, and then enters a hierarchical coding structure consisting of multiple stages. The window self-attention module divides the feature map into regular local windows, calculating the attention relationship between query, key, and value only within the window to extract local features. Adjacent blocks alternately change the window division method through a shift window mechanism, so that the window boundary region of the previous stage can become the window center in the next stage, thereby realizing cross-window information transfer and global context modeling. After the progressive processing of each stage, the backbone network generates multi-layered features with different spatial resolutions through downsampling operations, forming a feature pyramid structure from fine-grained to coarse-grained. The layered features focus on target information at different scales. Shallow features have high spatial resolution and rich detail information, which is beneficial for the localization of small targets; deep features have a large receptive field and abstract semantic information, which is beneficial for the identification and classification of large targets. By aggregating the layered features at multiple scales, the final output is a multi-scale vehicle feature adapted to the YOLO11-OBB detection head. The compatibility here is reflected in two aspects: First, the hierarchical division of the feature pyramid precisely corresponds to the small, medium, and large target detection scales required by the YOLO11-OBB detection head, enabling features at each level to directly serve the prediction task of targets at the corresponding scales; Second, the dimensional configuration of the feature channels is consistent with the input requirements of the YOLO11-OBB detection head, avoiding dimensional transformation and information loss during feature conversion, and ensuring the integrity and efficiency of feature transfer.

[0016] From a feature adaptation perspective, the lightweight Swin Transformer generates [P2, P3, P4, P5] multi-scale features through a hierarchical feature aggregation structure. Its downsampling ratios (4×, 8×, 16×, 32×) precisely match the P3 (small target), P4 (medium target), and P5 (large target) features required for YOLO11-OBB detection. This allows for seamless integration with YOLO's feature pyramid structure, avoiding information loss during feature transformation and ensuring the integrity and efficiency of feature transfer. The lightweight modification further enhances this adaptability. In one modification, the basic embedding dimension of the Swin Transformer is set to 128, and the heads configuration is simplified to [4, 8, 16, 32]. While compressing the number of parameters, the feature dimensions still correspond hierarchically to the number of channels in YOLO11-OBB's feature pyramid, preserving the integrity of feature representation while significantly reducing the computational overhead of feature interaction.

[0017] In terms of detection accuracy, the original YOLO11-OBB, using a traditional convolutional backbone, suffers from insufficient global semantic modeling capabilities. In SAR scenarios, it is prone to missed detections, false detections, and inaccurate bounding box regression for targets with low contrast, complex backgrounds, and large scale differences, such as small vehicles, especially with low accuracy in small target detection. However, by embedding the lightweight Swing Transformer, leveraging its window attention mechanism and hierarchical feature aggregation, the model can more accurately capture the local details and global semantic relationships of targets. This ensures that the feature representation of small and rotated targets is not lost, effectively distinguishing targets from complex backgrounds and significantly improving the detection accuracy of small and blurred targets. Simultaneously, it optimizes the regression effect of rotated bounding boxes, reducing the missed detection and false detection rates, resulting in a significant improvement in detection accuracy.

[0018] S102: Select the target feature layer with the smallest downsampling ratio from the multi-scale features of the vehicle and input it into the PConv windmill convolution module. The PConv windmill convolution module will then perform multi-directional feature adaptation enhancement on the target feature layer to obtain the enhanced feature map.

[0019] The PConv windmill convolutional module, acting as a feature adapter, is integrated into the backbone network layer of the model. It interfaces with the target feature layer with the smallest downsampling rate among the multi-scale vehicle features, specifically the P3 feature layer output by the SwinTransformer. This is because the P3 feature layer represents the optimal balance between resolution and receptive field for small targets, maximizing feature enhancement without requiring multi-scale stacking. The PConv windmill convolutional module constructs convolutional branches in four directions—horizontal, vertical, and two diagonals—through asymmetric padding, thereby enhancing the target feature layer through multi-directional feature adaptation and achieving omnidirectional capture of the vehicle target's multi-directional scattering features. This module further processes the shallow, high-resolution feature layers extracted from the multi-scale vehicle features to adapt to the Gaussian spatial distribution characteristics of small SAR targets, strengthening the feature representation capability for small and rotating targets, ultimately yielding an enhanced feature map.

[0020] Because the scattered signals from small targets like vehicles in SAR images are weak and easily confused with background clutter such as buildings and roads, traditional convolutional methods, which use a uniform coverage mode with a fixed receptive field, cannot focus on the core area of ​​the target. However, the PConv windmill convolutional module, with its four-directional convolution and center-focusing characteristics, can accurately match the main attenuation direction of a Gaussian distribution, prioritizing the capture of weak scattering features from small targets, effectively suppressing clutter interference, and significantly improving the accuracy of small target recognition in complex backgrounds. Furthermore, in SAR imaging, urban vehicles face random orientations and do not have fixed parking angles, and the imaging itself has inherent offsets. Traditional fixed-direction convolution can only extract features from a single orientation, easily leading to missed detections and feature loss of oblique and rotating vehicles. It is difficult to capture the strong scattering features of rotating and oblique vehicles, resulting in missed detections and feature loss. The PConv windmill convolutional module, through its multi-directional asymmetric structure, can adaptively match vehicles facing any orientation. The scattering features of vehicles at any angle can be decomposed into a linear combination of these four directions, achieving feature extraction for vehicles rotating at multiple angles. In addition, SAR imaging suffers from geometric offsets in the range and azimuth directions. The symmetrical padding of traditional convolution cannot compensate for this offset, which can easily lead to misalignment between the convolution kernel and the target scattering region. The PConv windmill convolution module designs a dedicated asymmetric padding strategy for branches in different directions to specifically compensate for offset errors in each direction, ensuring that the convolution kernel and the target scattering region are accurately aligned, and further improving the accuracy of feature extraction.

[0021] Specifically, the PConv windmill convolutional module takes the target feature layer with the smallest downsampling rate output from the Swin Transformer backbone network as input, and the input feature map is defined as: Where h, w, and c are the height, width, and number of channels of the feature map, respectively. The PConv windmill convolution module contains four convolutional branches in four directions: horizontal, vertical, and two diagonal directions. Each convolutional branch performs convolution operations on the input target feature layer using an asymmetric padding strategy to adapt to the SAR imaging offset characteristics, ensuring precise alignment between the convolutional kernel and the target scattering region. This compensates for imaging distortions that traditional symmetric padding cannot handle, thereby prioritizing the capture of strong scattering features at the target center and suppressing background clutter interference from buildings, roads, etc. Each convolutional branch, through asymmetric padding convolution operations, captures the vehicle scattering features in its corresponding direction, generating independent branch feature maps for each direction. The corresponding calculation formula is:

[0022] in, The convolution kernels for the corresponding branch directions (horizontal branches are...) Vertical branches are The two diagonal branches are ), For asymmetric fill parameters, Representing four directions, the final result is the feature output of four branches. .

[0023] To achieve effective aggregation of multi-directional features and avoid redundancy, the feature maps output from the four convolutional branches are integrated along the channel dimension using a channel concatenation operator to obtain multi-directional fused features. The specific concatenation formula is as follows:

[0024] The number of channels after splicing is The multi-directional fused features are precisely aligned with the preset number of output channels. While the concatenated features contain rich directional information, redundancy and overlap exist between them. To address the limited redundancy in the concatenated feature map, further purification is achieved using fusion convolution kernels to remove this redundancy. Simultaneously, to adapt to the input requirements of subsequent network layers, the number of feature channels is adjusted to a preset number of output channels that matches the input requirements of subsequent network layers, ultimately yielding the enhanced feature map. The feature fusion and final output formulas are as follows:

[0025] in, To fuse convolutional kernels, redundant splicing is eliminated and effective scattering features are aggregated. Batch normalization (BN) stabilizes the feature distribution, and the SiLU activation function enhances nonlinear representation capabilities. The final output is an optimized feature map. .

[0026] S103: Perform bidirectional feature fusion on the enhanced feature map, and input the resulting fused feature map into the YOLO11-OBB detection head trained by the auxiliary rotated box geometric constraint loss function to generate candidate detection boxes and their confidence scores corresponding to the vehicle target.

[0027] like Figure 2 As shown, after obtaining the enhanced feature map, a bidirectional feature fusion is performed on the enhanced feature map through a feature transfer path combining top-down and bottom-up approaches. The fused feature map obtained by bidirectional feature fusion is input into the YOLO11-OBB detection head. This detection head is trained and optimized using an auxiliary rotation box geometric constraint loss function, and can predict the position, scale, and rotation angle of the vehicle target based on the fused multi-scale features, outputting a confidence score representing the probability of the vehicle target's existence, as well as candidate detection boxes.

[0028] In one embodiment, bidirectional feature fusion is performed on the enhanced feature maps. First, top-down feature propagation and fusion are executed. For each layer of enhanced feature maps, an upsampling operation is performed, followed by fusion with adjacent lower-level enhanced feature maps. High-level semantic information is injected into low-level detailed features through feature overlay or concatenation, and this process is passed down layer by layer until the lowest-level feature map is obtained, resulting in the first fused feature map for each layer. Then, bottom-up feature propagation and fusion are executed. For each layer's first fused feature map, starting from the lowest-level feature map, a downsampling operation is performed, followed by fusion with adjacent higher-level first fused feature maps. This process injects fine-grained positional and texture details from the lower levels into high-level semantic features, and this process is passed up layer by layer until the highest-level first fused feature map is obtained, resulting in the second fused feature map for each layer. The first and second fusion feature maps corresponding to each level are horizontally connected. That is, at each level, the first fusion feature map output from the top-down path and the second fusion feature map output from the bottom-up path are concatenated or weighted in the channel dimension, so that the final output of each level contains semantic guidance information from the higher level and detailed support information from the lower level, thus obtaining the fusion feature map.

[0029] In one embodiment, before inputting the fused feature map into the YOLO11-OBB detection head, an auxiliary rotation box geometric constraint loss function needs to be constructed to train and optimize the YOLO11-OBB detection head. The auxiliary rotation box geometric constraint loss function aims to address issues such as multi-target detection within the same frame and rotation target detection box angle offset during vehicle target rotation bounding box regression in SAR images. By combining the advantages of Inner-IoU and MPDIoU, an auxiliary rotation box mechanism is introduced to enhance the regression accuracy and convergence efficiency for small targets, occluded targets, and rotating targets without increasing computational load, thus adapting to the needs of SAR image vehicle detection scenarios.

[0030] Specifically, for the manually labeled ground truth bounding boxes of vehicle targets in the preset training set, and the predicted bounding boxes of the YOLO11-OBB detection head based on the fused feature map output in the current iteration, concentric scaling operations are performed to generate corresponding auxiliary bounding boxes. That is, the center point and rotation angle of the bounding box remain unchanged, and only the width and height are scaled by a scaling factor, so that the generated auxiliary bounding boxes focus on the core scattering region of the SAR vehicle, amplifying the cross-union ratio change caused by the offset. It should be noted that the auxiliary bounding boxes include auxiliary ground truth boxes and auxiliary predicted boxes. Scaling the ground truth bounding boxes yields the auxiliary ground truth boxes, and scaling the predicted boxes yields the auxiliary predicted boxes; together, they constitute an auxiliary bounding box pair. The specific process is represented as follows:

[0031]

[0032] in, This is the scaling factor; , and , These represent the width and height of the original predicted rotated bounding box and the original ground truth rotated bounding box, respectively. , and , This corresponds to the width and height of the auxiliary rotation frame. The width and height of the auxiliary rotation frame are the original frame's width and height minus a scaling factor. The product preserves the position and angle features of the original bounding box, and the center point and rotation angle Completely inherit the original frame and realize the construction of auxiliary frames of different sizes with concentric corners.

[0033] The auxiliary ground truth bounding box and the auxiliary predicted bounding box are each converted into four sets of corresponding corner coordinates, that is, the position coordinates of the four vertices of each rotated box in the image coordinate system. Specifically, this is represented as follows:

[0034] in, Let x and y be the x and y coordinates of the i-th corner point in the global coordinate system; To assist in predicting the coordinates of the corresponding corner points of the bounding box in the local coordinate system, This is a rotation matrix used to transform the local coordinate system of the auxiliary rotation box to the global coordinate system of the image. It is the offset of the corner point relative to the center point in the local coordinate system of the auxiliary rotating frame. and These are the width and height of the auxiliary rotating frame, respectively, determined by the original frame's width and height and the scaling factor. Multiply them to get the result.

[0035] Based on the aforementioned corner coordinates, the intersection area and union area between the auxiliary ground truth bounding boxes and the auxiliary predicted bounding boxes are calculated. The intersection area is the area of ​​the overlapping region between the two boxes, and the union area is the total area covered by the combined area. The ratio of these two areas is calculated to obtain the Cross-Union Ratio (CURBR), which measures the degree of overlap between the auxiliary bounding boxes under rotational orientation. The formula for calculating the CURBR is:

[0036]

[0037]

[0038] in, To assist in predicting the rotated frame, To illustrate the actual rotation of the bounding boxes; inter represents the area of ​​the intersection of the two boxes, and union represents the area of ​​the union of the two boxes. This is the rotation-intersection-union ratio between the auxiliary boxes.

[0039] The intersection-union ratio (IoU) ranges from [0,1]. The closer the value is to 1, the higher the overlap between the auxiliary predicted bounding box and the auxiliary ground truth bounding box, and the more accurate the target localization. By scaling the ground truth bounding box and the predicted bounding box to generate an auxiliary rotated bounding box, the auxiliary rotated bounding box focuses on the core region. Its IoU change is more sensitive than that of the original bounding box, which can amplify the error caused by small offsets and improve the model optimization efficiency.

[0040] Simultaneously, based on corner coordinates, Euclidean distance constraints are determined between the corner points of the auxiliary rotation box. Specifically, the Euclidean distance between the four corresponding corner points of the auxiliary ground truth box and the auxiliary predicted box—that is, the straight-line distance between each pair of corresponding vertices in image space—is calculated as the corner distance constraint. After image width and height normalization, the Euclidean distance constraint balances the loss magnitude, ensuring synchronous optimization of rotation angle and position, and avoiding angle shift and center drift. The Euclidean distance constraint is specifically expressed by the following formula:

[0041]

[0042] in, , These are the coordinates of four corresponding corner points of the auxiliary prediction box and the auxiliary ground truth box (in clockwise order); Let be the Euclidean distance of the corresponding corner point in the i-th group. The four groups of corner point constraints can simultaneously optimize the rotation angle and the frame position, avoiding the angle shift caused by a single corner point constraint. W and H are the width and height of the input SAR image, respectively. Normalization can balance the loss magnitude of the distance term and the RIoU term, avoiding the loss imbalance caused by differences in image scale, and adapting to SAR images of different resolutions. This is the normalized corner distance penalty term, with a value range of [value missing]. The smaller the value, the smaller the corner deviation between the auxiliary predicted box and the auxiliary true box, and the more accurate the position and angle prediction.

[0043] By integrating the intersection-union ratio and Euclidean distance constraints, an auxiliary rotation box geometric constraint loss function is constructed, which is specifically expressed as follows:

[0044] The loss function is essentially based on the RIOU loss of the auxiliary box, with the corner distance penalty term D superimposed to achieve multi-dimensional optimization of overlap, position, and angle. The final loss function for the rotated bounding box (OBB) is the core optimization objective during model training. The YOLO11-OBB detection head minimizes this loss value through backpropagation, optimizing its network parameters and ultimately improving the accuracy of the detection box localization. When the auxiliary predicted box completely overlaps with the auxiliary ground truth box... , A loss value of 0 indicates perfectly accurate positioning; when the frame shifts, has an angular deviation, or is obstructed, the loss value is zero. Reduce As the value increases, the loss value rises, and the model will quickly correct the error, making it particularly suitable for detecting small targets, occluded targets, and rotating targets in SAR images.

[0045] S104: Based on the rotation intersection-union ratio and confidence level between candidate detection boxes, construct a directed edge matrix to characterize the overlap relationship between candidate detection boxes.

[0046] Based on the rotation intersection-union ratio (OUIR) and confidence scores of candidate detection boxes, a directed edge matrix is ​​constructed to characterize the overlap relationship between them. The candidate detection boxes referred to here are bounding boxes with rotation angle parameters initially predicted by the YOLO11-OBB detection head. Each candidate detection box includes center point coordinates, width, height, rotation angle, and a confidence score representing the probability of the target's presence. The directed edge matrix is ​​a graph structure representation used to describe the energy flow relationship between candidate detection boxes. Its purpose is to provide a global association modeling foundation for subsequent graph diffusion mechanisms, achieving directional transfer and optimization of detection box energy by mining the geometric overlap and confidence score relationships between candidate detection boxes.

[0047] In practical SAR image detection, a serious oversegmentation problem is often encountered. Traditional detection networks break down a complete vehicle target into multiple local fragmented boxes, such as generating candidate boxes for the front, body, and rear of the vehicle. These fragmented boxes often have high initial confidence, resulting in the detection results being filled with local fragments. At the same time, speckle noise and sidelobe interference in SAR imaging further exacerbate the generation of fragmented boxes. Combined with factors such as vehicle occlusion and rotation, traditional post-processing methods (such as NMS) only perform hard rejection using the intersection-union ratio threshold. This either fails to effectively suppress fragmented boxes or mistakenly filters out complete boxes of real small targets, seriously affecting detection accuracy.

[0048] like Figure 2As shown, in order to adapt to the vehicle small target detection scenario in complex urban SAR images and solve the problems of over-segmentation, fragment detection, and repeated false detection in traditional detection methods under small sample and strong interference environments, this application embodiment designs an FSOD-VFM graph diffusion post-processing module. FSOD-VFM does not require additional large-scale data pre-training and fine-tuning and is directly integrated after the detection model. With the graph diffusion mechanism, it realizes accurate optimization and screening of detection boxes by mining the global correlation between detection boxes, effectively suppressing the problems of fragmented detection boxes and repeated detection caused by speckle noise in SAR images, reducing invalid fragment interference, further improving the accuracy of vehicle target detection, and taking into account the integrity and accuracy of detection. It makes up for the technical defects of traditional NMS post-processing that only relies on IoU hard threshold screening and cannot mine the global correlation of detection boxes.

[0049] The graph diffusion mechanism of FSOD-VFM aims to enable "global communication" between candidate detection boxes. By flowing energy from local fragmented boxes to complete target boxes, it achieves fragmentation suppression and preservation of true targets, perfectly suited to the detection needs of SAR scenarios. The FSOD-VFM graph diffusion post-processing module first constructs a directed edge matrix based on the coordinates (OBB rotated boxes) and confidence scores of the candidate detection boxes.

[0050] Specifically, for all candidate bounding boxes, the rotation intersection-union ratio is calculated pairwise, which is the ratio of the intersection area to the union area of ​​two rotated bounding boxes, taking into account angular deviations. This is expressed as follows:

[0051] in, , These are the q-th and k-th candidate detection boxes, respectively. The larger the value, the higher the geometric overlap between the two frames. for and The area of ​​intersection , These are the areas of the two candidate detection boxes, respectively. The larger the value, the higher the geometric overlap between the two boxes.

[0052] Based on the above formula, the output dimension is The rotation intersection-union matrix (N is the number of candidate detection boxes) provides the basis for subsequent directed edge filtering.

[0053] Next, based on the rotation intersection-union (ROU) matrix and the initial confidence levels of the candidate detection boxes, directed edges are constructed through dual-condition screening to achieve global association modeling between candidate detection boxes. First, a preset threshold for the ROU is set. The calculated ROU is compared with this threshold. When the ROU is greater than the threshold, the two candidate detection boxes are determined to correspond to the same vehicle target, indicating a valid geometric association, and are included as valid associated detection box pairs in subsequent processing. Then, for each pair of valid associated detection boxes, the energy flow direction is determined based on the relationship between their respective confidence levels. If the confidence level of one candidate detection box is higher than that of the other, a directed edge is constructed from the candidate detection box with lower confidence to the candidate detection box with higher confidence, representing the tendency of energy to converge from the low-confidence box to the high-confidence box.

[0054] Construct a two-dimensional directed edge matrix with all candidate detection boxes as rows and directed edges pointing to other candidate detection boxes as columns. The element in the q-th row and k-th column of this matrix indicates whether there is a directed edge from the q-th candidate detection box to the k-th candidate detection box; if it exists, it is marked as 1, and if it does not exist, it is marked as 0. By traversing all candidate detection boxes and their valid associated pairs, the entire directed edge matrix is ​​filled, forming a complete graph structure representing the global overlap relationship between candidate detection boxes.

[0055] S105: Through the graph diffusion mechanism, the confidence scores of each candidate detection box in the directed edge matrix are diffused and reweighted to obtain the optimized confidence scores.

[0056] By utilizing the graph diffusion mechanism provided by FSOD-VFM, a transition matrix is ​​constructed based on the constructed directed edge matrix, and an iterative update strategy with restart is adopted to complete the confidence diffusion, allowing the energy of low-resolution boxes to converge to high-resolution boxes. The confidence is then further reweighted and optimized, ultimately achieving the decay of false detection box confidence and obtaining optimized confidence.

[0057] The core idea of ​​confidence diffusion is to borrow the random walk model of the PageRank algorithm and simulate the directional flow of energy between candidate detection box nodes to achieve the attenuation of confidence of low-quality detection boxes and the enhancement of confidence of high-quality detection boxes. This effectively suppresses the fragmentation of detection boxes and repeated false detections caused by speckle noise in SAR images, and improves the accuracy and completeness of the final detection results.

[0058] Specifically, the directed edge matrix is ​​normalized row-wise to obtain the transition matrix. Each row of the transition matrix sums to 1, and the row vectors represent the energy transition probabilities originating from each candidate detection box. The normalization process is specifically expressed as follows:

[0059] in, Let be the out-degree of the k-th candidate detection box (i.e., the number of directed edges originating from the k-th candidate detection box). This represents the value of the element in the q-th row and k-th column of the directed edge matrix, indicating whether there exists a directed edge from the q-th candidate detection box to the k-th detection box. If there is, it is 1; otherwise, it is 0.

[0060] It should be noted that, if ,but This avoids the situation where the denominator of the above expression is 0.

[0061] Based on the constructed transition matrix, a random walk strategy with restart is used to iteratively diffuse and update the confidence of candidate detection boxes. In each iteration, the new confidence of each candidate detection box consists of two parts: first, the diffused confidence received from neighboring nodes based on the transition matrix, reflecting the energy flow and convergence effect in the graph structure; second, the retained original initial confidence, where the degree of retention of original information is controlled by the restart probability to prevent information distortion caused by excessive diffusion. Therefore, a restart probability needs to be set. Typically set to 0.2, the restart probability is used to preserve the original confidence signal and avoid information distortion caused by over-diffusion. Initial Diffusion Confidence Vector The diffusion process in each iteration is as follows:

[0062] in, Let be the confidence level after the t-th iteration diffusion. Transition matrix transpose, Indicates the probability of restarting. Indicates the initial confidence level. This indicates a restart item, used to retain the core information of the original confidence level.

[0063] The above iterative process continues until the confidence scores of each candidate detection box converge to a steady-state distribution, that is, the change in the confidence score vector between two adjacent iterations is less than a preset value. The steady-state confidence score at this point is denoted as... At this point, the high-confidence true target boxes are further enhanced through energy convergence, while the low-confidence fragmented false detection boxes are significantly attenuated due to energy output, realizing the directional flow of energy from local to global.

[0064] To further optimize the confidence of candidate detection boxes, the steady-state confidence after diffusion is utilized. The original confidence scores are penalized and reweighted to obtain optimized confidence scores, thereby suppressing false positives while preserving the original confidence scores of the true targets. The reweighting process is shown below: First, according to The diffused steady-state confidence level is normalized to The interval is defined as 1e-8 to avoid cases where the denominator is 0. The reweighting strategy applies a punitive attenuation to candidate detection boxes with low steady-state confidence, effectively suppressing the interference of false detection boxes; candidate detection boxes with high steady-state confidence are retained or moderately enhanced to ensure the complete detection of true targets.

[0065] Then, according to The final optimized confidence level is obtained. The optimized confidence level will be directly updated to the candidate bounding box features, and then sent to OBB's dedicated NMS to complete the final detection box selection.

[0066] S106: Based on the optimized confidence level, output the vehicle target detection results in complex urban backgrounds.

[0067] Based on the optimized confidence scores, the OBB-specific nonmaximum suppression algorithm is used to finally filter the candidate detection boxes. That is, all candidate detection boxes are traversed in descending order of confidence scores, and the detection boxes with high confidence scores are retained as the final output results. At the same time, low-confidence duplicate boxes with a rotation intersection-union ratio exceeding a preset threshold are removed until all candidate detection boxes have been processed. Finally, the accurate localization results of vehicle targets in complex urban backgrounds are output, including the position, scale, rotation angle and corresponding confidence scores of the vehicle targets, thus completing the entire detection process.

[0068] like Figure 2 As shown in the figure, this application embodiment provides a detection model structure diagram that integrates the YOLO11 model and the lightweight SwinTransformer architecture. The training dataset used by the model must contain large-area images with a single image coverage of not less than 100 km², covering different resolutions, different scene types, and different types of vehicle targets. The samples include small targets, rotating targets, and occluded targets to ensure the model's generalization ability.

[0069] The model employs a lightweight Swing Transformer as its backbone network. Through a window attention mechanism and a hierarchical feature aggregation structure, it outputs multi-scale vehicle features, balancing global contextual information with local detail features. This reduces computational cost while enhancing feature discrimination capabilities in complex backgrounds. A Pconv windmill convolution module is introduced at the backbone network output as a feature adapter. This module utilizes multi-directional deformable convolution to strengthen local features and directional responses, expanding the effective receptive field and enhancing the feature representation capabilities for small and rotating targets. After bidirectional feature fusion of the enhanced feature map output from the Pconv windmill convolution module, the fused feature map is input into a rotation detection box loss optimization module. This module uses the Inner-MPDIoU loss function to specifically optimize the rotation bounding box regression process, effectively mitigating the problems of vehicle target detection box center drift and inaccurate angle regression in complex urban SAR scenarios. It is particularly suitable for the localization needs of rotating and occluded vehicles, improving the stability and accuracy of bounding box regression and laying the foundation for subsequent detection box optimization. The FSOD-VFM graph diffusion post-processing module is located after the detection model. It receives candidate detection boxes and their initial confidence scores from the detection model and optimizes the initial confidence scores using the constructed directed edge matrix and graph diffusion mechanism. Non-maximum suppression is then applied to the optimized confidence scores, and based on the output of the best candidate detection boxes, accurate vehicle target localization is achieved.

[0070] The above are embodiments of the methods proposed in this application. Based on the same idea, some embodiments of this application also provide devices and non-volatile computer storage media corresponding to the above methods.

[0071] Figure 3 This is a schematic diagram of the structure of a vehicle target detection device based on a complex urban background SAR image provided in an embodiment of this application. Figure 3 As shown, it includes: At least one processor; and, At least one processor-communication-connected memory; wherein, The memory stores instructions that can be executed by at least one processor, which enables the at least one processor to perform the vehicle target detection method based on SAR images with complex urban backgrounds as described above.

[0072] This application provides a non-volatile computer storage medium storing computer-executable instructions, which are configured as follows: The vehicle target detection method based on SAR images with complex urban backgrounds as described above.

[0073] The various embodiments in this application are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the device and medium embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the description of the method embodiments.

[0074] The devices and media provided in this application are one-to-one with the methods. Therefore, the devices and media also have similar beneficial technical effects as their corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media will not be repeated here.

[0075] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0076] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0077] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0078] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0079] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0080] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0081] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0082] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0083] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A vehicle target detection method based on SAR images with complex urban backgrounds, characterized in that, The method includes: The SAR images to be detected, collected against a complex urban background, are input into a lightweight Swin Transformer backbone network for multi-scale feature extraction to obtain the corresponding multi-scale features of the vehicles. The target feature layer with the smallest downsampling ratio is selected from the multi-scale features of the vehicle and input into the PConv windmill convolution module. The target feature layer is then enhanced by multi-directional feature adaptation through the PConv windmill convolution module to obtain the enhanced feature map. The enhanced feature map is subjected to bidirectional feature fusion, and the resulting fused feature map is input into the YOLO11-OBB detection head trained by the auxiliary rotating box geometric constraint loss function to generate candidate detection boxes and their confidence scores corresponding to the vehicle target. Based on the rotation intersection-union ratio between the candidate detection boxes and the confidence level, a directed edge matrix is ​​constructed to characterize the overlap relationship between the candidate detection boxes. The confidence scores of each candidate detection box in the directed edge matrix are optimized by using a graph diffusion mechanism, and the confidence scores are then diffused and reweighted. Based on the optimized confidence level, the vehicle target detection results in the complex urban background are output.

2. The vehicle target detection method based on SAR images with complex urban backgrounds according to claim 1, characterized in that, Before inputting the obtained fused feature map into the YOLO11-OBB detector head trained with the auxiliary rotated box geometric constraint loss function, the method further includes: For the ground truth bounding boxes corresponding to vehicle targets in the preset training set and the predicted bounding boxes output by the YOLO11-OBB detection head, the ground truth bounding boxes and the predicted bounding boxes are scaled to generate corresponding auxiliary rotated boxes; wherein, the auxiliary rotated boxes include auxiliary ground truth bounding boxes and auxiliary predicted bounding boxes; The auxiliary ground truth bounding box and the auxiliary predicted bounding box are converted into corresponding corner coordinates. Based on the corner coordinates, the intersection area and the union area between the auxiliary ground truth bounding box and the auxiliary predicted bounding box are calculated. Based on the intersection area and the union area, the corresponding intersection-union ratio is calculated. Based on the corner coordinates, determine the Euclidean distance constraints between the corner points in the auxiliary rotation frame; Based on the intersection-union ratio and the Euclidean distance constraint, an auxiliary rotating frame geometric constraint loss function is constructed, and the network parameters of the YOLO11-OBB detection head are optimized through the auxiliary rotating frame geometric constraint loss function.

3. The vehicle target detection method based on SAR images with complex urban backgrounds according to claim 1, characterized in that, Based on the rotation intersection-union ratio (ROI) between the candidate detection boxes and the confidence level, a directed edge matrix is ​​constructed to characterize the overlap relationship between the candidate detection boxes, specifically including: Calculate the rotation intersection-union ratio between each candidate detection box. If the rotation intersection-union ratio is greater than a preset threshold, determine that the candidate detection box corresponds to the same vehicle target and use the candidate detection box as a valid associated detection box. Based on the confidence levels of the valid associated detection boxes, directed edges are constructed between the valid associated detection boxes; wherein, the directed edges point from the candidate detection boxes with lower confidence levels to the candidate detection boxes with higher confidence levels. Using the candidate detection boxes as rows and the directed edges pointing to other candidate detection boxes as columns, a directed edge matrix is ​​constructed to characterize the overlapping relationship between candidate detection boxes.

4. The vehicle target detection method based on SAR images with complex urban backgrounds according to claim 1, characterized in that, Through a graph diffusion mechanism, the confidence scores corresponding to each candidate detection box in the directed edge matrix are diffused and reweighted for optimization to obtain the optimized confidence scores, specifically including: The directed edge matrix is ​​normalized row-wise to obtain the transition matrix; wherein the row vectors in the transition matrix represent the energy transition probability starting from each candidate detection box; Based on the graph diffusion mechanism, the confidence level is iteratively diffused according to the transition matrix until the diffused confidence level reaches a steady-state distribution, and the corresponding steady-state confidence level is obtained. Based on the steady-state confidence level, the confidence level is reweighted to obtain the optimized confidence level.

5. The vehicle target detection method based on SAR images with complex urban backgrounds according to claim 4, characterized in that, The confidence level is iteratively diffused based on the transition matrix, specifically including: in, Let be the confidence level after the t-th iteration diffusion. Transition matrix transpose, Indicates the probability of restarting. Indicates the initial confidence level. This indicates a restart item, used to retain the core information of the original confidence level.

6. The vehicle target detection method based on SAR images with complex urban backgrounds according to claim 1, characterized in that, The target feature layer is enhanced through multi-directional feature adaptation using the PConv windmill convolution module to obtain an enhanced feature map, specifically including: Based on the convolutional branches in multiple directions in the PConv windmill convolutional module, the target feature layer is asymmetrically filled to capture the vehicle scattering features in the SAR image to be detected, and to generate branch feature maps of each direction branch. The feature maps output by each convolutional branch are concatenated along the channel dimension to obtain multi-directional fused features; By fusing convolutional kernels, redundant information in the multi-directional fused features is removed to obtain an enhanced feature map.

7. The vehicle target detection method based on SAR images with complex urban backgrounds according to claim 1, characterized in that, The enhanced feature map is subjected to bidirectional feature fusion, specifically including: After upsampling the enhanced feature map layer by layer, it is fused with the feature maps of adjacent lower layers to obtain the first fused feature map corresponding to each layer; After downsampling the first fused feature map layer by layer, it is fused with the first fused feature map of the adjacent higher level to obtain the second fused feature map corresponding to each level. The first and second fusion feature maps corresponding to each level are fused by horizontal connection to obtain a fusion feature map.

8. The vehicle target detection method based on SAR images with complex urban backgrounds according to claim 1, characterized in that, The SAR image to be detected, acquired against a complex urban background, is input into the lightweight Swin Transformer backbone network for multi-scale feature extraction, yielding the corresponding multi-scale vehicle features, specifically including: The SAR image to be detected, collected against a complex urban background, is input into a lightweight Swin Transformer backbone network. Through the window attention mechanism of the Swin Transformer backbone network, local feature extraction and cross-window information transfer are performed on the SAR image to be detected to generate hierarchical features. The layered features are aggregated at multiple scales to output multi-scale vehicle features adapted to the YOLO11-OBB detection head.

9. A vehicle target detection device based on SAR images of complex urban backgrounds, characterized in that, The device includes: At least one processor; And, a memory communicatively connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the vehicle target detection method based on SAR images with complex urban backgrounds as described in any one of claims 1-8.

10. A non-volatile computer storage medium storing computer-executable instructions, characterized in that, The computer-executable instructions are set as follows: The vehicle target detection method based on SAR images with complex urban backgrounds as described in any one of claims 1-8.