CN-121982342-A - Hyperspectral image change detection method based on weighted cascade encoder
Abstract
The invention discloses a hyperspectral image change detection method based on a weighted cascade encoder, which comprises the steps of S1 establishing a data set, S2 establishing a detection model, S3 training the detection model, and S4 inputting an image pair to be detected into the detection model to obtain a detection result. The invention adopts a mode of comparing and extracting firstly, adopts a weighted cascade encoder, concentrates resources to understand and analyze the difference characteristics of the images, effectively simplifies the extraction of a large number of background areas without change, improves the extraction efficiency, then carries out sectional treatment on the difference characteristics, distributes learned weights one by one to judge important wave bands, gives higher weights to generate a space-spectrum characteristic module, effectively amplifies the information of the key difference characteristics, decodes the fused space-spectrum characteristic module finally through a decoder, judges whether the images change or not, thereby achieving the purpose of flexibly realizing the attention of different intensities of different wave band ranges and improving the detection efficiency.
Inventors
- CHEN YAXIONG
- ZHANG BO
- SU SHICHAO
- XIONG SHENGWU
Assignees
- 武汉理工大学三亚科教创新园
Dates
- Publication Date
- 20260505
- Application Date
- 20260409
Claims (3)
- 1. The hyperspectral image change detection method based on the weighted cascade encoder is characterized by comprising the following steps of: s1, selecting hyperspectral remote sensing images, and selecting two hyperspectral remote sensing images in the same region and in different periods to form an image pair; s2, constructing a hyperspectral image change detection model, wherein the hyperspectral image change detection model is composed of a differential feature module, a weighted cascade coding module and a decoding module; S21, subtracting the image pair input differential feature module pixel by pixel to obtain a differential feature map; S22, inputting the differential feature map into a weighted cascade coding module for band-by-band grouping processing, weighting by adopting an attention mechanism, gradually enhancing the differential feature by utilizing a cascade mechanism, and finally generating a fused space-spectrum feature map, wherein the weighted cascade coding module comprises a weighted cascade coder; The differential features are subjected to band-by-band grouping processing through a weighted cascade coding module, weighted by adopting an attention mechanism, and gradually enhanced through a cascade mechanism, and the method specifically comprises the following steps of: (1) Input differential feature map in weighted concatenation encoder , (2) The differential characteristic diagram is calculated according to the number of spectral bands Divided into along the wave band direction The calculation formula of each group is as follows: , Wherein, the ; For the number of spectral bands Division in the band direction Differential features of the group; (3) Initializing a learnable group weight parameter as The weight addition is 1: , Wherein, the ; (4) And adopting a cascade mechanism for processing group by group, wherein the coding process is progressive weighted fusion and characteristic enhancement, and the calculation formula is as follows: , , , Wherein, the The weighted cascade encoder is represented by the fact that in the weighted cascade encoder, each group of features is processed and output, SSCA is a space-spectrum cross attention module, each group of features passes through a space-spectrum cross attention module, and the current group of inputs is obtained by multiplying the output of the previous group by the weight and adding the input of the current group; (5) Output of all groups Splicing along the channel dimension: , Wherein, the In order to achieve the result of the stitching, Representing the concatenation, D is the depth dimension of each group, and finally the concatenation result is converted to a 5D tensor using the function einops. , Wherein, the Representing the remolded shape; The output result of the current module is obtained; The spatial-spectral cross attention module extracts information from a spectral dimension and a spatial dimension in each group of characteristics respectively, and performs weighted fusion by using an attention mechanism, and the method comprises the following steps of: (1) Obtaining Then, remodelling into a 5D tensor for 3D convolution, namely extracting information from three orthogonal directions of space depth, space height and space width in parallel, and adopting a depth separable convolution mode, wherein an input channel is 1 and is equivalent to common convolution; Capturing the relationship between the central band and the adjacent bands of each spectrum band by a 3D convolution with a kernel size of 1, 1, k, the convolution kernel having a length in the spectral dimension only and a length of 1 in the spatial dimension and sliding along the spectral axis; Capturing the relationship between the central pixel and the adjacent pixels in the vertical direction on each spectrum band by sliding along the height direction of the image in the vertical scanning mode through a 3D convolution with the kernel size of 1, k and 1; Capturing the relationship between the central pixel and the adjacent pixels in the horizontal direction on each spectrum band by sliding along the width direction of the image in the form of horizontal scanning through a 3D convolution with the kernel size of k, 1, 1; The convolution output of each direction is mapped to the attention weight between [0, 1] by the Sigmoid activation function: , Wherein, the Is a Sigmoid function, i.e. outputs the attention value of each point; Features representing a certain band group Conv3D represents a 3D convolution operation, A spectral attention map is represented and, A horizontal attention-seeking graph is presented, Representing a vertical attention graph; (2) The attention fusion mechanism is adopted to weight the weight direction by direction, three attentions strive to follow element by element and the first Differential features of a group The output characteristics of the calculated images are multiplied by each other, and The original features are subjected to three successive "sifting" and "enhancement" from different dimensions, and Step-wise weighting, the formula is as follows: , Wherein, the Representing an element-by-element multiplication, 、 And Are all feature vectors weighted in calculation; (3) The SSCA module introduces residual connection to integrate the feature after attention enhancement with The output characteristics of the calculated images are added element by element; the final output is added with residual connection: , The final output Is a tensor identical to the input shape, whose internal features are adaptively enhanced from three orthogonal dimensions, spatial and spectral; S23, decoding the space-spectrum characteristic diagram through a decoding module to obtain a change detection result; s3, repeating the steps S21 to S23, training the hyperspectral image change detection model, optimizing calculation and analysis of the difference characteristics of the original ground object, and finally obtaining an optimized hyperspectral image change detection model; S4, inputting the image pair to be detected into a model to obtain a hyperspectral image change detection result.
- 2. The method for detecting hyperspectral image variation based on weighted cascading encoder as claimed in claim 1, wherein the step S21 of obtaining the differential feature map comprises the following steps: (1) Two hyperspectral images in an image pair And The size is: , Wherein: Is the size of the batch to be processed, For the number of spectral bands, For the spatial height of the image, For the spatial width of the image, Indicating that the basic elements constituting the data structure are real numbers; (2) By imaging hyperspectral images And The differential feature map is obtained by subtracting pixels in the spectral dimension, and the calculation formula is as follows: , Wherein, the A differential feature map is shown.
- 3. The method for detecting hyperspectral image variation based on weighted cascading encoders as claimed in claim 1, wherein the step S23 comprises the following steps: (1) Capturing local joint patterns in the spatial and spectral dimensions in the spatial-spectral feature map through a standard 3D convolution layer, namely capturing the local joint patterns in the spatial and spectral dimensions in the spatial-spectral feature map by applying a 3D convolution with a kernel size of (3, 3, 3): , i.e. one with an encoder One sample, 1 input channel, depth of The height is With a width of 5D tensor of (2) Transformed into a new one by a 3D convolution operation, also having Sample, 8 output channels, depth downscaling to The height is reduced to Reduced width to 5D tensor of (2) Then, a batch normalization BatchNorm d and a ReLU activation function are connected, and the stable training is performed and nonlinearity is introduced; (2) 2D convolution feature extraction, namely converting a 3D feature map into a 2D feature map, namely, the channel dimension and the spectrum dimension of the 3D feature map Merging and applying a standard 2D convolution on the new 2D feature map: , Wherein the method comprises the steps of Representing a feature map ready for input to a 2D convolutional layer, output by a 3D convolutional The remodeling is carried out to obtain the product, Is that The number of channels of this 4D tensor is defined by Output channel number 8 and depth: Multiplying to obtain, then connecting a batch normalization BatchNorm d and a ReLU activation function to stabilize training and introduce nonlinearity; (3) 1D convolution dimension reduction, namely obtaining one after 2D convolution feature extraction Is a space feature map of (1) Each space position contains a 100-dimensional feature vector, and all features of the space are aggregated into a single feature vector capable of representing the whole image block; (4) And according to the feature vector, making a final judgment on whether the hyperspectral image changes.
Description
Hyperspectral image change detection method based on weighted cascade encoder Technical Field The invention relates to the technical field of hyperspectral and computer vision, in particular to a hyperspectral image change detection method based on a weighted cascade encoder. Background The hyperspectral remote sensing is a multidimensional information acquisition technology combining an imaging technology and a spectrum technology, is different from the traditional multispectral image in that the hyperspectral image is only in a few or a dozen of broadband, can acquire hundreds or thousands of continuous and narrow spectrum bands for each pixel point of the earth surface, separates mixed light into fine bands through grating and prism aliquoting light devices, realizes the data acquisition of 'map unification', can identify the components of the ground object, distinguish different types of similar objects and invert physical and chemical parameters through analyzing the morphological difference of a spectrum curve, so that the hyperspectral image can realize more accurate identification and analysis of the ground object by capturing the fine physical and chemical property differences of the ground object. The change detection is a core task in remote sensing image processing, and aims to identify and quantify the surface change of the same geographical area at different time points, and by combining hyperspectral technology with the change detection, namely hyperspectral change detection, the subtle changes which are difficult to find by the traditional method, such as subtle changes of vegetation health conditions, slight loss of soil components, evolution of water eutrophication degree and the like, can be detected; therefore, the hyperspectral change detection has great application value and significance in the fields of ecological environment monitoring, disaster evaluation, urban planning, agricultural refined management, military reconnaissance and the like. At present, the core of hyperspectral change detection is how to accurately learn the spectrum characteristic difference between different time phases so as to judge whether the ground object changes, however, the hyperspectral change detection is easy to be influenced by environment in the hyperspectral imaging process so as to generate spectrum pseudo-change, in ideal cases, the spectrum characteristic difference between unchanged areas of different time phases is close to 0, but the spectrum pseudo-change causes the indistinguishable areas of the changed areas and the unchanged areas to influence the judging result, and as such, the focus on the spectrum with obvious difference wave bands is enhanced during hyperspectral change detection, and the focus on the spectrum with smaller difference wave band ranges is weakened, so that the aim of realizing the focus on different intensities of different wave band ranges more flexibly is achieved, a weighted cascade encoder-decoder network based on the space spectrum difference characteristic is provided for hyperspectral change detection. Disclosure of Invention The invention provides a hyperspectral image change detection method based on a weighted cascade encoder aiming at the prior art, which is characterized in that the method comprises the steps of comparing and extracting firstly, adopting the weighted cascade encoder, concentrating resources to understand and analyze the difference characteristics of images, effectively simplifying the extraction of a large number of background areas without change, improving the extraction efficiency, carrying out sectional processing on the difference characteristics, distributing leavable weights one by one to judge important wave bands, giving higher weights, generating a space-spectrum characteristic module, effectively amplifying the information of the key difference characteristics, decoding the fused space-spectrum characteristic module through a decoder, and judging whether the images change or not to obtain the result. In order to achieve the above purpose, the invention adopts the following technical scheme: A hyperspectral image change detection method based on a weighted cascade encoder comprises the following steps: s1, selecting hyperspectral remote sensing images, and selecting two hyperspectral remote sensing images in the same region and in different periods to form an image pair; s2, constructing a hyperspectral image change detection model, wherein the hyperspectral image change detection model is composed of a differential feature module, a weighted cascade coding module and a decoding module; S21, subtracting the image pair input differential feature module pixel by pixel to obtain a differential feature map; S22, inputting the differential feature map into a weighted cascade coding module for band-by-band grouping processing, weighting by adopting an attention mechanism, gradually enhancing the differential feature by utilizing a cascad