Remote-sensing image change detection method based on deep convolutional network
By using linear transformation and pyramid feature extraction in remote sensing image change detection, combined with superpixel block annotation and optimization algorithms, the problem of insufficient intercommunication of high-resolution image information is solved and the accuracy and precision of change detection are improved.
Patent Information
- Application Number
- PCT/CN2024/089040
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-04-25
- Filing Date
- 2024-04-22
- Publication Date
- 2024-10-31
AI Technical Summary
The existing CNN-based remote sensing image change detection method is easily affected by the "change-like unchanged" and "unchanged-like change" between the two periods of images during high-resolution image processing, resulting in insufficient information exchange and failure to achieve the required results. accuracy and precision.
By performing different linear transformations on features to characterize the similarities of different emphases, the pyramid feature extraction and linear mapping methods are used, combined with the automatic annotation method of superpixel blocks, to build a change detection model for pre-training, using the AdamW optimizer and cosine annealing The algorithm optimizes the learning rate and calculates vector inner products to obtain differential features.
It improves the accuracy and precision of change detection, reduces labor costs, reduces resource consumption, and retains multi-scale information through pyramid features, enhancing the accuracy of detection results.
Smart Images

Figure CN2024089040_31102024_PF_FP_ABST
Abstract
Description
Remote sensing image change detection method based on deep convolutional 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 deep convolutional 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 performs different linear transformations on features to characterize similarities with different emphases, thereby obtaining features with stronger expressive capabilities, which can achieve higher accuracy and precision when performing change detection.
[0007] To achieve the above technical objectives, the present invention provides a remote sensing image change detection method based on a deep convolutional network, comprising:
[0008] S1 obtains the pre-phase image and the post-phase image of the target area, and performs pre-processing and data enhancement on the pre-phase image and the post-phase image;
[0009] S2 builds a change detection model and performs pre-training. The change detection model includes a feature extraction network, a change comparison network, and an output network.
[0010] S3 performs pyramid feature extraction on the front phase image and the back phase image through the feature extraction network to obtain the first feature and the second feature;
[0011] S4 inputs the first feature and the second feature into the change comparison network, performs linear mapping on each of them, obtains a first feature vector and a second feature vector, and calculates the vector inner product of the first feature vector and the second feature vector to obtain a difference feature;
[0012] S5 inputs and outputs the difference features into the network and processes the difference features to obtain the change detection results.
[0013] In one embodiment of the present invention, step S4 includes:
[0014] S41 linearly maps the first feature and the second feature, transforming them into multiple linear spaces in pairs, to obtain multiple first eigenvectors and second eigenvectors;
[0015] S42 calculates the vector inner product of the first eigenvector and the second eigenvector in the same linear space to obtain similar features of the linear space;
[0016] S43 fuses similar features of all linear spaces to obtain difference features.
[0017] In one embodiment of the present invention, the multiple linear spaces are not identical, and the similarity feature of each linear space represents the similarity between the first eigenvector and the second eigenvector in the linear space.
[0018] In one embodiment of the present invention, when pre-training the change detection model begins, the weights are initialized to a random normal distribution with an identity matrix added thereto.
[0019] In one embodiment of the present invention, the pre-training process of the change detection model is as follows:
[0020] Obtain a dataset with real labels and divide the dataset into training samples and validation samples;
[0021] The AdamW optimizer combined with the cosine annealing algorithm is used to optimize the learning rate. The initial change detection model is trained based on the training samples to obtain the predicted labels of the training samples. The validation samples are then used to adjust the model weights until the model converges.
[0022] During the training process, a loss function is introduced to calculate the gap between the predicted label and the true label.
[0023] In one embodiment of the present invention, the true label is automatically calculated according to a labeling method, which includes:
[0024] The dataset consists of multiple image pairs from the previous and next time phases. The image bands of the image pairs are superimposed, and then the first three principal component images are extracted using the principal component analysis method. These images are then segmented into superpixels to obtain multiple superpixel blocks.
[0025] Extract features from superpixel blocks, including spectral features, texture features, and spatial features;
[0026] Taking superpixel blocks as units, the difference value of each feature is calculated. That is, for each image pair, the spectral feature difference value, texture feature difference value, and spatial feature difference value between the corresponding two superpixel blocks are calculated.
[0027] The spectral feature difference value, texture feature difference value, and spatial feature difference value are combined into a vector as the difference vector of the corresponding superpixel block. The difference vector is modulo-normalized to obtain the change value of the superpixel block. The value range is [0,1]. A threshold is set to classify the superpixel block into two categories: changed and unchanged.
[0028] The classification result of each pixel in the dataset is obtained according to the classification result of the superpixel block, which is used as the true label of the dataset.
[0029] In one embodiment of the present invention, the loss function includes:
[0030] The cross entropy loss is calculated by predicting the label and the actual label. The cross entropy loss function is used to measure the similarity between the predicted change pixels and the actual change pixels.
[0031] The Dice loss function is used to calculate the Dice loss by predicting the label and the true label. The Dice loss function is used to alleviate the problem of imbalance in the number of changed and unchanged samples in the change detection process.
[0032] Add the cross entropy loss function and the Dice loss function to get the total loss function.
[0033] In one embodiment of the present invention, step S3 includes:
[0034] The front-phase image and the back-phase image are respectively input into the feature extraction network to construct a pyramid, and multi-scale features are extracted according to the scale space of the pyramid. The first feature and the second feature are obtained after output;
[0035] Among them, the feature extraction network includes a 4*4 convolutional layer, a first residual block, a second residual block, a third residual block, and a fourth residual block. Among them, the first residual block includes 3 residual units, the second residual block includes 3 residual units, the third residual block includes 9 residual units, and the fourth residual block includes 3 residual units. Each residual unit contains a 7*7 depth separation convolution layer, a normalization layer, a 1*1 convolution layer, and an activation function layer. Shortcuts are set between the residual units for connection.
[0036] In one embodiment of the present invention, step S5 includes:
[0037] The S51 output network includes a 1*1 convolutional layer, a feature concatenation layer, and an MLP layer;
[0038] S52 adjusts the channel through a 1*1 convolution layer, resamples and concatenates the difference features, and obtains the change features;
[0039] S53 performs pixel-level change determination on the change features through MLP, and outputs the change detection result.
[0040] In one embodiment of the present invention, step S53 includes:
[0041] The range of pixel values in the change feature 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.
[0042] The beneficial effects of the present invention are:
[0043] (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.
[0044] (2) By linearly mapping the feature vectors to multiple different linear spaces to calculate the vector inner product, different vector inner products are used to represent the similarity between two feature vectors with different focuses, which can obtain more accurate similarity values and improve the accuracy of change detection.
[0045] (3) This application adopts a new labeling method based on superpixel blocks. By calculating the difference values of multiple features based on superpixel blocks, the data set is labeled according to the classification results of the superpixel blocks. The obtained true labels are highly accurate, and the labor cost is reduced, and the consumption of manpower, material resources and other resources is reduced.
[0046] (4) When the change detection model in this application begins pre-training, the weights are initialized to a random normal distribution with an identity matrix added. This setting ensures that the initial weights are reasonable. The corresponding identity matrix initialization weights are used to maintain the original spatial calculation inner product, so that the extracted features can achieve a better clustering effect for different objects. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] 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:
[0048] FIG1 is a flow chart of a method according to an embodiment of the present invention;
[0049] FIG2 is a flowchart of a technical process according to an embodiment of the present invention;
[0050] FIG3 is a diagram of training result data according to an embodiment of the present invention;
[0051] FIG4 is a processing flow chart of a feature extraction network according to an embodiment of the present invention;
[0052] FIG5 is a processing flow chart of a change comparison network according to an embodiment of the present invention;
[0053] FIG6 is a processing flow chart of an output network according to an embodiment of the present invention. DETAILED DESCRIPTION
[0054] 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.
[0055] Referring to Figures 1 and 2, the present invention provides a remote sensing image change detection method based on a deep convolutional network, comprising:
[0056] 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.
[0057] Remote sensing imaging is very susceptible to external factors such as changes in sensor attitude, satellite platform motion, earth curvature, terrain undulations, and optical system distortion, which can cause the captured remote sensing image to be distorted, offset, squeezed, stretched, and other types of geometric distortion relative to the actual ground position. Before using high-resolution remote sensing images for change detection, the remote sensing images must first be subjected to necessary and sufficient preprocessing. The preprocessing process may vary for different types of remote sensing images. The preprocessing process used in this embodiment is as follows:
[0058] 1. Orthorectification: Orthorectification is the process of correcting spatial and geometric distortions of an image to generate a multi-center projection plane orthorectified image. This implementation uses a rational polynomial coefficient model in conjunction with a digital elevation model to implement the orthorectification process.
[0059] 2. Image registration: Image registration refers to the process of matching and superimposing multi-temporal images acquired at different times, with different imaging devices, or under different acquisition conditions into a unified coordinate system.
[0060] The specific steps are as follows:
[0061] Establish a reference system; use one of the two phase images as the reference image to establish a reference coordinate system; use the other image as the image to be registered to establish a coordinate system for the image to be registered. You can choose any one of the images as the reference image.
[0062] Select tie points; extract feature points using the Forstner corner operator, filter the feature points using a fitted global transformation geometry model using a first-order polynomial, and match tie points using a cross-correlation algorithm.
[0063] Establish a transformation model; using the relationship between the connection points in the two images, the parameters of the transformation model used for image registration can be determined.
[0064] Geometric transformation and resampling: Based on the transformation model, the image to be registered is geometrically transformed and resampled to obtain the final registration result. This embodiment uses three 1*1 convolutions for resampling and a polynomial model for geometric transformation.
[0065] 3. Histogram matching: Through histogram matching, the color differences of multi-temporal remote sensing images can be corrected to reduce the impact of color on the accuracy of change detection.
[0066] 4. Contrast-limited adaptive histogram equalization: To further enhance the contrast of local images and highlight changes in local features, this embodiment uses contrast-limited adaptive histogram equalization to enhance local images. After processing, the details of the remote sensing images are clearer, the local features are more obvious, and the tones of the multi-temporal remote sensing images are more consistent.
[0067] 5. Median filtering: Median filtering is a type of statistical sorting filter that uses the median of the grayscale levels in a pixel's neighborhood to replace the pixel's value. After this processing, some abrupt details are better handled, and the local features of the ground object become smoother and more orderly.
[0068] S2 builds a change detection model and performs pre-training. The change detection model includes a feature extraction network, a change comparison network, and an output network.
[0069] Specifically, the pre-training process of the change detection model is as follows:
[0070] (1) Obtain a dataset with real labels and divide the dataset into training samples and validation samples.
[0071] In one embodiment of the present invention, after obtaining the data set, data enhancement may be performed on the data set. Data enhancement strategies include Mixup, Cutmix, RandomErasing, and the like.
[0072] In this embodiment, the true label is automatically calculated according to the labeling method.
[0073] Specifically, the annotation methods include:
[0074] The dataset consists of multiple image pairs from the previous and next time phases. The image bands of the image pairs are superimposed, and then the first three principal component images are extracted using the principal component analysis method. They are then segmented into superpixels to obtain multiple superpixel blocks.
[0075] Feature extraction is performed on superpixel blocks, including spectral features, texture features, and spatial features.
[0076] The difference value of each feature is calculated in units of superpixel blocks, that is, the spectral feature difference value, texture feature difference value, and spatial feature difference value between the corresponding two superpixel blocks are calculated for each image pair.
[0077] The spectral feature difference value, texture feature difference value, and spatial feature difference value are combined into a vector as the difference vector of the corresponding superpixel block. The difference vector is modulo and normalized to obtain the change value of the superpixel block with a value range of [0,1]. A threshold is set to classify the superpixel block into two categories: changed and unchanged.
[0078] The classification result of each pixel in the dataset is obtained according to the classification result of the superpixel block, which is used as the true label of the dataset.
[0079] This application adopts a new automatic labeling method based on superpixel blocks. By calculating the difference values of multiple features in units of superpixel blocks, the data set is labeled according to the classification results of the superpixel blocks. The obtained real labels are highly accurate, and the labor cost is reduced, and the consumption of manpower, material resources and other resources is reduced.
[0080] Let’s use a specific example to illustrate the annotation process:
[0081] The dataset contains image pairs of the previous and next phases, and the previous phase image set is denoted as {A i}, the later phase image set is recorded as {B i}, where A i and B i As a set of image pairs.
[0082] A i and B i The bands are superimposed, and the principal component analysis method is used to extract the images of the first three principal components. These principal component images are then segmented into superpixels. i and B i The segmentation method is the same as that of the previous one, and multiple super pixel blocks are obtained, among which A i The set of super pixel blocks is denoted as {A k}, B i The set of super pixel blocks is denoted as {B k}.
[0083] To {A k} and {B k} respectively perform feature extraction, the extracted features include spectral feature I, texture feature M, spatial feature N, and obtain {A k}'s spectral feature set {A k -I}, texture feature set {A k -M}, spatial feature set {A k -N}, and {B k}'s spectral feature set {B k -I}, texture feature set {B k -M}, spatial feature set {B k -N}.
[0084] Calculate {A k -I} and {B k -I}、{A k -M} and {B k -M}、{A k -N} and {B k -N}, specifically {A k -I} and {B k -I} as an example:
[0085] {A k -I} refers to the superpixel block set {A k} spectral feature set, where A k It's A i The kth superpixel block, whose spectral feature is A k -I, correspondingly, B k It's B i The kth superpixel block, whose spectral feature is B k -I, it should be clear that A k With B k are two superpixel blocks with the same position in the images of the previous and next phases. When calculating, we can calculate A k -I and B k -I's Euclidean distance to get A k With B k The spectral feature difference values between the two super-pixel blocks are obtained, and then the spectral feature difference values between other super-pixel blocks are obtained according to the Euclidean distance.
[0086] Specifically, {A k -M} and {B k -M}、{A k -N} and {B k The method of calculating the feature difference value between the two super-pixel blocks is the same as above, and the texture feature difference value and the spatial feature difference value between the two corresponding super-pixel blocks are obtained.
[0087] For every two corresponding superpixel blocks, such as A k With B k , its spectral feature difference value, texture feature difference value, and spatial feature difference value are combined into a vector to obtain A k With B k The difference vector is normalized to a value in the range [0,1] after taking the modulus, and is used as A k With B kThe change value is used to characterize the change of A k With B k Whether these two super pixel blocks have changed, the specific judgment method is: k As a reference super pixel block, determine B k Whether it changes, set a threshold, for example 0.5, if the change value is in [0,0.5), determine B k For unchanged superpixel blocks, if the change value is in [0.5, 1], it is determined that B k is the change superpixel block.
[0088] The label of each pixel is obtained according to the judgment result of the super pixel block, for example, B k is judged to be unchanged, then B k Each pixel in is marked as unchanged, that is, B k The label of the pixel set with is “unchanged”, and vice versa. After labeling all the pixels, the true label of the dataset can be obtained.
[0089] (2) Using the AdamW optimizer combined with the cosine annealing algorithm to optimize the learning rate, the initial change detection model is trained based on the training samples to obtain the predicted labels of the training samples, and the model weights are adjusted using the validation samples until the model converges;
[0090] During the training process, a loss function is introduced to calculate the gap between the predicted label and the true label.
[0091] Specifically, the loss function includes:
[0092] The cross entropy loss is calculated by predicting the label and the actual label. The cross entropy loss function is used to measure the similarity between the predicted change pixels and the actual change pixels.
[0093] The Dice loss function is used to calculate the Dice loss by predicting the label and the true label. The Dice loss function is used to alleviate the problem of imbalance in the number of changed and unchanged samples in the change detection process.
[0094] Add the cross entropy loss function and the Dice loss function to get the total loss function.
[0095] Specifically, the AdamW optimizer formula is as follows:
[0096] m t =β1×m t-1 +(1-β1)×g t
[0097] Among them, the two hyperparameters β1 and β2 are the exponential decay rates of the first-order moment estimate and the second-order moment estimate of the gradient, respectively. Its role is the distribution of weights and the influence of the square of the gradient; g t represents the gradient of the step at time t; m t and v t They are the first-order moment estimation and second-order moment estimation of the gradient respectively; t represents the time step; and They are respectively for m t and v t The paranoid correction result of θ t represents the value of the optimizer output parameter at time t; λ is the weight decay factor; η t Represents the learning rate; ε represents a very small number to prevent the denominator from being zero.
[0098] The formula of the cosine annealing algorithm is as follows:
[0099] Among them, η t is the learning rate increased at the current time t, η min is the minimum learning rate set, η max is the maximum learning rate set, T cur is the Epoch number of the current training, T max It is the maximum epoch number that is set.
[0100] The training parameters are set as follows: β1 is 0.9, β2 is 0.999, the batch size is 4096, the number of training epochs is 300, the weight decay is set to 0.05, and the learning rate decay method uses the cosine annealing algorithm with a maximum learning rate of 0.004. During training, a warmup method can be used to increase the learning rate to its maximum value, and then decay from this maximum value. The number of warmup epochs is 20, and the warmup schedule uses linear transformation to adjust the learning rate. The entire training process is forward propagation, and the training parameters are then propagated back to each node to adjust the weight parameters of each process.
[0101] In this embodiment, when pre-training the change detection model, weights are initialized to a random normal distribution with an identity matrix added. This setting ensures that the initial weights are reasonable. Initializing the weights with the identity matrix maintains the original spatial inner product, allowing the extracted features to achieve a good clustering effect for different ground objects.
[0102] During training, cross entropy loss and Dice loss are introduced to evaluate the performance of the model during training. The formula of the cross entropy loss function is:
[0103] In the formula, x represents the value after LogSoftMax operation, class represents the real category, and j represents the predicted category.
[0104] The formula for the Dice loss function is as follows:
[0105] Among them, y d represents the true label of pixel d, represents the predicted label of pixel d, and D is the total number of pixels.
[0106] The total loss function is the sum of cross entropy loss and Dice loss.
[0107] The training results are evaluated based on mF1, which 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 for F1 is as follows:
[0108] Among them, precision refers to the accuracy rate and recall refers to the recall rate.
[0109] 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.
[0110] In a specific embodiment of the present invention, the feature extraction network includes, according to the data flow, a 4*4 convolutional layer, a first residual block, a second residual block, a third residual block, and a fourth residual block. The first residual block includes 3 residual units, the second residual block includes 3 residual units, the third residual block includes 9 residual units, and the fourth residual block includes 3 residual units. Each residual unit includes a 7*7 depth separation convolutional layer, a normalization layer, a 1*1 convolutional layer, and an activation function layer. The normalization layer uses an LN layer, the activation function layer uses a GELU function, and shortcuts are set between residual units for connection. The change contrast network uses a linear mapping layer and a feature fusion layer. The output network includes 3 1*1 convolutional layers, a feature splicing layer, and an MLP layer. The training steps of the change detection model are as follows: obtaining a dataset and dividing the dataset into training samples and validation samples, wherein the ratio of the number of training samples to validation samples is 7:3, and the training samples and validation samples are both remote sensing images of two phases with true labels. The training evaluation method adopts mF1, and FIG3 shows the training result of this embodiment.
[0111] 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 accuracy is higher than that of the model in the prior art. This shows that the change detection model of the present invention can successfully use multiple linear spaces to perform linear mapping on features, and obtain feature similarities that characterize different emphases, so that features can be expressed more accurately to improve the accuracy and precision of change detection.
[0112] S3 performs pyramid feature extraction on the front phase image and the back phase image through the feature extraction network to obtain the first feature and the second feature.
[0113] Please refer to FIG4 , specifically, step S3 includes:
[0114] The front-phase image and the back-phase image are respectively input into the feature extraction network to construct a pyramid, and multi-scale features are extracted according to the scale space of the pyramid. The first feature and the second feature are obtained after output;
[0115] Among them, the feature extraction network includes a 4*4 convolutional layer, a first residual block, a second residual block, a third residual block, and a fourth residual block. Among them, the first residual block includes 3 residual units, the second residual block includes 3 residual units, the third residual block includes 9 residual units, and the fourth residual block includes 3 residual units. Each residual unit contains a 7*7 depth separation convolution layer, a normalization layer, a 1*1 convolution layer, and an activation function layer. Shortcuts are set between the residual units for connection.
[0116] In the residual unit of this embodiment, the normalization layer adopts the LN layer, the activation function layer adopts the GELU function, there is one 7*7 depth separation convolution layer, and two 1*1 convolution layers.
[0117] Optionally, in one embodiment of the present invention, feature extraction is described using the previous phase image as an example:
[0118] The previous phase image is input into the feature extraction network, and the first feature map is extracted according to the 4*4 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.
[0119] Construct a pyramid framework, 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.
[0120] 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.
[0121] The extraction process of the second feature is the same as that of the first feature and will not be repeated here.
[0122] 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 the subsequent change detection processing.
[0123] S4 inputs the first feature and the second feature into the change comparison network, performs linear mapping on them respectively, obtains the first feature vector and the second feature vector, and calculates the vector inner product of the first feature vector and the second feature vector to obtain the difference feature.
[0124] Please refer to FIG5 , specifically, step S4 includes:
[0125] S41 linearly maps the first feature and the second feature, transforming them into multiple linear spaces in pairs, to obtain multiple first eigenvectors and second eigenvectors;
[0126] S42 calculates the vector inner product of the first eigenvector and the second eigenvector in the same linear space to obtain similar features of the linear space;
[0127] S43 fuses similar features of all linear spaces to obtain difference features.
[0128] In this embodiment, the multiple linear spaces are not identical, and the similarity feature of each linear space represents the similarity between the first eigenvector and the second eigenvector in the linear space.
[0129] In a specific embodiment of the present invention, the implementation process of step S4 is as follows:
[0130] First, the first feature includes the highest level pyramid feature, the second level pyramid feature, the third level pyramid feature, the fourth level pyramid feature, and the fifth level pyramid feature, which are denoted as A1, A2, A3, A4, and A5, where A5 is the feature with the largest scale. The second feature also includes the highest level pyramid feature, the second level pyramid feature, the third level pyramid feature, the fourth level pyramid feature, and the fifth level pyramid feature, which are denoted as B1, B2, B3, B4, and B5, where B5 is the feature with the largest scale.
[0131] In this embodiment, there are three linear spaces, that is, the first feature and the second feature are mapped by linear mapping, and the dimensions of these three linear spaces are different. Among them, the first linear space maps the first feature and the second feature to a c-dimensional feature vector, the second linear space maps the first feature and the second feature to a d-dimensional feature vector, and the third linear space maps the first feature and the second feature to a c+d-dimensional feature vector, c<d, c+d is less than the original dimension of the first feature and the second feature.
[0132] In the first linear space, the inner product of the c-dimensional first eigenvector and the c-dimensional second eigenvector is calculated to obtain the first similarity feature C1.
[0133] In the second linear space, the inner product of the d-dimensional first eigenvector and the d-dimensional second eigenvector is calculated to obtain the second similarity feature C2.
[0134] In the third linear space, the inner product of the c+d-dimensional first eigenvector and the c+d-dimensional second eigenvector is calculated to obtain the third similarity feature C3.
[0135] The inner product calculation formula is as follows:
[0136] Among them, i = 1, 2, 3, 4, 5, j is the dimension of the linear space, E1 and E2 represent the tensor product of A and B, W represents the parameter of the linear mapping, h and w are the height and width of the feature map respectively, and C is the similarity feature.
[0137] The first similar feature C1, the second similar feature C2, and the third similar feature C3 are fused to form the difference feature D. D = concat (C1, C2, C3)
[0138] This application calculates the vector inner product by linearly mapping feature vectors to multiple different linear spaces. This inner product is calculated based on the number of channels, the dimension of the linear space, and other factors. By first calculating the tensor product of the pyramid features of the two images in the preceding and following time phases, and then summing this tensor product with respect to the number of channels, the inner product of the vectors between the two features in the linear space is obtained. Using different inner products to characterize the similarity between two feature vectors with different emphases can yield more precise similarity values, thereby improving the accuracy of change detection.
[0139] S5 inputs and outputs the difference features into the network and processes the difference features to obtain the change detection results.
[0140] Please refer to FIG6 , specifically, step S5 includes:
[0141] The S51 output network includes a 1*1 convolutional layer, a feature concatenation layer, and an MLP layer.
[0142] S52 adjusts the channel through the 1*1 convolution layer, resamples and concatenates the difference features, and obtains the change features. Specifically, in this embodiment, there are three 1*1 convolution layers.
[0143] S53 performs pixel-level change determination on the change features through MLP, and outputs a change detection result. Specifically, in this embodiment, the MLP layer may include three 1*1 convolutional layers.
[0144] Wherein, step S53 includes:
[0145] The pixel values in the change feature 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.
[0146] 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 deep convolutional network, characterized in that: include: S1 obtains the pre-phase image and the post-phase image of the target area, and performs pre-processing and data enhancement on the pre-phase image and the post-phase image; S2 builds a change detection model and performs pre-training. The change detection model includes a feature extraction network, a change comparison network, and an output network; 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 and the second feature; S4 inputs the first feature and the second feature into a change comparison network, performs linear mapping respectively, obtains a first feature vector and a second feature vector, and calculates the vector inner product of the first feature vector and the second feature vector to obtain a difference feature; S5 inputs the difference features into the output network and processes the difference features to obtain the change detection results.
2. The method according to claim 1, characterized in that Step S4 includes: S41 linearly maps the first feature and the second feature, transforming them into multiple linear spaces in pairs, to obtain multiple first feature vectors and second feature vectors; S42 calculates the vector inner product of the first eigenvector and the second eigenvector in the same linear space to obtain similar features of the linear space; S43 fuses similar features of all linear spaces to obtain difference features.
3. The method according to claim 2, characterized in that The multiple linear spaces are not identical, and the similarity feature of each linear space represents the similarity between the first eigenvector and the second eigenvector in the linear space.
4. The method according to claim 1, characterized in that: When pre-training the change detection model, the weights are initialized to a random normal distribution plus an identity matrix.
5. The method according to claim 1, characterized in that The pre-training process of the change detection model is as follows: Get a dataset with real labels and divide it into training samples and validation samples; The AdamW optimizer is used in combination with the cosine annealing algorithm to optimize the learning rate. The initial change detection model is trained based on the training samples to obtain the predicted labels of the training samples. The model weights are adjusted using the validation samples until the model converges. During the training process, a loss function is introduced to calculate the gap between the predicted label and the true label.
6. The method according to claim 5, characterized in that The true label is automatically calculated based on the annotation method, which includes: The dataset consists of multiple image pairs of previous and next phases. The image bands of the image pairs are superimposed, and then the first three principal component images are extracted using the principal component analysis method, and then superpixel segmentation is performed on them to obtain multiple superpixel blocks. Extract features from superpixel blocks, including spectral features, texture features, and spatial features; Taking superpixel blocks as units, the difference value of each feature is calculated, that is, the spectral feature difference value, texture feature difference value, and spatial feature difference value between the corresponding two superpixel blocks are calculated for each image pair; The spectral feature difference value, texture feature difference value, and spatial feature difference value are combined into a vector as the difference vector of the corresponding superpixel block. The difference vector is modulo and normalized to obtain the change value of the superpixel block. The value range is [0,1]. The threshold is set to classify the superpixel block into two categories: changed and unchanged. According to the classification results of the superpixel blocks, the classification results of each pixel in the dataset are obtained as the true label of the dataset.
7. The method according to claim 5, characterized in that The loss functions include: The cross entropy loss is calculated by predicting the label and the real label, where the cross entropy loss function is used to measure the similarity between the predicted change pixels and the real change pixels; The Dice loss is calculated by predicting the label and the true label. The Dice loss function is used to alleviate the problem of imbalance in the number of changed and unchanged samples in the change detection process. Add the cross entropy loss function and the Dice loss function to get the total loss function.
8. The method according to claim 1, characterized in that: Step S3 includes: The front phase image and the back phase image are respectively input into the feature extraction network to construct a pyramid, and multi-scale features are extracted according to the scale space of the pyramid, and the first feature and the second feature are obtained after output; Among them, the feature extraction network includes a 4*4 convolutional layer, a first residual block, a second residual block, a third residual block, and a fourth residual block. Among them, the first residual block includes 3 residual units, the second residual block includes 3 residual units, the third residual block includes 9 residual units, and the fourth residual block includes 3 residual units. Each residual unit contains a 7*7 depth separation convolution layer, a normalization layer, a 1*1 convolution layer, and an activation function layer. Shortcuts are set between the residual units for connection.
9. The method according to claim 2, characterized in that: Step S5 includes: The S51 output network includes a 1*1 convolutional layer, a feature concatenation layer, and an MLP layer; S52 adjusts the channel through a 1*1 convolution layer, resamples and concatenates the difference features, and obtains the change features; S53 performs pixel-level change determination on the change feature through MLP, and outputs the change detection result.
10. The method according to claim 9, characterized in that Step S53 includes: The value range of the pixel value in the change feature 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.
Citation Information
Patent Citations
Change detection method based on high-resolution remote sensing image
CN108573276A
Image change detection method, image change training method, image change detection device, image change training device and computer equipment
CN114419406A
Remote sensing image partial supervision change detection method and equipment based on contrast loss
CN115410059A
Remote sensing image change detection method based on deep convolutional network
CN116403123A
System for performing change detection within a 3D geospatial model based upon semantic change detection using deep learning and related methods
US11238307B1
Cited By
Water and soil loss monitoring and evaluating method based on remote sensing technology
CN119181025A
Remote sensing image change detection method based on deep learning
CN119295456A
Crack identification analysis method and system for building shear wall
CN119515879A
Image data processing method and device, equipment and storage medium
CN119625485A
Low-bandwidth remote monitoring method for monitoring meteorological service system and related device
CN119729003A
