SAR image change detection method, system and device based on interactive attention and median filtering and storage medium
By introducing interactive attention and median filtering technology in SAR image change detection, the problem of insufficient noise suppression and change detection accuracy is solved, and higher quality image processing and more accurate change detection are achieved.
Patent Information
- Application Number
- CN202411496472.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2044-10-25
AI Technical Summary
The existing SAR image change detection methods have shortcomings in noise suppression and change detection accuracy, especially in the case of uncertainty in the distribution of changes in salt and pepper noise pollution areas and bi-time phase images.
The SAR image change detection method based on interactive attention and median filtering is adopted, and the filter residual convolution module reduces the noise interference of salt and pepper, and the spatial interactive attention module conducts global spatial information interaction, and uses the connecting domain judgment module to remove noise to improve detection accuracy.
Effectively suppress salt and pepper noise interference, improve SAR image quality, enhance the capture ability of real changing areas, and improve the detection accuracy and consistency of results.
Smart Images

Figure CN119559495A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of SAR image processing, and in particular relates to a SAR image change detection method, system, device and storage medium based on interactive attention and median filtering. Background Art
[0002] Synthetic Aperture Radar (SAR) is an important active remote sensing technology, widely used in many fields such as earth observation, environmental monitoring, military reconnaissance and disaster assessment. Compared with optical remote sensing, the imaging principle of SAR is based on the emission and reception of microwave echoes, and it can obtain high-resolution surface information in any weather conditions (including complex environments such as clouds, haze, etc.) and during the day or at night. This all-weather and all-day imaging capability makes SAR have irreplaceable advantages in specific application scenarios, so change detection of SAR images is crucial.
[0003] Existing change detection methods include traditional methods and deep learning-based methods. Traditional methods cannot perform comprehensive feature extraction and evaluation on multiple images, and rely on the quality of the images, making them difficult to apply to real scenes. Deep learning-based methods learn the transformation features of multiple image data and ultimately generate a binary transformation detection map, which can achieve more complex transformation feature analysis.
[0004] However, in SAR image processing, noise suppression is the key to improving image quality. Among them, salt and pepper noise, as a common type of SAR image noise, will have a great negative impact on the visual effects of SAR images and subsequent analysis tasks. However, most of the current deep learning methods do not work well for areas contaminated by salt and pepper noise, which can easily cause false detection and missed detection. At the same time, due to the uncertainty of the change distribution in dual-phase images and the existence of task-irrelevant interference such as seasonal changes and building renovations, feature interaction plays an important role. However, the feature interaction mechanism is lacking in most current SAR image change detection methods, which will lead to reduced detection accuracy. Summary of the invention
[0005] The purpose of the present invention is to overcome the deficiencies in the prior art and provide a SAR image change detection method, system, device and storage medium based on interactive attention and median filtering, which effectively solves the problems of noise suppression and insufficient change detection accuracy in SAR image change detection.
[0006] The present invention provides the following technical solutions:
[0007] In a first aspect, a SAR image change detection method based on interactive attention and median filtering is provided, comprising: obtaining a target data set, which includes a first phase and a second phase; inputting the first phase and the second phase into a pre-trained SAR change detection network model to obtain a final change detection map; wherein the SAR change detection network model includes a filter residual convolution module, a spatial interactive attention module, a decoding module and a connected domain judgment module; the filter residual convolution module is used to hierarchically extract features in the first phase and the second phase to obtain output feature map pairs of each layer; a plurality of the spatial interactive attention modules are used to respectively fuse the output feature map pairs of each layer to obtain corresponding interactive fused feature maps of each layer; the decoding module is used to fuse the interactive fused feature maps of each layer, and decode the fused feature maps to obtain a coarse change detection map; the connected domain judgment module is used to remove noise in the coarse change detection map to obtain a final change detection map.
[0008] As an optional technical solution of the present invention, the filter residual convolution module includes multiple filter residual convolution layers, and the output features of each filter residual convolution layer are used as input features of the next filter residual convolution layer;
[0009] No. The output feature map pair of the filter residual convolution layer is expressed as ,in, represents the output feature map of the first phase, Represents the output feature map of the second phase.
[0010] As an optional technical solution of the present invention, the filtering residual convolution layer includes a residual convolution block, a double downsampling and a median filter block;
[0011] The residual convolution block is used to extract the features of the input features through a convolution operation to obtain a first feature; the convolution operation is expressed as:
[0012] ;
[0013] in, Indicates the output feature at pixel location , No. The pixel value of each channel, Indicates the input feature at pixel location , No. The pixel value of each channel, Indicates that the convolution kernel is in the output channel For input channels The weight of Indicates the number of channels of the input feature map, represents the convolution kernel OK, represents the convolution kernel List, ;
[0014] The double downsampling is used to reduce the spatial dimension of the first feature to obtain the second feature;
[0015] The median filter block is used to process the noise level of different regions of the second feature to obtain an output feature map pair of the current filter residual convolution layer, including:
[0016] For the pixel position of the second feature , define its local window as , expressed as:
[0017] ;
[0018] in, represents the minimum local window size, Indicates the maximum local window size, represents the adjustment factor, represents the noise level threshold, Represents the noise level of the second feature local area, expressed as:
[0019] ;
[0020] in, Indicates that the second feature is at pixel position The pixel value of Represents the pixel mean in the local window, expressed as:
[0021] .
[0022] As an optional technical solution of the present invention, The output feature map of the filter residual convolution layer is Input the convolutional layer of the spatial interaction attention module respectively, and obtain the query matrix , , key matrix , Sum Matrix , , expressed as:
[0023] , ;
[0024] , ;
[0025] , ;
[0026] Among them, Conv represents the convolution operation, Represents the total number of pixels, Indicates the number of channels of the input feature map;
[0027] Will and Superimpose to generate a fused value matrix , expressed as:
[0028] ;
[0029] Among them, concat represents the superposition operation;
[0030] For the bond matrix , Perform softmax operation in the row direction to obtain the weight distribution , , expressed as:
[0031] , ;
[0032] Among them, softmax represents the softmax operation, and dim represents the dimension of the softmax operation;
[0033] Generate attention score matrix , , expressed as:
[0034] , ;
[0035] Where T represents transpose;
[0036] For the query matrix , Perform softmax operation in the column direction and then compare it with the corresponding attention score matrix and Perform matrix multiplication to obtain Interactive fusion feature map of layers , expressed as:
[0037] , ;
[0038] ;
[0039] in, Represents adaptive adjustment parameters, and concat represents superposition operation.
[0040] As an optional technical solution of the present invention, the decoding module includes an upsampling block and a residual convolution block; the decoding module is used to fuse the interactive fusion feature maps of each layer, including:
[0041] The last layer of interactive fusion feature map Upsampling matches the previous layer interactive fusion feature map The size of the last layer after matching is interactively fused with the feature map Input the residual convolution block for feature extraction, and superimpose the extracted features on the previous layer of interactive fusion feature map , get the first fusion decoding feature ;
[0042] The first fusion decoding feature Upsampling matches the previous layer interactive fusion feature map The size of the first fusion decoded feature after matching Input the residual convolution block for feature extraction, and superimpose the extracted features on the previous layer of interactive fusion feature map , get the second fusion decoding feature ;
[0043] Iterate until the fused decoding features are obtained ;
[0044] The fused decoding features After upsampling, input the residual convolution block to obtain the predicted probability map;
[0045] An argmax operation is performed on the predicted probability map to obtain a rough change detection map.
[0046] As an optional technical solution of the present invention, the connected domain determination module removes noise in the coarse change detection graph, including:
[0047] Pixel The surrounding 8 adjacent pixels are defined as the neighborhood , expressed as:
[0048] ;
[0049] For each pixel at the edge of the connected domain in the coarse change detection map , if its neighborhood If there is only one adjacent pixel in the connected domain, and the pixels above, below, left, right, or diagonally adjacent to the adjacent pixel are not included in the connected domain, the adjacent pixel is determined to be noise and is set to 0 to eliminate the noise;
[0050] For the binary image after noise removal Mark the connected domains and assign a unique label to each connected domain , connected domain Area It is expressed as:
[0051] ;
[0052] in, Represents pixels The connected domain to which it belongs, represents the labeling matrix, Represents an indicator function, which takes a value of 1 when the condition is true and a value of 0 when it is false;
[0053] Get binary change detection map , expressed as:
[0054] ;
[0055] in, Indicates the threshold value for the area of the connected domain;
[0056] The binary change detection map The final change detection map is obtained by splicing.
[0057] In a second aspect, a SAR image change detection system based on interactive attention and median filtering is provided, comprising: a data acquisition module, for acquiring a target data set, which comprises a first time phase and a second time phase;
[0058] A detection module, configured to input the first time phase and the second time phase into a pre-trained SAR change detection network model to obtain a final change detection map;
[0059] The SAR change detection network model includes a filter residual convolution module, a spatial interaction attention module, a decoding module and a connected domain judgment module;
[0060] The filter residual convolution module is used to extract features in the first time phase and the second time phase in layers to obtain output feature map pairs of each layer;
[0061] The plurality of spatial interaction attention modules are used to fuse the output feature map pairs of each layer respectively to obtain the corresponding interactive fusion feature maps of each layer;
[0062] The decoding module is used to fuse the interactive fusion feature maps of each layer, and decode the fused feature maps to obtain a coarse change detection map;
[0063] The connected domain judgment module is used to remove noise in the rough change detection map to obtain a final change detection map.
[0064] In a third aspect, a SAR image change detection device based on interactive attention and median filtering is provided, comprising a processor and a storage medium; the storage medium is used to store instructions; the processor is used to operate according to the instructions to execute the steps of the SAR image change detection method based on interactive attention and median filtering described in the first aspect.
[0065] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the steps of the SAR image change detection method based on interactive attention and median filtering described in the first aspect are implemented.
[0066] Compared with the prior art, the present invention has the following beneficial effects:
[0067] A SAR image change detection method based on interactive attention and median filtering provided by the present invention can reduce the interference of salt and pepper noise through a filter residual convolution module and improve the quality of SAR images; through a spatial interactive attention module, the first phase and the second phase are enabled to interact with each other in global spatial information, accurately focus on the real change area, and improve the detection accuracy; through a connected domain judgment module, the accuracy and consistency of the detection results are further guaranteed. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] Figure 1 is a flow chart of a SAR image change detection method based on interactive attention and median filtering in an embodiment of the present invention;
[0069] Figure 2 is a schematic diagram of a filter residual convolution module in an embodiment of the present invention;
[0070] Figure 3 is a schematic diagram of a residual convolution block in an embodiment of the present invention;
[0071] Figure 4 is a schematic diagram of a spatial interactive attention module in an embodiment of the present invention;
[0072] Figure 5 Schematic diagram of the decision of the connected domain decision module in the embodiment of the present invention;
[0073] Figure 6 It is the final change detection diagram of the SAR dual-phase diagram in the embodiment of the present invention. DETAILED DESCRIPTION
[0074] The present invention will be further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the protection scope of the present invention.
[0075] Example 1
[0076] This embodiment provides a SAR image change detection method based on interactive attention and median filtering. Specifically, it includes the following steps:
[0077] Step 1: Obtain a target data set, which includes a first time phase and a second time phase.
[0078] Step 2: Input the first time phase and the second time phase into a pre-trained SAR change detection network model to obtain a final change detection map.
[0079] like Figure 1 As shown, the first phase img1 and the second phase img2 form an image pair As the input of the SAR change detection network model.
[0080] The SAR change detection network model includes a filter residual convolution module, a spatial interaction attention module, a decoding module and a connected domain judgment module. After the SAR change detection network model is input, the final change detection map is obtained after being processed by each module in turn. The specific processing process is as follows:
[0081] Step (1): Image pair The filter residual convolution module is input, and the filter residual convolution module is used to extract features in the first time phase and the second time phase in layers to obtain output feature map pairs of each layer.
[0082] Specifically, Figure 2 As shown, the filter residual convolution module includes multiple filter residual convolution layers, and the output features of each filter residual convolution layer are used as the input features of the next filter residual convolution layer. Two weight-shared filter residual convolution modules are input, and the first time phase img1 and the second time phase img2 are respectively used as input features of the first filter residual convolution layer. The filter residual convolution module includes 4 filter residual convolution layers.
[0083] like Figure 2 As shown, the filter residual convolution layer includes a residual convolution block, a double downsampling and a median filter block. The specific operations are as follows:
[0084] 1.1. The residual convolution block is used to extract the features of the input feature map through a convolution operation to obtain the first feature. Figure 3 As shown in the figure, the residual convolution block first extracts features through a convolution Conv, then further extracts features through normalization-nonlinear activation-convolution-normalization operations, and adds the features. The sizes of both convolution kernels are set to 3*3, and the first convolution operation expands the number of channels to twice the original. For a certain output pixel position , the convolution operation is expressed as:
[0085] ;
[0086] in, Indicates the output feature at pixel location , No. The pixel value of each channel, Indicates the input feature at pixel location , No. The pixel value of each channel, Indicates that the convolution kernel is in the output channel For input channels The weight of Indicates the number of channels of the input feature map, represents the convolution kernel OK, represents the convolution kernel List, .
[0087] 1.2. The two-fold downsampling is used to reduce the spatial dimension of the first feature to obtain the second feature. Specifically, after the residual convolution block, the first feature is subjected to a two-fold downsampling operation to reduce the spatial resolution while retaining important feature information.
[0088] 1.3. The median filter block is used to process the noise level of different regions of the second feature, and obtain the output feature map pair of the current filter residual convolution layer. Specifically, the second feature is input into the median filter block, and the noise level of different regions is processed by dynamically adjusting the window size. The median filter block of each layer effectively eliminates the noise in the SAR image. Specifically including:
[0089] For the pixel position of the second feature , define its local window as , expressed as:
[0090] ;
[0091] in, Indicates the minimum local window size, set to 3×3. Indicates the maximum local window size, which is set according to the specific SAR image change detection requirements, such as 7×7 or 9×9. Represents the adjustment factor that controls the sensitivity of the window size to changes in the noise level. represents the noise level threshold, Indicates the noise level of the second feature local area. First, select a 3×3 size and then iterate step by step. It is used to measure the noise level and is expressed as:
[0092] ;
[0093] in, Indicates that the second feature is at pixel position The pixel value of Represents the pixel mean in the local window, expressed as:
[0094] .
[0095] Furthermore, each filter residual convolution layer undergoes operations 1.1-1.3 to obtain an output feature pair. The output feature map pair of the filter residual convolution layer is expressed as ,in, represents the output feature map of the first phase, In this embodiment, the output feature map of the last three layers is extracted. , , .
[0096] Step (2), the output feature map of the last three layers extracted in step (1) is , , , respectively input into the spatial interactive attention module, strengthen the attention weight of each SAR image on another SAR image, improve the attention level of the change area, and generate interactive fusion feature maps respectively , , .
[0097] Among them, the multiple spatial interaction attention modules are used to fuse the output feature map pairs of each layer respectively to obtain the corresponding interactive fusion feature maps of each layer. In this embodiment, three spatial interaction attention modules are provided. Figure 4 As shown, the specific process is as follows:
[0098] 2.1, Chapter The output feature map of the filter residual convolution layer is Input the convolutional layer of the spatial interaction attention module respectively, and obtain the query matrix , , key matrix , Sum Matrix , , expressed as:
[0099] , ;
[0100] , ;
[0101] , ;
[0102] Among them, Conv represents the convolution operation, Represents the total number of pixels, Indicates the number of channels of the input feature map.
[0103] 2.2. and Superimpose to generate a fused value matrix , expressed as:
[0104] ;
[0105] Among them, concat represents a superposition operation.
[0106] 2.3. For the bond matrix , Perform softmax operation in the row direction to obtain the weight distribution , , expressed as:
[0107] , ;
[0108] Among them, softmax represents the softmax operation, dim represents the dimension of the softmax operation,
[0109] 2.4. Generate Attention Score Matrix , , expressed as:
[0110] , ;
[0111] Where T stands for transpose.
[0112] 2.5. For the query matrix , Perform softmax operation in the column direction and then compare it with the corresponding attention score matrix and Perform matrix multiplication to obtain Interactive fusion feature map of layers , expressed as:
[0113] , ;
[0114] ;
[0115] in, Represents adaptive adjustment parameters, and concat represents superposition operation.
[0116] Step (3): Interactively fuse feature maps of different sizes , , After being upsampled and stacked step by step by the decoding module, the final change detection map is obtained through the connected domain judgment module after decoding.
[0117] The decoding module is used to fuse the interactive fusion feature maps of each layer, and decode the fused feature maps to obtain a rough change detection map. The connected domain judgment module is used to remove noise in the rough change detection map to obtain the final change detection map. The specific process is as follows:
[0118] 3.1. The decoding module includes an upsampling block and a residual convolution block.
[0119] The last layer of interactive fusion feature map Upsampling matches the previous layer interactive fusion feature map The size of the last layer after matching is interactively fused with the feature map Input the residual convolution block for feature extraction, and superimpose the extracted features on the previous layer of interactive fusion feature map , get the first fusion decoding feature ;
[0120] The first fusion decoding feature Upsampling matches the previous layer interactive fusion feature map The size of the first fusion decoded feature after matching Input the residual convolution block for feature extraction, and superimpose the extracted features on the previous layer of interactive fusion feature map , get the fusion decoding features .
[0121] 3.2. Fusion decoding features After upsampling, the residual convolution block is input to obtain a prediction probability map. The prediction probability map is subjected to an argmax operation to obtain a coarse change detection map.
[0122] Furthermore, due to The size of the original dual-phase input SAR image is , so a four-fold upsampling operation is required to generate the prediction probability map.
[0123] 3.3. The coarse change detection map is input into the connected domain decision module, which removes the false positives caused by noise through decision and obtains the final change detection map.
[0124] Pixel The surrounding 8 adjacent pixels are defined as the neighborhood , expressed as:
[0125] ;
[0126] For each pixel at the edge of the connected domain in the coarse change detection map , if its neighborhood If there is only one adjacent pixel in the connected domain, and the pixels above, below, left, right, or diagonally adjacent to the adjacent pixel are not included in the connected domain, the adjacent pixel is determined to be noise and is set to 0 to remove the noise. Figure 5 As shown in the figure, the left side is the two connected domain series graphs caused by noise, and the right side is the connected domain segmentation graph after removing the noise. It can be seen that the left and right positions of the noise in the two connected domain series graphs are not included in the connected domain, so it is judged to be noise. This step helps to eliminate the wrong connected areas caused by single-pixel connection, thereby improving the accuracy of connected domain analysis.
[0127] Furthermore, after removing the noise, the binary image Mark the connected domains and assign a unique label to each connected domain , connected domain Area It is expressed as:
[0128] ;
[0129] in, Represents pixels The connected domain to which it belongs, represents the labeling matrix, Represents an indicator function, which takes a value of 1 when the condition is true and a value of 0 when it is false. Figure 5 As shown, the two connected domains after segmentation are marked as 1 and 2 respectively.
[0130] Get binary change detection map , expressed as:
[0131] ;
[0132] in, Indicates setting threshold for connected domain area.
[0133] Further, the binary change detection map The final change detection graph is obtained by splicing. Figure 6 As shown, (a) is the final change detection map of this method on the public dataset Mexico City, and (b) is the final change detection map of this method on the public dataset Muragia.
[0134] Example 2
[0135] This example provides an experimental application of the method described in Example 1.
[0136] The environment used in this experiment is: Python3.9, NVIDIA RTX 3090 GPU, video memory is 24G, and the model is implemented in PyTorch. The comparative experiments include FC-EF, FC-SiamDi, FC-SiamConc and SNUNet. Five evaluation indicators are used to evaluate the final change detection results on the test set, namely: Precision, Recall, F1 score, Overall Accuracy and Kappa Overall Accuracy. The experimental results are shown in Table 1:
[0137] Table 1 Experimental results
[0138] Accuracy Recall F1 score Overall accuracy Kappa overall accuracy FC-EF 0.86890 0.86880 0.86890 0.98432 0.86311 FC-SiamDi 0.86980 0.90730 0.88820 0.99080 0.8810 FC-SiamConc 0.86780 0.90150 0.88430 0.99050 0.87710 SNUNet 0.92700 0.97150 0.94870 0.98800 0.94070 This method 0.97851 0.97681 0.97766 0.99706 0.97611
[0139] It can be seen from the experimental results that various indicators of the method of the present invention are higher than those of other methods.
[0140] Compared with FC-EF, its precision, recall and F1 scores are 0.86890, 0.86880 and 0.86890 respectively, while the method of the present invention reaches 0.97851, 0.97681 and 0.97766 respectively in these indicators, indicating that the method of the present invention can not only identify the changed area more accurately, but also effectively reduce the false detection phenomenon. In addition, compared with FC-SiamDi and FC-SiamConc, which perform relatively well, the method of the present invention also has a significant improvement in recall and F1 scores. The F1 score of FC-SiamDi is 0.88820, the F1 score of FC-SiamConc is 0.88430, and the method of the present invention reaches 0.97766, proving that it is superior to these methods in comprehensive performance. Compared with SNUNet, the method of the present invention performs better in precision and F1 score. Although the recall rate of SNUNet reaches 0.97150, which is close to 0.97681 of the method of the present invention, the precision and F1 score are 0.92700 and 0.94870 respectively, which are lower than the method of the present invention, indicating that the method of the present invention can more comprehensively improve the overall accuracy of the change detection task.
[0141] The above results show that under the same conditions, this method uses median filtering to suppress salt and pepper noise interference and spatial interactive attention to improve the capture of real change areas, and further enhances the change detection results through connected domain judgment. Compared with other methods, this method shows the advantages of the present invention in SAR change detection.
[0142] Example 3
[0143] This embodiment provides a SAR image change detection system based on interactive attention and median filtering, including:
[0144] The data acquisition module is used to acquire a target data set, which includes a first time phase and a second time phase.
[0145] The detection module is used to input the first time phase and the second time phase into a pre-trained SAR change detection network model to obtain a final change detection map.
[0146] Among them, the SAR change detection network model includes a filter residual convolution module, a spatial interaction attention module, a decoding module and a connected domain judgment module.
[0147] The filter residual convolution module is used to extract features in the first time phase and the second time phase in layers to obtain output feature map pairs of each layer.
[0148] The multiple spatial interaction attention modules are used to fuse the output feature map pairs of each layer respectively to obtain the corresponding interactive fusion feature maps of each layer.
[0149] The decoding module is used to fuse the interactive fusion feature maps of each layer, and decode the fused feature maps to obtain a coarse change detection map.
[0150] The connected domain judgment module is used to remove noise in the rough change detection map to obtain a final change detection map.
[0151] Example 4
[0152] This embodiment provides a SAR image change detection device based on interactive attention and median filtering, including a processor and a storage medium; the storage medium is used to store instructions; the processor is used to operate according to the instructions to execute the steps of the SAR image change detection method based on interactive attention and median filtering described in Example 1.
[0153] Example 5
[0154] This embodiment provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the SAR image change detection method based on interactive attention and median filtering described in Embodiment 1 are implemented.
[0155] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0156] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0157] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0158] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0159] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A SAR image change detection method based on interactive attention and median filtering, characterized in that: include: Acquire a target data set, which includes a first phase and a second phase; Inputting the first time phase and the second time phase into a pre-trained SAR change detection network model to obtain a final change detection map; The SAR change detection network model includes a filter residual convolution module, a spatial interaction attention module, a decoding module and a connected domain judgment module; The filter residual convolution module is used to extract features in the first time phase and the second time phase in layers to obtain output feature map pairs of each layer; The plurality of spatial interaction attention modules are used to fuse the output feature map pairs of each layer respectively to obtain the corresponding interactive fusion feature maps of each layer; The decoding module is used to fuse the interactive fusion feature maps of each layer, and decode the fused feature maps to obtain a coarse change detection map; The connected domain judgment module is used to remove noise in the rough change detection map to obtain a final change detection map.
2. The SAR image change detection method based on interactive attention and median filtering according to claim 1, characterized in that: The filter residual convolution module includes a plurality of filter residual convolution layers, and the output features of each filter residual convolution layer are used as input features of the next filter residual convolution layer; No. The output feature map pair of the filter residual convolution layer is expressed as ,in, represents the output feature map of the first phase, Represents the output feature map of the second phase.
3. The SAR image change detection method based on interactive attention and median filtering according to claim 2, characterized in that: The filtering residual convolution layer includes a residual convolution block, a double downsampling and a median filter block; The residual convolution block is used to extract the features of the input features through a convolution operation to obtain a first feature; the convolution operation is expressed as: ; in, Indicates the output feature at pixel location , No. The pixel value of each channel, Indicates the input feature at pixel location , No. The pixel value of each channel, Indicates that the convolution kernel is in the output channel For input channels The weight of Indicates the number of channels of the input feature map, represents the convolution kernel OK, represents the convolution kernel List, ; The double downsampling is used to reduce the spatial dimension of the first feature to obtain the second feature; The median filter block is used to process the noise level of different regions of the second feature to obtain an output feature map pair of the current filter residual convolution layer, including: For the pixel position of the second feature , define its local window as , expressed as: ; in, represents the minimum local window size, Indicates the maximum local window size, represents the adjustment factor, represents the noise level threshold, Represents the noise level of the second feature local area, expressed as: ; in, Indicates that the second feature is at pixel position The pixel value of Represents the pixel mean in the local window, expressed as: 。 4. The SAR image change detection method based on interactive attention and median filtering according to claim 2, characterized in that: No. The output feature map of the filter residual convolution layer is Input the convolutional layer of the spatial interaction attention module respectively, and obtain the query matrix , , key matrix , Sum Matrix , , expressed as: , ; , ; , ; Among them, Conv represents the convolution operation, Represents the total number of pixels, Indicates the number of channels of the input feature map; Will and Superimpose to generate a fused value matrix , expressed as: ; Among them, concat represents the superposition operation; For the bond matrix , Perform softmax operation in the row direction to obtain the weight distribution , , expressed as: , ; Among them, softmax represents the softmax operation, and dim represents the dimension of the softmax operation; Generate attention score matrix , , expressed as: , ; Where T represents transpose; For the query matrix , Perform softmax operation in the column direction and then compare it with the corresponding attention score matrix and Perform matrix multiplication to obtain Interactive fusion feature map of layers , expressed as: , ; ; in, Represents the adaptive adjustment parameters, and concat represents the superposition operation.
5. The SAR image change detection method based on interactive attention and median filtering according to claim 1, characterized in that: The decoding module includes an upsampling block and a residual convolution block; the decoding module is used to fuse the interactive fusion feature maps of each layer, including: The last layer of interactive fusion feature map Upsampling matches the previous layer interactive fusion feature map The size of the last layer after matching is interactively fused with the feature map Input the residual convolution block for feature extraction, and superimpose the extracted features on the previous layer of interactive fusion feature map , get the first fusion decoding feature ; The first fusion decoding feature Upsampling matches the previous layer interactive fusion feature map The size of the first fusion decoded feature after matching Input the residual convolution block for feature extraction, and superimpose the extracted features on the previous layer of interactive fusion feature map , get the second fusion decoding feature ; Iterate until the fused decoding features are obtained ; The fused decoding features After upsampling, input the residual convolution block to obtain the predicted probability map; An argmax operation is performed on the predicted probability map to obtain a rough change detection map.
6. The SAR image change detection method based on interactive attention and median filtering according to claim 1, characterized in that: The connected domain judgment module removes noise in the coarse change detection graph, including: Pixel The surrounding 8 adjacent pixels are defined as the neighborhood , expressed as: ; For each pixel at the edge of the connected domain in the coarse change detection map , if its neighborhood If there is only one adjacent pixel in the connected domain, and the pixels above, below, left, right, or diagonally adjacent to the adjacent pixel are not included in the connected domain, the adjacent pixel is determined to be noise and is set to 0 to eliminate the noise; For the binary image after noise removal Mark the connected domains and assign a unique label to each connected domain , connected domain Area It is expressed as: ; in, Represents pixels The connected domain to which it belongs, represents the labeling matrix, Represents an indicator function, which takes a value of 1 when the condition is true and a value of 0 when it is false; Get binary change detection map , expressed as: ; in, Indicates the threshold value for the area of the connected domain; The binary change detection map The final change detection map is obtained by splicing.
7. A SAR image change detection system based on interactive attention and median filtering, characterized in that: include: A data acquisition module, used for acquiring a target data set, which includes a first time phase and a second time phase; A detection module, configured to input the first time phase and the second time phase into a pre-trained SAR change detection network model to obtain a final change detection map; The SAR change detection network model includes a filter residual convolution module, a spatial interaction attention module, a decoding module and a connected domain judgment module; The filter residual convolution module is used to extract features in the first time phase and the second time phase in layers to obtain output feature map pairs of each layer; The plurality of spatial interaction attention modules are used to fuse the output feature map pairs of each layer respectively to obtain the corresponding interactive fusion feature maps of each layer; The decoding module is used to fuse the interactive fusion feature maps of each layer, and decode the fused feature maps to obtain a coarse change detection map; The connected domain judgment module is used to remove noise in the rough change detection map to obtain a final change detection map.
8. A SAR image change detection device based on interactive attention and median filtering, characterized in that: including processor and storage medium; The storage medium is used to store instructions; The processor is used to operate according to the instruction to execute the steps of the SAR image change detection method based on interactive attention and median filtering according to any one of claims 1 to 7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the SAR image change detection method based on interactive attention and median filtering described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
SAR image change detection method based on adaptive weight image fusion
CN104200471A
SAR (Synthetic Aperture Radar) image change detection method based on saliency fusion difference chart and deep learning
CN117455868A
Derivative Imaging for Subsurface Object Detection
US20170010388A1