Remote-sensing image change detection method based on siamese network
By performing pyramid feature extraction and feature fusion on remote sensing images based on the twin mirror network method, the problem of insufficient information exchange in high-resolution images is solved, the accuracy and precision of change detection are improved, and the cost of annotation is reduced.
Patent Information
- Application Number
- PCT/CN2024/088818
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-04-21
- Filing Date
- 2024-04-19
- Publication Date
- 2024-10-24
AI Technical Summary
Existing remote sensing image change detection methods are easily affected by "changes that appear unchanged" and "unchanges that appear to have changed" between two images during high-resolution image processing, resulting in insufficient information exchange and inability to effectively extract change information. Affects the accuracy and precision of detection results.
A method based on the twin mirror network is used to perform pyramid feature extraction and feature fusion on the front and rear phase images through the feature extraction network and feature refinement network, and is combined with the change contrast network to calculate the difference feature map to achieve more accurate change detection.
It improves the accuracy and precision of change detection, reduces manual annotation costs, reduces resource consumption, and ensures annotation accuracy through automatic annotation methods.
Smart Images

Figure CN2024088818_24102024_PF_FP_ABST
Abstract
Description
Remote sensing image change detection method based on twin image network Technical Field
[0001] The present invention relates to the field of change detection, and in particular to a remote sensing image change detection method based on a twin mirror network. Background Art
[0002] The Earth is constantly changing due to both natural and human factors. Identifying these changes is crucial for understanding the environment in which we live. Remote sensing change detection is the process of capturing the dynamic changes in surface objects or phenomena by observing the same area over time. Since the acquisition of multi-temporal remote sensing imagery, using remote sensing imagery to identify changes has become a key application in fields such as environmental monitoring, land management, and disaster assessment. Remote sensing imagery is characterized by wide coverage, fast revisit cycles, and high resolution. Improvements in image quality and resolution, while providing a rich data source for change detection, also place higher demands on change detection algorithms.
[0003] Change detection research began in the 1970s, with the goal of identifying interesting changes and removing interfering, irrelevant changes. In the early stages of this research, researchers used simple algebraic methods to identify change probabilities across large areas from low-resolution imagery. With increasing image resolution and advancements in machine learning, transformation, classification, and object-oriented methods have been applied. These methods have achieved promising results on low- and medium-resolution imagery, providing reliable change detection results, either semi-automatically or automatically. As image resolution increases, the image's ability to express detail increases. This, on the one hand, enhances the granularity of object recognition; on the other hand, it increases the phenomenon of identical objects with different spectra and different objects with the same spectra, leading to a large number of false detections. Therefore, robust feature extraction and change detection methods are needed to effectively extract features, detect valid changes, and suppress the interference of invalid changes. The rise of convolutional neural networks (CNNs), particularly fully convolutional neural networks, has provided a crucial tool for change detection. Numerous methods have incorporated CNNs into remote sensing image analysis and change detection, achieving results far exceeding those of traditional machine learning methods.
[0004] Existing CNN-based change detection methods can be categorized as single-stream, two-stream, and multi-model ensembles. Single-stream methods fuse two-period images or their transformations and directly utilize a single deep learning model for change detection. This approach tends to overlook the spatiotemporal information between the two periods. Two-stream methods are the most common change detection architecture and are further categorized as twin architectures, transfer learning-based architectures, and post-classification architectures. Among these, twin architecture-based methods are currently the mainstream. Since change detection often involves two or more periods, deep twin networks are the most common basic feature extraction module. However, most existing methods design change information extraction methods at the feature level, such as subtraction, concatenation, attention, and recurrent neural networks, directly exploiting the characteristics of these operations to extract changes. Simple subtraction and concatenation operations, designed to fully exploit the interrelationships between the two periods, make the algorithms susceptible to artifacts such as "change appears unchanged" and "unchanged appears changed" between the two periods. This prevents the exchange of information between the two periods, resulting in insufficient content in the mined remote sensing data and, consequently, insufficient accuracy and precision in change detection.
[0005] Summary of the Invention
[0006] In response to the above technical problems, the present invention opens up the information channels of remote sensing images of two time phases, allowing features to enhance their ability to express the content information of remote sensing images, thereby improving the accuracy of change detection.
[0007] To achieve the above technical objectives, the present invention provides a remote sensing image change detection method based on a twin mirror network, comprising:
[0008] S1 acquires a front-phase image and a back-phase image of a target area, and pre-processes the front-phase image and the back-phase image;
[0009] S2 builds a change detection model and performs pre-training. The change detection model includes a feature extraction network, a feature refinement network, and a change comparison network.
[0010] S3 performs pyramid feature extraction on the front phase image and the back phase image respectively through the feature extraction network to obtain the first feature map and the second feature map;
[0011] S4 inputs the first feature map and the second feature map into the feature refinement network in sequence.
[0012] Obtain a first refined feature map and a second refined feature map;
[0013] S5 inputs the first refined feature map and the second refined feature map into a change comparison network, calculates the difference between the first refined feature map and the second refined feature map to form a difference feature map, and processes the difference feature map to obtain a change detection result.
[0014] In one embodiment of the present invention, step S4 includes:
[0015] S41 first inputs the first feature map and then the second feature map, performs feature map fusion according to the order of the first feature map first and the second feature map last, and then performs feature refinement on the fused feature map to obtain a first refined feature map;
[0016] S42 first inputs the second feature map and then inputs the first feature map, performs feature map fusion according to the order of the second feature map in front and the first feature map in the back, and then refines the features of the fused feature map to obtain a second refined feature map.
[0017] In one embodiment of the present invention, step S3 includes:
[0018] Input the front-phase image and the back-phase image into the feature extraction network respectively, construct a pyramid, extract multi-scale features according to the scale space of the pyramid, and obtain the first feature map and the second feature map after output;
[0019] The feature extraction network includes a 7*7 convolutional layer, a maximum pooling layer, and 4 residual blocks. Each residual block includes 2 residual units, and each residual unit contains 2 3*3 convolutional layers. Shortcuts are set between the residual units for connection.
[0020] In a specific embodiment of the present invention, the extraction process of the first feature map and the second feature map is the same, and the feature extraction process is:
[0021] Input the front-phase image or the back-phase image into the feature extraction network, extract the first feature map according to the 7*7 convolutional layer, denoted as X1, and then input four residual blocks in sequence to extract four feature maps, denoted as X2, X3, X4, and X5 respectively. The scale of each feature map is different, and the scale of the feature map increases in sequence as the data flows.
[0022] Build the framework of the pyramid:
[0023] Take X5 as the highest level pyramid feature;
[0024] Upsample X5 and concatenate it with X4 to obtain the second-level pyramid features.
[0025] The second-layer pyramid features are upsampled and concatenated with X3 to obtain the third-layer pyramid features;
[0026] The third-layer pyramid features are upsampled and concatenated with X2 to obtain the fourth-layer pyramid features.
[0027] The fourth-layer pyramid features are upsampled and concatenated with X1 to obtain the fifth-layer pyramid features.
[0028] Arrange the highest-level pyramid features, the second-level pyramid features, the third-level pyramid features, the fourth-level pyramid features, and the fifth-level pyramid features in order to form a feature pyramid, that is, the first feature map or the second feature map.
[0029] In one embodiment of the present invention, step S5 includes:
[0030] The S51 change comparison network includes a feature comparison layer, a 1*1 convolutional layer, a feature splicing layer, and an MLP layer;
[0031] S52 inputs the first refined feature map and the second refined feature map into the feature comparison layer, calculates the feature difference and performs absolute value processing to obtain a difference feature map;
[0032] S53 adjusts the channel through a 1*1 convolution layer, resamples and concatenates the difference feature map, and obtains the change feature map;
[0033] S54 performs pixel-level change determination on the change feature map through MLP, and outputs a change detection result.
[0034] In one embodiment of the present invention, the pre-training process of the change detection model is as follows:
[0035] Obtain training samples, which include remote sensing images of two phases and their corresponding true labels;
[0036] The remote sensing images of the two previous and next time phases are input into the preset initial change detection model, and the predicted change feature map is output by the initial change detection model;
[0037] According to the predicted change feature map and the true label, the loss function is obtained;
[0038] Based on the loss function, the initial change detection model is trained to obtain a trained change detection model.
[0039] In a specific embodiment of the present invention, the process of obtaining the loss function according to the predicted change feature map and the true label includes:
[0040] The binary cross entropy loss is calculated by using the predicted change feature map and the true label. The binary cross entropy loss function is used to measure the similarity between the predicted change pixels and the true change pixels.
[0041] The Dice loss function is used to calculate the Dice loss between the predicted change feature map and the true label. The Dice loss function is used to alleviate the imbalance problem between changed and unchanged samples in the change detection process.
[0042] Add the binary cross entropy loss function and the Dice loss function to get the total loss function.
[0043] In one embodiment of the present invention, step S54 includes:
[0044] The range of pixel values in the change feature map is set to [0, 1], a classification threshold is set, pixels corresponding to values greater than the classification threshold are marked as changed, and pixels corresponding to values less than the classification threshold are marked as unchanged, to obtain the change detection result.
[0045] In a specific embodiment of the present invention, the true label is automatically calculated according to the labeling method.
[0046] In a specific embodiment of the present invention, the marking method includes:
[0047] Compare the spectral characteristics of the remote sensing images of the two phases to obtain the spectral characteristic difference map;
[0048] Perform superpixel segmentation on the spectral feature difference map to obtain a first segmentation result;
[0049] Taking the centroid position coordinates of each superpixel in the first segmentation result as the center of the image block and a preset size as the size of the image block, the overlap degree of each pair of image blocks between the remote sensing images of the previous and next time phases is calculated;
[0050] The true label is constructed based on each pair of image blocks between the remote sensing images of the previous and next time phases and the overlap between the image blocks.
[0051] The beneficial effects of the present invention are:
[0052] (1) Since pyramid features can retain image features at all levels, the accuracy of change detection results can be increased by extracting pyramid features for change detection.
[0053] (2) By setting up a feature refinement network in the model, the pyramid features of the two phases are input in different orders, so that the features of the two phases can exchange information to obtain more accurate feature representation and increase the accuracy of change detection results.
[0054] (3) The true labels of the training samples are obtained through automatic labeling methods, which reduces labor costs, reduces the consumption of manpower, material resources and resources, and the labeling accuracy can also be guaranteed. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Various other advantages and benefits will become apparent to those skilled in the art upon reading the detailed description of the preferred embodiment below. The accompanying drawings are for illustration purposes only and are not to be considered as limiting the present invention. The same reference symbols are used throughout the drawings to represent the same components. In the drawings:
[0056] FIG1 is a flow chart of a method according to an embodiment of the present invention;
[0057] FIG2 is a flowchart of a technical process according to an embodiment of the present invention;
[0058] FIG3 is a diagram of training result data according to the first embodiment of the present invention;
[0059] FIG4 is a diagram of training result data according to a second embodiment of the present invention;
[0060] FIG5 is a diagram of training result data according to a third embodiment of the present invention;
[0061] FIG6 is a diagram of training result data according to a fourth embodiment of the present invention;
[0062] FIG7 is a processing flow chart of a feature extraction network according to an embodiment of the present invention;
[0063] FIG8 is a schematic diagram of constructing a pyramid feature according to an embodiment of the present invention;
[0064] FIG9 is a processing flow chart of a feature refining network according to an embodiment of the present invention;
[0065] FIG10 is a processing flow chart of a change comparison network according to an embodiment of the present invention. DETAILED DESCRIPTION
[0066] The following embodiments of the present invention are described in further detail with reference to the accompanying drawings and examples. The following examples are used to illustrate the present invention but are not intended to limit the scope of the present invention.
[0067] Referring to Figures 1 and 2, the present invention provides a remote sensing image change detection method based on a twin image network, comprising:
[0068] S1 obtains a front-phase image and a back-phase image of a target area, and pre-processes the front-phase image and the back-phase image.
[0069] Specifically, in step S1, the preprocessing process includes radiation correction and alignment, wherein radiation correction is performed on the two remote sensing images to eliminate the image radiation error caused by differences in sensor sensitivity characteristics, solar altitude angle, atmospheric conditions, and terrain undulations; the specific radiation correction method is the same as the relevant existing technology and will not be repeated in the embodiments of the present invention.
[0070] After radiometric correction of the two remote sensing images, a registration operation is performed so that pixels of the same object correspond to the same spatial position. The specific registration method can be the SIFT method, and the process is as follows:
[0071] Obtain two remote sensing images of the same area at different time phases, select the same-name points on the remote sensing images, and geometrically align the remote sensing images of the two time phases so that the pixels of the remote sensing images of the two time phases correspond one to one.
[0072] S2 builds a change detection model and performs pre-training. The change detection model includes a feature extraction network, a feature refinement network, and a change comparison network.
[0073] Specifically, the pre-training process of the change detection model is as follows:
[0074] Step 1: Obtain training samples. The training samples include remote sensing images of two phases and the corresponding real labels.
[0075] In one embodiment of the present invention, the true label is automatically calculated according to the labeling method.
[0076] Specifically, the annotation methods include:
[0077] Compare the spectral characteristics of the remote sensing images of the two phases to obtain the spectral characteristic difference map;
[0078] Perform superpixel segmentation on the spectral feature difference map to obtain a first segmentation result;
[0079] Taking the centroid position coordinates of each superpixel in the first segmentation result as the center of the image block and a preset size as the size of the image block, the overlap degree of each pair of image blocks between the remote sensing images of the previous and next time phases is calculated;
[0080] The true label is constructed based on each pair of image blocks between the remote sensing images of the previous and next time phases and the overlap between the image blocks.
[0081] Let's take a specific example to illustrate:
[0082] (1) Use the change vector analysis method to compare the spectral characteristics of a pair of remote sensing images.
[0083] in, and They represent the pixel values of image I1 and image I2 in the kth band respectively; K represents the number of spectral bands; and P is the spectral feature difference map.
[0084] (2) The spectral feature difference map P is segmented into superpixels. Superpixels refer to irregular pixel blocks with certain visual significance composed of adjacent pixels with similar texture, color, brightness and other characteristics. The superpixel segmentation method can adopt a linear iterative clustering method, specifically, the segmentation scale H can be set. In this embodiment, H can be 8. The spectral feature difference map is segmented to obtain superpixels with similar spectra and spatial proximity, and the corresponding superpixel segmentation masks are obtained, that is, the first segmentation result.
[0085] (3) For each superpixel, use the segmentation mask to calculate the centroid position coordinates of the superpixel. In each of the two remote sensing images included in the remote sensing image pair, select an image block of size m×m with the centroid position as the center. Calculate the overlap of each pair of image blocks between the remote sensing image pairs. For example, if the first segmentation result includes 10 superpixels, then each remote sensing image can take 10 image blocks. Therefore, it is necessary to calculate the overlap of 10×10=100 pairs of image blocks between the remote sensing image pairs.
[0086] Specifically, the overlap degree can be calculated by calculating the intersection-over-union ratio of two image blocks, as follows:
[0087] Where x and y are two image blocks, which come from two images in a remote sensing image pair respectively; O(x, y) is the overlap of the two image blocks, and IoU represents the intersection over union (IoU) between the two image blocks.
[0088] (4) The degree of overlap is used as the category label of the two image blocks. Specifically, if the intersection-of-union (IoU) between the two image blocks is in the range [0, 0.5), then the two image blocks are considered as an image pair, and their category label is 0. If the IoU between the two image blocks is in the range [0.5, 1], then the category label of the image pair composed of the two image blocks is 0. The larger the IoU, the smaller the degree of change between the two image blocks, that is, the category label of 0 can be regarded as "unchanged", while the smaller the IoU, the greater the degree of change between the two image blocks, so the category label of 1 can be regarded as "changed". After labeling all image pairs, the training samples and their true labels are obtained.
[0089] Step 2: Input the remote sensing images of the two previous and next time phases into the preset initial change detection model, and output the predicted change feature map through the initial change detection model.
[0090] Specifically, the model can be trained based on the training samples and their true labels. During training, the model predicts a pixel-level difference change map, which contains pixel values. The range of the difference change map is [0, 1]. The larger the value, the higher the probability of change. Similarly, the range is divided into two equal parts. If the pixel value is in [0, 0.5), it means that the pixel has not changed, and the pixel is assigned a pseudo-label of 0. If the pixel value is in [0.5, 1], the pixel has changed, and the pixel is assigned a pseudo-label of 1.
[0091] Step 3: Obtain the loss function based on the predicted change feature map and the true label.
[0092] In one embodiment of the present invention, the specific method of this step is:
[0093] The cross entropy loss is calculated by using the predicted change feature map and the true label, where the cross entropy loss function is used to measure the similarity between the predicted change pixels and the true change pixels;
[0094] The Dice loss function is used to calculate the Dice loss between the predicted change feature map and the true label. The Dice loss function is used to alleviate the imbalance problem between changed and unchanged samples in the change detection process.
[0095] Add the cross entropy loss function and the Dice loss function to get the total loss function.
[0096] In another embodiment of the present invention, the loss function may also be an energy loss function.
[0097] Step 4: Based on the loss function, the initial change detection model is trained to obtain a trained change detection model.
[0098] In the above training process, the quality of model training is evaluated based on mF1. mF1 refers to the average F1 score. F1 is an indicator of model accuracy. Its maximum value is 1 and its minimum value is 0. The larger the value, the better the model. The formula of F1 is as follows:
[0099] Among them, precision refers to the accuracy rate and recall refers to the recall rate.
[0100] During training, the true labels used are of two categories, one for changes and the other for unchanged. TP refers to the number of samples whose predicted changed labels are consistent with their true labels, FP refers to the number of samples whose unchanged true labels are predicted as changed labels, and FN refers to the number of samples whose changed true labels are predicted as unchanged labels.
[0101] In a specific embodiment of the present invention, the feature extraction network includes one 7*7 convolutional layer, one maximum pooling layer, and four residual blocks according to the data flow direction, wherein each residual block includes two residual units, each residual unit contains two 3*3 convolutional layers, and shortcuts are set between adjacent residual units for connection; the feature refinement network includes three convolutional blocks, each of which includes one 3*3 convolutional layer, one BN layer, two 1*1 convolutional layers and two activation layers according to the data flow direction; the change contrast network includes a feature comparison layer, three 1*1 convolutional layers, a feature splicing layer, and an MLP layer. The training steps of the change detection model are: obtaining a training data set, dividing the training data set into training samples and verification samples, wherein the number of training samples and verification samples is 7:3, and the training samples and verification samples are both remote sensing images of two phases with real labels. The training evaluation method adopts mF1, and Figure 3 shows the training results of this embodiment.
[0102] In another specific embodiment of the present invention, the feature extraction network includes one 7*7 convolutional layer, one maximum pooling layer, and four residual blocks according to the data flow direction, wherein each residual block includes two residual units, each residual unit contains two 3*3 convolutional layers, and shortcuts are set between adjacent residual units for connection; the feature refinement network includes three convolutional blocks, each of which includes one 3*3 convolutional layer, one BN layer, four 1*1 convolutional layers, and four activation layers according to the data flow direction; the change contrast network includes a feature comparison layer, three 1*1 convolutional layers, a feature splicing layer, and an MLP layer. The training steps of the change detection model are as follows: obtain a training data set, divide the training data set into training samples and verification samples, wherein the number of training samples and verification samples is 7:3, and the training samples and verification samples are both remote sensing images of two phases with real labels. The training evaluation method adopts mF1, and its training data is shown in Figure 4.
[0103] In another specific embodiment of the present invention, the feature extraction network includes one 7*7 convolutional layer, one maximum pooling layer, and four residual blocks according to the data flow direction, wherein each residual block includes two residual units, each residual unit contains two 3*3 convolutional layers, and shortcuts are set between adjacent residual units for connection; the feature refinement network includes three convolutional blocks, each of which includes one 1*1 convolutional layer, one BN layer, two 1*1 convolutional layers, and two activation layers according to the data flow direction; the change contrast network includes a feature comparison layer, three 1*1 convolutional layers, a feature splicing layer, and an MLP layer. The training steps of the change detection model are as follows: obtain a training data set, divide the training data set into training samples and verification samples, wherein the number of training samples and verification samples is 7:3, and the training samples and verification samples are both remote sensing images of two phases with real labels. The training evaluation method adopts mF1, and its training data is shown in Figure 5.
[0104] In another specific embodiment of the present invention, the feature extraction network includes 1 7*7 convolutional layer, 1 maximum pooling layer, and 4 residual blocks according to the data flow direction, wherein the residual blocks are divided into a first residual block, a second residual block, a third residual block and a fourth residual block according to the data flow direction, the first residual block includes 3 residual units, the second residual block includes 4 residual units, the third residual block includes 6 residual units, and the fourth residual block includes 3 residual units. In all residual blocks, each residual unit includes 2 3*3 convolutional layers, and shortcuts are set between adjacent residual units for connection; the feature refinement network includes 3 convolutional blocks, each convolution block includes a 3*3 convolutional layer, a BN layer, 4 1*1 convolutional layers and 4 activation layers according to the data flow direction; the change contrast network includes a feature comparison layer, 3 1*1 convolutional layers, a feature splicing layer, and an MLP layer. The change detection model training steps are as follows: Obtain a training dataset and divide it into training samples and validation samples, with a 7:3 ratio of training samples to validation samples. Both training and validation samples are remote sensing images from two time phases with true labels. The training evaluation method uses mF1, and the training data is shown in Figure 6.
[0105] It can be seen from the data of the training results that the change detection model of the present invention has good performance, and its average accuracy has reached a relatively high level. This shows that the change detection model of the present invention can successfully utilize the feature information of the previous and next phases, and open up the channel for information flow, so that the features can be better expressed, thereby improving the accuracy and precision of change detection.
[0106] S3 performs pyramid feature extraction on the front phase image and the back phase image respectively through the feature extraction network to obtain the first feature map and the second feature map.
[0107] Please refer to FIG7 , specifically, step S3 includes:
[0108] Input the front-phase image and the back-phase image into the feature extraction network respectively, construct a pyramid, extract multi-scale features according to the scale space of the pyramid, and obtain the first feature map and the second feature map after output;
[0109] The feature extraction network includes a 7*7 convolutional layer, a maximum pooling layer, and 4 residual blocks. Each residual block includes 2 residual units, and each residual unit contains 2 3*3 convolutional layers. Shortcuts are set between the residual units for connection.
[0110] Optionally, in one embodiment of the present invention, feature extraction is described using the previous phase image as an example:
[0111] The previous phase image is input into the feature extraction network, and the first feature map is extracted according to the 7*7 convolutional layer, which is recorded as X1. Then, four residual blocks are input in sequence to extract four feature maps, which are recorded as X2, X3, X4, and X5. The scale of each feature map is different, and the scale of the feature map increases in sequence as the data flows.
[0112] Please refer to Figure 8, which shows the framework for constructing a pyramid, where X5 is the highest-level pyramid feature. X5 is upsampled and concatenated with X4 to obtain the second-level pyramid feature. The second-level pyramid feature is also upsampled and concatenated with X3 to obtain the third-level pyramid feature. The third-level pyramid feature is upsampled and concatenated with X2 to obtain the fourth-level pyramid feature. The fourth-level pyramid feature is upsampled and concatenated with X1 to obtain the fifth-level pyramid feature.
[0113] Arrange the highest-level pyramid features, the second-level pyramid features, the third-level pyramid features, the fourth-level pyramid features, and the fifth-level pyramid features in order to form a feature pyramid, namely the first feature map.
[0114] The extraction process of the second feature map is the same as that of the first feature map, and will not be repeated here.
[0115] It should be noted that the pyramid features in the present invention include both low-level features that describe detailed information and high-level features that describe semantic information. When constructing the feature pyramid, through layer-by-layer upsampling and splicing operations, the accuracy of each feature can be retained to the greatest extent, and the description content of each layer of the pyramid features can be improved, which is beneficial to subsequent refinement and fusion processing.
[0116] S4 inputs the first feature map and the second feature map into the feature refinement network in sequence to obtain a first refined feature map and a second refined feature map.
[0117] Specifically, step S4 includes:
[0118] S41 first inputs the first feature map and then the second feature map, performs feature map fusion according to the order of the first feature map first and the second feature map last, and then performs feature refinement on the fused feature map to obtain a first refined feature map;
[0119] S42 first inputs the second feature map and then inputs the first feature map, performs feature map fusion according to the order of the second feature map in front and the first feature map in the back, and then refines the features of the fused feature map to obtain a second refined feature map.
[0120] Referring to FIG9 , in one embodiment of the present invention, the feature refinement network includes multiple convolution blocks for performing convolution fusion on the feature maps. The process of obtaining the first refined feature map is as follows:
[0121] The first feature map and the second feature map are input into the feature refinement network in sequence, and features are fused at the same scale to obtain the first refined feature map. For example, the first feature map includes the highest pyramid feature, the second pyramid feature, the third pyramid feature, the fourth pyramid feature, and the fifth pyramid feature, which are denoted as A1, A2, A3, A4, and A5, where A5 is the feature of the largest scale. The second feature map also includes the highest pyramid feature, the second pyramid feature, the third pyramid feature, the fourth pyramid feature, and the fifth pyramid feature, which are denoted as B1, B2, B3, B4, and B5, where B5 is the feature of the largest scale. When fusion is performed, A1, A2, A3, A4, and A5 are placed in front, and B1, B2, B3, B4, and B5 are fused in the back. The specific method can be The features are summed up, specifically A1 and B1 are fused, A2 and B2 are fused, A3 and B3 are fused, A4 and B4 are fused, and A5 and B5 are fused to obtain the highest-level pyramid fusion feature C1, the second-level pyramid fusion feature C2, the third-level pyramid fusion feature C3, the fourth-level pyramid fusion feature C4, and the fifth-level pyramid fusion feature C5. The fusion features are smoothed and the channels are adjusted using convolution blocks to obtain refined features C′1, C′2, C′3, C′4, and C′5. The refined features are arranged from top to bottom according to the original scale to obtain the refined pyramid features, i.e., the first refined feature map.
[0122] The process of obtaining the second refined feature map is:
[0123] The second feature map and the first feature map are input into the feature refinement network in sequence, and features are fused at the same scale to obtain the second refined feature map. For example, the first feature map includes the highest pyramid feature, the second pyramid feature, the third pyramid feature, the fourth pyramid feature, and the fifth pyramid feature, which are denoted as A1, A2, A3, A4, and A5, where A5 is the feature with the largest scale. The second feature map also includes the highest pyramid feature, the second pyramid feature, the third pyramid feature, the fourth pyramid feature, and the fifth pyramid feature, which are denoted as B1, B2, B3, B4, and B5, where B5 is the feature of the largest scale; the convolution block is used to perform feature fusion, wherein B1, B2, B3, B4, and B5 are placed in front and A1, A2, A3, A4, and A5 are fused in the back. The specific method can be feature summation, specifically, B1 is fused with A1, B2 is fused with A2, B3 is fused with A3, B4 is fused with A4, and B5 is fused with A5 to obtain the highest-level pyramid fusion feature D1, the second-level pyramid fusion feature D2, the third-level pyramid fusion feature D3, the fourth-level pyramid fusion feature D4, and the fifth-level pyramid fusion feature D5, and the convolution block is used to smooth the fusion features and adjust the channels to obtain refined features D′1, D′2, D′3, D′4, and D′5, and the refined features are arranged from top to bottom according to the original scale to obtain the refined pyramid features, that is, the second refined feature map.
[0124] It should be noted that the pyramid features are refined according to different input orders, and are prioritized during fusion. This allows images of previous and subsequent phases to communicate with each other in a prioritized order, which can not only increase the semantic richness of deep features, but also enhance the detailed description of underlying features, thereby improving the ability to express the meaning of features and enhancing the accuracy of change detection.
[0125] It should be noted that the dotted lines and dashed lines with arrows in FIG9 mean that the pyramid features assist in refining the target pyramid features. For example, the highest-level pyramid fusion feature C1 is obtained by using the information contained in the highest-level pyramid feature B1 to assist the highest-level pyramid A1 in refining. The highest-level pyramid fusion feature C1 obtained is a fusion of all the information and feature content of the highest-level pyramid A1 and the covered information of the highest-level pyramid feature B1, rather than a direct fusion of the feature content of the highest-level pyramid feature B1. Therefore, feature refinement in this application is different from feature fusion. The purpose of doing this is to use the unique information in the highest-level pyramid feature B1 to allow the highest-level pyramid A1 to contain more image information, so that the highest-level pyramid A1 can achieve higher-precision feature expression and achieve the purpose of feature refinement. For the pyramid fusion features of other layers, the refining process and effect are similar to those described above.
[0126] S5 inputs the first refined feature map and the second refined feature map into a change comparison network, calculates the difference between the first refined feature map and the second refined feature map to form a difference feature map, and processes the difference feature map to obtain a change detection result.
[0127] Please refer to FIG10 , specifically, step S5 includes:
[0128] The S51 change comparison network includes a feature comparison layer, a 1*1 convolutional layer, a feature splicing layer, and an MLP layer.
[0129] S52 inputs the first refined feature map and the second refined feature map into the feature comparison layer, calculates the feature difference and performs absolute value processing to obtain a difference feature map.
[0130] S53 adjusts the channel through the 1*1 convolution layer, resamples the difference feature map and performs feature concatenation to obtain a change feature map. Specifically, in this embodiment, there are three 1*1 convolution layers.
[0131] S54 performs pixel-level change determination on the change feature map through MLP, and outputs a change detection result. Specifically, in this embodiment, the MLP layer may include three 1*1 convolutional layers.
[0132] Wherein, step S54 includes:
[0133] The pixel values in the change feature map are set to a range of [0, 1], a classification threshold is set, pixels corresponding to values greater than the classification threshold are marked as changed, and pixels corresponding to values less than the classification threshold are marked as unchanged, to obtain a change detection result. In this embodiment, the classification threshold is 0.5.
[0134] The above embodiments are only used to illustrate the present invention, and are not intended to limit the present invention. Ordinary technicians in the relevant technical field may make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, all equivalent technical solutions also fall within the scope of the present invention. The scope of patent protection of the present invention should be defined by the claims.
Claims
1. A remote sensing image change detection method based on twin image network, It is characterized in that include: S1 obtains a front-phase image and a back-phase image of a target area, and pre-processes the front-phase image and the back-phase image; S2 builds a change detection model and performs pre-training. The change detection model includes a feature extraction network, a feature refinement network, and a change comparison network; S3 performs pyramid feature extraction on the front phase image and the back phase image respectively through a feature extraction network to obtain a first feature map and a second feature map; S4 inputs the first feature map and the second feature map into the feature refining network in sequence, respectively, to obtain a first refined feature map and a second refined feature map; S5 inputs the first refined feature map and the second refined feature map into a change comparison network, calculates the difference between the first refined feature map and the second refined feature map to form a difference feature map, and processes the difference feature map to obtain a change detection result.
2. The method according to claim 1, It is characterized in that Step S4 includes: S41 first inputs the first feature map, then inputs the second feature map, fuses the feature maps in the order of the first feature map first and the second feature map second, and then refines the fused feature maps to obtain a first refined feature map; S42 first inputs the second feature map and then the first feature map, performs feature map fusion in the order of the second feature map first and the first feature map second, and then performs feature refinement on the fused feature map to obtain a second refined feature map.
3. The method according to claim 1, It is characterized in that Step S3 includes: The front phase image and the back phase image are respectively input into the feature extraction network, a pyramid is constructed, multi-scale features are extracted according to the scale space of the pyramid, and the first feature map and the second feature map are obtained after output; The feature extraction network includes a 7*7 convolutional layer, a maximum pooling layer, and 4 residual blocks. Each residual block includes 2 residual units, each residual unit contains 2 3*3 convolutional layers, and shortcuts are set between the residual units for connection.
4. The method according to claim 3, It is characterized in that The extraction process of the first feature map and the second feature map is the same, and the feature extraction process is: Input the previous phase image or the next phase image into the feature extraction network, extract the first feature map according to the 7*7 convolution layer, denoted as X1, and then input 4 residual blocks in sequence to extract 4 feature maps, denoted as X2, X3, X4, and X5, respectively. The scale of each feature map is different, and the scale of the feature map increases in sequence according to the data flow direction; Build the framework of the pyramid: Take X5 as the highest level pyramid feature; Upsample X5 and concatenate it with X4 to obtain the second-layer pyramid features. The second-layer pyramid features are upsampled and concatenated with X3 to obtain the third-layer pyramid features. The third-layer pyramid features are upsampled and concatenated with X2 to obtain the fourth-layer pyramid features. The fourth-layer pyramid features are upsampled and concatenated with X1 to obtain the fifth-layer pyramid features; The highest-level pyramid features, the second-level pyramid features, the third-level pyramid features, the fourth-level pyramid features, and the fifth-level pyramid features are arranged in order to form a feature pyramid, that is, the first feature map or the second feature map.
5. The method according to claim 2, It is characterized in that Step S5 includes: The S51 change comparison network includes a feature comparison layer, a 1*1 convolution layer, a feature concatenation layer, and an MLP layer; S52 inputs the first refined feature map and the second refined feature map into the feature comparison layer, calculates the feature difference and performs absolute value processing to obtain a difference feature map; S53 adjusts the channel through a 1*1 convolution layer, resamples and concatenates the difference feature map, and obtains the change feature map; S54 performs pixel-level change determination on the change feature map through MLP, and outputs a change detection result.
6. The method according to claim 1, It is characterized in that The pre-training process of the change detection model is as follows: Obtain training samples, which include remote sensing images of two phases and corresponding true labels; The remote sensing images of the previous and next two time phases are input into the preset initial change detection model, and the predicted change feature map is output through the initial change detection model; According to the predicted change feature map and the true label, the loss function is obtained; Based on the loss function, the initial change detection model is trained to obtain a trained change detection model.
7. The method according to claim 6, It is characterized in that According to the predicted change feature map and the true label, the process of obtaining the loss function includes: The binary cross entropy loss is calculated through the predicted change feature map and the true label, where the binary cross entropy loss function is used to measure the similarity between the predicted change pixels and the true change pixels; The Dice loss is calculated through the predicted change feature map and the true label. The Dice loss function is used to alleviate the problem of imbalance between changed and unchanged samples in the change detection process. The binary cross entropy loss function and the Dice loss function are added to obtain the total loss function.
8. The method according to claim 5, It is characterized in that Step S54 includes: The value range of the pixel values in the change feature map is set to [0,1], and the classification threshold is set. The pixels corresponding to the value range greater than the classification threshold are marked as changed, and the pixels corresponding to the value range less than the classification threshold are marked as unchanged, thereby obtaining the change detection result.
9. The method according to claim 6, It is characterized in that The true label is automatically calculated based on the annotation method.
10. The method according to claim 9, It is characterized in that The annotation methods include: Compare the spectral characteristics of the remote sensing images of the previous and next phases to obtain the spectral characteristic difference map; Performing superpixel segmentation on the spectral feature difference map to obtain a first segmentation result; Taking the centroid position coordinates of each superpixel in the first segmentation result as the center of the image block and taking a preset size as the size of the image block, calculating the overlap of each pair of image blocks between the remote sensing images of the previous and next two phases; The true label is constructed based on each pair of image blocks between the remote sensing images of the previous and next phases and the overlap between the image blocks.
Citation Information
Patent Citations
Optical remote sensing image target detection method based on FPGA heterogeneous deep learning
CN110516560A
High-resolution remote sensing image change detection method based on self-supervised learning
CN114926511A
Twin convolutional network remote sensing change detection method based on fitting XOR function
CN114926512A
Remote sensing image change detection method and system fusing regional semantics and pixel features
CN115331087A
High-resolution optical remote sensing image building change detection method
CN115471467A
Cited By
Remote sensing image water body change detection method and device, electronic equipment and storage medium
CN119181024A
Change detection method based on semantic prior and fusion space positioning
CN119478542A
Remote sensing image change detection method based on FPGA
CN119478685A
Building semantic change detection method for unmanned aerial vehicle image
CN119851119A
Hyperspectral remote sensing image change detection method and system based on multi-temporal unmixing
CN119851144A
