Multi-temporal hyperspectral image change detection method based on cross-layer feature fusion

By using a dual-branch network and an adaptive cross-layer feature fusion module in hyperspectral image change detection, combined with a deep and shallow feature enhancement module, the problem of high model parameters and feature interference is solved, achieving high-precision change detection and reducing the number of training samples. need.

CN118736410APending Publication Date: 2024-10-01LIAONING NORMAL UNIVERSITY
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410852580.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

In existing hyperspectral image change detection methods, the number and complexity of model parameters are high, and there is interference between features, resulting in reduced feature expression ability after fusion, making it difficult to improve accuracy with a smaller training set.

Method used

A multi-temporal hyperspectral image change detection method based on cross-layer feature fusion is adopted. Through the dual-branch network structure and adaptive cross-layer feature fusion module, combined with the deep and shallow feature enhancement module, features of different phases are extracted and fused to compensate for the increase in the number of layers. The lost spatial texture information improves model performance.

Benefits of technology

It achieves good feature extraction quality, improves detection accuracy, reduces the number of required training samples, and significantly improves the performance of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118736410A_ABST
    Figure CN118736410A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-temporal hyperspectral image change detection method based on cross-layer feature fusion, and the method comprises the steps: firstly employing a dual-branch network structure for extracting features of different temporal, and then carrying out the cross-layer fusion of shallow features and deep features through a self-adaptive cross-layer feature fusion module, effective information in cross-layer features is adaptively selected for fusion, spatial texture information lost due to increase of the number of layers is compensated, and the fusion features achieve complementation among multiple layers of information. And then the effective information is enhanced by using a deep and shallow feature enhancement module, so that the network more effectively pays attention to and utilizes important features in the hyperspectral image, thereby improving the performance of the model. Therefore, the method has the characteristics of good feature extraction quality, high detection precision and few required training samples.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of remote sensing image processing, and in particular to a multi-temporal hyperspectral image change detection method based on cross-layer feature fusion, which can effectively solve the problems of high number and complexity of model parameters, interference between features, and reduced expressiveness of fused features, and can achieve improved measurement accuracy with a smaller training set. Background Art

[0002] Changes in the surface environment are not only the result of natural processes, but also directly affected by human activities. With the increase in global population and the booming economy, activities such as surface development, land use, mineral mining, and the use of surface water resources have increased dramatically. These activities have led to the complexity and variability of the surface environment, which directly affects the living environment and safety of human beings. Therefore, in economic and social development activities, people need to grasp the changes in surface morphology and obtain information on changes in land objects in a timely manner, adopt sustainable development methods and measures to minimize the negative impact on the surface, and maintain the environmental balance and ecological health of the earth. As an important technology, remote sensing image change detection can identify changes in the surface environment by comparing remote sensing images acquired at different times. This technology has been widely used in many fields and provides key information support for all walks of life, such as monitoring changes in farmland, crop growth, evolution of land use, and monitoring changes in forest cover. Powerful remote sensing image acquisition technology provides a reliable data basis for change detection. Using remote sensing images acquired at different time points to accurately capture the dynamic changes of the surface will play a particularly important role in natural disaster warning, resource management, and urban planning.

[0003] Based on the rapid development of computer technology and remote sensing technology, researchers have proposed many methods for change detection in multi-temporal remote sensing images. Change Vector Analysis (CVA) is a typical algebraic change detection method. This method regards each spectral curve as a vector and realizes change detection by calculating the difference between vectors. Image transformation method realizes dimensionality reduction by mapping high-dimensional data to a specific low-dimensional feature space. Principal Component Analysis (PCA) is an effective dimensionality reduction method and is favored by many researchers. Deng et al. enhanced the change information based on PCA and combined supervised and unsupervised methods to accurately identify the change area.

[0004] In recent years, with the continuous advancement of deep learning technology, its application in remote sensing image change detection has become a research hotspot, and a variety of hyperspectral image change detection methods based on deep learning have emerged. Compared with traditional mathematical models that can only extract shallow features, deep learning methods have attracted much attention because of their significant advantages in dealing with high-dimensional problems and performing in-depth feature extraction. This method automatically identifies and learns deep semantic information in image data by using a complex network architecture. In the field of hyperspectral image change detection, the successful application of deep learning technology not only improves processing efficiency, but also provides a powerful solution for complex multi-temporal hyperspectral image analysis. For example, Zhong et al. designed a method that can use the temporal information of multi-temporal images to achieve change detection. It uses a long short-term memory model to capture the temporal dependency between images and combines a convolutional neural network (CNN) to complete the recognition of image changes. Wang et al. proposed a two-dimensional convolutional neural network framework called GETNET. This method uses an unsupervised method to train a deep network. However, the limitation of this method is that it relies on pseudo training sets generated by other change detection methods, which not only increases the complexity of the algorithm, but also may affect the accuracy of the model due to the noise it contains. Mostafa et al. proposed a new change detection method that uses the U-Net neural network to effectively learn and restore the details of the input image.

[0005] In general, hyperspectral image change detection methods have evolved from the initial traditional technical means, such as algebraic methods and mathematical model analysis, to deep learning methods that can intelligently extract complex features. Nevertheless, the high spectral dimension of hyperspectral images makes the image data large and complex, which also means that useful features need to be extracted from massive amounts of information during change detection. However, these features are often easily interfered by redundant information, which makes deep learning-based change detection methods still face many challenges in feature extraction. Summary of the invention

[0006] The present invention aims to solve the above-mentioned technical problems existing in the prior art and to provide a multi-temporal hyperspectral image change detection method based on cross-layer feature fusion, which can effectively solve the problems of high number and complexity of model parameters, interference between features and reduced expressiveness of fused features, and achieve improved measurement accuracy under a smaller training set.

[0007] The technical solution of the present invention is: a multi-temporal hyperspectral image change detection method based on cross-layer feature fusion, which is carried out in the following steps:

[0008] Step 1. Establish and initialize the convolutional neural network N for hyperspectral image change detection CD, the N CD Contains 1 subnetwork N for feature extraction feature and a subnetwork N for change detection cls ;

[0009] Step 1.1 Create and initialize subnetwork N feature , the sub-network N feature There are 6 groups of convolutional layers and 2 groups of custom modules. The 6 groups of convolutional layers are Conv2_0, Conv2_1, Conv2_2, Conv2_3, Conv2_4, Conv2_5, and the 2 groups of custom modules are L MASF , L CBAM ;

[0010] The operation sequence of Conv2_0 is 1 convolution operation, 1 activation operation, 1 convolution operation, 1 activation operation and 1 maximum pooling operation. The size of the convolution kernel in the convolution operation is 3×3, and each convolution kernel performs a convolution operation with a step size of 1 pixel. The activation operation uses a nonlinear activation function ReLU as an activation function for operation, and the maximum pooling operation uses a pooling kernel of size 3×3 for maximum pooling operation.

[0011] The operation sequence of Conv2_1 is 1 convolution operation, 1 activation operation, 1 convolution operation and 1 activation operation. The size of the convolution kernel in the convolution operation is 3×3, and each convolution kernel performs convolution operation with a step size of 1 pixel. The activation operation uses the nonlinear activation function ReLU as the activation function for operation.

[0012] The operation sequence of Conv2_2 is 1 convolution operation and 1 activation operation. The size of the convolution kernel in the convolution operation is 3×3, and each convolution kernel performs convolution operation with a step size of 1 pixel. The activation operation uses the nonlinear activation function ReLU as the activation function for operation.

[0013] The operation sequence of Conv2_3 is 1 convolution operation and 1 activation operation. The size of the convolution kernel in the convolution operation is 3×3, and each convolution kernel performs convolution operation with a step size of 1 pixel. The activation operation uses the nonlinear activation function ReLU as the activation function for operation.

[0014] Conv2_4 has one convolution operation layer, in which the size of the convolution kernel in the convolution layer is 1×1, each convolution kernel performs convolution operation with a step size of 1 pixel, and then performs a Dropout operation with a parameter of 0.1;

[0015] Conv2_5 has one convolution operation layer, in which the size of the convolution kernel in the convolution layer is 1×1, each convolution kernel performs convolution operation with a step size of 1 pixel, and then performs a Dropout operation with a parameter of 0.1;

[0016] The L MASF The module first adds the two input tensors F1 and F2 according to formula (1) to obtain the feature map F obtained by element-wise summation. sum :

[0017] F sum =F1+F2 (1)

[0018] According to formula (2), a global average pooling operation is used to compress the spatial dimension of the input feature map, a convolutional layer with a size of 1×1 is used to obtain compact features, and a ReLU activation function is used to control the coefficients to generate the feature F m :

[0019] F m =ReLU(f 1×1 (Avgpool(F sum ))) (2)

[0020] Among them, f 1×1 represents a 1×1 convolution operation, and Avgpool(·) represents a global average pooling operation;

[0021] According to formula (3), the weight F is calculated through the convolution layer and the SoftMax function. m ′:

[0022] F m ′=ε(fc i (F m (F sum ))),i=1,2 (3)

[0023] Where ε represents the SoftMax function, fc i It is a fully connected operation with the same structure and no parameter sharing;

[0024] According to formula (4), the input feature map is multiplied by the shared weight to obtain the feature map:

[0025]

[0026] Among them, [·,·] represents the concatenation of feature map groups, Represents tensor multiplication;

[0027] The L CBAMThe module first performs global maximum pooling and global average pooling operations on the input feature map F according to formulas (5) and (6) to obtain the maximum response and average response of the channel. The multi-layer perceptron structure containing two convolutional layers is used to process the results of maximum pooling and average pooling to obtain ω respectively. max_out and ω avg_out :

[0028] ω max_out =σ(MLP(AdaptiveMaxPool2d(F))) (5)

[0029] ω avg_out =σ(MLP(AdaptiveAvgPool2d(F))) (6)

[0030] Among them, σ represents the Sigmoid activation function, MLP represents a multi-layer perceptron with two convolutional layers, AdaptiveMaxPool2d is an adaptive maximum pooling operation, and AdaptiveAugPool2d is an adaptive average pooling operation;

[0031] According to formula (7), use the Sigmoid activation function to convert ω max_out and ω avg_out Scale to the range of (0,1) to get the channel attention weight ω channel_out :

[0032] ω channel_out =σ(ω max_out +ω avg_out ) (7)

[0033] The channel attention weight ω channel_out Multiply it with the input feature map F to get the weighted feature map F A :

[0034] F A =ω channel_out ×F (8)

[0035] According to formulas (9) and (10), the weighted feature map F A Perform maximum and average pooling on the channel dimension to obtain ωs max_out and ωs avg_out :

[0036] ωs max_out =max(F A ) (9)

[0037] ωs max_out =mean(F A ) (10)

[0038] According to formula (11), ωs max_out and ωs avg_out Splicing in the channel dimension, convolving the spliced ​​feature map through a convolution layer, and then using the Sigmoid activation function to scale it to the range of (0,1) to obtain the spatial attention weight ωs spatial_out :

[0039] ωs spatial_out =σ(Conv2d([ωs max_out ,ωs avg_out ])) (11)

[0040] According to formula (12), the spatial attention weight ωs spatial_out And the weighted feature map F A Multiply them together to get the final feature map F FA :

[0041] F FA =ωs spatial_out ×F A (12)

[0042] Step 1.2 Create and initialize subnetwork N cls , contains 1 convolutional layer Conv2_6 and 1 fully connected layer FC;

[0043] The operation sequence of the Conv2_6 is 1 layer of convolution operation, 1 layer of BatchNorm normalization operation, 1 layer of activation operation, 1 layer of maximum pooling operation, 1 layer of convolution operation, 1 layer of BatchNorm normalization operation and 1 layer of activation operation. The size of the convolution kernel in the convolution operation is 3×3, and each convolution kernel performs convolution operation with a step size of 1 pixel. The activation operation uses the nonlinear activation function LeakyReLU as the activation function for operation. The maximum pooling operation performs the maximum pooling operation with a pooling kernel of size 2×2.

[0044] The operation sequence of the FC is 1 layer of maximum pooling operation, 1 layer of full connection operation and 1 layer of activation operation. The maximum pooling operation is performed with a pooling kernel of size 2×2. The activation operation is performed by selecting a nonlinear activation function sigmoid as an activation function.

[0045] Step 2. Input the hyperspectral image I1∈R of the first phase M×N×D , the second phase of the hyperspectral image I2∈R M ×N×D , the manually labeled pixel point coordinate set and label set, for N CD Training is performed, where M and N are the spatial scales of the hyperspectral image, and D is the spectral dimension;

[0046] Step 2.1. Based on the manually labeled pixel point coordinate set, in the hyperspectral image I1∈R M×N×D and the hyperspectral image I2∈R of the second phase M×N×D Extract all pixel points with labels from and in, Represents X D1 The i-th Train Pixel points, Represents X D2 The i-th Train Pixel points, M Train Indicates the total number of pixel points with labels;

[0047] Step 2.2. X D1 and X D2 As the training set of the convolutional neural network, let the number of iterations iter←1 and execute step 2.3;

[0048] Step 2.3. Use network N CD Extract features from the training set and perform change detection tasks;

[0049] Step 2.3.1 Using subnetwork N feature Conv2_0, Conv2_1, Conv2_2 are on X D1 Perform feature extraction to obtain the feature F of the hyperspectral image in the first phase 11 ;

[0050] Step 2.3.2 Using subnetwork N feature Conv2_0, Conv2_1, Conv2_2, Conv2_3 are on X D1 Perform feature extraction to obtain the feature F of the hyperspectral image in the first phase 12 ;

[0051] Step 2.3.3 Using subnetwork N feature Conv2_0, Conv2_1, Conv2_2, Conv2_3, Conv2_4 are on X D1 Perform feature extraction to obtain the feature F of the hyperspectral image in the first phase 13 ;

[0052] Step 2.3.4 Using subnetwork N feature Conv2_0, Conv2_1, Conv2_2, Conv2_3, Conv2_4, Conv2_5 are on X D1 Perform feature extraction to obtain the feature F of the hyperspectral image in the first phase 14 ;

[0053] Step 2.3.5 Using subnetwork N feature Conv2_0, Conv2_1, Conv2_2 are on X D2 Perform feature extraction to obtain the feature F of the hyperspectral image of the second phase 21 ;

[0054] Step 2.3.6 Using subnetwork N feature Conv2_0, Conv2_1, Conv2_2, Conv2_3 are on X D2 Perform feature extraction to obtain the feature F of the hyperspectral image of the second phase 22 ;

[0055] Step 2.3.7 Using subnetwork N feature Conv2_0, Conv2_1, Conv2_2, Conv2_3, Conv2_4 are on X D2 Perform feature extraction to obtain the feature F of the hyperspectral image of the second phase 23 ;

[0056] Step 2.3.8 Using subnetwork N feature Conv2_0, Conv2_1, Conv2_2, Conv2_3, Conv2_4, Conv2_5 are on X D2 Perform feature extraction to obtain the feature F of the hyperspectral image of the second phase 24 ;

[0057] Step 2.3.9 Using L MASF Module pair F 11 and F 13 Perform feature extraction to obtain the cross-layer feature F of the hyperspectral image of the first phase 1113 ;

[0058] Step 2.3.10 Using L MASF Module pair F 12 and F 14 Perform feature extraction to obtain the cross-layer feature F of the hyperspectral image of the first phase 1214 ;

[0059] Step 2.3.11 Using L MASF Module pair F 21 and F 23 Perform feature extraction to obtain the cross-layer feature F of the hyperspectral image of the second phase 2123 ;

[0060] Step 2.3.12 Using L MASF Module pair F 22 and F 24Perform feature extraction to obtain the cross-layer feature F of the hyperspectral image of the second phase 2224 ;

[0061] Step 2.3.13 Using L CBAM Module pair F 1113 Perform feature extraction to obtain the cross-layer attention feature F of the hyperspectral image in the first phase cbam_1113 ;

[0062] Step 2.3.14 Using L CBAM Module pair F 1214 Perform feature extraction to obtain the cross-layer attention feature F of the hyperspectral image in the first phase cbam_1214 ;

[0063] Step 2.3.15 Using L CBAM Module pair F 2123 Perform feature extraction to obtain the cross-layer attention feature F of the hyperspectral image of the second phase cbam_2123 ;

[0064] Step 2.3.16 Using L CBAM Module pair F 2224 Perform feature extraction to obtain the cross-layer attention feature F of the hyperspectral image of the second phase cbam_2224 ;

[0065] Step 2.3.17 According to formula (13), cbam_1113 and F cbam_2123 Difference:

[0066] F K1 =F cbam_1113 -F cbam_2123 (13)

[0067] Step 2.3.18 According to formula (14), cbam_1214 and F cbam_2224 Difference:

[0068] F K1 =F cbam_1214 -F cbam_2224 (14)

[0069] Step 2.3.19: According to formula (15), K1 and F K2 Sum:

[0070] F K =F K1 +F K2 (15)

[0071] Step 2.3.20 Using subnetwork N cls Classify the features and calculate the classification prediction result TRpred ;:

[0072] Step 2.4: According to the definitions of formula (16) and formula (17), the weighted cross entropy is used as the loss function;

[0073]

[0074] in, Indicates the jth cls The weight of the class, Indicates that the pixel belongs to the jth cls The probability of a ground-like object, Indicates the jth ground-truth training sample cls The number of features;

[0075] In step 2.5, if all pixel blocks in the training set have been processed, proceed to step 2.6; otherwise, take a group of unprocessed pixel blocks from the training set and return to step 2.3;

[0076] Step 2.6 Let iter←iter+1. If the number of iterations iter>Total_iter, the trained convolutional neural network N is obtained. CD , go to step 3, otherwise, use the reverse error propagation algorithm based on stochastic gradient descent and the prediction loss L w-C Update N cd , go to step 2.3 to reprocess all pixel blocks in the training set, and the Total_iter represents the preset number of iterations;

[0077] Step 3. Input the hyperspectral image I1′∈R of the first phase to be measured M′×N′×D′ , the hyperspectral image of the second phase I2′∈R M′×N′×D′ , using the fully trained N CD The test is performed, where M′ and N′ are the spatial scales of the hyperspectral image, and D′ is the spectral dimension;

[0078] Step 3.1. Hyperspectral image I1′∈R in the first phase M′×N′×D′ and the hyperspectral image I2′∈R of the second phase M′×N′×D′ Extract all pixel point sets from and in, Represents X D1 ′ in the i test Pixel points, Represents X D2 ′ in the i test Pixel points, M test Represents the total number of pixel points with labels;

[0079] Step 3.2. X D1 ′ and X D2 ′ is taken as the sample to be tested, and the number of iterations iter←1 is set, and step 3.3 is executed;

[0080] Step 3.3. Use network N CD Extract the sample features that need to be tested and perform change detection tasks;

[0081] Step 3.3.1 Using subnetwork N feature Conv2_0, Conv2_1, Conv2_2 are on X D1 ′ to extract features and obtain the feature F of the hyperspectral image of the first phase 11 ′;

[0082] Step 3.3.2 Using subnetwork N feature Conv2_0, Conv2_1, Conv2_2, Conv2_3 are on X D1 ′ to extract features and obtain the feature F of the hyperspectral image of the first phase 12 ′;

[0083] Step 3.3.3 Using subnetwork N feature Conv2_0, Conv2_1, Conv2_2, Conv2_3, Conv2_4 are on X D1 ′ to extract features and obtain the feature F of the hyperspectral image of the first phase 13 ′;

[0084] Step 3.3.4 Using subnetwork N feature Conv2_0, Conv2_1, Conv2_2, Conv2_3, Conv2_4, Conv2_5 are on X D1 ′ to extract features and obtain the feature F of the hyperspectral image of the first phase 14 ′;

[0085] Step 3.3.5 Using subnetwork N feature Conv2_0, Conv2_1, Conv2_2 are on X D2 ′ to extract features and obtain the feature F of the hyperspectral image of the second phase 21 ′;

[0086] Step 3.3.6 Using subnetwork N feature Conv2_0, Conv2_1, Conv2_2, Conv2_3 are on X D2 ′ to extract features and obtain the feature F of the hyperspectral image of the second phase 22 ′;

[0087] Step 3.3.7 Using subnetwork N feature Conv2_0, Conv2_1, Conv2_2, Conv2_3, Conv2_4 are on X D2 ′ to extract features and obtain the feature F of the hyperspectral image of the second phase 23 ′;

[0088] Step 3.3.8 Using subnetwork N feature Conv2_0, Conv2_1, Conv2_2, Conv2_3, Conv2_4, Conv2_5 are on X D2 ′ to extract features and obtain the feature F of the hyperspectral image of the second phase 24 ′;

[0089] Step 3.3.9 Using L MASF Module pair F 11 ′ and F 13 ′ to extract features and obtain the cross-layer features F of the hyperspectral image of the first phase 1113 ′;

[0090] Step 3.3.10 Using L MASF Module pair F 12 ′ and F 14 ′ to extract features and obtain the cross-layer features F of the hyperspectral image of the first phase 1214 ′;

[0091] Step 3.3.11 Using L MASF Module pair F 21 ′ and F 23 ′ to extract features and obtain the cross-layer features F of the hyperspectral image of the second phase 2123 ′;

[0092] Step 3.3.12 Using L MASF Module pair F 22 ′ and F 24 ′ to extract features and obtain the cross-layer features F of the hyperspectral image of the second phase 2224 ′;

[0093] Step 3.3.13 Using L CBAM Module pair F 1113 ′ to extract features and obtain the cross-layer attention features F of the hyperspectral image of the first phase cbam_1113 ′;

[0094] Step 3.3.14 Using L CBAM Module pair F 1214 ′ to extract features and obtain the cross-layer attention features F of the hyperspectral image of the first phase cbam_1214 ′;

[0095] Step 3.3.15 Using L CBAM Module pair F 2123 ′ to extract features and obtain the cross-layer attention features F of the hyperspectral image of the second phase cbam_2123 ′;

[0096] Step 3.3.16 Using L CBAM Module pair F 2224 ′ to extract features and obtain the cross-layer attention features F of the hyperspectral image of the second phase cbam_2224 ′;

[0097] Step 3.3.17: According to formula (18), cbam_1113 ′ and F cbam_2123 ′Find the difference:

[0098] F K1 ′=F cbam_1113 ′-F cbam_2123 ′ (18)

[0099] Step 3.3.18 According to formula (19), cbam_1214 ′ and F cbam_2224 ′Find the difference:

[0100] F K1 ′=F cbam_1214 ′-F cbam_2224 ′ (19)

[0101] Step 3.3.19: According to formula (20), K1 ′ and F K2 ′Sum:

[0102] F K ′=F K1 ′+F K2 ′ (20)

[0103] Step 3.3.20 Using subnetwork N cls Classify the features and calculate the final change detection prediction result TE pred .

[0104] Compared with the prior art, the present invention first adopts a dual-branch network structure to extract features of different phases, and then cross-layers fuse shallow features with deep features through an adaptive cross-layer feature fusion module, adaptively selects effective information in cross-layer features for fusion, compensates for the spatial texture information lost due to the increase in the number of layers, and enables the fused features to complement each other among multiple layers of information. Subsequently, the deep and shallow feature enhancement modules are used to enhance the effective information, so that the network can more effectively focus on and utilize the important features in the hyperspectral image, thereby improving the performance of the model. Therefore, the present invention has the characteristics of good feature extraction quality, high detection accuracy, and few required training samples. BRIEF DESCRIPTION OF THE DRAWINGS

[0105] Figure 1 Multi-temporal hyperspectral image change detection method based on cross-layer feature fusion.

[0106] Figure 2 yes Figure 1 Schematic diagram of the medium-depth and shallow feature enhancement module.

[0107] Figure 3 This is a comparison chart of the change detection results of the Irrigated Agricultural Area dataset using the method of the present invention and the MMP method, GETNET method, DBDA method, SSCNN-S method, GTMSiam method and CSANet method.

[0108] Figure 4 This is a comparison chart of the change detection results of the Wetland Agricultural Area data set by the method of the present invention and the MMP method, GETNET method, DBDA method, SSCNN-S method, GTMSiam method and CSANet method.

[0109] Figure 5 This is a comparison chart of the change detection results of the River Area data set between the method of the present invention and the MMP method, GETNET method, DBDA method, SSCNN-S method, GTMSiam method and CSANet method. DETAILED DESCRIPTION

[0110] The present invention provides a multi-temporal hyperspectral image change detection method based on cross-layer feature fusion. Figure 1 , 2 As shown, follow the steps below:

[0111] Step 1. Establish and initialize the convolutional neural network N for hyperspectral image change detection CD , the N CD Contains 1 subnetwork N for feature extraction feature and a subnetwork N for change detectioncls ;

[0112] Step 1.1 Create and initialize subnetwork N feature , the sub-network N feature There are 6 groups of convolutional layers and 2 groups of custom modules. The 6 groups of convolutional layers are Conv2_0, Conv2_1, Conv2_2, Conv2_3, Conv2_4, Conv2_5, and the 2 groups of custom modules are L MASF , L CBAM ;

[0113] The operation sequence of Conv2_0 is 1 convolution operation, 1 activation operation, 1 convolution operation, 1 activation operation and 1 maximum pooling operation. The size of the convolution kernel in the convolution operation is 3×3, and each convolution kernel performs a convolution operation with a step size of 1 pixel. The activation operation uses a nonlinear activation function ReLU as an activation function for operation, and the maximum pooling operation uses a pooling kernel of size 3×3 for maximum pooling operation.

[0114] The operation sequence of Conv2_1 is 1 convolution operation, 1 activation operation, 1 convolution operation and 1 activation operation. The size of the convolution kernel in the convolution operation is 3×3, and each convolution kernel performs convolution operation with a step size of 1 pixel. The activation operation uses the nonlinear activation function ReLU as the activation function for operation.

[0115] The operation sequence of Conv2_2 is 1 convolution operation and 1 activation operation. The size of the convolution kernel in the convolution operation is 3×3, and each convolution kernel performs convolution operation with a step size of 1 pixel. The activation operation uses the nonlinear activation function ReLU as the activation function for operation.

[0116] The operation sequence of Conv2_3 is 1 convolution operation and 1 activation operation. The size of the convolution kernel in the convolution operation is 3×3, and each convolution kernel performs convolution operation with a step size of 1 pixel. The activation operation uses the nonlinear activation function ReLU as the activation function for operation.

[0117] Conv2_4 has one convolution operation layer, in which the size of the convolution kernel in the convolution layer is 1×1, each convolution kernel performs convolution operation with a step size of 1 pixel, and then performs a Dropout operation with a parameter of 0.1;

[0118] Conv2_5 has one convolution operation layer, in which the size of the convolution kernel in the convolution layer is 1×1, each convolution kernel performs convolution operation with a step size of 1 pixel, and then performs a Dropout operation with a parameter of 0.1;

[0119] The LMASF The module first adds the two input tensors F1 and F2 according to formula (1) to obtain the feature map F obtained by element-wise summation. sum :

[0120] F sum =F1+F2 (1)

[0121] According to formula (2), a global average pooling operation is used to compress the spatial dimension of the input feature map, a convolutional layer with a size of 1×1 is used to obtain compact features, and a ReLU activation function is used to control the coefficients to generate the feature F m :

[0122] F m =ReLU(f 1×1 (Avgpool(F sum ))) (2)

[0123] Among them, f 1×1 represents a 1×1 convolution operation, and Avgpool(·) represents a global average pooling operation;

[0124] According to formula (3), the weight F is calculated through the convolution layer and the SoftMax function. m ′:

[0125] F m ′=ε(fc i (F m (F sum ))), i =1 ,2 (3)

[0126] Where ε represents the SoftMax function, fc i It is a fully connected operation with the same structure and no parameter sharing;

[0127] According to formula (4), the input feature map is multiplied by the shared weight to obtain a feature map that can highlight useful areas and suppress useless areas.

[0128]

[0129] Among them, [·,·] represents the concatenation of feature map groups, Represents tensor multiplication;

[0130] The L CBAM The module first performs global maximum pooling and global average pooling operations on the input feature map F according to formulas (5) and (6) to obtain the maximum response and average response of the channel. The multi-layer perceptron structure containing two convolutional layers is used to process the results of maximum pooling and average pooling to obtain ω respectively. max_out and ωavg_out :

[0131] ω max_out =σ(MLP(AdaptiveMaxPool2d(F))) (5)

[0132] ω avg_out =σ(MLP(AdaptiveAvgPool2d(F))) (6)

[0133] Among them, σ represents the Sigmoid activation function, MLP represents a multi-layer perceptron with two convolutional layers, AdaptiveMaxPool2d is an adaptive maximum pooling operation, and AdaptiveAugPool2d is an adaptive average pooling operation;

[0134] According to formula (7), use the Sigmoid activation function to convert ω max_out and ω avg_out Scale to the range of (0,1) to get the channel attention weight ω channel_out :

[0135] ω channel_out =σ(ω max_out +ω avg_out ) (7)

[0136] The channel attention weight ω channel_out Multiply it with the input feature map F to get the weighted feature map F A :

[0137] F A =ω channel_out ×F (8)

[0138] According to formulas (9) and (10), the weighted feature map F A Perform maximum and average pooling on the channel dimension to obtain ωs max_out and ωs avg_out :

[0139] ωs max_out =max(F A ) (9)

[0140] ωs max_out =mean(F A ) (10)

[0141] According to formula (11), ωs max_out and ωs avg_out Splicing in the channel dimension, convolving the spliced ​​feature map through a convolution layer, and then using the Sigmoid activation function to scale it to the range of (0,1) to obtain the spatial attention weight ωsspatial_out :

[0142] ωs spatial_out =σ(Conv2d([ωs max_out ,ωs avg_out ])) (11)

[0143] According to formula (12), the spatial attention weight ωs spatial_out And the weighted feature map F A Multiply them together to get the final feature map F FA :

[0144] F FA =ωs spatial_out ×F A (12)

[0145] Step 1.2 Create and initialize subnetwork N cls , contains 1 convolutional layer Conv2_6 and 1 fully connected layer FC;

[0146] The operation sequence of the Conv2_6 is 1 layer of convolution operation, 1 layer of BatchNorm normalization operation, 1 layer of activation operation, 1 layer of maximum pooling operation, 1 layer of convolution operation, 1 layer of BatchNorm normalization operation and 1 layer of activation operation. The size of the convolution kernel in the convolution operation is 3×3, and each convolution kernel performs convolution operation with a step size of 1 pixel. The activation operation uses the nonlinear activation function LeakyReLU as the activation function for operation. The maximum pooling operation performs the maximum pooling operation with a pooling kernel of size 2×2.

[0147] The operation sequence of the FC is 1 layer of maximum pooling operation, 1 layer of full connection operation and 1 layer of activation operation. The maximum pooling operation is performed with a pooling kernel of size 2×2. The activation operation is performed by selecting a nonlinear activation function sigmoid as an activation function.

[0148] Step 2. Input the hyperspectral image I1∈R of the first phase M×N×D , the second phase of the hyperspectral image I2∈R M ×N×D , the manually labeled pixel point coordinate set and label set, for N CD Training is performed, where M and N are the spatial scales of the hyperspectral image, and D is the spectral dimension;

[0149] Step 2.1. Based on the manually labeled pixel point coordinate set, in the hyperspectral image I1∈R M×N×D and the hyperspectral image I2∈R of the second phase M×N×D Extract all pixel points with labels from and in, Represents X D1 The i-th Train Pixel points, Represents X D2 The i-th Train Pixel points, M Train Represents the total number of pixel points with labels;

[0150] Step 2.2. X D1 and X D2 As the training set of the convolutional neural network, let the number of iterations iter←1 and execute step 2.3;

[0151] Step 2.3. Use network N CD Extract features from the training set and perform change detection tasks;

[0152] Step 2.3.1 Using subnetwork N feature Conv2_0, Conv2_1, Conv2_2 are on X D1 Perform feature extraction to obtain the feature F of the hyperspectral image in the first phase 11 ;

[0153] Step 2.3.2 Using subnetwork N feature Conv2_0, Conv2_1, Conv2_2, Conv2_3 are on X D1 Perform feature extraction to obtain the feature F of the hyperspectral image in the first phase 12 ;

[0154] Step 2.3.3 Using subnetwork N feature Conv2_0, Conv2_1, Conv2_2, Conv2_3, Conv2_4 are on X D1 Perform feature extraction to obtain the feature F of the hyperspectral image in the first phase 13 ;

[0155] Step 2.3.4 Using subnetwork N feature Conv2_0, Conv2_1, Conv2_2, Conv2_3, Conv2_4, Conv2_5 are on X D1 Perform feature extraction to obtain the feature F of the hyperspectral image in the first phase 14 ;

[0156] Step 2.3.5 Using subnetwork N feature Conv2_0, Conv2_1, Conv2_2 are on X D2 Perform feature extraction to obtain the feature F of the hyperspectral image of the second phase 21 ;

[0157] Step 2.3.6 Using subnetwork N feature Conv2_0, Conv2_1, Conv2_2, Conv2_3 are on X D2 Perform feature extraction to obtain the feature F of the hyperspectral image of the second phase 22 ;

[0158] Step 2.3.7 Using subnetwork N feature Conv2_0, Conv2_1, Conv2_2, Conv2_3, Conv2_4 are on X D2 Perform feature extraction to obtain the feature F of the hyperspectral image of the second phase 23 ;

[0159] Step 2.3.8 Using subnetwork N feature Conv2_0, Conv2_1, Conv2_2, Conv2_3, Conv2_4, Conv2_5 are on X D2 Perform feature extraction to obtain the feature F of the hyperspectral image of the second phase 24 ;

[0160] Step 2.3.9 Using L MASF Module pair F 11 and F 13 Perform feature extraction to obtain the cross-layer feature F of the hyperspectral image of the first phase 1113 ;

[0161] Step 2.3.10 Using L MASF Module pair F 12 and F 14 Perform feature extraction to obtain the cross-layer feature F of the hyperspectral image of the first phase 1214 ;

[0162] Step 2.3.11 Using L MASF Module pair F 21 and F 23 Perform feature extraction to obtain the cross-layer feature F of the hyperspectral image of the second phase 2123 ;

[0163] Step 2.3.12 Using L MASF Module pair F 22 and F 24 Perform feature extraction to obtain the cross-layer feature F of the hyperspectral image of the second phase 2224 ;

[0164] Step 2.3.13 Using L CBAM Module pair F 1113Perform feature extraction to obtain the cross-layer attention feature F of the hyperspectral image in the first phase cbam_1113 ;

[0165] Step 2.3.14 Using L CBAM Module pair F 1214 Perform feature extraction to obtain the cross-layer attention feature F of the hyperspectral image in the first phase cbam_1214 ;

[0166] Step 2.3.15 Using L CBAM Module pair F 2123 Perform feature extraction to obtain the cross-layer attention feature F of the hyperspectral image of the second phase cbam_2123 ;

[0167] Step 2.3.16 Using L CBAM Module pair F 2224 Perform feature extraction to obtain the cross-layer attention feature F of the hyperspectral image of the second phase cbam_2224 ;

[0168] Step 2.3.17 According to formula (13), cbam_1113 and F cbam_2123 Difference:

[0169] F K1 =F cbam_1113 -F cbam_2123 (13)

[0170] Step 2.3.18 According to formula (14), cbam_1214 and F cbam_2224 Difference:

[0171] F K1 =F cbam_1214 -F cbam_2224 (14)

[0172] Step 2.3.19: According to formula (15), K1 and F K2 Sum:

[0173] F K =F K1 +F K2 (15)

[0174] Step 2.3.20 Using subnetwork N cls Classify the features and calculate the classification prediction result TR pred ;:

[0175] Step 2.4: According to the definitions of formula (16) and formula (17), the weighted cross entropy is used as the loss function;

[0176]

[0177] in, Indicates the jth cls The weight of the class, Indicates that the pixel belongs to the jth cls The probability of a ground-like object, Indicates the jth ground-truth training sample cls The number of features;

[0178] In step 2.5, if all pixel blocks in the training set have been processed, proceed to step 2.6; otherwise, take a group of unprocessed pixel blocks from the training set and return to step 2.3;

[0179] Step 2.6 Let iter←iter+1. If the number of iterations iter>Total_iter, the trained convolutional neural network N is obtained. CD , go to step 3, otherwise, use the reverse error propagation algorithm based on stochastic gradient descent and the prediction loss L w-C Update N cd , go to step 2.3 to reprocess all pixel blocks in the training set, and the Total_iter represents the preset number of iterations;

[0180] Step 3. Input the hyperspectral image I1′∈R of the first phase to be measured M′×N′×D′ , the hyperspectral image of the second phase I2′∈R M′×N′×D′ , using the fully trained N CD Test, where M′, N′ is the spatial scale of the hyperspectral image, and D′ is the spectral dimension;

[0181] Step 3.1. Hyperspectral image I1′∈R in the first phase M′×N′×D′ and the hyperspectral image I2′∈R of the second phase M′×N′×D′ Extract all pixel point sets from and in, Represents X D1 ′ in the i test Pixel points, Represents X D2 ′ in the i test Pixel points, M test Indicates the total number of pixel points with labels;

[0182] Step 3.2. X D1 ′ and X D2 ′ is taken as the sample to be tested, and the number of iterations iter←1 is set, and step 3.3 is executed;

[0183] Step 3.3. Use network N CD Extract the sample features that need to be tested and perform change detection tasks;

[0184] Step 3.3.1 Using subnetwork N feature Conv2_0, Conv2_1, Conv2_2 are on X D1 ′ to extract features and obtain the feature F of the hyperspectral image of the first phase 11 ′;

[0185] Step 3.3.2 Using subnetwork N feature Conv2_0, Conv2_1, Conv2_2, Conv2_3 are on X D1 ′ to extract features and obtain the feature F of the hyperspectral image of the first phase 12 ′;

[0186] Step 3.3.3 Using subnetwork N feature Conv2_0, Conv2_1, Conv2_2, Conv2_3, Conv2_4 are on X D1 ′ to extract features and obtain the feature F of the hyperspectral image of the first phase 13 ′;

[0187] Step 3.3.4 Using subnetwork N feature Conv2_0, Conv2_1, Conv2_2, Conv2_3, Conv2_4, Conv2_5 are on X D1 ′ to extract features and obtain the feature F of the hyperspectral image of the first phase 14 ′;

[0188] Step 3.3.5 Using subnetwork N feature Conv2_0, Conv2_1, Conv2_2 are on X D2 ′ to extract features and obtain the feature F of the hyperspectral image of the second phase 21 ′;

[0189] Step 3.3.6 Using subnetwork N feature Conv2_0, Conv2_1, Conv2_2, Conv2_3 are on X D2 ′ to extract features and obtain the feature F of the hyperspectral image of the second phase 22 ′;

[0190] Step 3.3.7 Using subnetwork N feature Conv2_0, Conv2_1, Conv2_2, Conv2_3, Conv2_4 are on X D2′ to extract features and obtain the feature F of the hyperspectral image of the second phase 23 ′;

[0191] Step 3.3.8 Using subnetwork N feature Conv2_0, Conv2_1, Conv2_2, Conv2_3, Conv2_4, Conv2_5 are on X D2 ′ to extract features and obtain the feature F of the hyperspectral image of the second phase 24 ′;

[0192] Step 3.3.9 Using L MASF Module pair F 11 ′ and F 13 ′ to extract features and obtain the cross-layer features F of the hyperspectral image of the first phase 1113 ′;

[0193] Step 3.3.10 Using L MASF Module pair F 12 ′ and F 14 ′ to extract features and obtain the cross-layer features F of the hyperspectral image of the first phase 1214 ′;

[0194] Step 3.3.11 Using L MASF Module pair F 21 ′ and F 23 ′ to extract features and obtain the cross-layer features F of the hyperspectral image of the second phase 2123 ′;

[0195] Step 3.3.12 Using L MASF Module pair F 22 ′ and F 24 ′ to extract features and obtain the cross-layer features F of the hyperspectral image of the second phase 2224 ′;

[0196] Step 3.3.13 Using L CBAM Module pair F 1113 ′ to extract features and obtain the cross-layer attention features F of the hyperspectral image of the first phase cbam_1113 ′;

[0197] Step 3.3.14 Using L CBAM Module pair F 1214 ′ to extract features and obtain the cross-layer attention features F of the hyperspectral image of the first phase cbam_1214 ′;

[0198] Step 3.3.15 Using L CBAM Module pair F 2123′ to extract features and obtain the cross-layer attention features F of the hyperspectral image of the second phase cbam_2123 ′;

[0199] Step 3.3.16 Using L CBAM Module pair F 2224 ′ to extract features and obtain the cross-layer attention features F of the hyperspectral image of the second phase cbam_2224 ′;

[0200] Step 3.3.17: According to formula (18), cbam_1113 ′ and F cbam_2123 ′Find the difference:

[0201] F K1 ′=F cbam_1113 ′-F cbam_2123 ′ (18)

[0202] Step 3.3.18 According to formula (19), cbam_1214 ′ and F cbam_2224 ′Find the difference:

[0203] F K1 ′=F cbam_1214 ′-F cbam_2224 ′ (19)

[0204] Step 3.3.19: According to formula (20), K1 ′ and F K2 ′Sum:

[0205] F K ′=F K1 ′+F K2 ′ (20)

[0206] Step 3.3.20 Using subnetwork N cls Classify the features and calculate the final change detection prediction result TE pred .

[0207] To verify the effectiveness of the present invention, experiments were conducted using the publicly available Irrigated Agricultural Area dataset, Wetland Agricultural Area dataset, and River Area dataset. Overall Accuracy (OA) and Kappa Coefficient (KC) were used as objective indicators to evaluate the transformation detection results. The results are shown in Tables 1, 2, and 3.

[0208] Table 1 Objective evaluation indicators of the Irrigated Agricultural Area dataset under different algorithms

[0209]

[0210] Table 2 Objective evaluation indicators of the Wetland Agricultural Area dataset under different algorithms

[0211]

[0212] Table 3 Objective evaluation indicators of the River Area dataset under different algorithms

[0213]

[0214] According to Tables 1, 2, and 3, it can be seen that the OA and KC of the present invention are superior to the comparison algorithms. KC takes into account the accuracy of classification and the accuracy that may be caused by random selection, so it can make a more accurate evaluation of the performance of the algorithm. The KC of the present invention has been significantly improved on the three data sets, indicating that it has more advantages in the change detection task. The introduced adaptive cross-layer feature fusion module can adaptively select effective information in the cross-layer features for fusion, so that the fused features can achieve complementarity between multiple layers of information. The depth feature enhancement module introduced subsequently can extract important information in the features and enhance the effective information, focus on key areas, and effectively utilize important features in the image, thereby improving the performance of the model. The combination of these two modules is of great help in improving the accuracy of change detection.

[0215] The evaluation results of the present invention are compared with those of the MMP method, the GETNET method, the DBDA method, the SSCNN-S method, the GTMSiam method and the CSANet method. Figure 3 , 4 , as shown in Figure 5.

[0216] Figure 3 The Irrigated Agricultural Area dataset mainly records the increase in agricultural land area, and its development in time and space is relatively intuitive, so the texture details of this dataset are not rich enough. The contrast algorithm contains noise points that may interfere with or confuse the results and unchanged points that are mistakenly marked as changes. The depth feature enhancement module introduced in the present invention enables the model to effectively capture important information in the image, and the resulting image shows clearer and sharper edges. Figure 4In the Wetland Agricultural Area dataset, the present invention uses an adaptive cross-layer feature fusion module to effectively fuse deep and shallow features, which well compensates for the spatial texture information lost due to the increase in the number of layers, has a good treatment of edge and texture details, and produces less blur or confusion. Compared with the true value map, there are few cases of misjudgment or omission of pixels, and it can well distinguish between changed and unchanged pixel points, showing a certain degree of superiority. Figure 5 The comparison algorithm of the RiverArea dataset contains invariant points that are incorrectly marked as changes. It can be seen from the result graph of the present invention that the present invention better captures the detailed information of river changes.

[0217] The experimental results show that the proposed method has achieved the result closest to Ground Truth (GT). In the change detection task, KC is considered to be the most convincing objective evaluation index. The KC value of the proposed algorithm on the three datasets of Irrigated Agricultural Area, Wetland Agricultural Area and River is 1%, 1.6% and 0.7% higher than the second best algorithm respectively. Therefore, it can be shown that the proposed algorithm is superior to other algorithms in accuracy and has better performance.

Claims

1. A multi-temporal hyperspectral image change detection method based on cross-layer feature fusion, characterized in that Proceed as follows: Step 1. Establish and initialize the convolutional neural network N for hyperspectral image change detection CD , the N CD Contains 1 subnetwork N for feature extraction feature and a subnetwork N for change detection cls ; Step 1.1 Create and initialize subnetwork N feature , the sub-network N feature There are 6 groups of convolutional layers and 2 groups of custom modules. The 6 groups of convolutional layers are Conv2_0, Conv2_1, Conv2_2, Conv2_3, Conv2_4, Conv2_5, and the 2 groups of custom modules are L MASF , L CBAM ; The operation sequence of Conv2_0 is 1 convolution operation, 1 activation operation, 1 convolution operation, 1 activation operation and 1 maximum pooling operation. The size of the convolution kernel in the convolution operation is 3×3, and each convolution kernel performs a convolution operation with a step size of 1 pixel. The activation operation uses a nonlinear activation function ReLU as an activation function for operation, and the maximum pooling operation uses a pooling kernel of size 3×3 for maximum pooling operation. The operation sequence of Conv2_1 is 1 convolution operation, 1 activation operation, 1 convolution operation and 1 activation operation. The size of the convolution kernel in the convolution operation is 3×3, and each convolution kernel performs convolution operation with a step size of 1 pixel. The activation operation uses the nonlinear activation function ReLU as the activation function for operation. The operation sequence of Conv2_2 is 1 convolution operation and 1 activation operation. The size of the convolution kernel in the convolution operation is 3×3, and each convolution kernel performs convolution operation with a step size of 1 pixel. The activation operation uses the nonlinear activation function ReLU as the activation function for operation. The operation sequence of Conv2_3 is 1 convolution operation and 1 activation operation. The size of the convolution kernel in the convolution operation is 3×3, and each convolution kernel performs convolution operation with a step size of 1 pixel. The activation operation uses the nonlinear activation function ReLU as the activation function for operation. Conv2_4 has one convolution operation layer, in which the size of the convolution kernel in the convolution layer is 1×1, each convolution kernel performs convolution operation with a step size of 1 pixel, and then performs a Dropout operation with a parameter of 0.1; Conv2_5 has one convolution operation layer, in which the size of the convolution kernel in the convolution layer is 1×1, each convolution kernel performs convolution operation with a step size of 1 pixel, and then performs a Dropout operation with a parameter of 0.1; The L MASF The module first adds the two input tensors F1 and F2 according to formula (1) to obtain the feature map F obtained by element-wise summation. sum : F sum =F1+F2 (1) According to formula (2), a global average pooling operation is used to compress the spatial dimension of the input feature map, a convolutional layer with a size of 1×1 is used to obtain compact features, and a ReLU activation function is used to control the coefficients to generate the feature F m : F m =ReLU(f 1×1 (Avgpool(F sum ))) (2) Among them, f 1×1 represents a 1×1 convolution operation, and Avgpool(·) represents a global average pooling operation; According to formula (3), the weight F is calculated through the convolution layer and the SoftMax function. m ′: F m ′=ε(fc i (F m (F sum ))),i=1,2 (3) Where ε represents the SoftMax function, fc i It is a fully connected operation with the same structure and no parameter sharing; According to formula (4), the input feature map is multiplied by the shared weight to obtain the feature map: Among them, [·,·] represents the concatenation of feature map groups, Represents tensor multiplication; The L CBAM The module first performs global maximum pooling and global average pooling operations on the input feature map F according to formulas (5) and (6) to obtain the maximum response and average response of the channel. The multi-layer perceptron structure containing two convolutional layers is used to process the results of maximum pooling and average pooling to obtain ω respectively. max_out and ω avg_out : ω max_out =σ(MLP(AdaptiveMaxPool2d(F))) (5) ω avg_out =σ(MLP(AdaptiveAvgPool2d(F))) (6) Among them, σ represents the Sigmoid activation function, MLP represents a multi-layer perceptron with two convolutional layers, AdaptiveMaxPool2d is an adaptive maximum pooling operation, and AdaptiveAugPool2d is an adaptive average pooling operation; According to formula (7), use the Sigmoid activation function to convert ω max_out and ω avg_out Scale to the range of (0,1) to get the channel attention weight ω channel_out : oh channel_out =σ(ω max_out +oh avg_out ) (7) The channel attention weight ω channel_out Multiply it with the input feature map F to get the weighted feature map F A : F A =ω channel_out ×F (8) According to formulas (9) and (10), the weighted feature map F A Perform maximum and average pooling on the channel dimension to obtain ωs max_out and ωs avg_out : oh max_out =max(F A ) (9) ωs max_out =mean(F A ) (10) According to formula (11), ωs max_out and ωs avg_out Splicing in the channel dimension, convolving the spliced ​​feature map through a convolution layer, and then using the Sigmoid activation function to scale it to the range of (0,1) to obtain the spatial attention weight ωs spatial_out : oh spatial_out =σ(Conv2d([ωs max_out ,ωs avg_out ])) (11) According to formula (12), the spatial attention weight ωs spatial_out And the weighted feature map F A Multiply them together to get the final feature map F FA : F FA =ωs spatial_out ×F A (12) Step 1.2 Create and initialize subnetwork N cls , contains 1 convolutional layer Conv2_6 and 1 fully connected layer FC; The operation sequence of the Conv2_6 is 1 layer of convolution operation, 1 layer of BatchNorm normalization operation, 1 layer of activation operation, 1 layer of maximum pooling operation, 1 layer of convolution operation, 1 layer of BatchNorm normalization operation and 1 layer of activation operation. The size of the convolution kernel in the convolution operation is 3×3, and each convolution kernel performs convolution operation with a step size of 1 pixel. The activation operation uses the nonlinear activation function LeakyReLU as the activation function for operation. The maximum pooling operation performs the maximum pooling operation with a pooling kernel of size 2×2. The operation sequence of the FC is 1 layer of maximum pooling operation, 1 layer of full connection operation and 1 layer of activation operation. The maximum pooling operation is performed with a pooling kernel of size 2×2. The activation operation is performed by selecting a nonlinear activation function sigmoid as an activation function. Step 2. Input the hyperspectral image I1∈R of the first phase M×N×D , the second phase of the hyperspectral image I2∈R M×N×D , the manually labeled pixel point coordinate set and label set, for N CD Training is performed, where M and N are the spatial scales of the hyperspectral image, and D is the spectral dimension; Step 2.

1. Based on the manually labeled pixel point coordinate set, in the hyperspectral image I1∈R M×N×D and the hyperspectral image I2∈R of the second phase M×N×D Extract all pixel points with labels from and in, Represents X D1 The i-th Train Pixel points, Represents X D2 The i-th Train Pixel points, M Train Indicates the total number of pixel points with labels; Step 2.

2. X D1 and X D2 As the training set of the convolutional neural network, let the number of iterations iter←1 and execute step 2.3; Step 2.

3. Use network N CD Extract features from the training set and perform change detection tasks; Step 2.3.1 Using subnetwork N feature Conv2_0, Conv2_1, Conv2_2 are on X D1 Perform feature extraction to obtain the feature F of the hyperspectral image in the first phase 11 ; Step 2.3.2 Using subnetwork N feature Conv2_0, Conv2_1, Conv2_2, Conv2_3 are on X D1 Perform feature extraction to obtain the feature F of the hyperspectral image in the first phase 12 ; Step 2.3.3 Using subnetwork N feature Conv2_0, Conv2_1, Conv2_2, Conv2_3, Conv2_4 are on X D1 Perform feature extraction to obtain the feature F of the hyperspectral image in the first phase 13 ; Step 2.3.4 Using subnetwork N feature Conv2_0, Conv2_1, Conv2_2, Conv2_3, Conv2_4, Conv2_5 are on X D1 Perform feature extraction to obtain the feature F of the hyperspectral image in the first phase 14 ; Step 2.3.5 Using subnetwork N feature Conv2_0, Conv2_1, Conv2_2 are on X D2 Perform feature extraction to obtain the feature F of the hyperspectral image of the second phase 21 ; Step 2.3.6 Using subnetwork N feature Conv2_0, Conv2_1, Conv2_2, Conv2_3 are on X D2 Perform feature extraction to obtain the feature F of the hyperspectral image of the second phase 22 ; Step 2.3.7 Using subnetwork N feature Conv2_0, Conv2_1, Conv2_2, Conv2_3, Conv2_4 are on X D2 Perform feature extraction to obtain the feature F of the hyperspectral image of the second phase 23 ; Step 2.3.8 Using subnetwork N feature Conv2_0, Conv2_1, Conv2_2, Conv2_3, Conv2_4, Conv2_5 are on X D2 Perform feature extraction to obtain the feature F of the hyperspectral image of the second phase 24 ; Step 2.3.9 Using L MASF Module pair F 11 and F 13 Perform feature extraction to obtain the cross-layer feature F of the hyperspectral image of the first phase 1113 ; Step 2.3.10 Using L MASF Module pair F 12 and F 14 Perform feature extraction to obtain the cross-layer feature F of the hyperspectral image of the first phase 1214 ; Step 2.3.11 Using L MASF Module pair F 21 and F 23 Perform feature extraction to obtain the cross-layer feature F of the hyperspectral image of the second phase 2123 ; Step 2.3.12 Using L MASF Module pair F 22 and F 24 Perform feature extraction to obtain the cross-layer feature F of the hyperspectral image of the second phase 2224 ; Step 2.3.13 Using L CBAM Module pair F 1113 Perform feature extraction to obtain the cross-layer attention feature F of the hyperspectral image in the first phase cbam_1113 ; Step 2.3.14 Using L CBAM Module pair F 1214 Perform feature extraction to obtain the cross-layer attention feature F of the hyperspectral image in the first phase cbam_1214 ; Step 2.3.15 Using L CBAM Module pair F 2123 Perform feature extraction to obtain the cross-layer attention feature F of the hyperspectral image of the second phase cbam_2123 ; Step 2.3.16 Using L CBAM Module pair F 2224 Perform feature extraction to obtain the cross-layer attention feature F of the hyperspectral image of the second phase cbam_2224 ; Step 2.3.17 According to formula (13), cbam_1113 and F cbam_2123 Difference: F K1 =F cbam_1113 -F cbam_2123 (13) Step 2.3.18 According to formula (14), cbam_1214 and F cbam_2224 Difference: F K1 =F cbam_1214 -F cbam_2224 (14) Step 2.3.19: According to formula (15), K1 and F K2 Sum: F K =F K1 +F K2 (15) Step 2.3.20 Using subnetwork N cls Classify the features and calculate the classification prediction result TR pred ;: Step 2.4: According to the definitions of formula (16) and formula (17), the weighted cross entropy is used as the loss function; in, Indicates the jth cls The weight of the class, Indicates that the pixel belongs to the jth cls The probability of a ground-like object, Indicates the jth ground-truth training sample cls The number of features; In step 2.5, if all pixel blocks in the training set have been processed, proceed to step 2.6; otherwise, take a group of unprocessed pixel blocks from the training set and return to step 2.3; Step 2.6 Let iter←iter+1. If the number of iterations iter>Total_iter, the trained convolutional neural network N is obtained. CD , go to step 3, otherwise, use the reverse error propagation algorithm based on stochastic gradient descent and the prediction loss L w-C Update N cd , go to step 2.3 to reprocess all pixel blocks in the training set, and the Total_iter represents the preset number of iterations; Step 3. Input the hyperspectral image I1′∈R of the first phase to be measured M′×N′×D′ , the hyperspectral image of the second phase I2′∈R M′×N′×D′ , using the fully trained N CD The test is performed, where M′ and N′ are the spatial scales of the hyperspectral image, and D′ is the spectral dimension; Step 3.

1. Hyperspectral image I1′∈R in the first phase M′×N′×D′ and the hyperspectral image I2′∈R of the second phase M′ ×N′× D′ Extract all pixel point sets from and in, Represents X D1 ′ in the i test Pixel points, Represents X D2 ′ in the i test Pixel points, M test Indicates the total number of pixel points with labels; Step 3.

2. X D1 ′ and X D2 ′ is taken as the sample to be tested, and the number of iterations iter←1 is set, and step 3.3 is executed; Step 3.

3. Use network N CD Extract the sample features that need to be tested and perform change detection tasks; Step 3.3.1 Using subnetwork N feature Conv2_0, Conv2_1, Conv2_2 are on X D1 ′ to extract features and obtain the feature F of the hyperspectral image of the first phase 11 ′; Step 3.3.2 Using subnetwork N feature Conv2_0, Conv2_1, Conv2_2, Conv2_3 are on X D1 ′ to extract features and obtain the feature F of the hyperspectral image of the first phase 12 ′; Step 3.3.3 Using subnetwork N feature Conv2_0, Conv2_1, Conv2_2, Conv2_3, Conv2_4 are on X D1 ′ to extract features and obtain the feature F of the hyperspectral image of the first phase 13 ′; Step 3.3.4 Using subnetwork N feature Conv2_0, Conv2_1, Conv2_2, Conv2_3, Conv2_4, Conv2_5 are on X D1 ′ to extract features and obtain the feature F of the hyperspectral image of the first phase 14 ′; Step 3.3.5 Using subnetwork N feature Conv2_0, Conv2_1, Conv2_2 are on X D2 ′ to extract features and obtain the feature F of the hyperspectral image of the second phase 21 ′; Step 3.3.6 Using subnetwork N feature Conv2_0, Conv2_1, Conv2_2, Conv2_3 are on X D2 ′ to extract features and obtain the feature F of the hyperspectral image of the second phase 22 ′; Step 3.3.7 Using subnetwork N feature Conv2_0, Conv2_1, Conv2_2, Conv2_3, Conv2_4 are on X D2 ′ to extract features and obtain the feature F of the hyperspectral image of the second phase 23 ′; Step 3.3.8 Using subnetwork N feature Conv2_0, Conv2_1, Conv2_2, Conv2_3, Conv2_4, Conv2_5 are on X D2 ′ to extract features and obtain the feature F of the hyperspectral image of the second phase 24 ′; Step 3.3.9 Using L MASF Module pair F 11 ′ and F 13 ′ to extract features and obtain the cross-layer features F of the hyperspectral image of the first phase 1113 ′; Step 3.3.10 Using L MASF Module pair F 12 ′ and F 14 ′ to extract features and obtain the cross-layer features F of the hyperspectral image of the first phase 1214 ′; Step 3.3.11 Using L MASF Module pair F 21 ′ and F 23 ′ to extract features and obtain the cross-layer features F of the hyperspectral image of the second phase 2123 ′; Step 3.3.12 Using L MASF Module pair F 22 ′ and F 24 ′ to extract features and obtain the cross-layer features F of the hyperspectral image of the second phase 2224 ′; Step 3.3.13 Using L CBAM Module pair F 1113 ′ to extract features and obtain the cross-layer attention features F of the hyperspectral image of the first phase cbam_1113 ′; Step 3.3.14 Using L CBAM Module pair F 1214 ′ to extract features and obtain the cross-layer attention features F of the hyperspectral image of the first phase cbam_1214 ′; Step 3.3.15 Using L CBAM Module pair F 2123 ′ to extract features and obtain the cross-layer attention features F of the hyperspectral image of the second phase cbam_2123 ′; Step 3.3.16 Using L CBAM Module pair F 2224 ′ to extract features and obtain the cross-layer attention features F of the hyperspectral image of the second phase cbam_2224 ′; Step 3.3.17: According to formula (18), cbam_1113 ′ and F cbam_2123 ′Find the difference: F K1 ′=F cbam_1113 ′-F cbam_2123 ′ (18) Step 3.3.18 According to formula (19), cbam_1214 ′ and F cbam_2224 ′Find the difference: F K1 ′=F cbam_1214 ′-F cbam_2224 ′ (19) Step 3.3.19: According to formula (20), K1 ′ and F K2 ′Sum: F K ′=F K1 ′+F K2 ′ (20) Step 3.3.20 Using subnetwork N cls Classify the features and calculate the final change detection prediction result TE pred .

Citation Information

Cited By

  • Cross-scale space-time fusion ground feature classification method based on double-branch architecture

    CN121121529A