An image target detection method, system, device and medium
By integrating hybrid expert models and RT-Detr models, an image target detection method is developed that solves the problem of anchor frame models misjudging noisy regions in strong speckle scenes. This method achieves high-precision, robust, and real-time detection of targets in SAR images and is suitable for emergency response scenarios such as forest fire prevention.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- WUHAN VOCATIONAL COLLEGE OF SOFTWARE & ENG (WUHAN OPEN UNIV)
- Filing Date
- 2026-01-12
- Publication Date
- 2026-06-02
Smart Images

Figure CN122135222A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image detection technology, and in particular to an image target detection method, system, device and medium. Background Technology
[0002] In the development of SAR (Synthetic Aperture Radar) target detection technology, deep learning models have become the mainstream direction for SAR target detection due to their powerful automatic feature extraction capabilities, mainly including anchor box models based on CNN and Transformer.
[0003] However, due to the presence of strong speckle interference noise in SAR images, the anchor frame model tends to misjudge the pixel gradients of noisy regions in SAR images as high-attention features in strong speckle scenes, causing attention to be focused on noise rather than the target, resulting in poor target detection accuracy. Summary of the Invention
[0004] To overcome the problem that existing anchor frame models easily misjudge pixel gradients in noisy regions of SAR images as high-interest features in strong speckle scenes, resulting in poor image target detection accuracy, this application provides an image target detection method, system, device, and medium.
[0005] Firstly, in order to solve the above-mentioned technical problems, this application provides an image target detection method, including: Acquire the raw SAR image; The original SAR image is preprocessed to obtain the input feature image; The input feature image is input into a preset target detection model, and block gating decisions are made based on the input feature image to obtain an expert model for multiple pixel blocks of the input feature image. In the object detection model, an expert model with multiple pixel blocks is used to process the input feature image to obtain an expert feature map; In the object detection model, the pre-defined RT-Detr model is used to classify objects and regress bounding boxes on expert feature maps to obtain object detection results.
[0006] Secondly, this application also provides an image target detection system, comprising: The acquisition module is used to acquire raw SAR images; The preprocessing module is used to preprocess the original SAR image to obtain the input feature image; The block gating decision module is used to input the input feature image into the preset target detection model, and perform block gating decisions based on the input feature image to obtain an expert model for multiple pixel blocks of the input feature image. The expert model processing module is used in the target detection model to process the input feature image using a multi-pixel block expert model to obtain an expert feature map; The detection result determination module is used in the target detection model to perform target classification and bounding box regression on the expert feature map using a preset RT-Detr model to obtain the target detection result.
[0007] Thirdly, this application also provides a computing device, including a memory, a processor, and a program stored in the memory and running on the processor, wherein the processor executes the program to implement the steps of the image target detection method described above.
[0008] Fourthly, this application also provides a computer-readable storage medium storing instructions that, when executed on a terminal device, cause the terminal device to perform the steps of an image target detection method.
[0009] The beneficial effects of this application are as follows: First, the original SAR image is preprocessed to reduce speckle noise interference, thereby improving the visual quality of the preprocessed input feature image. This input feature image is then input into a pre-defined target detection model, where block-gating decisions are performed to obtain multiple pixel-block expert models for the input feature image. This allows for the selection of the optimal expert sub-network for the input feature image of this quality. Second, in the target detection model, the targeted processing of the input feature image using multiple pixel-block expert models reduces unnecessary computation, improving the efficiency and accuracy of image processing. Expert feature maps are obtained, and a pre-defined RT-Detr model is used to perform target classification and bounding box regression on these expert feature maps, improving the accuracy of target detection and thus enhancing the accuracy of the final target detection result. Furthermore, since speckle noise has been removed from the image used for detection, the model focuses on the target rather than the noise during image detection, further improving the accuracy of target detection. Attached Figure Description
[0010] Figure 1 This is a schematic flowchart illustrating an image target detection method as an exemplary embodiment of this application; Figure 2 This is a network structure diagram of a noise suppression expert model in an exemplary embodiment of this application; Figure 3 This is a network structure diagram of a small target detection expert model in an exemplary embodiment of this application; Figure 4This is a network structure diagram of a complex background expert model in an exemplary embodiment of this application; Figure 5 This is a network structure diagram of a general processing expert model in an exemplary embodiment of this application; Figure 6 This is a diagram illustrating the expert pre-training process during the training of the object detection model in an exemplary embodiment of this application. Figure 7 This is a diagram illustrating the joint training process of the object detection model during training in an exemplary embodiment of this application. Figure 8 This is a diagram illustrating the fine-tuning process during the training of the object detection model in an exemplary embodiment of this application. Figure 9 This is a schematic flowchart illustrating the image target detection method provided in an exemplary embodiment of this application. Figure 10 This is a schematic diagram illustrating the structure of an image target detection method system as an exemplary embodiment of this application. Detailed Implementation
[0011] The following embodiments are further explanations and supplements to this application and do not constitute any limitation on this application.
[0012] Due to the inherent characteristics of SAR images and the complex requirements of practical applications, existing technologies still face many bottlenecks that urgently need to be addressed: First, anchor frame design relies heavily on experience and has poor adaptability: In practical applications, anchor frame-based detection models require pre-setting a large number of anchor frames covering images of different scales and proportions, and the anchor frame parameters need to be adjusted according to the target size in a specific scene. However, SAR images contain targets with large differences in scale, and pre-setting anchor frames is difficult to cover all targets. Furthermore, too many small-scale anchor frames increase computational redundancy, while large-scale anchor frames easily overlook small targets, resulting in a high rate of missed detection for small targets and high real-time computational costs for the model, which is particularly difficult to meet the rapid early warning requirements in emergency response scenarios such as forest fire prevention.
[0013] Second, they are sensitive to speckle noise, which interferes with feature extraction: the backbone based on the anchor frame detection model is designed based on optical images and is not optimized for SAR speckle noise. Noise accumulates with model depth, causing the model to misclassify noise features as target details. Furthermore, RT-Detr captures global target features through a deformable attention mechanism, but its attention weight allocation logic is not adapted to the characteristics of SAR noise. In strong speckle scenes, pixel gradients in noisy regions are easily misclassified as high-attention features, causing attention to focus on noise rather than the target, which is particularly noticeable in strong speckle forest areas such as forest fire prevention. Therefore, existing methods based on these two models are significantly affected by speckle noise.
[0014] Third, while MOE possesses the advantage of dynamic routing selection, its applications are currently lacking: Hybrid Expert Models (MOEs) achieve efficient allocation of computing resources through a mechanism of "dynamically selecting expert subnetworks via gating networks," demonstrating advantages in natural language processing and optical image classification. However, they remain unexplored in the field of SAR target detection. Existing MOE expert subnetworks are mostly designed for the texture and color features of optical images, neglecting the noise characteristics and target feature differences of SAR images, thus preventing MOEs from being directly transferred to SAR scenarios.
[0015] To address the aforementioned problems, embodiments of this application provide an image target detection method, system, device, and medium, which will be described in detail below.
[0016] The image target detection method provided in this application embodiment can be specifically executed by a server. It should be noted that the server can be an independent server, or it can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms. No limitation is imposed here.
[0017] This application aims to address the problems in existing SAR image target detection technologies, such as the reliance on experience in anchor box design and sensitivity to inherent speckle noise in SAR images. It proposes an image target detection method that integrates a hybrid expert model (MOE) and a real-time detection transformer (RT-Detr). Leveraging the dynamic expert selection capability of the MOE and the real-time detection advantage of the RT-Detr model, an innovative architecture is constructed that integrates both. An expert sub-network and gating decision rules adapted to the characteristics of SAR images are designed to effectively suppress the interference of strong speckle noise on feature extraction, reducing the false positive and false negative rates caused by noise. Simultaneously, it enhances the extraction and preservation of detailed features of small targets, improving the accuracy of small target detection. Furthermore, by utilizing the "on-demand allocation of computing resources" characteristic of the MOE, it reduces the unnecessary computational consumption in the background region of the SAR image, ensuring detection accuracy. This approach enhances model inference speed on the basis of accuracy, meeting real-time detection requirements. It integrates the fusion mechanism of MOE and RT-Detr, along with SAR scene adaptation optimization, into a unified detection process, achieving end-to-end model training and inference. This fully leverages the correlation information between data distribution, noise characteristics, and spatial geometry, filling the application gap of MOE in SAR target detection. Through these achievements, the accuracy, robustness, and real-time performance of SAR image target detection are improved, providing efficient and reliable automated detection solutions for forest fire prevention, emergency rescue, and other related scenarios. This promotes the practical application of SAR remote sensing technology and meets the high requirements of various industries for SAR image target detection.
[0018] Please see Figure 1 , Figure 1 An image target detection method is shown as an exemplary embodiment of this application, such as Figure 1 As shown, this application provides an image target detection method, including: S11, acquire the raw SAR image; S12, preprocess the original SAR image to obtain the input feature image; S13, Input the input feature image into the preset target detection model, perform block gating decision based on the input feature image, and obtain an expert model for multiple pixel blocks of the input feature image; S14, In the target detection model, the input feature image is processed using a multi-pixel block expert model to obtain an expert feature map; S15. In the object detection model, the preset RT-Detr model is used to classify the object and regress the bounding box on the expert feature map to obtain the object detection result.
[0019] The image target detection method provided in this application first preprocesses the original SAR image to reduce speckle noise interference, thereby improving the visual quality of the preprocessed input feature image. This input feature image is then input into a preset target detection model. Block-gating decisions are performed based on the input feature image to obtain multiple pixel-block expert models for the input feature image, enabling the selection of the optimal expert sub-network for the input feature image of this quality. Secondly, in the target detection model, multiple pixel-block expert models are used to specifically process the input feature image, reducing unnecessary computation and improving the efficiency and accuracy of image processing. This yields an expert feature map, which is then used by a preset RT-Detr model for target classification and bounding box regression, improving the accuracy of image target detection and thus enhancing the accuracy of the final target detection result. Furthermore, since speckle noise has been removed from the image used for detection, the model focuses on the target rather than the noise during image detection, further improving the accuracy of image target detection.
[0020] Optionally, the original SAR image is preprocessed to obtain the input feature image, including: Adaptive speckle suppression is applied to the original SAR image to obtain a filtered image; Edge enhancement is performed on the filtered image to obtain the enhanced image; Multi-scale normalization is performed on the enhanced image to obtain a normalized image; Channel expansion is performed on the normalized image to obtain the input feature image.
[0021] In the embodiment provided in this application, the original SAR image is preprocessed sequentially with adaptive speckle suppression, edge enhancement, multi-scale normalization, and channel expansion. This reduces the interference of inherent speckle noise in the original SAR image on the subsequent detection model. At the same time, it unifies the image input format, provides high-quality input for the target detection model (MOE-RT-Detr fusion model), avoids misselection of expert subnetworks or feature extraction bias caused by noise, improves the visual quality of the preprocessed input feature image, and facilitates the subsequent model detection based on the input feature image to focus attention on the target rather than noise, thereby improving the detection accuracy of the image target.
[0022] In an exemplary embodiment provided in this application, the original SAR image is preprocessed to obtain an input feature image. The specific steps are as follows: ① Adaptive speckle suppression based on improved Lee filtering: Initial noise estimation is performed on the original SAR image (size H×W, grayscale range [0,255]), and the variance of pixels within a 3×3 window is calculated. ,like >Preset threshold (Preset threshold) Based on the dynamically adjusted SAR image resolution, areas identified as noisy are filtered using a 5×5 filtering window; if... ≤ The region is identified as a potential target area and filtered using a 3×3 filter window to avoid blurring of small target features, resulting in a filtered image. The filtering formula for this process can be summarized as follows: in, These are the filtered pixel values. These are the original pixel values. This represents the signal variance of the pixels within the window corresponding to the original SAR image. For noise variance, The imaging parameters of SAR images are calculated in advance. Set as the average pixel value within the window.
[0023] ② Edge enhancement of the filtered image: The Sobel operator is used to calculate the horizontal and vertical gradients of the original SAR image, which are then superimposed onto the filtered image to preserve target edge features, resulting in an enhanced image. The formula for the superposition process is as follows: in, These are the pixel values after overlay. , These are the Sobel horizontal gradient and the Sobel vertical gradient, respectively. This is the enhancement coefficient.
[0024] ③ Multi-scale normalization and format unification: To adapt to the input requirements of the target detection model (MOE-RT-Detr model) and avoid image scale differences caused by different SAR imaging devices, multi-scale normalization and channel expansion are performed to obtain the input feature image. Specifically, multi-scale normalization involves resizing the enhanced image to a uniform size and then normalizing it by channel, normalizing the image pixel values to the [-1,1] interval to obtain a normalized image; channel expansion adds channel dimensions to the normalized image, expanding the single-channel normalized image to 3 channels by copying channels, thus adapting to the input requirements of the RT-Detr CNN backbone (the core part of a convolutional neural network responsible for extracting multi-level, abstract features from the input image), resulting in the final preprocessed input feature image.
[0025] Optionally, the input feature image is input into a preset target detection model, and block-gating decisions are performed based on the input feature image to obtain a multi-pixel block expert model for the input feature image, including: The input feature image is input into a preset target detection model, and the input feature image is downsampled, divided into blocks and feature extracted in sequence to obtain multiple pixel blocks and feature vectors of each pixel block. By using a pre-defined gating network, the feature vector is processed to obtain the expert model selection probability of the corresponding pixel block; Filter out the target selection probabilities that meet the preset threshold requirements from the expert model selection probabilities; The expert model corresponding to the target selection probability is determined as the pixel block expert model of the corresponding pixel block.
[0026] In this embodiment, the input feature image is input into a preset target detection model. The input feature image is then downsampled, divided into blocks, and its features are extracted sequentially to obtain multiple pixel blocks and feature vectors for each pixel block. A preset gating network is used to process each feature vector to obtain the corresponding expert model selection probability for the pixel block. Thus, the expert model corresponding to the target selection probability that meets the preset threshold requirement among the expert model selection probabilities is the pixel block expert model for that pixel block. This selects the optimal expert sub-network for targeted image processing of the high-quality input feature image, reducing unnecessary computation and improving the efficiency and accuracy of image target detection. The expert selection probabilities include noise suppression expert selection probability, small target detection expert selection probability, complex target detection expert selection probability, and general processing expert selection probability. The pixel block size can be 16×16 pixels. The preset threshold requires that if the maximum probability in the expert model selection probability is ≥0.5, then the maximum probability is determined as the target selection probability; otherwise, the two probabilities ranked in descending order are determined as the target selection probabilities.
[0027] In an exemplary embodiment provided in this application, based on the local features of the input feature image, each 16×16 pixels can be divided into a pixel block as a decision unit. The optimal expert sub-network is selected for each pixel block using a preset gating network, which can reduce invalid computation.
[0028] Specifically, the gating network adopts a 2-layer CNN + softmax structure, and performs block-based gating decisions based on the input feature image to obtain an expert model for multiple pixel blocks of the input feature image. The specific steps are as follows: ① The preprocessed input feature image Downsampling to 40×40 corresponds to 16×16 decision units in a 640×640 input image. A 256-dimensional feature vector is extracted from each pixel block decision unit. ; ② For each pixel block, the gating network calculates the feature vector of that pixel block. The process is performed to output the selection probabilities of four experts, suppressing noise in the expert selection probabilities. Small target detection expert selection probability Complex Beijing expert selection probability and general processing expert selection probability The expert model selection probability is obtained; where, through softmax normalization, the following conditions are met. ; ③ For each pixel block, if the highest probability selected by the expert model is ≥0.5 (determined as a non-complex mixing region), then the expert sub-network (expert model) corresponding to the highest probability is selected as the pixel block expert model to process the features of the decision unit of that pixel block; if the highest probability is <0.5 (determined as a complex mixing region), then the expert sub-networks (expert models) corresponding to the two highest probabilities are selected as the pixel block expert models for feature weighted fusion. The specific feature weighted fusion formula is as follows: in, Represents the pixel block feature map, k=1 (single expert model), k=2 (fusion of 2 expert models). In the pixel block expert model, the first The feature map output by the expert model.
[0029] Optionally, the pixel block expert model is one or two of the following: noise suppression expert model, small target detection expert model, complex background expert model, and general processing expert model. The input feature image includes multiple pixel blocks, and each pixel block corresponds to a pixel block expert model. The input feature image is processed using a multi-pixel block expert model to obtain an expert feature map, including: For each pixel block in the input feature image, the pixel block is processed using the corresponding pixel block expert model to obtain a pixel block feature map. An expert feature map is obtained by fusing features from multiple pixel block feature maps.
[0030] In the embodiment provided in this application, for each pixel block in the input feature image, the pixel block is processed in a targeted manner using the pixel block expert model corresponding to the pixel block to obtain a pixel block feature map. This can reduce invalid calculations, and feature fusion is performed based on multiple pixel block feature maps, thereby improving the accuracy of the fused expert feature map and thus improving the overall accuracy of image target detection.
[0031] In an exemplary embodiment provided in this application, for each pixel block in the input feature image, the pixel block is processed using the pixel block expert model corresponding to the pixel block to obtain a pixel block feature map. The specific steps are as follows: For each pixel block in the input feature image, if the pixel block expert model for that pixel block is a noise suppression expert model, the pixel block is processed using the noise suppression expert model to obtain the first pixel block feature map. When the pixel block expert model for this pixel block is a small object detection expert model, the pixel block is processed using the small object detection expert model to obtain the feature map of the second pixel block; When the pixel block expert model of the pixel block is a complex background expert model, the complex background expert model is used to process the corresponding pixel block in the input feature image to obtain the third pixel block feature map. When the pixel block expert model of the pixel block is a general processing expert model, the pixel block is processed using the general processing expert model to obtain the feature map of the fourth pixel block. When the pixel block expert model for this pixel block is a noise suppression expert model and a small target detection expert model, the pixel block is processed using the noise suppression expert model and the small target detection expert model to obtain the feature map of the fifth pixel block; When the pixel block expert model of the pixel block is a noise suppression expert model and a complex background expert model, the pixel block is processed using the noise suppression expert model and the complex background expert model to obtain the feature map of the sixth pixel block; When the pixel block expert model of the pixel block is a noise suppression expert model and a general processing expert model, the pixel block is processed using the noise suppression expert model and the general processing expert model to obtain the feature map of the seventh pixel block; When the pixel block expert model for this pixel block is a small object detection expert model and a complex background expert model, the pixel block is processed using the small object detection expert model and the complex background expert model to obtain the feature map of the eighth pixel block. When the pixel block expert model of this pixel block is a small object detection expert model and a general processing expert model, the pixel block is processed using the small object detection expert model and the general processing expert model to obtain the feature map of the ninth pixel block; When the pixel block expert model of the pixel block is a complex background expert model and a general processing expert model, the pixel block is processed using the complex background expert model and the general processing expert model to obtain the feature map of the tenth pixel block. A pixel block feature map is formed based on the first pixel block feature map, the second pixel block feature map, the third pixel block feature map, the fourth pixel block feature map, the fifth pixel block feature map, the sixth pixel block feature map, the seventh pixel block feature map, the eighth pixel block feature map, the ninth pixel block feature map, and the tenth pixel block feature map.
[0032] In this embodiment, the noise suppression expert model, the small target detection expert model, the complex background expert model, and the general processing expert model form the hybrid expert model (MOE, feature encoding sub-network) of this application. These four structurally differentiated expert sub-networks are all based on the ResNet50 network as their backbone, and their functional division is achieved by adjusting the convolutional kernel size and attention module type. The network structure of the noise suppression expert model is as follows: Figure 2 As shown, the network structure of the small target detection expert model is as follows: Figure 3 As shown, the network structure of the expert model for complex backgrounds is as follows: Figure 4 As shown, the network structure of the general processing expert model is as follows: Figure 5 As shown.
[0033] Specifically, the noise suppression expert model Expert1's processing procedure—for noise handling: For areas with strong noise, a noise-aware attention module is added after the 2nd and 3rd convolutional layers of ResNet5 (a 50-layer residual network). This model targets the input feature image. (dimension is) , (number of channels), per pixel Construct a 5×5 local window and calculate the variance of the pixels within the window. The variance, which reflects the local noise intensity, is calculated using the following formula: in, This is the average value of the pixels within a 5x5 window.
[0034] Attention weights are generated based on the ratio of local variance to the maximum variance of the entire image. To suppress features in high-noise regions, the attention weight formula is: in, To determine the maximum local variance of the entire image, the weight values are set to [0,1], with the weights closer to 0 in areas with denser noise.
[0035] The attention weights are multiplied pixel-by-pixel with the original input feature image to suppress noise features, and the processed feature map is output: .
[0036] Specifically, the processing procedure of the Expert2 small object detection expert model—for small object detection: For the input feature image… For small targets with a pixel ratio of less than 5%, to preserve the details of these small targets, the original 4 downsampling operations of the ResNet50 network are adjusted to 2 downsampling operations. Let the original input feature image be... The size is Feature image after downsampling Size is This is achieved through a convolutional layer with a stride of 2, as shown in the formula: in, This indicates a convolution operation with a kernel size of 3×3, a stride of 2, and padding of 1, which reduces resolution while avoiding loss of edge features.
[0037] Then, channel weights are learned through 1×1 convolution to strengthen the feature channels that are sensitive to small targets. Let the channel weight vector be... ( (Number of feature map channels), the weighted feature image is obtained. The formula is: in, This indicates element-wise multiplication. Through backpropagation optimization, the channel weights corresponding to small target samples are made significantly higher than those of the background channels.
[0038] Specifically, the processing procedure of the Expert3 expert model for complex backgrounds—for complex backgrounds: First, for the input feature image… Multi-scale background features are extracted using dilated convolutions of different sizes (3×3 and 5×5) to capture the spatial correlation of complex backgrounds. The operation is as follows: ①3×3 dilated convolution (dilation rate) ): Extract mesoscale background features, cover local background textures, and obtain a mesoscale background feature image. .
[0039] in, This represents the dilation convolution operation. It is a 3×3 dilated convolution. To ensure the output size matches the input size, the expansion ratio is used. Expand the receptive field to 7x7 while avoiding a reduction in resolution.
[0040] ②5×5 dilated convolution (dilation rate) ): Extract large-scale background features, cover the global background structure, and obtain a large-scale background feature image. .
[0041] in, For a 5×5 dilated convolution, the padding number is... While maintaining the same output size, the receptive field is expanded to 13×13, enabling the capture of large-scale background features such as undulating mountains and continuous forests.
[0042] ③ Multi-scale feature fusion: Weighted fusion of medium and large-scale background features enhances the integrity of background features, resulting in a fused background feature image. .
[0043] in, , For fixed weights, This indicates element-wise multiplication.
[0044] Secondly, by calculating the input feature map image With fused background feature image Channel-level difference entropy, quantizing each pixel Probability of belonging to target or background – features of the background region and Small differences result in low difference entropy; large differences in the target region result in high difference entropy, as shown in the following formula: ① Channel-level feature differences: calculation and Absolute difference in each channel .
[0045] in, , They represent , The Channel characteristics, This is an absolute value operation.
[0046] ② Difference Entropy Calculation: The entropy value is calculated for the channel-level differences to measure the dispersion of the feature distribution. The higher the difference entropy, the greater the target probability.
[0047] in, For the first The absolute difference between the channels The normalized probability, To avoid tiny values where the denominator is 0, and to ensure computational stability.
[0048] Then, based on difference entropy Generate background suppression attention weights —Assign low weights to background regions with low differential entropy to suppress background features, and assign high weights to target regions with high differential entropy to preserve target features. Normalized to the interval [0, 1] to eliminate the influence of different image brightness and contrast, the difference entropy normalization formula is: in, To normalize the difference entropy, , These are the minimum and maximum values of the difference entropy in the current input feature image, calculated by traversing the entire image. Then, a sigmoid function is used to enhance the weight discrimination, highlight the target region, and generate background suppression attention weights. The formula is: in, This is a weighting adjustment coefficient to enhance the weight difference between the target and the background. The threshold is set so that the background region weight is concentrated in [0, 0.2] and the target region weight is concentrated in [0.7, 1.0].
[0049] Finally, the background suppression attention weights are applied. With input feature image Element-wise multiplication is used to suppress background features and preserve target features, ultimately outputting the Expert3 feature map. : in, The feature map after complex background suppression can be directly fed into the subsequent RT-Detr model (RT-Detr decoding sub-network) for target detection, effectively reducing the interference of complex backgrounds such as mountains and forests on target recognition.
[0050] Specifically, the processing procedure of the general processing expert model Expert4 is as follows: For general cases, the ResNet50 network structure is used to process regions in the input feature image that have no obvious noise, moderate target scale, and simple background, as a supplement to other expert models to ensure full image coverage.
[0051] Optionally, a pre-defined RT-Detr model is used to perform target classification and bounding box regression on the expert feature map to obtain target detection results, including: Using a pre-defined RT-Detr model, target classification is performed on the expert feature map to obtain multiple predicted target bounding boxes; In the RT-Detr model, for each predicted target bounding box, adaptive anchor point matching is performed based on the size of the predicted target bounding box to obtain the attention anchor point layout within the predicted target bounding box. In the RT-Detr model, sparse spatial sampling is performed on the image patch where the predicted target bounding box is located according to the attention anchor point layout to obtain the predicted feature vector; In the RT-Detr model, target detection results are formed based on multiple predicted target bounding boxes and multiple predicted feature vectors.
[0052] In the embodiment provided in this application, the expert feature map is classified into multiple predicted target bounding boxes in the RT-Detr model. For each predicted target bounding box, adaptive anchor point matching is performed based on the size of the predicted target bounding box to obtain the attention anchor point layout within the predicted target bounding box. Then, according to the attention anchor point layout, sparse spatial sampling is performed on the image patch where the predicted target bounding box is located to obtain the predicted feature vector, forming a target detection result composed of multiple predicted target bounding boxes and multiple predicted feature vectors, so as to achieve target classification and bounding box regression. This not only retains the real-time advantage of RT-Detr, but also adapts to the target characteristics of SAR images, thereby improving the detection accuracy of image targets.
[0053] Specifically, the attention anchor point layout includes the number of anchor points and their arrangement. Anchor point arrangement methods include regular and random arrangements. Regular arrangements include grid-like arrangements (including rectangular / square grids and hexagonal grids), ring / radial arrangements, arrangements along specific curves, and lattice arrangements. Random arrangements include completely random arrangements, Poisson distributions, and clustered arrangements. The size of the predicted target bounding box includes its area. Therefore, when the area is <32×32, the number of anchor points can be 3; when 32×32 ≤ area < 128×128, the number of anchor points can be 6; and when the area is ≥128×128, the number of anchor points can be 9. Specifically, the predicted feature vector includes pixel-level mask, target classification information (category label, confidence score, identity ID), and target attribute information (pose key points, parts / contours, visual feature vectors / embeddings). The predicted target bounding box and pixel-level mask both belong to target localization information. That is, the target detection result includes target localization information, target classification information, and target attribute information.
[0054] Optionally, the target detection result includes multiple predicted target bounding boxes and a predicted feature vector corresponding to each predicted target bounding box; an image target detection method further includes: In the target detection model, continuous frame association is performed on the original SAR image to obtain multi-frame associated SAR images; In the target detection model, the cross-union ratio of the bounding boxes between the associated SAR image and the original SAR image is calculated; In the target detection model, the predicted target bounding boxes with a cross-union ratio greater than a preset cross-union ratio and an area greater than or equal to a preset cross-union ratio are determined as filtered target bounding boxes. In the target detection model, a new target detection result is formed based on the filtered target bounding box and its corresponding predicted feature vector.
[0055] In the embodiment provided in this application, the target detection model performs continuous frame association on the original SAR image to obtain multi-frame associated SAR images. The cross-union ratio (CUI) of the bounding boxes between the associated SAR images and the original SAR images is calculated. Then, the predicted target bounding boxes with CUIs greater than a preset CUI and areas greater than or equal to a preset area are determined as filtered target bounding boxes, forming a new target detection result composed of the filtered target bounding boxes and their corresponding predicted feature vectors. Thus, the use of multi-frame association and area threshold filtering strategies can further reduce false detections caused by noise, thereby further improving the accuracy of image target detection.
[0056] In an exemplary embodiment provided in this application, the specific steps of the multi-frame association and area threshold filtering strategy are as follows: The detection results of three consecutive SAR images are correlated to obtain the correlated SAR image of the previous frame and the correlated SAR image of the next frame of the original SAR image. The intersection-union ratio (IOU) of the bounding boxes between the correlated SAR image and the original SAR image is calculated. If the preset intersection-union ratio is set to 0.6, targets with an IOU greater than 0.6 will be identified as the same target, and targets that appear consecutively for ≥2 frames will be retained. If the preset area is set to 10×10 pixels, the predicted target bounding box with an area < 10×10 pixels will be identified as a small-noise pseudo-target detection box and filtered. The filtered target bounding box with an area ≥ 10×10 pixels will be output to obtain the final target detection result.
[0057] Optionally, the RT-Detr model is dynamically optimized using a pre-defined loss function, the formula for which the loss function is calculated is as follows: in, This represents the total loss of the model. Represents the cross-entropy classification loss. This represents the first balance coefficient. Indicates regression loss, This represents the second balance coefficient. This represents the weighted loss of small targets. This represents the third balance coefficient. Indicates noise robustness loss, Indicates the number of training samples. Indicates the number of target categories. ∈{0,1} represents the first... The training sample at the th ... The true label indicator variable on the nth category, when the nth category Each sample belongs to category hour, ,otherwise ; The model represents the first The sample belongs to the first Predicted probability of class Represents the predicted target bounding box and the true target bounding box The intersection and union ratio, express Center point of the frame and Center point of the frame The square of the Euclidean distance, Represents the regression weight coefficients. This indicates a consistent aspect ratio. This represents the target weight coefficient for the i-th target. Indicates the first The single-sample regression loss corresponding to each training sample. Indicates noise weight, Indicates the first The classification loss for a single training sample.
[0058] In the embodiment provided in this application, the RT-Detr model is dynamically optimized using a preset loss function, enabling the RT-Detr model to maintain detection accuracy at all times, thereby ensuring that it can always perform accurate detection of SAR images that meets the requirements. =1.0、 =0.5、 =0.3.
[0059] In this embodiment, This indicates the coordinates of the top-left and bottom-right corners of the predicted target bounding box. These are the coordinates of the top-left and bottom-right corners of the actual target bounding box. The square of the diagonal length of the smallest rectangle that encloses both the predicted and true target bounding boxes; Used to optimize bounding box positioning accuracy; =2.0, to increase the training priority for small goals; if The area was identified as a suspected noise source. =0.8, otherwise =1.0), thus, by calculating the variance of the predicted target area, the loss of the noise-suspected area with high variance is multiplied by a coefficient of 0.8 to reduce false noise detections.
[0060] at the same time, ; ; in, Represents the true target bounding box width, Represents the true target bounding box height, Represents the predicted target bounding box width, Represents the predicted target bounding box height, Represents the predicted target bounding box and the true target bounding box The intersection and union ratio.
[0061] In an exemplary embodiment provided in this application, compared with the existing RT-Detr model, this application performs deformable attention module adaptation optimization and loss function optimization on the decoder in the RT-Detr model.
[0062] First, the deformable attention module is adapted and optimized: SAR image targets are prone to deformation due to imaging angle. Traditional RT-Detr's deformable attention anchors are fixed. This application proposes SAR target deformation adaptive anchors, which dynamically adjust the number of anchors according to the target scale: Small target (predicted bounding box area < 32×32): Set 9 attention anchors to improve detail capture capability; Medium target (32×32≤area<128×128): Set 6 attention anchors; Large targets (area ≥ 128×128): Set 3 attention anchors to reduce computational load.
[0063] Second, loss function optimization: Traditional RT-Detr uses classification loss (cross-entropy) + regression loss (L1). This application introduces a "small target weighted loss" and a noise robustness loss. The corresponding total loss formula is: .
[0064] In another exemplary embodiment provided in this application, the model training and verification process of the object detection model is as follows: First, the dataset was constructed by combining publicly available SAR target datasets with a self-made dataset, and data augmentation was performed on each image dataset. The publicly available SAR target datasets include SSDD (SAR vessel detection dataset) and SAR-Target-Dataset (SAR dataset containing vehicles and buildings). The self-made dataset includes a small target dataset, and small target annotations were added to supplement the small target samples in the small target dataset. Data augmentation was performed by randomly flipping, rotating, and adding Gaussian noise to simulate coherence speckles of different intensities, thereby improving the robustness of the model. Secondly, phased joint training: To avoid confusion in the initial selection of the gating network, a three-stage training approach is adopted: "pre-training - joint training - fine-tuning". ① Expert pre-training phase: Using a publicly available SAR target dataset, the four expert models included in the hybrid expert model MOE are initialized with ResNet50 pre-trained weights and trained separately. The training epochs are E1=20, the optimizer is AdamW, and the learning rate is 1e-4. The specific expert pre-training process is as follows: Figure 6 As shown; ② Joint Training Phase: The four pre-trained expert models are combined with the gating network and the RT-Detr model for overall training. The training epochs are E2=50, and cosine annealing is used with an initial learning rate of 1e-4 and a final learning rate of 1e-6. The specific joint training process is as follows: Figure 7 As shown; ③ Fine-tuning stage: Fine-tuning is performed using a self-made small object dataset, focusing on optimizing the small object detection expert and loss function. The training epochs are E3=10, and the learning rate is 5e-5. The specific fine-tuning process is as follows: Figure 8 As shown.
[0065] Sparse activation of expert subnetworks: Utilizing the dynamic expert selection property of MOE, only the selected expert subnetworks are activated, and the unselected experts do not participate in the calculation; Model quantization and pruning: Quantization: The model weights are quantized from 32-bit floating-point numbers to 16-bit floating-point numbers, improving inference speed; Pruning: Redundant convolutional kernels (absolute weights < threshold T = 1e-3) in the expert subnetwork are pruned at a rate of 20%, further reducing the number of parameters. Finally, the performance verification metrics are as follows: mAP (mean accuracy), FPS (frames per second), and small target detection rate (AP of small targets when IOU=0.5) are used as verification metrics.
[0066] In this embodiment, through the training and validation of the target detection model, the MOE and RT-Detr models can be collaboratively optimized, ensuring the parameter adaptation of each expert subnetwork, gating network, and detection subnetwork. At the same time, the model inference speed is improved, and the problems of noise interference, poor detection of small targets, and computational redundancy are solved, thus meeting real-time requirements.
[0067] This application aims to construct an efficient and robust SAR image target detection method by fusing a hybrid expert model (MOE) and an RT-Detr model. The image target detection method of this application mainly includes three core stages: SAR image preprocessing, MOE-RT-Detr fusion detection, and model training and optimization. The overall process can be summarized as follows: After the original SAR image is input, adaptive denoising and format standardization are first performed; then, the processed image is fed into the fusion detection module, where a gating network dynamically selects or combines the most suitable expert sub-networks for feature extraction; the extracted features are then used by an optimized RT-Detr decoder for target localization and classification; finally, post-processing strategies are used to filter out false detections caused by noise, and the final detection result is output.
[0068] Please see Figure 9 , Figure 9 This is a schematic flowchart illustrating the application of the provided image target detection method in an exemplary embodiment of this application, as shown below. Figure 9 As shown, the specific application process of the image target detection method is as follows: First, SAR image preprocessing: the front end suppresses speckle noise and unifies the diverse raw SAR images into a standardized format that the model can process.
[0069] (1) Adaptive speckle suppression ① The original input is a single-channel SAR initial image with a grayscale range of [0, 255] (size: × The core processing unit is an improved Lee filter.
[0070] ② The system traverses the image using a 3x3 sliding window, calculating the variance of the grayscale values of pixels within each window. A variance threshold that is dynamically adjusted based on the image resolution is set. If the window variance is greater than If the noise level is high, the area is considered a noise-dense area; otherwise, it is considered a potential target or a smooth background area.
[0071] ③ For areas with high noise levels, a larger 5x5 filter window is used to enhance the smoothing effect; for potential target areas, a smaller 3x3 filter window is used to protect target edges and details. The filter calculation formula can be: in, These are the filtered pixel values. It is the mean value of the pixels within the filtering window. These are the pixel values before filtering. It is an adaptive coefficient. The calculation formula is: in, It is the calculation of the signal within the window. The mean and variance are obtained. This is the noise variance estimated in advance based on the parameters of the SAR imaging system. The purpose of this formula is to: in small, uniform regions, Approaching 0, the output is close to the mean, resulting in good smoothing; Large edge or target area, Approaching 1 preserves the original value and keeps details intact.
[0072] (2) Edge enhancement and format uniformity To compensate for potential edge blurring caused by filtering, the Sobel operator is used to calculate the gradients of the filtered image in the horizontal and vertical directions. , Calculate the gradients in the horizontal and vertical directions. Multiply by an enhancement factor Then the filtered image is superimposed, i.e. This operation sharpens the target contours. The enhanced image is then scaled to a fixed size of 640x640 as required by the model. Subsequently, channel normalization is performed, linearly transforming pixel values from [0,255] to the [-1,1] range. Finally, a 3-channel image tensor is generated by copying the single-channel data to adapt to the input requirements of the subsequent RT-Detr-based backbone network.
[0073] Secondly, the SAR-adaptive MOE-RT-Detr fusion detection process using the target detection model is as follows: (1) MOE Feature Encoding Subnetwork First, the design and function of the Experts subnetwork. Four specialized expert subnetworks (Expert1 to Expert4) were constructed, all based on ResNet50 as a common framework, but with functional differentiation achieved through fine-tuning of their internal structures. All experts share the same input interface, but their output feature maps are dynamically determined by a gating network to be used. The dynamic process and division of labor are as follows: Expert1 (Noise Processing Expert): A noise-aware attention module is embedded after the second and third convolutional layers of ResNet50. This module calculates the variance of each location on the feature map within a 5x5 local window and normalizes it into attention weights. Regions with higher variance are suppressed with lower weights because they may be noise. This allows Expert1 to actively filter out interference from strong speckle noise.
[0074] Expert2 (Small Object Detection Expert): Modified the downsampling strategy of ResNet50, reducing the traditional four downsampling steps to two, thereby preserving higher-resolution feature maps and preventing information loss of small objects in deep networks. Simultaneously, a small object feature enhancement module was added after the last layer. This module uses 1x1 convolutions to increase the weights of feature channels sensitive to small objects, strengthening the feature response of small objects.
[0075] Expert3 (Complex Background Expert): This module adds a background target separation attention module after layer 4 of ResNet50. This module learns the texture feature patterns of complex backgrounds such as mountains and forests through training, and generates an attention mask to suppress feature activation in these background regions, highlighting potential targets.
[0076] Expert4 (General Case Expert): Maintains the standard ResNet50 structure without special modifications. It is used to handle general regions with minimal noise, moderate target scale, and simple background, serving as a supplement to other experts to ensure the system's full coverage capability.
[0077] Second, the gated decision sub-network: The gated network is a lightweight convolutional neural network consisting of two convolutional layers and one fully connected layer, followed by a softmax activation function. Its input is the downsampled entire preprocessed image. The processing dynamics are as follows: ① The preprocessed 640x640 image is downsampled to a lower dimension of 40x40. Each point in the 40x40 grid corresponds to a 16x16 pixel block in the original image, which is a decision unit.
[0078] ② The gating network processes the features of each decision unit and outputs a 4-dimensional vector, representing the applicability probabilities of the four experts in processing the features of that region. The Softmax function ensures that the sum of these four probabilities is 1.
[0079] ③ The system selects the expert with the highest probability to process the image region corresponding to the decision unit. If the highest probability is lower than the set confidence threshold, the region is considered to have complex features, and a single expert is not sufficient to handle it. Instead, the output features of the two experts with the highest probabilities are selected for weighted fusion. Finally, the feature maps output by all activated experts are integrated to form the final output feature map of the MOE module.
[0080] (2) RT-Detr Decoding and Detection Subnetwork This sub-network receives multi-scale feature maps from the MOE module output. It inherits the core components of RT-Detr, including the Transformer decoder and the detection head for predicting object categories and bounding boxes.
[0081] First, adaptation of deformable attention modules. Traditional RT-Detr sets a fixed number of deformable attention reference points for each query. This application makes it dynamic: the number of attention points is adaptively allocated based on the initially predicted bounding box size. For small targets with an area <32x32, more points (9) are allocated to capture details; for large targets with an area ≥128x128, fewer points (3) are allocated to save computation. This dynamic mechanism allows the model to focus more precisely on key parts of targets at different scales.
[0082] Second, the optimized loss function Standard cross-entropy classification loss and L1 regression loss Based on this, two new loss items have been added: Weighted loss of small goals When calculating the regression loss, the loss of samples labeled as small targets is multiplied by a weight coefficient greater than 1, thereby giving small targets higher priority during training.
[0083] Noise robustness loss For each target bounding box predicted by the model, the pixel variance of its internal region is calculated. The classification loss for predicted target bounding boxes with high variance (suspected to be noise) is multiplied by a coefficient less than 1, so that the model is not overly confident that high-variance regions are real targets, thus reducing false detections.
[0084] The formula for the total loss function is: in , , To balance the hyperparameters.
[0085] (3) Post-processing of detection results: To further improve reliability, the initial detection results output by RT-Detr are filtered as follows: ① When processing video streams or consecutive frame SAR images, the detection results of three consecutive frames are correlated. The Intersection over Union (IOU) of the target bounding boxes between adjacent frames is calculated. If the IOU is greater than a threshold, the target is determined to be the same target. Only targets that appear more than twice in consecutive frames are retained to filter out false alarms caused by transient noise.
[0086] ② Set a minimum pixel target area threshold of 10x10 to directly filter out detection boxes with too small an area. These are usually discrete strong noise points that cannot be completely suppressed by the model.
[0087] Then, the specific implementation process of the model training and validation module is as follows: (1) Phased joint training strategy ① Using a large SAR dataset, initialize four expert subnetworks with pre-trained ResNet50 weights, allowing them to independently learn features of their respective specializations without interference from gating networks. Train for 20 epochs.
[0088] ② The pre-trained experts, randomly initialized gating networks, and RT-Detr decoders are connected as a whole for end-to-end training. This stage lasts 50 epochs, with the learning rate adjusted using a cosine annealing scheduler. During this stage, the gating network learns how to make optimal expert selection decisions based on the input image content.
[0089] ③ Fine-tune the overall model using a dedicated dataset rich in small objectives, focusing on optimizing the Expert2 and small objective weighted losses. This further improves the detection performance for small targets. The training run consists of 10 rounds.
[0090] (2) Optimization of reasoning speed During inference, for each decision unit, the gating network typically activates only one or two expert subnetworks for computation, while the remaining experts remain dormant. This achieves dynamic, on-demand allocation of computational resources, significantly reducing computational load. After training, the model weights are converted from FP32 to FP16, improving inference speed without significantly sacrificing accuracy. Simultaneously, convolutional kernels in the expert subnetworks are pruned, removing redundant filters with weights less than 1e-3, further compressing the model size and accelerating the process.
[0091] In summary, the RT-Detr SAR image target detection method proposed in this application, which integrates the hybrid expert model MOE, effectively solves the problems of existing technologies, such as anchor frame design relying on experience, sensitivity to speckle noise, low accuracy in small target detection, and insufficient real-time performance, by combining the innovative architecture of the hybrid expert model and RT-Detr with SAR image preprocessing, adaptive expert sub-network design, dynamic gating decision-making, and optimization training strategies. It significantly improves the overall performance of SAR image target detection: in terms of detection accuracy, it effectively suppresses the interference of strong speckle noise, reduces false detection and false negative rates, and significantly enhances the recognition ability of small targets; in terms of robustness, it can better adapt to complex scenes with complex backgrounds, targets of different scales, and various noise intensities; and in terms of efficiency, it achieves efficient real-time processing through the dynamic allocation of computing resources and model optimization strategies of MOE.
[0092] Please see Figure 10 , Figure 10 An image target detection system is shown as an exemplary embodiment of this application, such as Figure 10 As shown, this application provides an image target detection system 1000, comprising: Acquisition module 1001 is used to acquire raw SAR images; The preprocessing module 1002 is used to preprocess the original SAR image to obtain the input feature image; The block gating decision module 1003 is used to input the input feature image into a preset target detection model, and perform block gating decision based on the input feature image to obtain an expert model for multiple pixel blocks of the input feature image. The expert model processing module 1004 is used in the target detection model to process the input feature image using a multi-pixel block expert model to obtain an expert feature map. The detection result determination module 1005 is used in the target detection model to perform target classification and bounding box regression on the expert feature map using a preset RT-Detr model to obtain the target detection result.
[0093] The image target detection system 1000 of this application firstly preprocesses the original SAR image acquired by the acquisition module 1001 using a preprocessing module 1002 to reduce speckle noise interference in the image, thereby improving the visual quality of the preprocessed input feature image. Then, a block gating decision module 1003 inputs the input feature image into a preset target detection model, performing block gating decisions based on the input feature image to obtain multiple pixel block expert models for the input feature image, enabling the selection of the optimal expert sub-network for the input feature image of this quality. Secondly, in the target detection model, an expert model processing module 1004 uses multiple pixel block expert models to perform targeted processing on the input feature image, reducing invalid computation and improving the efficiency and accuracy of image processing, obtaining an expert feature map. Finally, a detection result determination module 1005 uses a preset RT-Detr model to perform target classification and bounding box regression on the expert feature map, improving the accuracy of image target detection and thus improving the accuracy of the final target detection result. Meanwhile, since speckle noise has been removed from the images used for detection, the model will focus on the target rather than the noise when detecting the image, further improving the accuracy of target detection in the image.
[0094] Optionally, the preprocessing module 1002 is specifically used for: Adaptive speckle suppression is applied to the original SAR image to obtain a filtered image; Edge enhancement is performed on the filtered image to obtain the enhanced image; Multi-scale normalization is performed on the enhanced image to obtain a normalized image; Channel expansion is performed on the normalized image to obtain the input feature image.
[0095] Optionally, the block gating decision module 1003 is specifically used for: The input feature image is input into a preset target detection model, and the input feature image is downsampled, divided into blocks and feature extracted in sequence to obtain multiple pixel blocks and feature vectors of each pixel block. By using a pre-defined gating network, the feature vector is processed to obtain the expert model selection probability of the corresponding pixel block; Filter out the target selection probabilities that meet the preset threshold requirements from the expert model selection probabilities; The expert model corresponding to the target selection probability is determined as the pixel block expert model of the corresponding pixel block.
[0096] Optionally, the pixel block expert model is one or two of the following: noise suppression expert model, small target detection expert model, complex background expert model, and general processing expert model. The input feature image includes multiple pixel blocks, and each pixel block corresponds to a pixel block expert model. Expert model processing module 1004 is specifically used for: For each pixel block in the input feature image, the pixel block is processed using the corresponding pixel block expert model to obtain a pixel block feature map. An expert feature map is obtained by fusing features from multiple pixel block feature maps.
[0097] Optionally, the detection result determination module 1005 is specifically used for: Using a pre-defined RT-Detr model, target classification is performed on the expert feature map to obtain multiple predicted target bounding boxes; In the RT-Detr model, for each predicted target bounding box, adaptive anchor point matching is performed based on the size of the predicted target bounding box to obtain the attention anchor point layout within the predicted target bounding box. In the RT-Detr model, sparse spatial sampling is performed on the image patch where the predicted target bounding box is located according to the attention anchor point layout to obtain the predicted feature vector; In the RT-Detr model, target detection results are formed based on multiple predicted target bounding boxes and multiple predicted feature vectors.
[0098] Optionally, the target detection result includes multiple predicted target bounding boxes and a predicted feature vector corresponding to each predicted target bounding box; an image target detection system further includes a target filtering module, which is specifically used for: In the target detection model, continuous frame association is performed on the original SAR image to obtain multi-frame associated SAR images; In the target detection model, the cross-union ratio of the bounding boxes between the associated SAR image and the original SAR image is calculated; In the target detection model, the predicted target bounding boxes with a cross-union ratio greater than a preset cross-union ratio and an area greater than or equal to a preset cross-union ratio are determined as filtered target bounding boxes. In the target detection model, a new target detection result is formed based on the filtered target bounding box and its corresponding predicted feature vector.
[0099] Optionally, an image target detection system further includes a model optimization module, which is specifically used to: dynamically optimize the RT-Detr model using a preset loss function, the formula for which the loss function is calculated is as follows: in, This represents the total loss of the model. Represents the cross-entropy classification loss. This represents the first balance coefficient. Indicates regression loss, This represents the second balance coefficient. This represents the weighted loss of small targets. This represents the third balance coefficient. Indicates noise robustness loss, Indicates the number of training samples. Indicates the number of target categories. ∈{0,1} represents the first... The training sample at the th ... The true label indicator variable on the nth category, when the nth category Each sample belongs to category hour, ,otherwise ; The model represents the first The sample belongs to the first Predicted probability of class Represents the predicted target bounding box and the true target bounding box The intersection and union ratio, express Center point of the frame and Center point of the frame The square of the Euclidean distance, Represents the regression weight coefficients. This indicates a consistent aspect ratio. This represents the target weight coefficient for the i-th target. Indicates the first The single-sample bounding box regression loss corresponds to each training sample. Indicates noise weight, Indicates the first The classification loss for a single training sample.
[0100] It should be noted that the image target detection system and the image target detection method provided in the above embodiments belong to the same concept. The specific ways in which each module and unit performs its operations have been described in detail in the method embodiments and will not be repeated here. In practical applications, the image target detection system provided in the above embodiments can be assigned to different functional modules as needed, that is, the internal structure of the system can be divided into different functional modules to complete all or part of the functions described above. This is not a limitation here.
[0101] A computing device according to an embodiment of this application includes a memory, a processor, and a program stored in the memory and running on the processor. When the processor executes the program, it implements some or all of the steps of the above-described image target detection method.
[0102] The computing device can be a computer, and the corresponding program is computer software. The parameters and steps of the computing device described above can be referred to the parameters and steps in the embodiment of the image target detection method above, and will not be repeated here.
[0103] This application embodiment provides a computer-readable storage medium storing instructions that, when executed, perform the steps of the image target detection method described above. The computer-readable storage medium can be either transient or non-transitory.
[0104] The technical solutions of this disclosure can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes one or more instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of this disclosure. The aforementioned computer-readable storage medium can be a non-transitory computer-readable storage medium, including: USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks, and other media capable of storing program code; it can also be a transient computer-readable storage medium.
[0105] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. Each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0106] Those skilled in the art will recognize that this application can be implemented as a system, method, or computer program product. Therefore, this disclosure can be implemented in the following forms: it can be entirely hardware, entirely software (including firmware, resident software, microcode, etc.), or a combination of hardware and software, generally referred to herein as a "module" or "system." Furthermore, in some embodiments, this application can also be implemented as a computer program product contained in one or more computer-readable media, which contains computer-readable program code. Computer-readable storage media can be, for example, but not limited to—electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof.
[0107] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0108] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.
Claims
1. An image target detection method, characterized in that, include: Acquire the raw SAR image; The original SAR image is preprocessed to obtain the input feature image; The input feature image is input into a preset target detection model, and block gating decisions are made based on the input feature image to obtain multiple pixel block expert models for the input feature image; In the target detection model, multiple pixel block expert models are used to process the input feature image to obtain an expert feature map; In the target detection model, a preset RT-Detr model is used to perform target classification and bounding box regression on the expert feature map to obtain the target detection result.
2. The method according to claim 1, characterized in that, The preprocessing of the original SAR image to obtain the input feature image includes: Adaptive speckle suppression is applied to the original SAR image to obtain a filtered image; Edge enhancement is performed on the filtered image to obtain an enhanced image; The enhanced image is normalized at multiple scales to obtain a normalized image; The normalized image is subjected to channel expansion to obtain the input feature image.
3. The method according to claim 1, characterized in that, The step of inputting the input feature image into a preset target detection model, and performing block gating decisions based on the input feature image to obtain multiple pixel block expert models for the input feature image includes: The input feature image is input into a preset target detection model, and the input feature image is downsampled, divided into blocks, and feature extracted sequentially to obtain multiple pixel blocks and feature vectors for each pixel block. The feature vector is processed using a pre-defined gating network to obtain the expert model selection probability of the corresponding pixel block; Filter out the target selection probabilities that meet the preset threshold requirements from the expert model selection probabilities; The expert model corresponding to the target selection probability is determined as the pixel block expert model of the corresponding pixel block.
4. The method according to claim 1, characterized in that, The pixel block expert model is one or two of the following: noise suppression expert model, small target detection expert model, complex background expert model and general processing expert model. The input feature image includes multiple pixel blocks, and each pixel block corresponds to a pixel block expert model. The process of processing the input feature image using multiple pixel block expert models to obtain an expert feature map includes: For each pixel block in the input feature image, the pixel block is processed using the pixel block expert model corresponding to the pixel block to obtain a pixel block feature map; Based on the feature maps of multiple pixel blocks, feature fusion is performed to obtain an expert feature map.
5. The method according to claim 1, characterized in that, The step of using a pre-defined RT-Detr model to perform target classification and bounding box regression on the expert feature map to obtain target detection results includes: Using a pre-defined RT-Detr model, the expert feature map is classified to obtain multiple predicted target bounding boxes; In the RT-Detr model, for each predicted target bounding box, adaptive anchor point matching is performed based on the size of the predicted target bounding box to obtain the attention anchor point layout within the predicted target bounding box. In the RT-Detr model, according to the attention anchor point layout, sparse spatial sampling is performed on the image patch where the predicted target bounding box is located to obtain the predicted feature vector; In the RT-Detr model, target detection results are formed based on multiple predicted target bounding boxes and multiple predicted feature vectors.
6. The method according to any one of claims 1 to 5, characterized in that, The target detection result includes multiple predicted target bounding boxes and a predicted feature vector corresponding to each predicted target bounding box; the method further includes: In the target detection model, the original SAR image is correlated with consecutive frames to obtain multi-frame correlated SAR images; In the target detection model, the cross-union ratio of the bounding boxes between the associated SAR image and the original SAR image is calculated; In the target detection model, the predicted target bounding boxes with a cross-union ratio greater than a preset cross-union ratio and an area greater than or equal to a preset area are determined as filtered target bounding boxes. In the target detection model, a new target detection result is formed based on the filtered target bounding box and its corresponding predicted feature vector.
7. The method according to any one of claims 1 to 5, characterized in that, The RT-Detr model is dynamically optimized using a preset loss function, the formula for which the loss function is calculated is as follows: in, This represents the total loss of the model. Represents the cross-entropy classification loss. This represents the first balance coefficient. Indicates regression loss, This represents the second balance coefficient. This represents the weighted loss of small targets. This represents the third balance coefficient. Indicates noise robustness loss, Indicates the number of training samples. Indicates the number of target categories. ∈{0,1} represents the first... The training sample at the th ... The true label indicator variable on the nth category, when the nth category Each sample belongs to category hour, ,otherwise ; The model represents the first The sample belongs to the first Predicted probability of class Represents the predicted target bounding box and the true target bounding box The intersection and union ratio, express Center point of the frame and Center point of the frame The square of the Euclidean distance, Represents the regression weight coefficients. This indicates a consistent aspect ratio. This represents the target weight coefficient for the i-th target. Indicates the first The single-sample bounding box regression loss corresponds to each training sample. Indicates noise weight, Indicates the first The classification loss for a single training sample.
8. An image target detection system, characterized in that, include: The acquisition module is used to acquire raw SAR images; The preprocessing module is used to preprocess the original SAR image to obtain the input feature image; The block gating decision module is used to input the input feature image into a preset target detection model, and perform block gating decisions based on the input feature image to obtain multiple pixel block expert models for the input feature image. An expert model processing module is used in the target detection model to process the input feature image using multiple pixel block expert models to obtain an expert feature map; The detection result determination module is used in the target detection model to perform target classification and bounding box regression on the expert feature map using a preset RT-Detr model to obtain the target detection result.
9. A computing device, comprising a memory, a processor, and a program stored in the memory and running on the processor, characterized in that, When the processor executes the program, it implements the steps of an image target detection method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed on a terminal device, cause the terminal device to perform the steps of an image target detection method as described in any one of claims 1 to 7.