Anti-noise hyperspectral change detection method based on distribution consistency and entropy-induced attention
Patent Information
- Application Number
- CN202611456397.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-18
- Publication Date
- 2026-11-03
AI Technical Summary
Existing hyperspectral change detection methods suffer from problems such as high false change detection rate, uncoordinated spectral feature extraction, and insufficient noise suppression under complex imaging conditions, making it difficult to accurately identify the true changes in ground features.
A noise-resistant hyperspectral change detection method based on distribution consistency and entropy-induced attention is adopted. Deep features are extracted through a twin encoder, and the first-order mean and second-order covariance are aligned. Combined with bi-branch mutual learning and entropy-induced adaptive attention, fused change features are generated, and finally pixel-level change detection is performed.
It significantly reduces the false change detection rate, improves the robustness and accuracy of detection, and can effectively identify real changes in ground features under complex conditions.
Smart Images

Figure CN123033121A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of remote sensing image processing, in particular to an anti-noise hyperspectral change detection method based on distribution consistency and entropy-induced attention. BACKGROUND
[0002] Hyperspectral remote sensing imaging can obtain tens to hundreds of continuous narrow-band spectral response information of ground objects. With fine spectral resolution, it is widely used in dynamic remote sensing scenes such as urban construction monitoring, crop growth assessment, disaster damage identification, and mine ecological management. Hyperspectral change detection identifies the change area of ground object types and coverage states by analyzing the hyperspectral images of the same region at different times, and is a core technical means of dynamic remote sensing monitoring.
[0003] In practical applications, the hyperspectral images at different times are often affected by factors such as differences in solar elevation angle, fluctuations in atmospheric transmittance, changes in surface humidity, and shifts in sensor gain and spectral response function. Even if the ground object does not have a real physical change, the mean and covariance distribution of its feature space will shift significantly, inducing a large number of false changes and seriously interfering with the accuracy of the detection results. At the same time, real ground object changes often have small spatial scales, fuzzy boundaries, and weak spectral differences, which are easily overwhelmed by imaging noise, spatial registration errors, and background textures, making it difficult to detect weak changes.
[0004] The existing hyperspectral change detection methods still have the following technical defects: first, there is a lack of systematic alignment of two-time feature distributions. Most methods directly perform feature differentiation or splicing without constraining the distribution consistency from the first-order mean and second-order covariance levels, which cannot eliminate the radiation drift and band correlation shift caused by imaging environment differences from the root, and the false change false detection rate is high; second, the spatial-spectral feature extraction is mutually fragmented. Some methods focus on spectral difference mining, and some focus on spatial texture modeling, lacking mutual learning constraint mechanism, and the two types of features are prone to redundancy or expression deviation, making it difficult to simultaneously consider spectral fidelity and spatial detail; third, the noise adaptive suppression capability is insufficient. Most methods use a global uniform feature processing strategy and do not model information uncertainty to distinguish between real changes and noise. Weak changes in low signal-to-noise ratio areas are prone to be missed, and the detection robustness is insufficient under complex imaging conditions.
[0005] Therefore, it is urgent to develop an anti-noise hyperspectral change detection method that can align the statistical distribution of two-time features, extract spatial-spectral features cooperatively, and adaptively distinguish between real changes and noise, to solve the above technical problems. SUMMARY
[0006] The present application aims at providing an anti-noise hyperspectral change detection method based on distribution consistency and entropy-induced attention to solve the problems in the prior art.
[0007] In order to achieve the above-mentioned purpose, the present application adopts the following technical solutions: An anti-noise hyperspectral change detection method based on distribution consistency and entropy-induced attention comprises the following steps: S1, obtaining a first time-phase hyperspectral image and a second time-phase hyperspectral image; S2, constructing an anti-noise detection model, including a twin encoder, a distribution consistency feature alignment module, a double-branch mutual learning feature extraction module, an entropy-induced adaptive attention module, a context-aware gating fusion module, and a classification prediction head; S3, inputting the first time-phase hyperspectral image and the second time-phase hyperspectral image into the twin encoder, and extracting first time-phase deep features and second time-phase deep features through the twin encoder; S4, based on the distribution consistency feature alignment module, performing first-order mean alignment and second-order covariance alignment on the first time-phase deep features and the second time-phase deep features, and generating a reference difference feature according to the aligned deep features; S5, based on the double-branch mutual learning feature extraction module, extracting deep spectral difference features and deep spatial texture features of the first time phase and the second time phase respectively, and performing mutual learning constraint with the reference difference feature through KLD divergence constraint; S6, based on the entropy-induced adaptive attention module, converting the reference difference feature into a probability distribution along the channel dimension and calculating the normalized information entropy and the channel standard deviation, splicing to obtain a statistical tensor and generating an attention mask through multi-scale convolution, and obtaining an entropy saliency enhanced feature in a residual manner according to the attention mask; S7, based on the context-aware gating fusion module, adaptively gating and fusing the reference difference feature, the deep spectral difference feature, the deep spatial texture feature, and the entropy saliency enhanced feature to obtain a fused change feature, and inputting the fused change feature into the classification prediction head to generate a pixel-level change detection result; S8, inputting the fused change feature into the classification prediction head to generate a pixel-level change detection result.
[0008] Further, in the step S4, the processing procedure of the distribution consistency feature alignment module includes: calculating the feature mean of the first time phase deep feature and the second time phase deep feature along the spatial dimension respectively, taking the L2 norm square of the mean difference of the two as the first-order mean loss; calculating the covariance matrix of the first time phase deep feature and the second time phase deep feature respectively, taking the normalized value of the square of the Frobenius norm of the difference between the two covariance matrices as the second-order covariance alignment loss; taking the sum of the first-order mean loss and the second-order covariance alignment loss as the total alignment loss; under the alignment constraint, generating the body feature corresponding to the first time phase deep feature and the second time phase deep feature, calculating the element-wise difference between the first time phase deep feature and the second time phase deep feature, and performing element-wise square operation on the difference value, and inputting the square result of the difference value into the large core attention mechanism to obtain the benchmark difference feature.
[0009] Further, in the step S4, the calculation formula of the total alignment loss is as follows:
[0010] wherein, denotes the total alignment loss, denotes the first-order mean alignment loss, denotes the second-order covariance alignment loss. The calculation formula of the mean loss is as follows:
[0011] wherein, denotes the feature mean calculated along the spatial dimension, is the first time phase deep feature, is the second time phase deep feature. The calculation formula of the covariance alignment loss is as follows:
[0012] wherein, denotes the feature channel number, and are the covariance matrices of the first time phase deep feature and the second time phase deep feature respectively, denotes the Frobenius norm. By minimizing the total alignment loss , the aligned first time phase body feature and the second time phase body feature are generated under the alignment constraint, and the calculation formula of the benchmark difference feature is as follows:
[0013] wherein, a baseline difference feature, indicates a large core attention mechanism.
[0014] Further, in the step S5, the processing procedure of the double-branch mutual learning feature extraction module includes: a spectral difference feature extraction branch calculates a pixel-level feature difference square of the double-time feature, calculates a channel correlation matrix through a channel attention mechanism, and extracts a deep spectral difference feature through a large core attention; a spatial texture feature extraction branch splices the double-time feature, calculates a spatial correlation matrix through a position attention mechanism, and extracts a deep spatial texture feature through a large core attention; a KLD loss is introduced as a mutual learning constraint, a baseline difference feature is taken as a reference distribution, a first KLD divergence loss between the baseline difference feature and the spectral difference feature, and a second KLD divergence loss between the baseline difference feature and the spatial texture feature are calculated respectively, and a sum of the two is taken as a mutual learning loss.
[0015] Further, in the step S5, the pixel-level feature difference square of the double-time feature is calculated, and the calculation formula is as follows:
[0016] wherein, is a double-time pixel-level feature difference square; is a first-time body feature; is a second-time body feature; a channel correlation matrix is calculated through a channel attention mechanism, and the calculation formula is as follows:
[0017] wherein, indicates a channel correlation matrix, indicates a channel projection matrix, is a transpose matrix; a deep spectral difference feature is extracted through a large core attention, and the calculation formula is as follows:
[0018] wherein, is a deep spectral difference feature, is a learnable scaling parameter of a spectral branch, indicates multiplication and reshaping; the double-time feature is spliced, and the calculation formula is as follows:
[0019] wherein, is a spliced feature; a spatial correlation matrix is calculated through a position attention mechanism, and the calculation formula is as follows:
[0020] wherein, represents a spatial correlation matrix; represents a spatial texture feature projection matrix; extract deep spatial texture features through a large kernel attention, and the calculation formula is as follows:
[0021] wherein, is a deep spatial texture feature, is a learnable scaling parameter of a spatial branch; The calculation formula of mutual learning loss is as follows:
[0022] wherein, is a first KLD divergence loss between the reference difference feature and the spectral difference feature; is a second KLD divergence loss between the reference difference feature and the spatial texture feature, is a numerical representation of a pixel point on a feature map.
[0023] Further, in the step S6, the processing process of the entropy-induced adaptive attention module includes: embedding and position coding the reference difference feature, converting the feature value along the channel dimension into a probability distribution through Softmax, calculating the normalized information entropy of each spatial position according to the Shannon entropy definition; calculating the standard deviation along the channel dimension; concatenating the information entropy and the standard deviation along the channel dimension to obtain a statistical tensor, and generating an attention mask through multi-scale convolution and a Sigmoid function; the attention mask acts on the difference embedding feature in a residual manner, and the entropy saliency enhanced feature is obtained through the channel enhancement sub-module.
[0024] Further, in the step S6, the input feature is preprocessed through an embedding layer and batch normalization, and position coding is added after flattening, and the calculation formula is as follows:
[0025] wherein, is a preprocessed feature; is an input feature; is a position coding; The normalized information entropy of each spatial position is calculated, and the calculation formula is as follows:
[0026] wherein, represents a normalized information entropy, represents a probability value of a channel, represents a channel number, is a stabilizing term; The standard deviation along the channel dimension is calculated, and the calculation formula is as follows:
[0027] wherein, is the standard deviation along the channel dimension, is the pre-processed feature the average value along the channel dimension; The normalized information entropy is combined with the standard deviation along the channel dimension to obtain a statistical tensor , and an attention mask is generated through multi-scale convolution, and the calculation formula is as follows:
[0028] wherein, is the attention mask; is a Sigmoid activation function, is a fusion convolution, is a normal convolution, is a dilated convolution; The attention mask acts on the difference embedding feature in a residual manner, and an entropy saliency enhancement feature is calculated through a channel enhancement sub-module, and the calculation formula is as follows:
[0029] wherein, is the intermediate feature after residual connection, represents a convolution kernel, represents batch normalization, represents a GELU activation function, is the entropy saliency enhancement feature.
[0030] Further, in the step S7, the processing process of the context-aware gating fusion module includes: generating gating weights for the spectral difference feature, the spatial texture feature, the entropy saliency enhancement feature, and the reference difference feature through a convolution layer and a Sigmoid function respectively; performing multi-branch weighted fusion to obtain a fused change feature.
[0031] Further, in the step S7, adaptive gating weights are generated for each feature branch through a convolution layer and a Sigmoid function respectively, and the calculation formula is as follows:
[0032] wherein, is the gating weight of the spectral difference feature, is the gating weight of the spatial texture feature, a gating weight for the entropy saliency enhanced feature, a gating weight for the baseline difference feature; denotes a convolution layer; is the final spatial feature processed by the spatial texture feature extraction branch, is the final spectral feature processed by the spectral difference feature extraction branch; each feature is multiplied by the corresponding gating weight element by element, and then summed to obtain the fused change feature, and the calculation formula is as follows:
[0033] wherein, is the fused change feature, denotes element by element multiplication.
[0034] Further, in the step S8, the classification prediction head calculates the class probability of each pixel belonging to the change class and the non-change class, and the calculation formula is as follows:
[0035] wherein, is the class probability, and are the weight and bias parameters of the prediction head; a pixel-level binary change detection map is generated by a preset threshold, and the calculation formula is as follows:
[0036] wherein, is the preset threshold.
[0037] Compared with the prior art, the beneficial effects of the present application are: 1. The present application constrains the overall response level of the dual-time-phase feature by the first-order mean loss, eliminates the global radiation drift caused by the solar height and the sensor gain, corrects the inter-band correlation structure by the second-order covariance alignment loss, and offsets the spectral correlation shift caused by atmospheric scattering and surface humidity changes. The dual-time-phase features are aligned at the statistical distribution level, the baseline difference feature more purely reflects the real physical changes of the ground objects, the false change false detection rate is greatly reduced, and the detection stability under complex imaging conditions is improved.
[0038] 2. In the present application, the spectral difference branch adopts difference + channel attention to mine the spectral combination with high discriminability for changes; the spatial texture branch adopts splicing + position attention to completely retain the spatial structure details of the ground objects. With the baseline difference after distribution alignment as the reference, the mutual learning constraint is constructed through KLD divergence to guide the two branches to converge to reliable differences, while retaining their respective specialized expression ability, avoiding feature redundancy, and realizing the synchronous improvement of spectral fidelity and spatial detail.
[0039] 3、The application converts the difference features into a probability distribution along the channel, calculates the normalized information entropy and the channel standard deviation to construct a statistical tensor, and generates a spatial self-adaptive attention mask through multi-scale convolution. The real change area with low entropy and high dispersion obtains feature enhancement, and the noise and pseudo change area with high entropy and low difference are effectively suppressed, realizing pixel-level differential noise reduction, and significantly improving the detection ability and anti-noise robustness of weak real changes.
[0040] 4、The application generates pixel-level gate weights for four types of heterogeneous features, including baseline difference, spectral difference, spatial texture and entropy enhancement, through convolution + Sigmoid, and dynamically weights fusion according to local context, replacing the traditional fixed weight feature splicing. The contribution of each feature can be automatically allocated according to different ground object scenes, the multi-source complementary information is fully integrated, and more accurate pixel-level change detection results are output, which is suitable for various remote sensing monitoring scenes. BRIEF DESCRIPTION OF DRAWINGS
[0041] Figure 1 It is the overall method flowchart of the application. Figure 2 It is the anti-noise detection model structure diagram of the application. Figure 3 It is the entropy-induced adaptive attention module flowchart of the application. DETAILED DESCRIPTION
[0042] In order to enable personnel in the art to better understand the present application scheme, the technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0043] Before specific embodiments are described, related concepts involved in the embodiments will be described.
[0044] Hyperspectral image (HSI) refers to the remote sensing image obtained by a hyperspectral imaging sensor in tens to hundreds of continuous narrow wavebands, and each pixel corresponds to a continuous spectral curve.
[0045] Change detection refers to identifying pixels or areas of changed ground objects by analyzing remote sensing images of the same area at different times. Real change refers to the actual change of physical properties of ground objects; pseudo change refers to non-real ground surface changes caused by differences in imaging conditions.
[0046] Attention mechanism is a technique in deep learning that allows the model to focus on key information relevant to the task by calculating the correlation between input features.
[0047] Large Kernel Attention (LKA) is an attention mechanism that captures long-range spatial dependencies while maintaining computational efficiency through a large kernel decomposition strategy.
[0048] KLD divergence (Kullback-Leibler Divergence) is an asymmetric measure used to measure the difference between two probability distributions.
[0049] To solve the problem of feature distribution drift, false change false detection and difficulty in distinguishing true weak change caused by inconsistent imaging environment of dual temporal high spectral images, an anti-noise hyperspectral change detection method based on distribution consistency and entropy-induced attention is provided, referring to Figure 1 The method includes the following steps: S1, obtaining dual temporal high spectral images, including first temporal high spectral images and second temporal high spectral images.
[0050] Specifically, high spectral images collected at the first time and the second time of the same geographical area are obtained, and the two images cover the same geographical area and have consistent spatial dimensions and spectral band numbers after preprocessing such as radiation calibration, atmospheric correction and spatial registration.
[0051] S2, constructing an anti-noise detection model, including a twin encoder, a distribution consistency feature alignment module, a dual-branch mutual learning feature extraction module, an entropy-induced adaptive attention module, a context-aware gating fusion module and a classification prediction head.
[0052] S3, inputting the first temporal high spectral image and the second temporal high spectral image into the twin encoder with shared parameters or consistent structure, and extracting deep features of the first temporal high spectral image and the second temporal high spectral image through the twin encoder to obtain first temporal deep features and second temporal deep features.
[0053] Let the obtained first temporal deep features be , the second temporal deep features be , the channel number be C, and the spatial size be HxW.
[0054] In one implementation, the Siamese encoder can be composed of multiple convolutional layers, batch normalization layers, and ReLU or GELU nonlinear activation layers stacked together. To enhance the spatial context and spectral discriminative power of feature representation, the Siamese encoder can also embed residual connections, channel attention modules, or Transformer self-attention layers. After passing through the Siamese encoder, the feature vector at each spatial location corresponds to the high-level semantic representation of the input hyperspectral image at that location after being abstracted by the encoder, providing a high-quality feature foundation for subsequent distribution alignment and multi-branch feature extraction.
[0055] S4. Based on the distribution consistency feature alignment module, first-order mean alignment and second-order covariance alignment are performed on the deep features of the first and second time phases, and a baseline difference feature is generated based on the aligned deep features. This step aims to eliminate the dual-time phase feature distribution drift caused by differences in the imaging environment at the statistical distribution level.
[0056] Specifically, the processing steps of the distribution consistency feature alignment module include: calculating the feature means of the first and second phase deep features along the spatial dimension, respectively, and using the squared L2 norm of the difference between the two means as the first-order mean loss to constrain the first-order statistics of the two phase deep features; calculating the covariance matrices of the first and second phase deep features, respectively, and using the normalized value of the squared Frobenius norm of the difference between the two covariance matrices as the second-order covariance alignment loss, with the covariance alignment loss employing CORAL... The loss is used to constrain the second-order statistics of the deep features of the two time phases. The sum of the first-order mean loss and the second-order covariance alignment loss is used as the total alignment loss, that is, the total alignment loss is composed of the first-order mean loss and the second-order covariance alignment loss. Under the alignment constraint, the body features corresponding to the deep features of the first time phase and the deep features of the second time phase are generated, and the element-wise difference between the deep features of the first time phase and the deep features of the second time phase is calculated. The element-wise square operation is performed on the difference, and the squared result of the difference is input into the big kernel attention mechanism to obtain the baseline difference feature.
[0057] More specifically, the formula for calculating the total alignment loss is as follows:
[0058] in, This represents the total alignment loss. This represents the first-order mean-aligned loss. This represents the second-order covariance alignment loss.
[0059] Mean loss The calculation formula is as follows:
[0060] in, denotes the mean value of the feature calculated along the spatial dimension.
[0061] covariance alignment loss The calculation formula is as follows:
[0062] wherein, denotes the number of feature channels, and respectively, are the covariance matrices of the first time phase deep feature and the second time phase deep feature, denotes the Frobenius norm.
[0063] By minimizing the total alignment loss , the module can generate the aligned first time phase body feature and the second time phase body feature , then the calculation formula of the reference difference feature is as follows:
[0064] wherein, is the reference difference feature, denotes the large kernel attention mechanism. The square of the difference can nonlinearly amplify the difference amplitude between the two time phase deep features, and highlight the significance of the change area.
[0065] Through the above distribution consistency alignment processing, the distribution consistency feature alignment module realizes the joint constraint of the first-order and second-order statistics of the two time phase features. The first-order mean alignment aims to eliminate the overall radiation level drift caused by the change of the solar elevation angle, the difference of the atmospheric transmittance or the offset of the sensor gain, so that the same kind of unchanged ground objects have similar feature response mean in two time phases. The second-order covariance alignment constrains the correlation structure between channels to be consistent through the CORAL loss, which is used to correct the drift of the inter-band correlation caused by atmospheric scattering, surface humidity change or difference of the sensor spectral response function. The square of the difference value of the distribution aligned feature can more purely reflect the real physical property change of the ground object, without being disturbed by the difference of the imaging environment. Further, the statistics of the distribution consistency feature alignment module can be calculated at the image block level, batch level or class prototype level.
[0066] S5, based on the double-branch mutual learning feature extraction module, the spectral difference feature extraction branch and the spatial texture feature extraction branch respectively extract the complementary change information of the first time phase and the second time phase, and constrain mutual learning with the reference difference feature through the KLD divergence constraint, so that the two branches are optimized and complementary expressed.
[0067] Specifically, the dual-branch mutual learning feature extraction module includes a spectral difference feature extraction branch and a spatial texture feature extraction branch. The spectral difference feature extraction branch calculates pixel-level feature difference squares of the dual-time feature, calculates a channel correlation matrix through a channel attention mechanism, and extracts deep spectral difference features through a large kernel attention. The spatial texture feature extraction branch splices the dual-time feature to retain complete spatial context, calculates a spatial correlation matrix through a position attention mechanism, and extracts deep spatial texture features through a large kernel attention. The KLD divergence mutual learning constraint process includes: introducing a KLD loss as a mutual learning constraint, taking the baseline difference feature as a reference distribution, calculating a first KLD divergence loss between the baseline difference feature and the spectral difference feature, and a second KLD divergence loss between the baseline difference feature and the spatial texture feature; and taking the sum of the two as a mutual learning loss.
[0068] More specifically, the extraction process of the spectral difference feature extraction branch includes: The pixel-level feature difference squares of the dual-time feature are calculated, and the calculation formula is as follows:
[0069] wherein, is the pixel-level feature difference square of the dual-time.
[0070] The channel correlation matrix is calculated using the channel attention mechanism, and the calculation formula is as follows:
[0071] wherein, represents the channel correlation matrix, represents the channel projection matrix, is the transpose matrix.
[0072] Based on the channel correlation matrix, deep spectral difference features are extracted through a large kernel attention, and the calculation formula is as follows:
[0073] wherein, is the deep spectral difference feature, is a learnable scaling parameter of the spectral branch, represents multiplication and reshaping.
[0074] The extraction process of the spatial texture feature extraction branch includes: The spatial branch uses feature splicing to retain complete context information, and the calculation formula is as follows:
[0075] wherein, is the feature after splicing.
[0076] The spatial correlation matrix is calculated by a position attention mechanism, and the calculation formula is as follows:
[0077] wherein, denotes the spatial correlation matrix; denotes the spatial texture feature projection matrix.
[0078] Based on the spatial correlation matrix, deep spatial texture features are extracted by a large kernel attention, and the calculation formula is as follows:
[0079] wherein, is the deep spatial texture feature, is a learnable scaling parameter of the spatial branch.
[0080] The calculation formula of the mutual learning loss is as follows:
[0081] wherein, is the first KLD divergence loss between the reference difference feature and the spectral difference feature, that is, the mutual learning loss of the spectral branch; is the second KLD divergence loss between the reference difference feature and the spatial texture feature, that is, the mutual learning loss of the spatial branch.
[0082] In a discrete implementation, the mutual learning losses of the spectral branch and the spatial branch can be respectively represented as follows:
[0083] wherein, is the numerical representation of a pixel point on a feature map, , are the features extracted by the spectral branch and the spatial branch respectively, that is, the deep spectral difference feature and the deep spatial texture feature. Through mutual learning constraints, the two branches will not deviate from the reliable reference difference, while still retaining their respective complementary expressions.
[0084] From the perspective of design principles, the spectral difference feature extraction branch adopts a "difference first and then enhancement" strategy. The difference operation directly exposes the differences between the two time phases in the spectral response dimension, and the channel attention mechanism automatically identifies the spectral band combination with high discriminability for change detection. The spatial texture feature extraction branch adopts a "concatenate first and then enhance" strategy. The feature concatenation retains the spatial structure information of each time phase, avoiding the loss of spatial details that may be caused by the difference operation. The core value of the mutual learning mechanism lies in the bidirectional constraints: the reference difference feature serves as a reference signal, guiding the two branches to converge to the reliable difference expression after distribution alignment through the KLD divergence, while the two branches each retain the specialized modeling capability, forming complementary rather than redundant feature expression.
[0085] S6, based on the entropy-induced adaptive attention module, the reference difference feature is converted into a probability distribution along the channel dimension, the information entropy and the channel standard deviation are calculated, the statistical tensor is spliced to generate an attention mask through multi-scale convolution, and the entropy saliency enhanced feature is obtained in a residual manner according to the attention mask.
[0086] Specifically, the processing process of the entropy-induced adaptive attention module includes: embedding and position coding the reference difference feature, converting the feature value along the channel dimension into a probability distribution through Softmax, calculating the normalized information entropy of each spatial position according to the Shannon entropy definition; calculating the standard deviation along the channel dimension; splicing the information entropy and the standard deviation along the channel dimension to obtain a statistical tensor, and performing multi-scale feature perception on the statistical tensor through local convolution and dilated convolution to generate an attention mask through a Sigmoid function; the difference embedding feature is acted on by the attention mask in a residual manner, and the entropy saliency enhanced feature is obtained through the channel enhancement sub-module.
[0087] More specifically, the input feature is preprocessed through an embedding layer and batch normalization, and after flattening, position coding is added, and the calculation formula is as follows:
[0088] wherein, is the preprocessed feature; is the input feature, and the input feature ; is the position coding.
[0089] The feature value is converted into a probability distribution along the channel dimension through Softmax, and the normalized information entropy of each spatial position is calculated, and the calculation formula is as follows:
[0090] wherein, denotes the normalized information entropy, denotes the probability value of the channel, denotes the number of channels, is a stabilizing term.
[0091] The standard deviation along the channel dimension is calculated, and the calculation formula is as follows:
[0092] wherein, is the standard deviation along the channel dimension, is the preprocessed feature is the average value along the channel dimension.
[0093] The normalized information entropy and the standard deviation along the channel dimension The statistical tensor is obtained by splicing wherein, is a 2-dimensional matrix of HxW, is a 3-dimensional tensor of 1xHxW, which can be directly stacked into a statistical tensor of 2xHxW and generates an attention mask through multi-scale convolution, and the calculation formula is as follows:
[0094] wherein, is an attention mask; is a Sigmoid activation function, is a fusion convolution, is a normal convolution, is a dilated convolution, and the convolution formula is as follows:
[0095] wherein, is a normal convolution input image, is a dilated convolution input image, is a convolution kernel, is a pixel coordinate on the original image, represents the deviation of the pixel relative to the center pixel of the convolution. The dilated convolution calculation formula is consistent with the standard convolution, but 0 values are inserted between the elements of the standard convolution kernel to expand the receptive field.
[0096] Attention mask acts on the difference embedding feature in a residual manner, and is represented as follows:
[0097] wherein, is an intermediate feature after residual connection, represents a convolution kernel, represents batch normalization, represents a GELU activation function, is an entropy saliency enhanced feature.
[0098] S7, based on the context-aware gating fusion module, the multi-source heterogeneous features (including benchmark difference features, spectral difference features, spatial texture features, and entropy saliency enhanced features) are adaptively gated and fused to obtain a fused change feature, and the classification prediction head is input according to the fused change feature, and a pixel-level change detection result is generated.
[0099] Specifically, the processing procedure of the context-aware gating fusion module includes: generating gating weights for the spectral difference feature, the spatial texture feature, the entropy saliency enhanced feature, and the baseline difference feature respectively through a convolution layer and a Sigmoid function; performing multi-branch weighted fusion to obtain a fused change feature; inputting the fused change feature into a classification prediction head, and the classification prediction head calculating and outputting a class probability of each pixel belonging to a change class and an unchanged class; and generating a pixel-level binary change detection map through a preset threshold according to the class probability.
[0100] More specifically, adaptive gating weights are generated for each feature branch through a convolution layer and a Sigmoid function, and the calculation formula is as follows:
[0101] wherein, is the gating weight of the spectral difference feature, is the gating weight of the spatial texture feature, is the gating weight of the entropy saliency enhanced feature, is the gating weight of the baseline difference feature, denotes a convolution layer; is the final spatial feature processed by the spatial texture feature extraction branch, is the final spectral feature processed by the spectral difference feature extraction branch, is the baseline difference feature, is the entropy saliency enhanced feature.
[0102] After each feature is multiplied element by element with its corresponding gating weight and summed, a fused change feature is obtained, and the calculation formula is as follows:
[0103] wherein, is the fused change feature, denotes element-wise multiplication. This mechanism allows the network to adaptively allocate attention between different features according to the context environment of the current pixel.
[0104] S8, inputting the fused change feature into a classification prediction head to generate a pixel-level change detection result.
[0105] The fused change feature is input into a classification prediction head, and the classification prediction head calculates and outputs a class probability of each pixel belonging to a change class and an unchanged class, and the calculation formula is as follows:
[0106] wherein, is the class probability, and are weight and bias parameters of the prediction head.
[0107] According to the category probability, a pixel-level binary change detection map is generated by a preset threshold, and the calculation formula is as follows:
[0108] wherein, is a preset threshold, is each pixel in the map. The pixel-level binary change detection map is the pixel-level change detection result, wherein the area with a value of 1 (usually white) represents the change area, and the area with a value of 0 (usually black) represents the non-change area.
[0109] It should be noted that in the method flow of S1 to S8, the twin encoder can be implemented by a convolutional network, a Transformer network or a hybrid architecture; and the classification prediction head can be configured with an output channel number according to a binary classification or a multi-category change recognition task.
[0110] In the embodiment, the distribution consistency feature alignment module eliminates feature drift caused by environmental differences from the statistical distribution level, the double-branch mutual learning feature extraction module cooperatively extracts complementary change information from the spectral and spatial dimensions, the entropy-induced adaptive attention module precisely locates reliable change areas using information uncertainty and change intensity, and the context perception gating fusion module realizes dynamic fusion of multi-source heterogeneous features. Based on the above, the distribution consistency feature alignment module jointly constrains the first-order mean and second-order covariance of the double-time deep features to forcibly align the statistical distribution in the feature space; the double-branch mutual learning feature extraction module models the spectral difference and spatial texture change respectively, and performs KLD divergence mutual learning constraint with the reference difference feature after distribution alignment; the entropy-induced adaptive attention module uses information entropy and standard deviation to precisely enhance the high-confidence change area and effectively suppress the pseudo-change and noise area; and the context perception gating fusion module performs pixel-level dynamic weighting on the multi-source change features to generate a robust change detection result.
[0111] The application further provides an anti-noise hyperspectral change detection device based on distribution consistency and entropy-induced attention, which comprises: an image acquisition module configured to acquire double-time hyperspectral images; a deep feature extraction module configured to extract first-time deep features and second-time deep features by a twin encoder; a distribution consistency feature alignment module configured to perform first-order mean alignment and second-order covariance alignment on the double-time deep features, and generate a reference difference feature according to the aligned deep features; a double-branch mutual learning feature extraction module configured to extract complementary features through a spectral difference branch and a spatial texture branch, and perform KLD divergence mutual learning constraint. An entropy-induced self-adaptive attention module is used to generate an attention mask according to information entropy and a standard deviation, and obtain an entropy saliency enhanced feature; A context-aware gated fusion module is used to perform adaptive gated fusion on multi-source features, and obtain a fused change feature.
[0112] A classification prediction and detection result generation module is used to calculate a category probability according to the fused change feature, and generate a pixel-level change detection result.
[0113] The application also provides an anti-noise hyperspectral change detection electronic device based on distribution consistency and entropy-induced attention. The anti-noise hyperspectral change detection electronic device comprises a processor, a memory and a display. The processor can be a central processing unit (CPU), a microprocessor or other data processing chip, and is used to run program codes or process data stored in the memory, for example, the anti-noise hyperspectral change detection method based on distribution consistency and entropy-induced attention in the application. In some embodiments, the processor can be a single server or a server group, and the server group can be centralized or distributed. In some embodiments, the processor can be local or remote, and can also be implemented on a cloud platform. The memory is an internal storage unit of the electronic device, for example, a hard disk or a memory. In other embodiments, the memory can also be an external storage device of the electronic device, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card and the like. Further, the memory can include both an internal storage unit and an external storage device, and the memory is used to store application software and various data installed on the electronic device. The display is an LED display, a liquid crystal display, a touch liquid crystal display, an OLED (Organic Light-Emitting Diode) touch screen and the like, and the components of the electronic device communicate with each other through a system bus. In an embodiment, when the processor executes the anti-noise hyperspectral change detection program of the remote sensing image in the memory, the following steps can be implemented: Obtaining a double-time-phase hyperspectral image, the double-time-phase hyperspectral image comprising a first-time-phase hyperspectral image and a second-time-phase hyperspectral image; Extracting deep features of the first-time-phase hyperspectral image and the second-time-phase hyperspectral image through a twin encoder respectively; Performing first-order mean alignment and second-order covariance alignment on the double-time-phase deep features based on a distribution consistency feature alignment module, and generating a reference difference feature according to the aligned deep features; The spectral difference feature and the spatial texture feature are extracted based on the double-branch mutual learning feature extraction module, and KLD divergence mutual learning constraint is performed according to the benchmark difference feature; The entropy-induced adaptive attention module is used to generate an attention mask according to information entropy and a standard deviation, and obtain an entropy saliency enhanced feature; The context-aware gating fusion module is used for adaptive gating fusion of the multi-source features, and a fusion change feature is obtained. The classification prediction and detection result generation module is used to generate a pixel-level change detection result according to the fusion change feature.
[0114] It should be understood that, in addition to the above functions, the processor can also implement other functions when executing the remote sensing image anti-noise hyperspectral change detection program in the memory, and specific implementation can be referred to the description of the corresponding method embodiments.
[0115] The application further provides a computer readable storage medium, which stores a computer readable program or instruction, and the program or instruction is executed by a processor to implement the anti-noise hyperspectral change detection method described in the above embodiments.
[0116] Although the application has been described by the above preferred embodiments, it is not intended to limit the protection scope of the application, and any person skilled in the art can make various changes and modifications to the above embodiments without departing from the spirit and scope of the application, which still belongs to the protection scope of the application.
Claims
1. A noise-resistant hyperspectral change detection method based on distribution consistency and entropy-induced attention, characterized in that, Includes the following steps: S1. Acquire the first phase hyperspectral image and the second phase hyperspectral image; S2. Construct a noise-resistant detection model, including a twin encoder, a distribution consistency feature alignment module, a two-branch mutual learning feature extraction module, an entropy-induced adaptive attention module, a context-aware gating fusion module, and a classification prediction head; S3. Input the first-phase hyperspectral image and the second-phase hyperspectral image into the twin encoder, and extract the first-phase deep features and the second-phase deep features respectively through the twin encoder; S4. Based on the distribution consistency feature alignment module, perform first-order mean alignment and second-order covariance alignment on the deep features of the first time phase and the deep features of the second time phase, and generate benchmark difference features based on the aligned deep features. S5. Based on the dual-branch mutual learning feature extraction module, the deep spectral difference features and deep spatial texture features of the first and second time phases are extracted respectively, and mutual learning constraints are performed between the KLD divergence constraint and the benchmark difference feature. S6. Based on the entropy-induced adaptive attention module, the baseline difference features are converted into probability distributions along the channel dimension and the normalized information entropy and channel standard deviation are calculated. The statistical tensor is concatenated and then an attention mask is generated by multi-scale convolution. The entropy significance enhancement features are obtained in the residual manner based on the attention mask. S7. Based on the context-aware gating fusion module, adaptive gating fusion is performed on the baseline difference features, deep spectral difference features, deep spatial texture features, and entropy significance enhancement features to obtain fused change features; S8. Input the fused change features into the classification prediction head to generate pixel-level change detection results.
2. The noise-resistant hyperspectral change detection method based on distribution consistency and entropy-induced attention according to claim 1, characterized in that, In step S4, the processing of the distribution consistency feature alignment module includes: calculating the feature mean of the first phase deep feature and the second phase deep feature along the spatial dimension, and using the square of the L2 norm of the difference between the two means as the first-order mean loss; calculating the covariance matrix of the first phase deep feature and the second phase deep feature, and using the normalized value of the square of the Frobenius norm of the difference between the two covariance matrices as the second-order covariance alignment loss; using the sum of the first-order mean loss and the second-order covariance alignment loss as the total alignment loss; generating body features corresponding to the first phase deep feature and the second phase deep feature under alignment constraints, calculating the element-wise difference between the first phase deep feature and the second phase deep feature, performing element-wise squaring on the difference, and inputting the squared result of the difference into the big kernel attention mechanism to obtain the benchmark difference feature.
3. The noise-resistant hyperspectral change detection method based on distribution consistency and entropy-induced attention according to claim 2, characterized in that, In step S4, the formula for calculating the total alignment loss is as follows: , in, This represents the total alignment loss. This represents the first-order mean-aligned loss. This represents the second-order covariance alignment loss; Mean loss The calculation formula is as follows: , in, This represents the feature mean calculated along the spatial dimension. This represents the deep features of the first phase. This represents the deep features of the second phase; Covariance Alignment Loss The calculation formula is as follows: , in, Indicates the number of feature channels. and These are the covariance matrices of the deep features in the first and second time phases, respectively. Denotes the Frobenius norm; By minimizing the total alignment loss Generate aligned first-phase body features under alignment constraints. Second phase body characteristics The formula for calculating the baseline difference characteristics is as follows: , in, As a benchmark difference feature, This represents the big nucleus attention mechanism.
4. The noise-resistant hyperspectral change detection method based on distribution consistency and entropy-induced attention according to claim 3, characterized in that, In step S5, the processing of the dual-branch mutual learning feature extraction module includes: the spectral difference feature extraction branch calculates the squared pixel-level feature difference of the dual-temporal features, calculates the channel correlation matrix through the channel attention mechanism, and extracts deep spectral difference features through big kernel attention; the spatial texture feature extraction branch concatenates the dual-temporal features, calculates the spatial correlation matrix through the position attention mechanism, and extracts deep spatial texture features through big kernel attention; KLD loss is introduced as a mutual learning constraint, with the benchmark difference feature as the reference distribution, the first KLD divergence loss between the benchmark difference feature and the spectral difference feature, and the second KLD divergence loss between the benchmark difference feature and the spatial texture feature are calculated respectively, and the sum of the two is used as the mutual learning loss.
5. The noise-resistant hyperspectral change detection method based on distribution consistency and entropy-induced attention according to claim 4, characterized in that, In step S5, the squared pixel-level feature difference of the dual-temporal features is calculated using the following formula: , in, The squared feature difference between the two temporal pixels; The physical characteristics of the first phase; This refers to the physical characteristics of the second phase; The channel correlation matrix is calculated using the channel attention mechanism, and the formula is as follows: , in, Represents the channel correlation matrix. Represents the channel projection matrix; It is the transpose matrix; Deep spectral difference features are extracted using large kernel attention, and the calculation formula is as follows: , in, For deep spectral differences, For the learnable scaling parameters of the spectral branch, Indicates multiplication and reshaping; The two temporal features are concatenated, and the calculation formula is as follows: , in, Features after splicing; The spatial correlation matrix is calculated using a location attention mechanism, and the formula is as follows: , in, Represents the spatial correlation matrix; Represents the spatial texture feature projection matrix; Deep spatial texture features are extracted using a large kernel attention algorithm, calculated as follows: , in, For deep spatial texture features, Learnable scaling parameters for spatial branches; The formula for calculating mutual learning loss is as follows: , , , in, The first KLD divergence loss between the baseline difference feature and the spectral difference feature; The second KLD divergence loss is used to compare the baseline difference features with the spatial texture features. This represents the numerical representation of a pixel on the feature map.
6. The noise-resistant hyperspectral change detection method based on distribution consistency and entropy-induced attention according to claim 5, characterized in that, In step S6, the entropy-induced adaptive attention module's processing includes: embedding and positionally encoding the baseline difference features; converting the feature values into a probability distribution along the channel dimension using Softmax; calculating the normalized information entropy for each spatial location according to the Shannon entropy definition; calculating the standard deviation along the channel dimension; concatenating the information entropy and standard deviation along the channel dimension to obtain a statistical tensor; and generating an attention mask using multi-scale convolution and the Sigmoid function; applying the attention mask as a residual to the difference embedding features; and obtaining entropy saliency enhancement features through the channel enhancement submodule.
7. The noise-resistant hyperspectral change detection method based on distribution consistency and entropy-induced attention according to claim 6, characterized in that, In step S6, the input features are preprocessed through an embedding layer and batch normalization, and then flattened and filled with positional encoding. The calculation formula is as follows: , in, These are the features after preprocessing; Input features; For position encoding; The normalized information entropy for each spatial location is calculated using the following formula: , in, Represents the normalized information entropy. This represents the probability value of the channel. Indicates the number of channels. It is a stable term; The standard deviation along the channel dimension is calculated using the following formula: , in, The standard deviation along the channel dimension, Features after preprocessing Average value along the channel dimension; Normalized information entropy Standard deviation along the channel dimension The statistical tensor is obtained by splicing. Attention masks are generated through multi-scale convolution, and the calculation formula is as follows: , in, For attention masking; It is the Sigmoid activation function. To merge convolutions, For ordinary convolution, This is dilated convolution; Attention mask The residual is applied to the differential embedding features, and the entropy-enhanced features are calculated by the channel enhancement submodule. The calculation formula is as follows: , , in, These are intermediate features after residual connection. express Convolution kernel, Indicates batch normalization. This represents the GELU activation function. This is a feature that significantly enhances entropy.
8. The noise-resistant hyperspectral change detection method based on distribution consistency and entropy-induced attention according to claim 7, characterized in that, In step S7, the processing of the context-aware gating fusion module includes: generating gating weights for spectral difference features, spatial texture features, entropy significance enhancement features, and baseline difference features through convolutional layers and the Sigmoid function; and performing multi-branch weighted fusion to obtain fused change features.
9. The noise-resistant hyperspectral change detection method based on distribution consistency and entropy-induced attention according to claim 8, characterized in that, In step S7, adaptive gating weights are generated for each feature branch using convolutional layers and the sigmoid function, and the calculation formula is as follows: , , , , in, The gating weights are the spectral difference features. For the gating weights of spatial texture features, The gating weights for features that enhance entropy significance. The gating weights are the baseline difference features; Indicates a convolutional layer; It is the final spatial feature after processing the spatial texture feature extraction branch. It is the final spectral feature after the spectral difference feature extraction branch processing; The fused change feature is obtained by multiplying each feature element by its corresponding gating weight and summing the results. The calculation formula is as follows: , in, To integrate the characteristics of change, This indicates element-wise multiplication.
10. The noise-resistant hyperspectral change detection method based on distribution consistency and entropy-induced attention according to claim 9, characterized in that, In step S8, the classification prediction head calculates the class probability of each pixel belonging to the changed category and the unchanged category, using the following formula: , in, For class probabilities, and The weights and bias parameters for the prediction head; A pixel-level binary change detection map is generated by setting a preset threshold. The calculation formula is as follows: , in, This is a preset threshold.
