SAR target detection method integrating pixel-level prior knowledge with template matching
By integrating pixel-level prior knowledge and template matching methods, the problems of insufficient detection speed and generalization in SAR target detection are solved, and efficient and accurate target recognition is achieved.
Patent Information
- Application Number
- CN202511063904.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-31
- Publication Date
- 2025-10-14
- Estimated Expiration
- 2045-07-31
AI Technical Summary
Existing CNN-based SAR target detection methods have shortcomings in detection speed and generalization. In particular, the two-stage method has high detection accuracy but slow speed, while the one-stage method has poor detection effect and is prone to overfitting, which makes it difficult to meet practical application needs.
A SAR target detection method that integrates pixel-level prior knowledge with template matching obtains target position information through sliding window traversal. Combining K-means clustering and grid distance suppression, a classification network is used to identify the target and perform non-maximum suppression and SIFT feature matching to filter out background interference.
The applicability and accuracy of the detection network are improved, the time loss and background learning of candidate region extraction are avoided, and the generalization ability of the model is enhanced.
Smart Images

Figure CN120564060B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of radar target detection and recognition, and particularly relates to a SAR target detection method fusing pixel-level prior knowledge and template matching. BACKGROUND
[0002] Compared with infrared, optical and other sensors, SAR is an active microwave remote sensing radar, which can work all day and all weather. In addition, SAR has high resolution and can penetrate the ground vegetation, so it has obvious advantages in camouflage recognition and shelter penetration, and is widely used in military and civilian fields. With the gradual maturity of SAR systems and imaging algorithms, as one of the important steps of SAR image interpretation, how to quickly and accurately detect targets from SAR images is the current research hotspot.
[0003] In recent years, with the continuous development of deep learning theory, convolutional neural network (CNN) performs well in image recognition and detection of different features, and is often used to describe deep features of images. At present, the target detection network based on CNN mainly includes two-stage method and one-stage method. The two-stage method divides the target detection task into candidate region extraction and target classification regression, such as region convolution neural network (RCNN), Fast-RCNN and Faster-RCNN algorithms; while the one-stage method directly uses network to extract features to predict the class and position information of the target, such as single shot multibox detector (SSD) and "you only look once" (YOLO) series algorithms.
[0004] Because the two-stage method needs to extract candidate regions, it can obtain high detection accuracy but reduces the detection speed, which is difficult to meet the needs of some actual application scenarios. The one-stage target detection method may reduce the detection effect because it does not introduce the process of candidate region. In addition, due to the difficulty in extracting data from large scene detection, the small amount of data may cause overfitting phenomenon in the process of network training, resulting in weak generalization of the trained model, and there is certain limitation in actual engineering application. SUMMARY
[0005] Invention purposes: To solve the above problems, the application provides a SAR target detection method combining pixel-level prior knowledge and template matching, which can avoid the uncertainty of the position of the target in the scene graph and the surrounding background information and the overfitting problem caused by the small amount of large scene detection data in the model training process, can accurately locate the position of the target according to the strong scattering characteristics of the SAR target in the pixel level, project the obtained target information to the image to be detected to extract the target slice, and then use the trained classification model for classification and feature matching with the provided target template to obtain the position and category information of the target in the original scene.
[0006] Technical scheme: The SAR target detection method combining pixel-level prior knowledge and template matching comprises the following steps:
[0007] S1: According to the data set of the target slice in the SAR image, the pixel-level prior knowledge of the target in the slice image is obtained;
[0008] S2: According to the strong scattering intensity characteristics of the target in the SAR image, the position information satisfying the pixel-level prior knowledge of S1 in the region of the sliding window is judged by traversing the panoramic image through the sliding window;
[0009] S3: The position coordinates of the center are obtained by K-means clustering of the position information obtained in S2;
[0010] S4: In order to avoid the problem that the same target center point is obtained after clustering due to the overlapping of the adjacent regions of the sliding window in S2, the grid distance is used to suppress the predicted center position coordinates in S3;
[0011] S5: The optimal weight of the trained classification network is loaded, the predicted target in the panoramic image is extracted and sent into the classification network for identification;
[0012] S6: The prediction results of the classification network in S5 are subjected to non-maximum suppression processing, and the redundant boxes of the same target detection are removed, and the detection results are optimized;
[0013] S7: The detection results after non-maximum suppression processing are subjected to SIFT feature matching, and the interference of background clutter on the prediction results is filtered out;
[0014] S8: The detection performance is calculated according to the final prediction information after S7, and the detection result graph is drawn.
[0015] Further, the implementation process of S1 is as follows:
[0016] The target slice graph contains The average pixel intensity information mean of all slice graphs of each type of target is counted, and the corresponding image intensity information is represented as:
[0017] ;
[0018] wherein, is the total number of slice maps for each type of target, is the height of the target slice, is the width of the target slice, and the pixel value at the th target .
[0019] Further, the S2 implementation process is as follows:
[0020] Under the condition that the target size is and the sliding window size is , the adjacent slice overlap degree extracted needs to meet the following requirements:
[0021] ;
[0022] According to the target pixel-level prior knowledge obtained in S1, the image intensity information of the region where the current sliding window is located needs to meet:
[0023] ;
[0024] wherein, is the pixel-level prior knowledge of the class , and is the number of target classes.
[0025] Further, the S3 implementation process is as follows:
[0026] Select pixel points as initial cluster centers; assign each pixel point to the nearest cluster center;
[0027] For each data point in the data set, calculate its distance to each cluster center and assign it to the nearest cluster center; use the Euclidean distance as the distance measure, and the calculation formula is as follows:
[0028] ;
[0029] wherein, is the pixel point with position information , and is the th cluster center with position information ;
[0030] For each cluster, recalculate its cluster center; the new cluster center is all the pixels in the cluster The mean of is calculated as follows:
[0031] ;
[0032] Where, For the A set of pixels that are clustered, is the number of pixels in the set.
[0033] Furthermore, the S4 implementation process is as follows:
[0034] The obtained target prediction center points are further screened under the conditions of a given grid size and distance threshold. First, the target prediction center points are sorted by any dimension and the distance between the target prediction center points in the current grid area is calculated. The distance between each point is calculated and the distance threshold is set to divide them into a compact point set and a discrete point set. Finally, the discrete point set is retained, while the mean of the pixel position information is taken for the compact point set. The grid distance screening is used to suppress the problem of the target prediction center point positions being close to each other caused by the overlapping part of the sliding window.
[0035] Grid distance screening adjusts the target prediction center position information. The area where it is located needs to be tested to verify whether it still meets the pixel-level prior knowledge. If it does, it will be retained.
[0036] Furthermore, the S5 implementation process is as follows:
[0037] The classification network model with resnet50 as the backbone network structure needs to create a classification network and load the trained model weights in the target recognition part; according to the predicted target center position and sliding window size, the detected target slices are extracted in the panorama and sent to the classification network for recognition.
[0038] Furthermore, the S6 implementation process is as follows:
[0039] Non-maximum suppression is used to further screen the prediction boxes with overlapping parts. All prediction boxes are sorted according to the confidence of the prediction box, the detection box with the highest confidence is selected, and the prediction box with the intersection-over-union (IOU) ratio exceeding the threshold is suppressed. The IOU is calculated as follows:
[0040] ;
[0041] Where, and are two prediction boxes, Represents the target prediction box A and the target prediction box The intersection area, represents the union region of the target prediction frame A and the target prediction frame .
[0042] Further, the S7 implementation process is as follows:
[0043] The SIFT algorithm identifies the key points in the picture which are invariant to scale and rotation by establishing a DOG Gaussian difference pyramid and using Gaussian difference functions of different scales; the key points are accurately positioned according to the gradient direction information of the key points, and then the key point feature matching in two pictures is realized;
[0044] The scale space of the image is defined as a Gaussian function of varying scale and the convolution of the original image, that is:
[0045]
[0046]
[0047] In the formula, ,is the Gaussian dimension, is the image pixel position, is the scale space factor; The DOG Gaussian difference pyramid of the image is implemented as follows:
[0048]
[0049]
[0050] In the formula, is the proportional coefficient, that is, the updated spatial scale factor.
[0051] Advantages: compared with the prior art, the advantages of the present application are: on the one hand, the present application obtains the prediction target position information according to the pixel-level prior knowledge of the target in the SAR image, avoiding the time loss caused by generating target candidate regions of different sizes in the two-stage detection method; on the other hand, the classification network is trained through the slice graph of the target, the prediction target of the panoramic graph is extracted according to the pixel-level prior knowledge, and the target recognition is carried out by using the classification network, avoiding the learning of the background and position information around the target in the training process of the detection network, and improving the applicability of the detection network. BRIEF DESCRIPTION OF DRAWINGS
[0052] Figure 1 is the flowchart of the present application;
[0053] Figure 2 Fig. 1 is a schematic diagram of sliding window traversal for extracting pixel-level prior knowledge, taking the panoramic image 26ROI_final35.tif in the FAST-Vehicle dataset as an example, and giving the pixel value distribution characteristics of the target and clutter regions;
[0054] Figure 3 is a slice dataset category in the FAST-Vehicle dataset;
[0055] Figure 4 is a local region of the panoramic image in the FAST-Vehicle dataset, containing the true position and category information of the target, taking 26ROI_final35.tif as an example;
[0056] Figure 5 is the target detection result of the method proposed in the present application in 26ROI_final35.tif. DETAILED DESCRIPTION
[0057] The present application will be further described in detail below with reference to the accompanying drawings.
[0058] As shown in Fig. 1, the present application proposes a SAR target detection method that fuses pixel-level prior knowledge and template matching, mainly exploring how to use the prior knowledge that the target has strong scattering characteristics in SAR images to divide the target detection into two parts of detection and classification for implementation, and then recognizing the extracted target slice after detecting the target in the panoramic image. The specific implementation process is as follows: Figure 1 S1: According to the data set of the target slice in the SAR image, the intensity information of the target in the slice image is obtained.
[0059] Suppose that the target slice image contains
[0060] pixel points, the average pixel point intensity information mean of all target slice categories is counted, and the corresponding image intensity information can be expressed as:
[0061]
[0062] In the formula, is the total number of slice images of each target category, is the height of the target slice, is the width of the target slice, and the pixel value of the th target is .
[0063] S2: According to the strong scattering intensity characteristics of the target in the SAR image, the pixel point position information in the region where the sliding window is located that meets the intensity prior knowledge in S1 is judged by sliding window traversal of the panoramic image.
[0064] Since the randomly distributed targets can appear anywhere in the panoramic image, if a sliding window only covers a part of a target, the detection and recognition result of the target in the sliding window will be inaccurate. To solve this problem, it is necessary to ensure that any possible target in the large scene image will be completely covered by at least one sliding window. Therefore, under the condition that the size of the target is , the size of the sliding window is , and the adjacent slice overlap degree extracted needs to meet the following requirements:
[0065] ;
[0066] According to the target pixel-level prior knowledge obtained in S1, the image intensity information of the region where the current sliding window is located needs to meet:
[0067] ;
[0068] wherein is the pixel-level prior knowledge of the category , and is the number of target categories.
[0069] S3: In order to as far as possible meet the center position of the extracted target, the position information obtained in S2 is clustered by K-means to obtain the center position coordinates.
[0070] K-means clustering is to divide the input data into clusters, so that the distance between the data in each cluster is minimized, and the distance between the data in different clusters is maximized. In order to as far as possible extract the center position of the target, the pixel point position in S2 needs to be clustered to obtain the center position coordinates of the target.
[0071] Select pixel points as initial clustering centers; assign each pixel point to the nearest clustering center;
[0072] For each data point in the data set, calculate the distance between it and each clustering center, and assign it to the nearest clustering center. The Euclidean distance is usually used as the distance measure, and the calculation formula is as follows:
[0073] ;
[0074] wherein is the pixel point with position information , and is the th clustering center, and the position information of which is .
[0075] Update cluster center: for each cluster, recalculate its cluster center. The new cluster center is the mean of all pixel points in the cluster, and the calculation formula is as follows:
[0076]
[0077] In the formula, is the pixel point set of the i-th cluster, is the number of pixel points in the set.
[0078] S4: Due to the overlapping part of the adjacent sliding window when traversing the panoramic image, the target center points obtained by clustering the same target are adjacent, so the grid distance and pixel value prior knowledge are used to further screen the target center points predicted in S3.
[0079] Grid distance screening is a further screening of the target center points obtained in S3 under the condition of given grid size and distance threshold. The specific process is as follows: first, sort any dimension of the target prediction points obtained in S3, calculate the distance between the target prediction pixel points in the current grid region. By traversing the calculation of the distance between each point and according to the distance threshold, it is divided into a compact point set and a discrete point set. Finally, the discrete point set is retained, and for the compact point set, the mean value of the pixel position information is taken. Through the grid distance screening, the problem of adjacent prediction target center positions introduced by the overlapping part of the sliding window can be further suppressed.
[0080] S5: Load the trained classification network model weight, extract the predicted target in the panoramic image and send it into the classification network for recognition.
[0081] The present application divides the detection and recognition of the target into two steps. Therefore, first, the classification network needs to be trained using the target slice data set to obtain the optimal model weight. Since the classification network model used in this paper is based on the resnet50 backbone network structure, a classification network needs to be created and the trained model weight is loaded in the target recognition part. According to the predicted target center position and the size of the sliding window obtained in S4, the detected target slice is extracted in the panoramic image and sent into the classification network for recognition.
[0082] S6: Perform Non-Maximum Suppression (NMS) processing on the prediction results of the classification network in S5 to remove redundant boxes detected by the same target, and optimize the detection results;
[0083] Due to the existence of overlapping parts of some prediction boxes, further screening is needed through NMS. NMS mainly sorts all the prediction boxes according to the confidence of the prediction boxes, selects the detection box with the highest confidence, and suppresses the prediction boxes with an intersection over union (IOU) exceeding a threshold. The IOU is calculated as follows:
[0084]
[0085] wherein, and are two prediction boxes, denotes the intersection area of the target prediction box A and the target prediction box , and denotes the union area of the target prediction box A and the target prediction box .
[0086] S7: SIFT feature matching is performed on the detection results after NMS to filter out the interference of background clutter on the prediction results.
[0087] Since the pixel-level prior knowledge cannot completely filter out the trees and other strong scattering clutter in the scene, according to the rotation and scale invariance of SIFT features, templates of various targets are constructed, and the detection results obtained in S6 are further analyzed and screened.
[0088] The SIFT algorithm mainly establishes a DOG Gaussian difference pyramid, uses Gaussian difference functions of different scales to identify key points in the picture that are invariant to scale and rotation. According to the gradient direction information of the key points, the key points are accurately positioned, and then the key point feature matching in two pictures is realized.
[0089] wherein the scale space of the image is defined as a Gaussian function of varying scale and the convolution of the original image . That is:
[0090]
[0091]
[0092] wherein, , is the Gaussian dimension, is the pixel position of the image, is the scale space factor.
[0093] The DOG Gaussian difference pyramid of the image is realized as follows:
[0094]
[0095] wherein, is a proportional coefficient, is the updated spatial scale factor.
[0096] S8: Calculate the detection performance according to the final prediction information after S7 and draw a detection result map;
[0097] The working platform used in the model training and panoramic image target detection stages of the classification network is a server with a hardware configuration of NVDIA Quadro RTX6000 graphics card, and the software environment is CUDA11.0, Pytorch 1.7.1, Python 3.7.16, and Pycharm Community Edition 2021.2.2.
[0098] The FAST-Vehicle dataset collected for the vehicle target detection and recognition task contains panoramic SAR images and target slice data of 10 types of vehicle targets. Figure 3 The SAR target slices extracted in the panoramic image and the corresponding optical image are given; taking 26ROI_final35.tif as an example, the panoramic image of the FAST-Vehicle dataset is as shown in Figure 4 The specific sliding window traversal extraction pixel-level prior knowledge method is as shown in Figure 2 By analyzing the pixel value distribution frequency of the background clutter and the target region, it can be concluded that the background clutter and the target region have separability in the high pixel value interval. The specific information of the FAST-Vehicle slice dataset is shown in Table 1.
[0099] Table 1 is the class and total sample number of the FAST-Vehicle dataset
[0100]
[0101] The experimental results are evaluated from precision, recall and The precision (Precision) is the proportion of correctly detected targets to all detected targets, and the recall (Recall) is the proportion of correctly detected targets to all real labeled samples, which are defined as follows:
[0102] ,
[0103] ,
[0104] ,
[0105] wherein, , , The number of correctly detected targets, the number of non-targets marked as targets (false alarm), and the number of undetected targets (missed detection), respectively.
[0106] The resnet50 is used as a classification network structure, and optimal model weights are obtained by training a FAST-Vehicle slice data set. The July data is used as a training set, and the March data is used as a test set. The detection method is verified by using the July panoramic map. The highest is 0.8214, The highest is 0.7222, 0.6990. Part of the detection results in the July panoramic map are shown in Figure 5
[0107] As shown by the detection index and the detection result, the position and category information of the target can be better detected by the application. By observing Figure 5 Under the influence of the scattering intensity of the surrounding environment, the prior knowledge based on the pixel level and the SIFT template matching method can effectively suppress the interference of the surrounding environment on the detection result. At the same time, compared with the real position and category information of the target in the data set shown in Figure 4 The position information of the target can be more accurately identified.
[0108] The above-described embodiments only express several embodiments of the application, and the description is more specific and detailed, but it cannot be understood as a limitation on the scope of the patent. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the application, a number of modifications and improvements can be made, which belong to the protection scope of the application. Therefore, the protection scope of the patent of the application should be subject to the appended claims.
Claims
1. A SAR target detection method integrating pixel-level prior knowledge and template matching, characterized in that: The following steps are involved: S1: Based on the target slice dataset in the SAR image, the pixel-level prior knowledge of the target in the slice image is obtained; S2: Based on the strong scattering intensity characteristics of the target in the SAR image, the panoramic image is traversed through the sliding window to determine the position information in the area where the sliding window is located that meets the pixel-level prior knowledge of S1; S3: Perform K-means clustering on the location information obtained in S2 to obtain the center location coordinates; S4: To avoid the problem of the target center points of the same target being close to each other after clustering due to the overlapping of the adjacent areas of the sliding window in S2, grid distance suppression is used to filter the predicted center position coordinates in S3; S5: Load the optimal weights of the trained classification network, extract the predicted targets in the panorama, and feed them into the classification network for recognition; S6: Perform non-maximum suppression on the prediction results of the classification network in S5 to remove redundant boxes detected for similar targets and optimize the detection results; S7: Perform SIFT feature matching on the detection results after non-maximum suppression processing to filter out the interference of background clutter on the prediction results; S8: Calculate the detection performance based on the final prediction information after S7 and draw a detection result graph; The S2 implementation process is as follows: When the target size is , the sliding window size is The overlap of adjacent slices extracted under the condition of The following requirements must be met: ; According to the target pixel-level prior knowledge obtained in S1, the image intensity information of the area where the current sliding window is located Need to meet: ; in, For category Pixel-level prior knowledge, is the number of target categories, ; The S4 implementation process is as follows: The obtained target prediction center points are further screened under the conditions of a given grid size and distance threshold. First, the target prediction center points are sorted by any dimension and the distance between the target prediction center points in the current grid area is calculated. The distance between each point is calculated and the distance threshold is set to divide them into a compact point set and a discrete point set. Finally, the discrete point set is retained, while the mean of the pixel position information is taken for the compact point set. The grid distance screening is used to suppress the problem of the target prediction center point positions being close to each other caused by the overlapping part of the sliding window. Grid distance screening adjusts the target prediction center position information. The area where it is located needs to be tested to verify whether it still meets the pixel-level prior knowledge. If it does, it will be retained.
2. The SAR target detection method integrating pixel-level prior knowledge and template matching according to claim 1 is characterized in that: The S1 implementation process is as follows: The target slice contains Pixel points, statistics of the average pixel intensity information of all slices of each type of target, and the corresponding image intensity information Expressed as: ; Where, is the total number of slices for each type of target, is the height of the target slice, is the target slice width, goals The pixel value at .
3. The SAR target detection method integrating pixel-level prior knowledge and template matching according to claim 1, characterized in that: The S3 implementation process is as follows: choose Pixels are used as initial cluster centers; Assign each pixel to the nearest cluster center; For each data point in the dataset, calculate its distance to each cluster center , and assign it to the nearest cluster center; using Euclidean distance as the distance metric, the calculation formula is as follows: ; Where, The location information is Pixels, For the Cluster centers, whose location information is ; For each cluster, recalculate its cluster center; the new cluster center is all the pixels in the cluster The mean of is calculated as follows: ; Where, For the A set of pixels that are clustered, is the number of pixels in the set.
4. The SAR target detection method integrating pixel-level prior knowledge and template matching according to claim 1, characterized in that: The S5 implementation process is as follows: The classification network model with resnet50 as the backbone network structure needs to create a classification network and load the trained model weights in the target recognition part; according to the predicted target center position and sliding window size, the detected target slices are extracted in the panorama and sent to the classification network for recognition.
5. The SAR target detection method integrating pixel-level prior knowledge and template matching according to claim 1, characterized in that: The S6 implementation process is as follows: Non-maximum suppression is used to further screen the prediction boxes with overlapping parts. All prediction boxes are sorted according to the confidence of the prediction box, the detection box with the highest confidence is selected, and the prediction box with the intersection-over-union (IOU) ratio exceeding the threshold is suppressed. The IOU is calculated as follows: ; Where, and are two prediction boxes, Represents the target prediction box A and the target prediction box The intersection area, Represents the target prediction box A and the target prediction box The union area of .
6. The SAR target detection method integrating pixel-level prior knowledge and template matching according to claim 1, characterized in that: The S7 implementation process is as follows: The SIFT algorithm uses Gaussian difference functions of different scales to identify scale- and rotation-invariant key points in an image by establishing a DOG Gaussian difference pyramid. It then accurately locates the key points based on their gradient direction information, thereby matching key point features between the two images. Image scale space Defined as a Gaussian function of varying scale and the original image Convolution; that is: ; ; Where, 、 is the Gaussian dimension, is the image pixel position, is the scale space factor; The DOG Gaussian difference pyramid of the image is implemented as follows: ; Where, is the proportionality coefficient, This is the updated spatial scale factor.
Citation Information
Patent Citations
Noisy SAR image target recognition method based on wavelet denoising threshold self-learning
CN112906716A
Large infrared remote sensing image ship target detection method
CN117765232A