Hyperspectral image unmixing method and system based on double-path attention gating fusion

By employing a dual-path attention-gated fusion method to extract parallel spatial and channel attention from hyperspectral images, and combining a convolutional neural network and a dual-branch module of the Swin Transformer, the problem of insufficient feature representation in hyperspectral unmixing is solved, achieving higher accuracy in endmember spectral and abundance estimation.

CN121921623AActive Publication Date: 2026-04-24HANGZHOU DIANZI UNIV
View PDF 9 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HANGZHOU DIANZI UNIV
Filing Date
2026-03-25
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

Existing hyperspectral unmixing methods struggle to simultaneously and effectively capture both local spatial-spectral details and global long-range dependencies, resulting in insufficient feature representation capabilities and limited unmixing accuracy.

Method used

A dual-path attention-gated fusion method is adopted to perform parallel spatial and channel attention extraction on hyperspectral images to generate enhanced feature images. Feature extraction and fusion are performed through the local-global dual-branch module of convolutional neural network and Swin Transformer, and the unmixing network is optimized by combining the joint loss function.

Benefits of technology

It improves the accuracy and efficiency of hyperspectral unmixing, enabling more accurate estimation of endmember spectra and their abundance distribution, enhancing the adaptability and robustness of the model, and reducing computational complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121921623A_ABST
    Figure CN121921623A_ABST
Patent Text Reader

Abstract

The invention discloses a hyperspectral image demixing method and system based on double-path attention gating fusion, and the method comprises the steps: carrying out the parallel execution of channel attention extraction and space attention extraction of an input hyperspectral image, and generating a corresponding feature map; carrying out adaptive fusion on the feature image to obtain an enhanced feature image; inputting the image into a local-global branch based on a convolutional neural network and a Swin Transform for feature extraction and fusion; reconstructing an input hyperspectral image by using abundance estimation and a linear spectrum; and constructing and utilizing a joint loss function to optimize a de-mixing network. According to the method, parallel space and channel attention extraction is carried out on the original hyperspectral image at the front end of feature extraction, and dynamic weighted fusion is carried out through a learnable gating mechanism, so that the network can adaptively strengthen the most discriminative information in the hyperspectral images of different scenes. The adaptive feature reweighting mode effectively filters redundant noise in an original image and enhances the discrimination of key features.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and more specifically, to a method and system for demixing hyperspectral images based on dual-path attention-gated fusion. Background Technology

[0002] Hyperspectral remote sensing technology can acquire spectral information of ground objects across tens to hundreds of consecutive narrow bands and has been widely applied in precision agriculture, environmental monitoring, and mineral exploration. However, limited by the spatial resolution of imaging systems and the complexity of ground object distribution, hyperspectral images contain a large number of "mixed pixels," meaning that the spectral signal of a single pixel is the result of mixing the spectra of multiple pure substances (called "endmembers") in their corresponding proportions (called "abundance"). Decomposing mixed pixels, i.e., "hyperspectral unmixing," is a key step in obtaining sub-pixel-level ground object composition information and achieving high-precision quantitative inversion via remote sensing.

[0003] Traditional unmixing methods are mainly based on linear or nonlinear spectral mixing models, heavily relying on manually designed features and prior knowledge, resulting in poor robustness in complex scenes and under noise interference. Deep learning-based methods, especially convolutional neural networks (CNNs) and Transformer architectures, offer new approaches to unmixing. However, CNNs have limited receptive fields, making it difficult to model long-range dependencies; while traditional Transformers can capture global information, they have high computational complexity, destroy the two-dimensional structure of images, and are weak in modeling local details. Existing deep learning unmixing methods mostly employ a single CNN or traditional Transformer structure, failing to fully leverage the advantages of both, and have limitations in simultaneously modeling stable representations of local details and cross-regional consistency, thus restricting further improvements in unmixing accuracy.

[0004] Therefore, there is an urgent need to propose a computationally efficient hyperspectral unmixing method that can synergistically utilize local fine features and global contextual information to estimate endmember spectra and their abundance distributions more quickly and accurately. Summary of the Invention

[0005] The purpose of this invention is to overcome the shortcomings of the prior art and provide a hyperspectral image demixing method and system based on dual-path attention-gated fusion. This invention aims to solve the technical problem in existing hyperspectral demixing methods that it is difficult to simultaneously and effectively capture local spatial-spectral details and global long-range dependencies, resulting in insufficient feature representation capabilities and limited demixing accuracy.

[0006] To achieve the above objectives, the present invention adopts the following technical solution:

[0007] A hyperspectral image demixing method based on dual-path attention-gated fusion includes the following steps:

[0008] Step S1: Perform channel attention extraction and spatial attention extraction in parallel on the input hyperspectral image to generate channel attention feature maps and spatial attention feature maps, respectively.

[0009] Step S2: Adaptively fuse the channel attention feature map and the spatial attention feature map to obtain an enhanced feature image;

[0010] Step S3: Input the enhanced feature image into the local-global dual-branch module based on convolutional neural network and Swing Transformer for feature extraction and fusion;

[0011] Step S4: Based on the fusion features, the input hyperspectral image is reconstructed using abundance estimation and linear spectroscopy;

[0012] Step S5: Construct and optimize the unmixed network using the joint loss function.

[0013] Furthermore, in step S1, channel attention extraction is achieved through the following steps: global average pooling is performed on the input hyperspectral image to obtain channel descriptors; then, a channel weight vector is generated through a sub-function containing a one-dimensional convolutional layer and a sigmoid activation function; the channel weight vector is multiplied by the input hyperspectral image to obtain the channel attention feature map.

[0014] Furthermore, in step S1, spatial attention extraction is achieved through the following steps: global max pooling and global average pooling are performed on the input hyperspectral image along the channel dimension to obtain two spatial feature maps; the two spatial feature maps are concatenated along the channel dimension and generated through a convolutional layer and a sigmoid activation function to generate a spatial attention weight map; the spatial attention weight map is multiplied with the input hyperspectral image to obtain a spatial attention feature map.

[0015] Furthermore, in step S2, the channel attention feature map and the spatial attention feature map are concatenated, and the fusion weight of the two is adaptively learned by the gated weight generator. Based on this, the two features are weighted and summed to generate a feature image in which both spectral and spatial information are enhanced.

[0016] Furthermore, in step S3, the global feature extraction branch contains at least one Swing Transformer block, which employs a window multi-head self-attention mechanism and a shift window multi-head self-attention mechanism.

[0017] Furthermore, in step S4, the abundance estimation maps the fused features to a preset number of endmembers through a 1×1 convolutional layer, and then applies the Softmax function along the channel dimension to obtain an abundance map that satisfies the constraints of nonnegativity and summation to 1.

[0018] Furthermore, in step S6, the hyperspectral image reconstruction is performed by forward computation through a 1×1 convolutional layer with a weight matrix that is a learnable endmember spectral matrix, using the abundance map as input.

[0019] Furthermore, in step S5, the joint loss function is:

[0020]

[0021] In the formula, To calculate the pixel-level reconstruction error loss, the mean square error of the reconstructed image and the original image over all pixels is calculated. To account for the spectral angular distance loss, the average difference in shape between the reconstructed spectral curve and the original spectral curve is calculated; To balance the hyperparameters of the two losses.

[0022] The present invention also provides a hyperspectral image demixing system based on dual-path attention-gated fusion, the system comprising:

[0023] The attention extraction and fusion module is used to perform parallel dual-path attention extraction and gated adaptive fusion on the input hyperspectral image and output an enhanced feature image.

[0024] The dual-branch feature extraction and fusion module, connected to the attention extraction and fusion module, includes parallel convolutional neural subnetworks and Swing Transformer subnetworks, used to collaboratively extract local detail features and global context features from the enhanced feature image and perform feature fusion.

[0025] The demixing output module, connected to the dual-branch feature extraction and fusion module, is used to estimate the abundance map based on the fused features and reconstruct the input hyperspectral image using the learnable endmember spectral matrix.

[0026] The loss calculation and optimization module is used to calculate the joint loss and optimize the parameters in the attention extraction and fusion module, the dual-branch feature extraction and fusion module, and the demixing output module through the backpropagation algorithm.

[0027] Furthermore, the attention extraction and fusion module includes:

[0028] The channel attention submodule is used to generate channel attention feature maps;

[0029] The spatial attention submodule is used to generate spatial attention feature maps;

[0030] The gated fusion submodule is used to adaptively weight and fuse the channel attention feature map and the spatial attention feature map.

[0031] The beneficial effects of this invention are:

[0032] 1. This invention performs parallel spatial and channel attention extraction on the original hyperspectral image at the feature extraction front end, and dynamically weights and fuses the data through a learnable gating mechanism, enabling the network to adaptively enhance the most discriminative information in hyperspectral images of different scenes. This adaptive feature reweighting method effectively filters redundant noise in the original image and enhances the discriminative power of key features.

[0033] 2. This invention simultaneously inputs the gated enhanced image into a local feature extraction branch based on a convolutional neural network (CNN) and a global feature extraction branch based on a Swing Transformer, both set in parallel. It utilizes the local receptive field of the CNN to capture subtle spectral variations in ground features, and leverages the window self-attention mechanism of the Swing Transformer to model non-local spatial priors. This combination overcomes the problem of insufficient feature representation in handling complex ground feature distributions using a single architecture. Furthermore, the gated and fused enhanced features are fed separately into the local-global dual-branch modules based on CNN and Swing Transformer, ensuring that subsequent local detail extraction and global context modeling are both built upon optimized feature bases, thus improving the efficiency and synergy of the dual-branch feature extraction.

[0034] 3. In this invention, the gating mechanism automatically learns the contribution weights of spatial and channel attention through a lightweight network, avoiding the difficulty of manually setting the fusion ratio and enhancing the model's adaptability and robustness. The windowing mechanism of the Swin Transformer significantly reduces computational complexity while maintaining global awareness. Attached Figure Description

[0035] Figure 1 This is a flowchart of a hyperspectral image demixing method based on dual-path attention-gated fusion in this embodiment;

[0036] Figure 2 This is a structural framework diagram of a hyperspectral image demixing system based on dual-path attention-gated fusion in this embodiment;

[0037] Figure 3 This is a visualization comparison of abundance on the Samson dataset in this embodiment.

[0038] Figure labeling: Attention extraction and fusion module 1, Channel attention submodule 11, Spatial attention submodule 12, Gated fusion submodule 13, Dual-branch feature extraction and fusion module 2, Demixed output module 3, Loss calculation and optimization module 4. Detailed Implementation

[0039] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0040] Example: A hyperspectral image demixing method based on dual-path attention-gated fusion. This method constructs an end-to-end demixing network. At the network front end, a parallel dual-branch attention extraction and gated adaptive fusion module is designed. The channel attention branch generates channel weight vectors through global average pooling and one-dimensional convolution operations to enhance the highly discriminative spectral bands in the input image. The spatial attention branch fuses global max pooling and average pooling features and generates a spatial weight map through convolutional layers to focus on key spatial regions in the image. The outputs of the two branches are adaptively weighted and fused through a lightweight gated weight generator. By automatically learning and allocating the optimal contribution ratio of channel and spatial attention, an enhanced feature image that integrates spectral discriminativity and spatial saliency is generated. Building upon this foundation, a parallel Convolutional Neural Network (CNN) branch and a SwinTransformer branch are introduced. The CNN branch extracts local spatial-spectral detail features through multi-layer convolutional operations, while the SwinTransformer branch utilizes its window and shift window self-attention mechanisms to model long-range global contextual dependencies. The two branches work together to overcome the limitations of a single structure in terms of stable local detail representation and global consistency modeling. The features extracted by the dual branches are concatenated through channels and mapped to an abundance estimation map via convolutional layers. A Softmax function is used to impose constraints on the non-negativity of abundance and a sum of 1. Simultaneously, the convolutional kernel weights of the decoder layer are treated as learnable endmember spectral matrices, and the input image is reconstructed using a linear spectral mixture model. Furthermore, this method constructs a joint loss function that includes pixel-level reconstruction error terms and spectral shape consistency terms. Under an unsupervised framework, this simultaneously constrains the reconstructed image to maintain consistency with the original input in both numerical values ​​and spectral curve shape, thereby driving the synchronous optimization of network parameters and endmember spectra.

[0041] Specifically, such as Figure 1 As shown, the method includes the following steps:

[0042] Step S1, Parallel Dual-Path Attention Refinement: Perform channel attention refinement and spatial attention refinement in parallel on the input hyperspectral image to generate channel attention feature maps for enhanced discriminative spectral bands and spatial attention feature maps for focusing key spatial regions, respectively.

[0043] This step employs a parallel dual-path attention mechanism to extract and enhance key information from the input image in both the spectral and spatial dimensions. The channel attention path performs a global evaluation of all bands, adaptively assigning higher weights to the most information-rich bands to improve spectral discriminative power. The spatial attention path aggregates channel information to generate a spatial weight map, highlighting ground feature boundaries or regions with significant features in the image. These two processing paths address the spectral redundancy and spatial heterogeneity of hyperspectral images, providing a cleaner and more discriminative feature base for subsequent unmixing.

[0044] Channel attention extraction is achieved through the following steps:

[0045] Construct a channel attention submodule, which can consist of a global average pooling layer, a one-dimensional convolutional layer, and a sigmoid activation function; then, process the input hyperspectral image... (dimension) , For the number of bands, and These are the image height and width, respectively. The channel descriptors are obtained by compressing spatial information through a global average pooling layer (for the set of real numbers); then, a sub-function containing a one-dimensional convolutional layer and a sigmoid activation function is used to generate channel weight vectors. (dimension) ); channel weight vector With the input hyperspectral image Multiply to obtain the channel attention feature map. The formula is as follows:

[0046]

[0047] In the formula, This represents an element-wise multiplication operation that broadcasts along the channel dimension.

[0048] Spatial attention extraction is achieved through the following steps:

[0049] Construct a spatial attention submodule, which first processes the input hyperspectral image. Global max pooling and global average pooling are performed along the channel dimension to obtain two spatial feature maps. These two feature maps are then concatenated along the channel dimension and fed into a convolutional layer for fusion and dimensionality reduction. Finally, a spatial attention weight map is generated by applying a sigmoid activation function. (dimension) Spatial attention weight map With the input hyperspectral image Multiplying them together yields the spatial attention feature map. The formula is as follows:

[0050]

[0051] In the formula, This represents an element-wise multiplication operation that broadcasts along spatial dimensions (height and width).

[0052] Further, in step S2, gated adaptive weighted fusion: the channel attention feature map and the spatial attention feature map are adaptively fused to obtain an enhanced feature image.

[0053] Specifically, it includes the following steps:

[0054] Step S21, Concatenate attention features: Concatenate the channel attention feature maps Spatial attention feature map By stitching along the channel dimension, the stitching feature is obtained. Dimension ;

[0055] Step S22, Generate gated fusion weights: Combine the spliced ​​features Input gated weight generator The generator contains a global average pooling layer, a fully connected layer, a ReLU activation function, and a softmax function for calculating weights. and ,satisfy These two weights represent the relative importance of the channel attention path and the spatial attention path in the final fusion result, respectively.

[0056] Step S23, Perform weighted fusion: Use the generated weights and Channel attention feature maps respectively Spatial attention feature map The weighted values ​​are then summed to generate a feature image with enhanced spectral and spatial information. The formula is as follows:

[0057]

[0058]

[0059]

[0060] In the formula, This represents an element-wise multiplication operation that broadcasts along the channel dimension.

[0061] Step S2 aims to effectively fuse the two feature maps obtained in step S1, and a gated weight generator is designed. The generator takes dual-channel attention features as input, automatically learns and outputs weights to balance the importance of channel attention and spatial attention. and The gating mechanism is used to perform a weighted summation of the two feature streams to generate an enhanced feature image. The image adaptively combines significant spectral discriminativeness and spatial structure, providing a better input for subsequent complex feature extraction.

[0062] Further, in step S3, local-global dual-branch feature collaborative extraction and fusion: the enhanced feature image is input into the parallel convolutional neural network (CNN) branch and the Swin Transformer branch, and then the features extracted by the two branches are fused to obtain fused features that simultaneously contain local details and global information.

[0063] The CNN branch is used to enhance the feature image. The local spatial-spectral detail features are extracted. This branch can be composed of multiple cascaded convolutional modules, such as four convolutional modules. Each convolutional module contains a 2D convolutional layer, a batch normalization layer, and a ReLU activation function. The kernel size of the 2D convolutional layer is 3×3, and the number of channels is set to 128, 64, 32, and 16 respectively. After multiple nonlinear transformations, the final output is a local feature map. Dimension .

[0064] The Swin Transformer branch is used to extract enhanced feature images. Hierarchical global context features are extracted from this branch, which contains at least one Swin Transformer block. During feature extraction, the enhanced feature image is first adjusted through a linear embedding layer. The feature dimensions are then fed into the Swing Transformer block, which employs both window multi-head self-attention (W-MSA) and moving window multi-head self-attention (SW-MSA) mechanisms, and applies layer normalization (LN) and multilayer perceptron (MLP) before and after attention calculation. After processing, a linear mapping layer adjusts the feature dimensions and reshapes them into a global feature map. Dimension ;

[0065]

[0066] In the formula, Represents a linear mapping layer; This indicates a dimension reshaping operation; For the SwinTransformer block.

[0067] As a preferred option, the Swin Transformer block can be represented as:

[0068]

[0069]

[0070]

[0071]

[0072] In the formula, Representation layer normalization; Indicates a feedforward network; This indicates multi-head self-attention in the window; This indicates multi-head self-attention within a displacement window; and These are the input and output characteristics of the module, respectively.

[0073] Local feature maps output by CNN branches Global feature map output by the Swing Transformer branch By splicing along the channel dimension, a fusion feature is formed. Dimension .

[0074] Step S3 aims to enhance the feature image To simultaneously acquire local details and global contextual information, a parallel dual-branch architecture was designed. The CNN branch, composed of stacked multi-layer convolutional modules, excels at extracting local stable features such as subtle spectral variations and spatial textures within pixel neighborhoods due to its local connectivity and weight sharing characteristics. The SwinTransformer branch, based on a multi-head self-attention mechanism using window and shift window methods, effectively models semantic relationships between distant pixels, capturing global structural priors and long-range dependencies of the image. The complementary features extracted by the two branches are fused to obtain a deep feature representation that simultaneously contains fine local information and global consistency.

[0075] Further, in step S4, abundance estimation and linear spectral reconstruction: based on the fusion features, the input hyperspectral image is reconstructed using abundance estimation and linear spectral reconstruction.

[0076] Abundance estimation is achieved through the following steps:

[0077] Fusion features A 1×1 convolutional layer maps the number of channels to a preset number of endmembers P; then, a Softmax function is applied along the channel dimension (i.e., the endmember dimension) to obtain an abundance map that satisfies the nonnegativity and summation constraints of 1. Dimension .

[0078] Hyperspectral image reconstruction is achieved through the following steps:

[0079] Use another 1×1 convolutional layer as the decoder, with its weights (dimension) As a learnable endmember spectrum, to estimate the abundance map The reconstructed hyperspectral image can be obtained by performing forward computation through this convolutional layer as input. Dimension The formula is as follows:

[0080]

[0081] In the formula, The convolution operation, which is mathematically equivalent to matrix multiplication, achieves a linear combination of endmember spectra and abundance.

[0082] In step S4, the estimated endmember spectra and abundance maps are used to reconstruct the input hyperspectral image, thereby making the forward process of the network equivalent to the unmixed physical model.

[0083] Further, in step S5, joint loss optimization: construct and utilize the joint loss function to optimize the unmixed network.

[0084] Specifically, a joint loss function is constructed, comprising reconstruction error loss and spectral angular distance loss. The reconstruction error loss forces the abundance and endmembers output by the network to accurately reconstruct the original image, ensuring the numerical fidelity of the unmixed structure. The spectral angular distance loss focuses on constraining the consistency of the reconstructed spectral curve with the original spectral curve in shape, improving the spectral fidelity of the endmember estimation. This joint loss function is minimized through backpropagation, synchronously updating all parameters in the network and driving the model to evolve towards simultaneously improving the accuracy of abundance estimation and endmember spectral accuracy.

[0085] Joint loss function Loss due to pixel-level reconstruction error and spectral angular distance loss The linear weighted average is constructed using the following formula:

[0086]

[0087] In the formula, To balance the hyperparameters of the two losses.

[0088] Reconstruction error loss Used to calculate reconstructed images With the original image The mean square error across all pixels is calculated using the following formula:

[0089]

[0090] In the formula, Represents the row index of a pixel in the image, with values ​​ranging from 1 to the height of the image. ; The column index representing the pixels in the image, with values ​​ranging from 1 to the width of the image. ; Represents the original input hyperspectral image In spatial location The complete spectral vector at that location; Represents the reconstructed hyperspectral image In spatial location The complete spectral vector at that location; This represents the square of the L2 norm.

[0091] Spectral angular distance loss The formula used to calculate the average difference in shape between the reconstructed spectral curve and the original spectral curve is as follows:

[0092]

[0093] In the formula, This represents the total number of pixels. ; and These represent the pixel positions of the original image and the reconstructed image, respectively. The L-dimensional spectral vector at that location; Represents the dot product of vectors; This represents the L2 norm of a vector.

[0094] Minimize the joint loss function using the backpropagation algorithm. It synchronously updates all parameters in the network, including attention extraction and fusion module 1 (i.e., channel attention submodule 11, spatial attention submodule 12 and gated fusion submodule 13) and learnable endmember spectra, driving the model to evolve in the direction of simultaneously improving the accuracy of abundance estimation and endmember spectra.

[0095] This embodiment of the demixing method designs a deep network architecture that coordinates local perception and global modeling to achieve high-precision estimation of endmember spectra and abundance in mixed pixels. The core process is as follows: First, channel and spatial attention are extracted in parallel on the original hyperspectral image to enhance the response of discriminative bands and key regions, respectively. A learnable gating mechanism is introduced to achieve adaptive fusion of the two attention features, generating an enhanced feature image with optimized spectral and spatial information. Second, the enhanced feature image is simultaneously input into parallel convolutional neural network branches and SwinTransformer branches to extract stable features that characterize local details and global context features that capture long-range dependencies, respectively, and then the two are deeply fused. Subsequently, based on the fused features, an abundance map that satisfies physical constraints is estimated, and the input image is reconstructed using a linear mixture model using a learnable endmember spectral matrix, thus organically combining network learning with the demixing physical process. Finally, a joint loss function that simultaneously constrains pixel-level reconstruction error and spectral shape consistency is constructed. By optimizing this loss function, the synchronous update of the entire network parameters and endmember spectra is driven, ultimately outputting accurate endmember spectra and abundance distributions.

[0096] This embodiment also provides a hyperspectral image demixing system based on dual-path attention-gated fusion, such as Figure 2 As shown, the system includes an attention extraction and fusion module 1, a dual-branch feature extraction and fusion module 2, a demixing output module 3, and a loss calculation and optimization module 4.

[0097] The attention extraction and fusion module 1 is responsible for performing parallel dual-path attention extraction and gated adaptive fusion on the input hyperspectral image and outputting an enhanced feature image. This module includes a channel attention submodule 11 for generating channel attention feature maps, a spatial attention submodule 12 for generating spatial attention feature maps, and a gated fusion submodule 13 for adaptively weighted fusion of channel attention feature maps and spatial attention feature maps.

[0098] The dual-branch feature extraction and fusion module 2 is connected to the attention extraction and fusion module 1. It contains parallel convolutional neural subnetworks and Swin Transformer subnetworks, and is responsible for collaboratively extracting local detail features and global context features from the enhanced feature image and performing feature fusion.

[0099] The demixing output module 3 is connected to the dual-branch feature extraction and fusion module 2. It is responsible for estimating the abundance map based on the fused features and reconstructing the input hyperspectral image using the learnable endmember spectral matrix.

[0100] The loss calculation and optimization module 4 is responsible for calculating the joint loss and optimizing the parameters in the attention extraction and fusion module 1, the dual-branch feature extraction and fusion module 2, and the demixing output module 3 through the backpropagation algorithm.

[0101] To verify the effectiveness of the method proposed in this embodiment, experiments were conducted on real hyperspectral images. The specific implementation method is illustrated below using the Samson dataset as an example; the experiments are as follows:

[0102] The images used are from the Samson dataset, which contains 156 spectral bands, and the scenes include three endmembers: soil, trees, and water.

[0103] like Figure 3 As shown in the figure, this diagram illustrates the abundance visualization results between the proposed method and the comparison methods. Experimental results demonstrate that the method proposed in this embodiment outperforms other methods in terms of image purity and contrast, providing more accurate component separation results.

[0104] Table 1 shows the unmixing performance of different unmixing methods on the Samson dataset. Root mean square error (RMSE) is used to evaluate the accuracy of abundance estimation, and spectral angular distance (SAD) is used to evaluate the accuracy of endmember estimation. As can be seen from Table 1, the method proposed in this invention exhibits higher accuracy in both endmember and abundance estimation.

[0105] Table 1. Performance of different unmixing methods on the Samson dataset.

[0106]

[0107] The above description is merely a preferred embodiment of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of the present invention should also be considered within the scope of protection of the present invention.

Claims

1. A hyperspectral image demixing method based on dual-path attention-gated fusion, characterized in that, Includes the following steps: Step S1: Perform channel attention extraction and spatial attention extraction in parallel on the input hyperspectral image to generate channel attention feature maps and spatial attention feature maps, respectively. Step S2: Adaptively fuse the channel attention feature map and the spatial attention feature map to obtain an enhanced feature image; Step S3: Input the enhanced feature image into the local-global dual-branch module based on convolutional neural network and Swing Transformer for feature extraction and fusion; Step S4: Based on the fusion features, the input hyperspectral image is reconstructed using abundance estimation and linear spectroscopy; Step S5: Construct and optimize the unmixed network using the joint loss function.

2. The hyperspectral image demixing method based on dual-path attention-gated fusion according to claim 1, characterized in that, In step S1, channel attention extraction is achieved through the following steps: global average pooling is performed on the input hyperspectral image to obtain channel descriptors; then, a channel weight vector is generated through a sub-function containing a one-dimensional convolutional layer and a sigmoid activation function; the channel weight vector is multiplied by the input hyperspectral image to obtain the channel attention feature map.

3. The hyperspectral image demixing method based on dual-path attention-gated fusion according to claim 1, characterized in that, In step S1, spatial attention extraction is achieved through the following steps: global max pooling and global average pooling are performed on the input hyperspectral image along the channel dimension to obtain two spatial feature maps; the two spatial feature maps are concatenated along the channel dimension and passed through a convolutional layer and a sigmoid activation function to generate a spatial attention weight map; the spatial attention weight map is multiplied with the input hyperspectral image to obtain a spatial attention feature map.

4. The hyperspectral image demixing method based on dual-path attention-gated fusion according to claim 1, characterized in that, In step S2, the channel attention feature map and the spatial attention feature map are concatenated, and the fusion weight of the two is adaptively learned by the gated weight generator. Based on this, the two features are weighted and summed to generate a feature image in which both spectral and spatial information are enhanced.

5. The hyperspectral image demixing method based on dual-path attention-gated fusion according to claim 1, characterized in that, In step S3, the global feature extraction branch contains at least one Swing Transformer block, which employs a window multi-head self-attention mechanism and a shift window multi-head self-attention mechanism.

6. The hyperspectral image demixing method based on dual-path attention-gated fusion according to claim 1, characterized in that, In step S4, the abundance estimation is performed by mapping the fused features to a preset number of endmembers through a 1×1 convolutional layer, and then applying the Softmax function along the channel dimension to obtain an abundance map that satisfies the constraints of nonnegativity and summation to 1.

7. The hyperspectral image demixing method based on dual-path attention-gated fusion according to claim 6, characterized in that, In step S6, the hyperspectral image reconstruction is performed by forward computation through a 1×1 convolutional layer with a weight matrix that is a learnable endmember spectral matrix, using the abundance map as input.

8. The hyperspectral image demixing method based on dual-path attention-gated fusion according to claim 1, characterized in that, In step S5, the joint loss function is: In the formula, To calculate the pixel-level reconstruction error loss, the mean square error of the reconstructed image and the original image over all pixels is calculated. To account for the spectral angular distance loss, the average difference in shape between the reconstructed spectral curve and the original spectral curve is calculated; To balance the hyperparameters of the two losses.

9. A hyperspectral image demixing system based on dual-path attention-gated fusion for implementing the method of claim 1, characterized in that, The system includes: The attention extraction and fusion module (1) is used to perform parallel dual-path attention extraction and gated adaptive fusion on the input hyperspectral image and output an enhanced feature image. The dual-branch feature extraction and fusion module (2), connected to the attention extraction and fusion module (1), contains parallel convolutional neural subnetworks and Swin Transformer subnetworks, used to collaboratively extract local detail features and global context features from the enhanced feature image and perform feature fusion; The demixing output module (3) is connected to the dual-branch feature extraction and fusion module (2) to estimate the abundance map based on the fused features and reconstruct the input hyperspectral image using the learnable endmember spectral matrix. The loss calculation and optimization module (4) is used to calculate the joint loss and optimize the parameters in the attention extraction and fusion module (1), the dual-branch feature extraction and fusion module (2), and the demixing output module (3) through the backpropagation algorithm.

10. The hyperspectral image demixing system based on dual-path attention-gated fusion according to claim 9, characterized in that, The attention extraction and fusion module includes: The channel attention submodule (11) is used to generate channel attention feature maps; The spatial attention submodule (12) is used to generate spatial attention feature maps; The gated fusion submodule (13) is used to adaptively weighted fuse the channel attention feature map and the spatial attention feature map.

Citation Information

Patent Citations

  • Forage grass identification method based on three-dimensional self-encoding multi-scale feature extraction

    CN119295978A

  • Construction method of adaptive gated spectrum-space-graph collaborative fusion network

    CN120472243A

  • Hyperspectral image demixing method and device, electronic equipment and computer program product

    CN121010897A

  • Hyperspectral image unmixing method for joint optimization of end member extraction and abundance inversion

    CN121392585A

  • Image reconstruction method and device based on multispectral pixel decomposition, equipment and medium

    CN121505089A