A gradient difference enhanced farmland remote sensing change detection method and device
By introducing a feature refinement perception module, a gradient difference enhancement module, and a context-aware aggregation module into the CAGDE-CD model for farmland remote sensing change detection, the problems of false changes, missed detections, and unclear boundaries are solved, and high-precision farmland change detection is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HUAZHONG NORMAL UNIV
- Filing Date
- 2026-05-22
- Publication Date
- 2026-06-19
Smart Images

Figure CN122244695A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of remote sensing image farmland change detection technology, and in particular to a method and device for detecting farmland remote sensing changes with gradient difference enhancement. Background Technology
[0002] Remote sensing technology plays a crucial role in detecting farmland changes due to its advantages such as large coverage area and high timeliness. Traditional methods for detecting farmland changes using remote sensing include visual interpretation, comparative analysis, change vector analysis, and principal component analysis. These methods require sophisticated image preprocessing, such as threshold segmentation, and rely heavily on manual intervention, making them prone to significant errors. The detection results suffer from serious problems such as false changes and missed detections, failing to obtain accurate information on farmland changes.
[0003] Deep learning provides an end-to-end detection method that can automatically learn multi-level features of images, reducing manual intervention and improving detection efficiency and accuracy. Deep learning methods, represented by convolutional neural networks, have been widely used in the field of change detection. However, existing deep learning-based methods for detecting farmland change still have limitations: on the one hand, farmland with different planting types and phenological stages has significant differences in spectral features and textures, leading to false changes in the detection results; on the other hand, farmland has similar features to certain background features (such as forests, grasslands, and bare land), leading to missed detections; in addition, although high-resolution remote sensing images have rich detailed features of ground features, containing clearer spatial relationships and more complex spectral feature information, as the change detection network deepens, the detailed features and spatial information contained in the shallow layers of the network are easily lost or weakened during the layer-by-layer transmission process. To a certain extent, this can lead to problems such as missed detection of small target changes, inaccurate boundaries of change areas, and holes inside change areas, posing challenges to the accurate detection of farmland change. Context-aware aggregation refers to the fusion of features by fully utilizing multi-scale features and spatial context information, enabling the simultaneous capture of both large-scale macroscopic changes and small-scale detailed changes. Gradient difference enhancement, on the other hand, highlights change information by progressively refining the differences between dual-temporal features. Therefore, integrating context-aware aggregation and gradient difference enhancement allows for a more comprehensive extraction and fusion of change features, thereby improving the completeness and accuracy of farmland change detection results. Summary of the Invention
[0004] The purpose of this invention is to address the aforementioned problems in existing technologies by providing a gradient difference enhancement method and device for detecting changes in cultivated land remote sensing. This solves problems such as false changes, missed detections, unclear boundaries of changed areas, and internal voids in cultivated land change detection. By introducing a feature refinement perception module into the encoder to enhance multi-scale feature extraction capabilities, designing a gradient difference enhancement module in the decoder to highlight change features, and combining this with a context-aware aggregation module to retain detailed information, the model can simultaneously capture complete changed areas and subtle changes, accurately detecting cultivated land changes even in areas with complex agricultural landscapes and diverse cultivated land types.
[0005] The above-mentioned objective of this invention is achieved through the following technical solution:
[0006] A method for detecting changes in cultivated land using remote sensing with enhanced gradient difference includes the following steps:
[0007] Step 1: Acquire dual-temporal remote sensing images of the study area, which include both pre-contemporal and post-contemporal images;
[0008] Step 2: Generate sample pairs and corresponding real farmland change label maps based on dual-temporal remote sensing images, and further construct training sets, test sets and validation sets;
[0009] Step 3: Construct the CAGDE-CD model, which includes a twin encoder and a decoder.
[0010] The twin encoder includes a first encoder and a second encoder. Both the first encoder and the second encoder include, in sequence, a first CBR module, a second CBR module, a first-level feature refinement perception module, a max-pooling layer, a first residual block, a second-level feature refinement perception module, a second residual block, a third-level feature refinement perception module, a third residual block, and a fourth-level feature refinement perception module.
[0011] The decoder includes upsampling modules that correspond one-to-one with the feature refinement perception modules. Each upsampling module includes gradient difference enhancement module A, gradient difference enhancement module B, and a context-aware aggregation module.
[0012] Construct the loss function for the CAGDE-CD model;
[0013] Step 4: Train the CAGDE-CD model based on the training set;
[0014] Step 5: Input the predicted dual-temporal remote sensing images into the trained CAGDE-CD model to obtain the corresponding change detection result map.
[0015] As described above, the earlier image T1 and the later image T2 of the dual-temporal remote sensing imagery are used as the first input feature X1 and the second input feature X2, respectively.
[0016] The first input feature X1 and the second input feature X2 are respectively input into the first encoder and the second encoder of the twin encoder.
[0017] The output features of the first-level feature refinement perception module, the second-level feature refinement perception module, the third-level feature refinement perception module, and the fourth-level feature refinement perception module of the first encoder are respectively the first-level feature F1, the second-level feature F2, the third-level feature F3, and the fourth-level feature F4.
[0018] The output features of the first-level feature refinement perception module, the second-level feature refinement perception module, the third-level feature refinement perception module, and the fourth-level feature refinement perception module of the second encoder are respectively the first-level feature f1, the second-level feature f2, the third-level feature f3, and the fourth-level feature f4.
[0019] As described above, the first-level feature refinement perception module, the second-level feature refinement perception module, the third-level feature refinement perception module, and the fourth-level feature refinement perception module all include a first 3×3 depthwise separable convolution, a first 1×1 depthwise separable convolution, a first SE module, a first 1×1 convolution, a second 3×3 depthwise separable convolution, a second 1×1 convolution, a third 3×3 depthwise separable convolution, a second 1×1 depthwise separable convolution, and a second SE module.
[0020] Define the input features Ff of the first-level feature refinement perception module, the second-level feature refinement perception module, the third-level feature refinement perception module, and the fourth-level feature refinement perception module. i ,
[0021] Input features Ff i The first depthwise separable convolutional features and the second depthwise separable convolutional features are obtained by parallel operations of the first 3×3 depthwise separable convolution and the first 1×1 depthwise separable convolution, respectively.
[0022] Input features Ff i The first depthwise separable convolutional features and the second depthwise separable convolutional features are added element-wise to obtain the feature Ff. i 1,
[0023] Feature Ff i The feature Ff is obtained by sequentially processing the data through a first SE module, a first 1×1 convolution, a second 3×3 depthwise separable convolution, and a second 1×1 convolution. i se1',
[0024] Feature Ff i se1' inputs a third 3×3 depthwise separable convolution and a second 1×1 depthwise separable convolution, respectively, and features Ff i The output features of se1', the third 3×3 depthwise separable convolution, and the second 1×1 depthwise separable convolution are added together to obtain feature Ff. i 2,
[0025] Feature Ff i 2. Input the second SE module, and the second SE module outputs the feature Ff. i se2,
[0026] Input features Ff i With feature Ff i The output feature Ff is obtained by adding se2 element by element. i '.
[0027] As described above, the upsampling module includes a 4-level upsampling module, a 3rd-level upsampling module, a 2nd-level upsampling module, and a 1st-level upsampling module. The 4th-level, 3rd-level, 2nd-level, and 1st-level upsampling modules all include a gradient difference enhancement module A, a gradient difference enhancement module B, and a context-aware aggregation module.
[0028] The first input feature X of the gradient difference enhancement module A of the i-th level upsampling module 11 Second input feature X 12 Features F i and feature f i Let i = 1, 2, 3, 4, and X be the first input feature X of the context-aware aggregation module of the i-th level upsampling module. 11 Second input feature X 12 Features F i and feature f i i = 1, 2, 3, 4, feature F i and feature f i As the bi-temporal feature map of the i-th level,
[0029] When i takes the value of 1, 2, or 3: the output feature of gradient difference enhancement module A of the i-th level upsampling module and the output feature of gradient difference enhancement module A of the (i+1)-th level upsampling module are superimposed as the first input feature X of gradient difference enhancement module B of the i-th level upsampling module. 11 The second input feature X of the gradient difference enhancement module B of the i-th level upsampling module 12The output features of the context-aware aggregation module of the (i+1)th level upsampling module, and the output features of the gradient difference enhancement module B of the i-th level upsampling module, serve as the third input features of the context-aware aggregation module of the i-th level upsampling module.
[0030] When i is 4: the output feature of gradient difference enhancement module A of the 4th level upsampling module is used as the first input feature X of gradient difference enhancement module B of the 4th level upsampling module. 11 The superimposed features of features F4 and f4 serve as the second input feature X of the gradient difference enhancement module B of the fourth-level upsampling module. 12 The output features of the gradient difference enhancement module B of the fourth-level upsampling module are used as the third input features of the context-aware aggregation module of the fourth-level upsampling module.
[0031] The output features of the context-aware aggregation module of the first-level upsampling module are processed by a 1×1 convolutional layer and a Softmax function to output a probability distribution map. The probability distribution map is then processed by the Argmax function to output the final change detection result map.
[0032] In gradient difference enhancement module A and gradient difference enhancement module B, the first input feature X 11 Second input feature X 12 Perform the following steps:
[0033] First input feature X 11 Second input feature X 12 Perform a connection operation along the channel dimension to obtain combined features;
[0034] The combined features are processed sequentially through an average pooling layer, a 1×1 convolutional layer, a batch normalization layer, a ReLU activation function, and another 1×1 convolutional layer to obtain channel recovery combined features.
[0035] The channel recovery combined features are divided into early features and late features according to the channel order. The early features and late features are respectively input into the Sigmoid activation function to obtain the early attention weight and the late attention weight.
[0036] The initial attention weights and the first input feature X are combined. 11 The features obtained by element-wise multiplication are then multiplied by the first input feature X. 11 The first enhanced feature map is obtained by element-wise addition, and the subsequent attention weights are used for the second input feature X. 12 The features obtained by element-wise multiplication are then multiplied by the second input feature X. 12 The second enhanced feature map is obtained by adding elements one by one.
[0037] The first and second enhanced feature maps are fused to obtain a fused feature map.
[0038] The fused feature map is sequentially passed through a 1×1 convolution, batch normalization, a first ReLU activation function, a 1×1 convolution, and a second ReLU activation function to obtain the output features.
[0039] As mentioned above, in the context-aware aggregation module,
[0040] First input feature X 21 Second input feature X 22 and the third input feature F T Stitch along the channel dimension;
[0041] The concatenated features are then subjected to dimensionality reduction through a convolutional layer with a kernel size of 1×1 to obtain the dimensionality-reduced features.
[0042] The reduced features and the first input feature X 21 Second input feature X 22 and the third input feature F T Perform element-wise addition to obtain the addition characteristics;
[0043] Input the summation features into the residual block;
[0044] Output characteristics and third input characteristics F of the residual block T The features obtained by performing the addition operation are then processed through a convolutional layer with a kernel size of 3×3;
[0045] The output features of a 3×3 convolutional layer are upsampled through an upsampling unit to obtain the output features.
[0046] In the residual block as described above:
[0047] The additive features are processed by a convolutional layer with a kernel size of 3×3 to obtain the spatial features of the local region;
[0048] The local spatial features are added to the summative features to obtain a more refined feature map;
[0049] The refined feature map is processed by the ReLU activation function to obtain the output features of the residual block.
[0050] The loss function of the CAGDE-CD model is based on the following formula:
[0051] ,
[0052] In the formula, This represents the cross-entropy loss function of the CAGDE-CD model. The pixel values representing the actual changes in arable land in the label map. Represents the pixel probability value of the probability distribution map.
[0053] A computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the above-described gradient difference-enhanced remote sensing change detection method for cultivated land.
[0054] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described gradient difference-enhanced remote sensing change detection method for cultivated land.
[0055] Compared with the prior art, the present invention has the following main advantages:
[0056] This invention addresses problems in farmland change detection such as false changes, missed detections, unclear boundaries of changed areas, and internal voids. More importantly, this method not only accurately detects the boundaries of changed areas but also enhances the completeness of the change detection results, significantly improving detection accuracy and exhibiting good robustness. Attached Figure Description
[0057] Figure 1 This is a structural diagram of the CAGDE-CD model of the present invention.
[0058] Figure 2 This is a structural diagram of the feature refinement perception module.
[0059] Figure 3 This is a structural diagram of the gradient difference enhancement module.
[0060] Figure 4 This is a structural diagram of the context-aware aggregation module.
[0061] Figure 5 This is a display of the results of farmland change detection by various models for the early and late images of the first instance. Among them, (a1) and (a2) are the first instance of the early and late images, respectively. (a3) is the label map of the real farmland change corresponding to the first instance. (a4), (a5), (a6), (a7), (a8) and (a9) are the change detection results predicted by the FC-Siam-conc model, FC-Siam-diff model, BIT model, DTCDSCN model, MSCANet model and the GDEFA-CD model of this invention, respectively, for the first instance.
[0062] Figure 6This is a display of the results of farmland change detection by various models for the early and late images of the second instance. Among them, (b1) and (b2) are the early and late images of the second instance, respectively. (b3) is the label map of the actual farmland change corresponding to the second instance. (b4), (b5), (b6), (b7), (b8) and (b9) are the change detection results predicted by the FC-Siam-conc model, FC-Siam-diff model, BIT model, DTCDSCN model, MSCANet model and the GDEFA-CD model of this invention corresponding to the second instance, respectively.
[0063] Figure 7 This is a display of the results of farmland change detection by various models for the early and late images of the third instance. Among them, (c1) and (c2) are the third instance of the early and late images, respectively. (c3) is the label map of the real farmland change corresponding to the third instance. (c4), (c5), (c6), (c7), (c8) and (c9) are the change detection results predicted by the FC-Siam-conc model, FC-Siam-diff model, BIT model, DTCDSCN model, MSCANet model and the GDEFA-CD model of this invention, respectively, for the third instance.
[0064] Figure 8 This is a display of the farmland change detection results of the previous and later images of the fourth instance through various models. Among them, (d1) and (d2) are the fourth instance of the previous and later images, respectively. (d3) is the label map of the actual farmland change corresponding to the fourth instance. (d4), (d5), (d6), (d7), (d8) and (d9) are the change detection results predicted by the FC-Siam-conc model, FC-Siam-diff model, BIT model, DTCDSCN model, MSCANet model and the GDEFA-CD model of this invention, respectively, for the fourth instance.
[0065] Figure 9 This is a display of the results of farmland change detection by various models for the previous and later images of the fifth instance. Among them, (e1) and (e2) are the fifth instance of the previous and later images, respectively. (e3) is the label map of the actual farmland change corresponding to the fifth instance. (e4), (e5), (e6), (e7), (e8) and (e9) are the change detection results predicted by the FC-Siam-conc model, FC-Siam-diff model, BIT model, DTCDSCN model, MSCANet model and the GDEFA-CD model of this invention, respectively, for the fifth instance.
[0066] Figure 10This is a display of the results of farmland change detection by various models for the previous and later images of the sixth instance. Among them, (f1) and (f2) are the sixth instance of the previous and later images, respectively. (f3) is the label map of the actual farmland change corresponding to the sixth instance. (f4), (f5), (f6), (f7), (f8) and (f9) are the change detection results predicted by the FC-Siam-conc model, FC-Siam-diff model, BIT model, DTCDSCN model, MSCANet model and the GDEFA-CD model of this invention, respectively, for the sixth instance.
[0067] Figure 11 These are the ablation experiment results of the early and late images of the seventh instance. Among them, (a1) and (a2) are the early and late images of the seventh instance, respectively. (a3) is the label map of the real farmland change corresponding to the seventh instance. (a4), (a5), (a6), (a7), (a8) and (a9) are the change detection results of ablation experiment one, ablation experiment two, ablation experiment three, ablation experiment four, ablation experiment five and ablation experiment six corresponding to the seventh instance, respectively.
[0068] Figure 12 These are the ablation experiment results of the early and late images of the eighth instance. Among them, (b1) and (b2) are the early and late images of the eighth instance, respectively. (b3) is the real farmland change label map corresponding to the eighth instance. (b4), (b5), (b6), (b7), (b8) and (b9) are the change detection results of ablation experiment one, ablation experiment two, ablation experiment three, ablation experiment four, ablation experiment five and ablation experiment six corresponding to the eighth instance, respectively.
[0069] Figure 13 These are the ablation experiment results of the early and late images of the ninth instance. Among them, (c1) and (c2) are the early and late images of the ninth instance, respectively. (c3) is the label map of the real farmland change corresponding to the ninth instance. (c4), (c5), (c6), (c7), (c8) and (c9) are the change detection results of ablation experiment one, ablation experiment two, ablation experiment three, ablation experiment four, ablation experiment five and ablation experiment six corresponding to the ninth instance, respectively.
[0070] Figure 14These are the ablation experiment results of the early and late images of the tenth instance. Among them, (d1) and (d2) are the early and late images of the tenth instance, respectively. (d3) is the label map of the real farmland change corresponding to the tenth instance. (d4), (d5), (d6), (d7), (d8) and (d9) are the change detection results of ablation experiment one, ablation experiment two, ablation experiment three, ablation experiment four, ablation experiment five and ablation experiment six corresponding to the tenth instance, respectively.
[0071] Figure 15 These are the ablation experiment results of the early and late images of the eleventh instance. Among them, (e1) and (e2) are the early and late images of the eleventh instance, respectively. (e3) is the real farmland change label map corresponding to the eleventh instance. (e4), (e5), (e6), (e7), (e8) and (e9) are the change detection results of ablation experiment one, ablation experiment two, ablation experiment three, ablation experiment four, ablation experiment five and ablation experiment six corresponding to the eleventh instance, respectively.
[0072] Figure 16 These are the ablation experiment results of the early and late images of the twelfth instance. Among them, (f1) and (f2) are the twelfth instance in the early and late images, respectively. (f3) is the label map of the real farmland change corresponding to the twelfth instance. (f4), (f5), (f6), (f7), (f8) and (f9) are the change detection results of ablation experiment one, ablation experiment two, ablation experiment three, ablation experiment four, ablation experiment five and ablation experiment six corresponding to the twelfth instance, respectively.
[0073] In ablation experiment 1, the Feature Refinement Awareness Module (FRAM), Gradient Difference Enhancement Module (GDEM), and Context Awareness Aggregation Module (CAGM) were not introduced.
[0074] Ablation experiment 2 introduced a separate feature refinement sensing module, FRAM.
[0075] Ablation experiment 3 introduced a gradient difference enhancement module (GDEM) separately.
[0076] Ablation experiment four introduced both the Feature Refinement Awareness Module (FRAM) and the Gradient Difference Enhancement Module (GDEM).
[0077] Ablation experiment 5 introduced both the gradient difference enhancement module GDEM and the context-aware aggregation module CAGM.
[0078] Ablation Experiment 6 introduced the Feature Refinement Awareness Module (FRAM), Gradient Difference Enhancement Module (GDEM), and Context Awareness Aggregation Module (CAGM) simultaneously. Detailed Implementation
[0079] To facilitate understanding and implementation of the present invention by those skilled in the art, the present invention will be further described in detail below with reference to embodiments. It should be understood that the embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.
[0080] This invention addresses the problems of false changes, missed detections, unclear boundaries of changed areas, and internal voids in farmland change detection. It proposes a gradient difference enhancement method and device for farmland remote sensing change detection, achieving high-precision detection of farmland changes. The invention employs an encoder-decoder structure. A feature refinement perception module is introduced into the encoder to enhance the extraction of detailed contextual information, enabling the model to simultaneously extract coarse and fine-grained features. A gradient difference enhancement module is designed in the decoder to enhance the difference between dual-temporal features, progressively refining the change features. Simultaneously, a context-aware aggregation module is introduced to capture relevant information from multiple inputs, performing local and global feature refinement. Residual learning is used to retain important detailed information, thereby improving the farmland change detection capability.
[0081] A method for detecting changes in cultivated land using remote sensing with enhanced gradient difference includes the following steps:
[0082] Step 1: Acquire dual-temporal remote sensing images of the study area and perform data preprocessing:
[0083] High-resolution historical dual-temporal remote sensing images of the study area were acquired from Google, including an earlier image (T1) and a later image (T2). The acquired dual-temporal images were preprocessed using ENVI software, primarily including: precise registration of the images to ensure strict spatial correspondence between T1 and T2, with registration accuracy error controlled within one pixel; the preprocessed dual-temporal images were then used as input data for the CAGDE-CD model.
[0084] Step 2: Create the training and testing sets for the CAGDE-CD model:
[0085] Based on the preprocessed dual-temporal remote sensing images from step 1, areas of farmland change are labeled, and training and testing sets for the CAGDE-CD model are created. The specific steps include:
[0086] Step 21: Based on the preprocessed dual-temporal remote sensing images from Step 1, create a new polygon vector layer using ArcGIS software, set a spatial reference consistent with the dual-temporal remote sensing images, and determine the vector data of the change areas of cultivated land in the previous image T1 and the later image T2. The types of change areas include cultivated land and forest land, cultivated land and buildings, cultivated land and water bodies, cultivated land and roads, and the mutual conversion areas between cultivated land and hardened surfaces.
[0087] As a preferred approach, the vector data of the changed areas drawn in step 21 can be cross-checked and reviewed to screen out the vector data of the changed areas with incorrect or missing labels and make corrections. In particular, the vector data of the changed areas with complex or unclear boundaries should be checked in detail to ensure that the labels of the changed areas are correct.
[0088] Step 22: Based on the acquired vector data of the changed areas, use the vector-to-raster tool in ArcGIS software to convert the vector data of the changed areas into a black and white binary map. The changed areas are white (pixel value 1), and the unchanged areas are black (pixel value 0). This is used as the label map of real farmland change. The real farmland change label map here is obtained by converting the "vector data of the changed areas" into raster data. It serves as the label for the farmland change detection dataset. The change detection dataset is divided into a training set, a validation set, and a test set. The training set, validation set, and test set are all composed of multiple sample pairs. Each sample pair includes an earlier image, a later image, and the real farmland change label map.
[0089] Step 23: To facilitate input to the CAGDE-CD model, based on the real farmland change label map corresponding to the preprocessed dual-temporal remote sensing image obtained in Step 1, the dual-temporal remote sensing image and the corresponding real farmland change label map are uniformly cropped to a size of 256×256 pixels. The cropped dual-temporal remote sensing image and the corresponding real farmland change label map are uniformly renamed using Python code to form corresponding sample pairs, which facilitates subsequent data management and processing.
[0090] Step 24: Based on the sample pairs from Step 23, in order to prevent the CAGDE-CD model from overfitting and improve the robustness of the model, data augmentation processing is performed on the sample pairs by using image rotation and image flipping to expand the sample pairs.
[0091] Step 25: Based on the expanded sample pairs in Step 24, divide the expanded sample pairs into training set, validation set and test set in a ratio of 6:2:2, which contain 922 sample pairs, 306 sample pairs and 306 sample pairs respectively.
[0092] Step 3: Construct the CAGDE-CD model:
[0093] A CAGDE-CD model was designed and constructed using an encoder-decoder architecture. The structure of the CAGDE-CD model is as follows: Figure 1As shown, firstly, a feature refinement awareness module is added to each layer of the Siamese encoder to enhance the CAGDE-CD model's ability to extract detailed contextual information, enabling the Siamese encoder to simultaneously extract coarse and fine-grained features. Then, a gradient difference enhancement module is designed in the decoder to enhance the difference between bi-temporal features, progressively refining the changing features. Finally, a context-aware aggregation module is designed to capture relevant information from multiple inputs, perform local and global feature refinement, and retain important detailed information through residual learning, thereby improving the ability to detect farmland changes. The process includes the following steps:
[0094] In step 3 above, the encoder-decoder structure is adopted, a feature refinement and perception module is introduced into the twin encoder, and a gradient difference enhancement module and a context-aware aggregation module are designed in the decoder. At the same time, a loss function is constructed, and the CAGDE-CD model is proposed. Specifically, the following steps are included:
[0095] Step 31: The CAGDE-CD model is a deep convolutional neural network structure based on an encoder-decoder architecture, using a twin encoder as the encoder. Its structure is as follows: Figure 1 As shown;
[0096] Step 32: Add a feature refinement perception module to each layer of the twin encoder;
[0097] Step 33: Add a gradient difference enhancement module to the decoder;
[0098] Step 34: Add a context-aware aggregation module to the decoder.
[0099] Step 31 specifically includes the following:
[0100] Step 311: The twin encoder includes a first encoder and a second encoder. The first encoder and the second encoder include two CBR modules with a kernel size of 3×3 and the first three layers of the ResNet18 module. The CBR module includes a convolutional layer, a batch normalization layer, and a ReLU activation layer connected in sequence. The kernel size of the convolutional layer is 3×3. The first three layers of the ResNet18 module include a first residual block ResBlock-1, a second residual block ResBlock-2, and a third residual block ResBlock-3 in sequence.
[0101] Specifically, both the first encoder and the second encoder include a first CBR module, a second CBR module, a first-level feature refinement perception module FRAM-1, a max-pooling layer MaxPooling, a first residual block ResBlock-1, a second-level feature refinement perception module FRAM-2, a second residual block ResBlock-2, a third-level feature refinement perception module FRAM-3, a third residual block ResBlock-3, and a fourth-level feature refinement perception module FRAM-4, all connected in sequence.
[0102] Two CBR modules with a kernel size of 3×3 capture initial spatial detail features. The initial spatial detail features are then processed sequentially through a first-level feature refinement perception module, a max-pooling layer, a first residual block, a second-level feature refinement perception module, a second residual block, a third-level feature refinement perception module, a third residual block, and a fourth-level feature refinement perception module to extract features, gradually reducing the spatial resolution.
[0103] Step 312: Use the earlier image T1 and the later image T2 of the dual-temporal remote sensing imagery as the first input feature X1 and the second input feature X2, respectively. Input the first input feature X1 and the second input feature X2 into the first encoder and the second encoder of the twin encoder, respectively.
[0104] The output features of the first-level feature refinement perception module, the second-level feature refinement perception module, the third-level feature refinement perception module, and the fourth-level feature refinement perception module of the first encoder are respectively the first-level feature F1, the second-level feature F2, the third-level feature F3, and the fourth-level feature F4.
[0105] The output features of the first-level feature refinement perception module, the second-level feature refinement perception module, the third-level feature refinement perception module, and the fourth-level feature refinement perception module of the second encoder are respectively the first-level feature f1, the second-level feature f2, the third-level feature f3, and the fourth-level feature f4.
[0106] The spatial dimensions of features F1, F2, F3, and F4 are halved in turn, while the number of channels increases in turn.
[0107] The spatial dimensions of features f1, f2, f3, and f4 are halved in turn, while the number of channels increases in turn.
[0108] The first-level feature refinement perception module, the second-level feature refinement perception module, the third-level feature refinement perception module, and the fourth-level feature refinement perception module have the same structure, as shown in the figure below. Figure 2As shown, each module includes a first 3×3 depthwise separable convolution (3×3 Depthwise Conv), a first 1×1 depthwise separable convolution (1×1 Depthwise Conv), a first SE module, a first 1×1 convolution (1×1 Conv), a second 3×3 depthwise separable convolution (3×3 Depthwise Conv), a second 1×1 convolution (1×1 Conv), a third 3×3 depthwise separable convolution (3×3 Depthwise Conv), a second 1×1 depthwise separable convolution (1×1 Depthwise Conv), and a second SE module. The 1×1 and 3×3 values refer to the kernel size. For ease of description, the input feature of the feature refinement perception module is defined as the input feature Ff. i The feature refinement perception modules (level 1, level 2, level 3, and level 4 feature refinement perception modules) refine the input features Ff. i The processing steps include:
[0109] Step 321: Input feature Ff i The first 3×3 depthwise separable convolution and the first 1×1 depthwise separable convolution are operated in parallel to separate relevant spatial features while preserving channel information, thus obtaining the first depthwise separable convolution features and the second depthwise separable convolution features, respectively. The aforementioned depthwise separable convolutions include depthwise convolutions and pointwise convolutions connected in sequence.
[0110] Step 322: Input feature Ff i The first depthwise separable convolutional features and the second depthwise separable convolutional features are added element-wise to obtain the feature Ff. i 1.
[0111] Step 323: Transfer feature Ff i 1. Input the first SE (Squeeze-and-Excitation) module for channel attention modeling, and the first SE module outputs the feature Ff. i se1.
[0112] Step 324: Transfer feature Ff i se1 is processed sequentially through a first 1×1 convolution, a second 3×3 depthwise convolution, and a second 1×1 convolution to obtain the feature Ff. ise1', that is, performing a 1×1 convolution operation with a kernel size of 1×1, a 3×3 depthwise separable convolution (DConv) operation, and a 1×1 convolution operation with a kernel size of 1×1 in sequence to obtain the feature Ff. i se1'.
[0113] Step 325: Transfer feature Ff i se1' inputs two parallel 3×3 depthwise separable convolutions and a 1×1 depthwise separable convolution with kernel sizes of 3×3 and 1×1 respectively, and features Ff i The output features of se1', the third 3×3 depthwise separable convolution, and the second 1×1 depthwise separable convolution are added together to obtain feature Ff. i 2. This step further refines the feature representation.
[0114] Step 326: Transfer feature Ff i 2. Input the second SE module, and the second SE module outputs the feature Ff. i se2.
[0115] Step 327: Use a skip connection to combine the original input features Ff i With feature Ff i se2 performs element-wise addition to generate the final output feature Ff of the feature refinement perception module. i (i.e., corresponding features F1, F2, F3, F4, f1, f2, f3, and f4).
[0116] In step 33, a gradient difference enhancement module (GDEM) is added to the decoder, and its structure is as follows: Figure 1 As shown, specifically, the decoder sequentially includes a 4th-level upsampling module, a 3rd-level upsampling module, a 2nd-level upsampling module, and a 1st-level upsampling module. The 4th-level upsampling module is the preceding level upsampling module of the 3rd-level upsampling module, the 3rd-level upsampling module is the following level upsampling module of the 4th-level upsampling module, and so on. The 2nd-level upsampling module is the preceding level upsampling module of the 1st-level upsampling module, and the 1st-level upsampling module is the following level upsampling module of the 2nd-level upsampling module.
[0117] The fourth-level upsampling module, the third-level upsampling module, the second-level upsampling module, and the first-level upsampling module all include a gradient difference enhancement module A, a gradient difference enhancement module B, and a context-aware aggregation module.
[0118] The first input feature X of the gradient difference enhancement module A of the i-th level upsampling module 11 Second input feature X12 Features F i and feature f i (i=1, 2, 3, 4), the first input feature X of the context-aware aggregation module of the i-th level upsampling module. 11 Second input feature X 12 Features F i and feature f i (i=1, 2, 3, 4), feature F i and feature f i As the bi-temporal feature map of the i-th level,
[0119] When i takes the value of 1, 2, or 3: the output feature of gradient difference enhancement module A of the i-th level upsampling module and the output feature of gradient difference enhancement module A of the (i+1)-th level upsampling module are superimposed as the first input feature X of gradient difference enhancement module B of the i-th level upsampling module. 11 The second input feature X of the gradient difference enhancement module B of the i-th level upsampling module 12 The output features of the context-aware aggregation module of the (i+1)th level upsampling module are used as the third input features of the context-aware aggregation module of the i-th level upsampling module.
[0120] When i is 4: the output feature of gradient difference enhancement module A of the 4th level upsampling module is used as the first input feature X of gradient difference enhancement module B of the 4th level upsampling module. 11 The superimposed features of features F4 and f4 serve as the second input feature X of the gradient difference enhancement module B of the fourth-level upsampling module. 12 The output features of the gradient difference enhancement module B of the fourth-level upsampling module are used as the third input features of the context-aware aggregation module of the fourth-level upsampling module.
[0121] The output features of the context-aware aggregation module of the first-level upsampling module are processed by a 1×1 convolutional layer and a Softmax function to output a probability distribution map. The probability distribution map is then processed by the Argmax function, and the output is the final change detection result map.
[0122] The final generated change detection result map has the same spatial dimensions as the original input images (previous image T1 and later image T2), and the value of each pixel indicates whether the location is a changed area (pixel value 1) or an unchanged area (pixel value 0).
[0123] In gradient difference enhancement module A and gradient difference enhancement module B, the first input feature X 11 Second input feature X 12Perform the following steps:
[0124] Step 331: First input feature X 11 Second input feature X 12 A connection operation is performed along the channel dimension to generate a combined feature of size H×W×2C, where H represents the height, W represents the width, and C represents the number of channels.
[0125] Step 332: In order to aggregate global context information, the combined features are spatially downsampled through an average pooling layer to reduce the spatial size of the combined features while keeping the number of channels unchanged, thus obtaining dimensionality-reduced combined features.
[0126] Step 333: After the average pooling in step 332, the dimensionality-reduced combined features are passed through a convolutional layer with a kernel size of 1×1 to adjust the channel dimension from 2C to 2C / 16, compressing the features and reducing computational complexity to obtain channel-compressed combined features. Channel compression means that after the dimensionality-reduced combined features pass through a 1×1 convolutional layer, the number of channels in the features is compressed from 2C to 2C / 16. A 1×1 convolution can achieve channel dimension adjustment and feature fusion without changing the feature map space size.
[0127] Step 334: Compress and combine the channel features through a batch normalization (BN) layer and a ReLU activation function to enable the model to learn more complex feature representations and obtain normalized combined features;
[0128] Step 335: Use a convolutional layer with a kernel size of 1×1 to transpose the normalized combined features, restore the channel dimension to 2C, separate the compressed features, and obtain the channel restored combined features to prepare for the subsequent attention weight generation.
[0129] Step 336: Divide the channel recovery combination features into early features and late features according to the channel order. Input the early features and late features into the Sigmoid activation function to generate a dual-temporal attention feature map. The dual-temporal attention feature map includes early attention weights and late attention weights.
[0130] Step 337: Combine the initial attention weights with the first input feature X 11 The features obtained by element-wise multiplication are then multiplied by the first input feature X. 11 The first enhanced feature map is obtained by element-wise addition, and the subsequent attention weights are used for the second input feature X. 12 The features obtained by element-wise multiplication are then multiplied by the second input feature X. 12 The second enhanced feature map is obtained by adding elements one by one, which enhances the perception of the differences between the two temporal features and suppresses the interference of invariant or irrelevant regions.
[0131] Step 338: The first and second enhanced feature maps are fused by concatenation to enhance the expression of the changing features and obtain a fused feature map;
[0132] Step 339: Pass the fused feature map sequentially through a 1×1 kernel convolution, batch normalization, the first ReLU activation function, a 1×1 kernel convolution, and the second ReLU activation function to generate the final output feature of the gradient difference enhancement module.
[0133] As described in step 33 above, two gradient difference enhancement modules (GDEMs) are deployed sequentially at each level of the decoder, namely gradient difference enhancement module A and gradient difference enhancement module B, forming a dual GDEM gradient structure. Gradient difference enhancement module A enhances the gradient of the dual-temporal features of the input (first input feature X). 11 Second input feature X 12 Initial difference enhancement is performed to extract preliminary change features. Gradient difference enhancement module B further refines these features based on gradient difference enhancement module A, providing finer processing of the initially extracted change features. Gradient difference enhancement module A guides gradient difference enhancement module B, making the model focus more on change features while reducing noise and irrelevant changes, gradually improving the accuracy of change detection. This dual GDEM gradient structure helps to gradually refine change features, utilizing the differences between two time-series images to generate more informative and discriminative feature maps for more accurate change detection.
[0134] As described above, in step 34, a context-aware aggregation module (CAGM) is added to the decoder, and its structure is as follows: Figure 4 As shown, step 34 includes the following steps:
[0135] Step 341: The first input feature X of the context-aware aggregation module 21 Second input feature X 22 and the third input feature F T The dimensions are all H×W×C;
[0136] Step 342: First input feature X 21 Second input feature X 22 and the third input feature F T Concatenate along the channel dimension; the concatenated feature dimension is H×W×3C.
[0137] Step 343: Perform dimensionality reduction on the concatenated features using a convolutional layer with a kernel size of 1×1 to obtain the dimensionality-reduced features. Reduce the number of channels from 3C to C, and fuse the features from the first input feature X.21 Second input feature X 22 and the third input feature F T Information;
[0138] Step 344: Combine the dimensionality-reduced features with the first input feature X. 21 Second input feature X 22 and the third input feature F T Perform element-wise addition to obtain the addition characteristics;
[0139] Step 345: Input the summation features obtained in step 344 into the residual block.
[0140] In the residual block:
[0141] The additive features are processed by a convolutional layer with a kernel size of 3×3 to capture local spatial relationships, extract spatial structure information of local regions, and obtain local spatial features.
[0142] By combining skip connections, the spatial features of the local region are added to the additive features again to obtain a more refined feature map;
[0143] The refined feature map is processed by the ReLU activation function to obtain the output features of the residual block. This introduces a nonlinear transformation to help the model better learn complex change patterns.
[0144] Step 346: The output features of the residual block and the third input features are added together to obtain the features, which are then processed by a convolutional layer with a kernel size of 3×3 to further extract and refine the features;
[0145] Step 347: Upsample the output features of the 3×3 convolutional layer from Step 346 through the upsampling unit. This doubles the spatial resolution of the features and halves the number of channels, i.e., from H×W×C to 2H×2W×(C / 2), gradually restoring the spatial resolution of the feature map and obtaining the output features of the context-aware aggregation module CAGM.
[0146] Construct the loss function as described above:
[0147] This invention employs the Cross Entropy Loss (CE) function as the model's loss function. The Cross Entropy Loss function quantifies the difference between the probability distribution map output by the model and the actual farmland change label map, enabling the model to better learn change features. For a binary classification change detection task, the calculation formula for the Cross Entropy Loss function is as follows:
[0148] ,
[0149] In the formula, This represents the cross-entropy loss function of the CAGDE-CD model. The pixel values of the label map representing the actual changes in cultivated land (0 indicates no change, 1 indicates change). The pixel probability value represents the prediction confidence of each pixel belonging to the "change" category in the probability distribution map, and is a pixel probability value between 0 and 1.
[0150] Step 4: Monitor and evaluate changes in arable land.
[0151] The CAGDE-CD model is trained based on the training set obtained in step 2 to obtain the model training weight parameters. The model training process is monitored using the validation set. Finally, the test set is input into the CAGDE-CD model to detect farmland changes and evaluate the results, including the following steps:
[0152] Step 41: Set the hyperparameters for training the CAGDE-CD model. Set the number of training epochs to 300; set the batch size to 2; and use the LambdaLR strategy to adjust the learning rate, with the initial learning rate set to 0.005.
[0153] Step 42: Input the training set into the CAGDE-CD model in batches for training. Each batch contains BatchSize pairs of bi-temporal images (early and late images) and their corresponding real farmland change label maps. The forward propagation process is as follows: features are extracted from the early and late images using a Siamese encoder, refined by the Feature Refinement Awareness (FRAM) module, and then processed by the dual gradient difference enhancement module and the context-aware aggregation module in the decoder, finally outputting the change detection result map. Calculate the cross-entropy loss between the model's output change detection result map and the real farmland change label map. Backpropagation process: Calculate the gradient based on the loss value and update the model parameters using the SGD optimizer. Repeat the forward and backpropagation processes to continuously optimize the model parameters.
[0154] Step 43: After each training round, use the validation set to evaluate the performance of the CAGDE-CD model, monitor the model's generalization ability, and prevent overfitting;
[0155] Step 44: After completing the set number of training rounds, save the weight parameters of the trained model;
[0156] Step 45: Load the weight parameters of the trained CAGDE-CD model, input the dual-temporal remote sensing images from the test set into the model, and generate a change detection result map;
[0157] Step 46: Based on the change detection results from Step 45, compare them with the corresponding ground truth label data, and count the true positives (TP), false positives (FP), false negatives (FN), and true negatives (TN) of the farmland change detection results. Here, TP represents the number of pixels correctly predicted as changed areas by the model; TN represents the number of pixels correctly predicted as unchanged areas by the model; FP represents the number of pixels incorrectly predicted as changed areas by the model; and FN represents the number of pixels that actually changed but were not captured by the model.
[0158] Step 47: Based on the statistical true positives (TP), false positives (FP), false negatives (FN), and true negatives (TN), calculate the overall accuracy (OA), intersection over union (IoU1), precision (P), recall (R), and F1 score, and evaluate the model accuracy based on these five metrics.
[0159] Step 5: Input the predicted dual-temporal remote sensing images into the trained CAGDE-CD model to obtain the corresponding change detection result map.
[0160] As mentioned above, overall accuracy, intersection-over-union ratio, precision, recall, and F1-score are based on the following formulas:
[0161] ,
[0162] ,
[0163] ,
[0164] ,
[0165] ,
[0166] In the formula, OA represents overall accuracy, measuring the model's ability to classify correctly overall, i.e., the proportion of correctly classified pixels (TP+TN) to the total number of pixels. IoU represents intersection-over-union ratio, also known as the Jaccard index, used to measure the degree of overlap between the predicted change region and the actual change region; it is the ratio of the number of correctly predicted pixels (TP) in the target region to the sum of the predicted and actual regions (TP+FP+FN). P (Precision) represents precision, also known as accuracy, representing the proportion of correctly predicted true positive values (TP) to all predicted true positive values (TP+FP). R (Recall) represents recall, also known as recall, representing the proportion of correctly predicted true positive values (TP) to all true positive values (TP+FN). F1-score is the harmonic mean of precision and recall, representing the overall performance of the model.
[0167] The invention will be further illustrated by specific experiments below.
[0168] Experimental data:
[0169] This invention uses historical Google remote sensing imagery for farmland change detection experiments. Historical Google remote sensing images of a selected area from December 2013 and April 2022, at a resolution of 0.6 meters, were selected as the experimental data for farmland change detection, forming dual-temporal remote sensing images. The December 2013 image is the earlier image (T1), and the April 2022 image is the later image (T2). Based on these dual-temporal remote sensing images, vector data of the farmland change areas were acquired according to the method in step 2 and converted into black-and-white binary images as real farmland change label maps. The dual-temporal remote sensing images and their corresponding real farmland change label maps were uniformly cropped to a size of 256×256 pixels. Data augmentation processing was performed using image rotation and image flipping to expand the sample dataset. Finally, the dataset was divided into a training set, a validation set, and a test set in a 6:2:2 ratio, containing 922, 306, and 306 pairs of samples, respectively.
[0170] Experimental setup:
[0171] This invention was implemented on a Windows 10 operating system with an NVIDIA GeForce RTX 3060 graphics card, using PyCharm as the integrated development environment and Python language based on the PyTorch deep learning framework. The optimizer employed stochastic gradient descent (SGD) with a momentum of 0.9, weight decay of 0.0005, and 300 training epochs. The batch size was set to 2. The learning rate was adjusted using a custom rule based on the LambdaLR strategy, with an initial learning rate of 0.005. The CAGDE-CD model was trained using the training set to obtain the training weights. During training, the validation set was used to monitor model performance, evaluate the model's generalization ability, and prevent overfitting. After training, the model was used to make final predictions using the test set, and the accuracy of the model in detecting farmland changes was analyzed.
[0172] To verify that the present invention outperforms existing deep learning models in detecting farmland changes, a comparative experiment was conducted with the detection results of five change detection models—FC-Siam-conc, FC-Siam-diff, BIT, DTCDSCN, and MSCANet—and the CAGDE-CD model of the present invention. All models used the same dataset and experimental parameters.
[0173] To verify the promoting effect of the proposed Feature Refinement Awareness Module (FRAM), Gradient Difference Enhancement Module (GDEM), and Context Awareness Aggregation Module (CAGM) on farmland change detection, an ablation experiment was conducted based on the CAGDE-CD model to discuss the impact of adding these modules on the change detection results.
[0174] Accuracy evaluation and analysis of experimental results:
[0175] To verify the accuracy of the CAGDE-CD model in detecting farmland change, the farmland change detection model proposed in this invention was used to train the sample data. The training weight data of the model was then used to predict the test set, and the test results were qualitatively and quantitatively compared with the farmland change sample data manually labeled in the corresponding area.
[0176] Qualitative comparison of experimental results:
[0177] Figures 5-10 The experimental results for detecting farmland change from all comparative models are presented, facilitating a direct comparison of the results from each model. From... Figures 5-10It can be seen that the FC-Siam-conc and FC-Siam-diff models are not comprehensive enough in detecting changing regions, especially in large-scale changing regions, where obvious holes and missed detections occur. They also miss detections when detecting changes in small targets. The BIT model improves boundary accuracy in large-scale changing regions, but it suffers from spurious changes and holes in changing regions in complex changing scenes. The DTCDSCN model improves the completeness of changing regions and the accuracy of changing boundaries to some extent, but it still suffers from holes and missed detections in complex changing scenes. The MSCANet model has relatively poor overall prediction results, exhibiting inaccurate changing region detection, numerous spurious changes, missed detections, and holes in changing regions. Compared to other models, the CAGDE-CD model performs best in terms of accuracy and completeness of changing region detection. Especially in cases of small target changes and complex background changes, the model can not only accurately locate changing regions but also preserve clear changing boundaries, reduce noise interference, and significantly improve the problems of missed detections and spurious changes, resulting in the best overall model performance.
[0178] Figures 11-16To visualize the ablation experiment prediction results, the effectiveness of the proposed three modules in improving model detection performance was further verified. It can be seen that the baseline model without the inclusion of the Feature Refinement Awareness Module (FRAM), Gradient Difference Enhancement Module (GDEM), and Context Awareness Aggregation Module (CAGM) exhibits significant boundary inaccuracies, background noise, incomplete detection of change regions, missed detections, and spurious changes. When only the Feature Refinement Awareness Module (FRAM) is introduced, the boundary accuracy of the model prediction results is improved, and the missed detection of small targets is reduced, but issues such as spurious changes and low completeness of change regions still exist. When only the Gradient Difference Enhancement Module (GDEM) is introduced, the completeness of change regions is significantly improved, but spurious changes still exist, indicating that using difference enhancement alone requires combining it with other mechanisms to further improve detection accuracy. When both the Feature Refinement Awareness Module (FRAM) and the Gradient Difference Enhancement Module (GDEM) are introduced simultaneously, compared to introducing either FRAM or GDEM alone, the completeness of change regions is further improved, and background noise is reduced. This is because the synergistic effect of the Feature Refinement Awareness Module (FRAM) and the Gradient Difference Enhancement Module (GDEM) enhances both feature extraction capabilities and the expression of differential features, enabling the model to capture change information more comprehensively. However, some issues of missed detections and false changes still exist. When both the Gradient Difference Enhancement Module (GDEM) and the Context Awareness Aggregation Module (CAGM) are introduced simultaneously, the boundary accuracy of the model's prediction results is further improved compared to introducing either FRAM or GDEM alone. The model achieves optimal prediction performance when all three modules (FRAM, GDEM, and CAGM) are introduced together. The combined use of these three modules significantly improves the model's detection accuracy and robustness, resulting in more complete detection of changed regions with clearer boundaries. The problems of missed detections of small targets and false changes are significantly reduced, fully validating the effectiveness of the three modules proposed in this invention for farmland change detection tasks.
[0179] Quantitative comparison of experimental results:
[0180] The quantitative evaluation of the experimental results of each model is shown in Table 1. The indicators in the table are, in order, overall accuracy (OA), intersection-over-union ratio (IoU1), precision (P), recall (R), and F1-score. As can be seen from Table 1, the CAGDE-CD model proposed in this invention has the highest accuracy in detecting farmland change. Specifically, the overall accuracy is 93.07%, the IoU1 is 67.22%, the precision is 78.84%, the recall is 78.94%, and the F1-score is 78.89%. Higher values for these indicators indicate better model performance. Compared with experimental results from other change detection models, the CAGDE-CD model showed an overall improvement in farmland change detection accuracy of 3.23% (93.07% vs 89.84%), 4.22% (93.07% vs 88.85%), 0.52% (93.07% vs 92.55%), 1.57% (93.07% vs 91.50%), and 3.55% (93.07% vs 89.52%) compared to the FC-Siam-conc model, FC-Siam-diff model, BIT model, DTCDSCN model, and MSCANet model, respectively. The intersection-and-union (OU) ratios improved by 17.99% (67.22% vs 49.23%), 29.47% (67.22% vs 37.75%), 5.94% (67.22% vs 61.28%), 9.92% (67.22% vs 57.30%), and 12.20% (67.22% vs 55.02%), respectively. Precision improved by 5.42% (78.84% vs 73.42%), 20.21% (78.84% vs 58.63%), 1.06% (78.84% vs 77.78%), 2.36% (78.84% vs 76.48%), and 6.86% (78.84% vs 71.98%), respectively. The recall rates improved by 19.03% (78.94% vs 59.91%), 27.49% (78.94% vs 51.45%), 4.66% (78.94% vs 74.28%), 9.38% (78.94% vs 69.56%), and 8.92% (78.94% vs 70.02%), respectively. The F1 score improved by 12.91% (78.89% vs 65.98%), 24.08% (78.89% vs 54.81%), 2.90% (78.89% vs 75.99%), 6.03% (78.89% vs 72.86%), and 7.90% (78.89% vs 70.99%), respectively.These results show that the CAGDE-CD model outperforms the comparison model on all evaluation metrics, especially in terms of crossover ratio and recall, indicating that the CAGDE-CD model can detect farmland change areas more completely and accurately, reduce missed detections, and improve the detection completeness of change areas.
[0181] Table 1. Accuracy of Farmland Change Detection Results for Each Model
[0182]
[0183] To verify the positive effects of the proposed Feature Refinement Awareness Module (FRAM), Gradient Difference Enhancement Module (GDEM), and Context Awareness Aggregation Module (CAGM) on farmland change detection, ablation experiments were conducted on the CAGDE-CD model to discuss the impact of adding these modules on the change detection results. Since one of the inputs to the CAGM module is the output of the Gradient Difference Enhancement Module (GDEM), the CAGM module needs to be combined with the GDEM module in the ablation experiment. The parameters and datasets for each experiment were identical, and the experimental accuracy evaluation results are shown in Table 2, where "√" indicates the addition of the module. Table 2 shows that the addition of all three modules improves the model accuracy evaluation results, verifying the effectiveness of the proposed modules. When none of the three modules are added (ablation experiment one), the baseline model's overall accuracy evaluation results are: OA 90.90%, IoU1 55.88%, precision P 72.66%, recall R 70.77%, and F1-score 71.70%. When the Feature Refinement Awareness Module (FRAM) is introduced alone (Ablation Experiment 2), the model's overall accuracy (OA) is 92.52%, IoU1 is 65.20%, precision (P) is 77.69%, recall (R) is 77.21%, and F1-score is 77.45%. Compared to the baseline model, the accuracy metrics improved by 1.62%, 9.32%, 5.03%, 6.44%, and 5.75%, respectively, indicating that the FRAM effectively enhances the model's ability to extract detailed contextual information and improves its ability to capture subtle changes between two temporal images. When the Gradient Difference Enhancement Module (GDEM) is introduced alone (Ablation Experiment 3), the model's overall accuracy (OA) is 92.53%, IoU1 is 65.19%, precision (P) is 77.67%, recall (R) is 77.22%, and F1-score is 77.45%. Compared to the baseline model, the accuracy scores for each evaluation metric improved by 1.63%, 9.31%, 5.01%, 6.45%, and 5.75%, respectively, indicating that the Gradient Difference Enhancement Module (GDEM) effectively enhances the differences in features across two time phases, gradually refining the changing features and improving the model's detection accuracy. The accuracy improvements when FRAM and GDEM are introduced individually are similar, suggesting that both modules contribute significantly to model performance in different aspects. When FRAM and GDEM are introduced simultaneously (ablation experiment 4), the model's overall accuracy (OA) is 92.66%, IoU1 is 66.81%, precision (P) is 78.69%, recall (R) is 78.15%, and F1-score is 77.91%. Compared to the baseline model, the overall accuracy improved by 1.76%, IoU1 by 10.93%, precision by 6.03%, recall by 7.38%, and F1-score by 6.21%.It can be seen that the combined use of FRAM and GDEM further improves the model's detection capabilities, particularly in terms of intersection-over-union (IoU) and recall, indicating that the synergistic effect of the two modules can more effectively extract features and enhance variable features. When GDEM and CAGM are introduced simultaneously (ablation experiment 5), the model's overall accuracy (OA) is 92.70%, IoU1 is 66.71%, precision (P) is 77.82%, recall (R) is 77.84%, and F1-score is 77.83%. Compared to the baseline model, the overall accuracy improved by 1.80%, IoU1 by 10.83%, precision by 5.16%, recall by 7.07%, and F1-score by 6.13%. The results show that the combined use of GDEM and CAGM can effectively enhance differential features and retain key detail information, further improving the model's detection accuracy. When the three modules FRAM, GDEM, and CAGM are introduced simultaneously (ablation experiment 6), the model achieves optimal accuracy, with all metrics reaching their best values. The overall accuracy (OA) is 93.07%, the intersection-over-union (IoU1) is 67.22%, the precision (P) is 78.84%, the recall (R) is 78.94%, and the F1-score is 78.89%. Compared to the baseline model, the overall accuracy is improved by 2.17%, the IoU1 by 11.34%, the precision by 6.18%, the recall by 8.17%, and the F1-score by 7.19%. These results fully demonstrate the synergistic effect of the three modules: the feature refinement and perception module FRAM fuses spatial and channel information, improving the model's sensitivity to subtle changes; the gradient difference enhancement module GDEM enhances dual-temporal difference features, reducing noise and irrelevant changes, and improving the completeness of the detected change regions; the CAGM module retains key detail information during feature fusion, making the model perform better in boundary and small target detection. Using these three modules together significantly improves the model's detection accuracy and robustness, effectively enhancing the model's ability to detect changes.
[0184] Table 2 Precision Table of Model Ablation Experiment Results
[0185]
[0186] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods.
[0187] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.
[0188] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.
[0189] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0190] The above description only illustrates preferred embodiments of the present invention and should not be construed as limiting the scope of the claims. The present invention is not limited to the above embodiments, and variations in its specific structure are permitted. All modifications made within the scope of the independent claims of this invention are also within the scope of protection of this invention.
Claims
1. A method for detecting changes in cultivated land using gradient difference enhancement, characterized in that, Includes the following steps: Step 1: Acquire dual-temporal remote sensing images of the study area, which include both pre-contemporal and post-contemporal images; Step 2: Generate sample pairs and corresponding real farmland change label maps based on dual-temporal remote sensing images, and further construct training sets, test sets and validation sets; Step 3: Construct the CAGDE-CD model, which includes a twin encoder and a decoder. The twin encoder includes a first encoder and a second encoder. Both the first encoder and the second encoder include, in sequence, a first CBR module, a second CBR module, a first-level feature refinement perception module, a max-pooling layer, a first residual block, a second-level feature refinement perception module, a second residual block, a third-level feature refinement perception module, a third residual block, and a fourth-level feature refinement perception module. The decoder includes upsampling modules that correspond one-to-one with the feature refinement perception modules. Each upsampling module includes gradient difference enhancement module A, gradient difference enhancement module B, and a context-aware aggregation module. Construct the loss function for the CAGDE-CD model; Step 4: Train the CAGDE-CD model based on the training set; Step 5: Input the predicted dual-temporal remote sensing images into the trained CAGDE-CD model to obtain the corresponding change detection result map.
2. The method for detecting changes in cultivated land by gradient difference enhancement according to claim 1, characterized in that, The earlier image T1 and the later image T2 of the dual-temporal remote sensing imagery are used as the first input feature X1 and the second input feature X2, respectively. The first input feature X1 and the second input feature X2 are respectively input into the first encoder and the second encoder of the twin encoder. The output features of the first-level feature refinement perception module, the second-level feature refinement perception module, the third-level feature refinement perception module, and the fourth-level feature refinement perception module of the first encoder are respectively the first-level feature F1, the second-level feature F2, the third-level feature F3, and the fourth-level feature F4. The output features of the first-level feature refinement perception module, the second-level feature refinement perception module, the third-level feature refinement perception module, and the fourth-level feature refinement perception module of the second encoder are respectively the first-level feature f1, the second-level feature f2, the third-level feature f3, and the fourth-level feature f4.
3. The method for detecting changes in cultivated land by gradient difference enhancement according to claim 2, characterized in that, The first-level feature refinement perception module, the second-level feature refinement perception module, the third-level feature refinement perception module, and the fourth-level feature refinement perception module each include a first 3×3 depthwise separable convolution, a first 1×1 depthwise separable convolution, a first SE module, a first 1×1 convolution, a second 3×3 depthwise separable convolution, a second 1×1 convolution, a third 3×3 depthwise separable convolution, a second 1×1 depthwise separable convolution, and a second SE module. Define the input features Ff of the first-level feature refinement perception module, the second-level feature refinement perception module, the third-level feature refinement perception module, and the fourth-level feature refinement perception module. i , Input features Ff i The first depthwise separable convolutional features and the second depthwise separable convolutional features are obtained by parallel operations of the first 3×3 depthwise separable convolution and the first 1×1 depthwise separable convolution, respectively. Input features Ff i The first depthwise separable convolutional features and the second depthwise separable convolutional features are added element-wise to obtain the feature Ff. i 1, Feature Ff i The feature Ff is obtained by sequentially processing the data through a first SE module, a first 1×1 convolution, a second 3×3 depthwise separable convolution, and a second 1×1 convolution. i se1', Feature Ff i se1' inputs a third 3×3 depthwise separable convolution and a second 1×1 depthwise separable convolution, respectively, and features Ff i The output features of se1', the third 3×3 depthwise separable convolution, and the second 1×1 depthwise separable convolution are added together to obtain feature Ff. i 2, Feature Ff i 2. Input the second SE module, and the second SE module outputs the feature Ff. i se2, Input features Ff i With feature Ff i The output feature Ff is obtained by adding se2 element by element. i '.
4. The method for detecting changes in cultivated land by gradient difference enhancement according to claim 2, characterized in that, The upsampling module includes a 4-level upsampling module, a 3rd-level upsampling module, a 2nd-level upsampling module, and a 1st-level upsampling module. Each of the 4th-level, 3rd-level, 2nd-level, and 1st-level upsampling modules includes a gradient difference enhancement module A, a gradient difference enhancement module B, and a context-aware aggregation module. The first input feature X of the gradient difference enhancement module A of the i-th level upsampling module 11 Second input feature X 12 Features F i and feature f i Let i = 1, 2, 3, 4, and X be the first input feature X of the context-aware aggregation module of the i-th level upsampling module. 11 Second input feature X 12 Features F i and feature f i i = 1, 2, 3, 4, feature F i and feature f i As the bi-temporal feature map of the i-th level, When i takes the value of 1, 2, or 3: the output feature of gradient difference enhancement module A of the i-th level upsampling module and the output feature of gradient difference enhancement module A of the (i+1)-th level upsampling module are superimposed as the first input feature X of gradient difference enhancement module B of the i-th level upsampling module. 11 The second input feature X of the gradient difference enhancement module B of the i-th level upsampling module 12 The output features of the context-aware aggregation module of the (i+1)th level upsampling module, and the output features of the gradient difference enhancement module B of the i-th level upsampling module, serve as the third input features of the context-aware aggregation module of the i-th level upsampling module. When i is 4: the output feature of gradient difference enhancement module A of the 4th level upsampling module is used as the first input feature X of gradient difference enhancement module B of the 4th level upsampling module. 11 The superimposed features of features F4 and f4 serve as the second input feature X of the gradient difference enhancement module B of the fourth-level upsampling module. 12 The output features of the gradient difference enhancement module B of the fourth-level upsampling module are used as the third input features of the context-aware aggregation module of the fourth-level upsampling module. The output features of the context-aware aggregation module of the first-level upsampling module are processed by a 1×1 convolutional layer and a Softmax function to output a probability distribution map. The probability distribution map is then processed by the Argmax function to output the final change detection result map.
5. The method for detecting changes in cultivated land by gradient difference enhancement according to claim 4, characterized in that, In gradient difference enhancement module A and gradient difference enhancement module B, the first input feature X 11 Second input feature X 12 Perform the following steps: First input feature X 11 Second input feature X 12 Perform a connection operation along the channel dimension to obtain combined features; The combined features are processed sequentially through an average pooling layer, a 1×1 convolutional layer, a batch normalization layer, a ReLU activation function, and another 1×1 convolutional layer to obtain channel recovery combined features. The channel recovery combined features are divided into early features and late features according to the channel order. The early features and late features are respectively input into the Sigmoid activation function to obtain the early attention weight and the late attention weight. The initial attention weights and the first input feature X are combined. 11 The features obtained by element-wise multiplication are then multiplied by the first input feature X. 11 The first enhanced feature map is obtained by element-wise addition, and the subsequent attention weights are used for the second input feature X. 12 The features obtained by element-wise multiplication are then multiplied by the second input feature X. 12 The second enhanced feature map is obtained by adding elements one by one. The first and second enhanced feature maps are fused to obtain a fused feature map. The fused feature map is sequentially passed through a 1×1 convolution, batch normalization, a first ReLU activation function, a 1×1 convolution, and a second ReLU activation function to obtain the output features.
6. The method for detecting changes in cultivated land by gradient difference enhancement according to claim 5, characterized in that, In the context-aware aggregation module First input feature X 21 Second input feature X 22 and the third input feature F T Stitch along the channel dimension; The concatenated features are then subjected to dimensionality reduction through a convolutional layer with a kernel size of 1×1 to obtain the dimensionality-reduced features. The dimensionality-reduced features and the first input feature X are used to... 21 Second input feature X 22 and the third input feature F T Perform element-wise addition to obtain the addition characteristics; Input the summation features into the residual block; Output characteristics and third input characteristics F of the residual block T The features obtained by performing the addition operation are then processed through a convolutional layer with a kernel size of 3×3; The output features of a 3×3 convolutional layer are upsampled through an upsampling unit to obtain the output features.
7. The method for detecting changes in cultivated land by gradient difference enhancement according to claim 6, characterized in that, In the residual block: The additive features are processed by a convolutional layer with a kernel size of 3×3 to obtain the spatial features of the local region; The local spatial features are added to the summative features to obtain a more refined feature map; The refined feature map is processed by the ReLU activation function to obtain the output features of the residual block.
8. The method for detecting changes in cultivated land by gradient difference enhancement according to claim 1, characterized in that, The loss function of the CAGDE-CD model is based on the following formula: , In the formula, This represents the cross-entropy loss function of the CAGDE-CD model. The pixel values representing the actual changes in arable land in the label map. Represents the pixel probability value of the probability distribution map.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the gradient difference-enhanced remote sensing change detection method for cultivated land as described in any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the gradient difference-enhanced remote sensing change detection method for cultivated land as described in any one of claims 1 to 8.