A hyperspectral image denoising method and system based on Mamba and linear attention
By combining the U-Net network with a dual-branch architecture of Mamba and linear attention blocks, efficient and high-precision denoising of hyperspectral images is achieved, solving the problem of difficulty in balancing denoising accuracy and efficiency in existing technologies. It is applicable to fields such as hyperspectral remote sensing and environmental monitoring.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-06
- Publication Date
- 2026-07-24
AI Technical Summary
Existing hyperspectral image denoising methods struggle to balance high denoising accuracy with computational efficiency, and are unable to adapt to the complex spatial-spectral characteristics of hyperspectral images, resulting in insufficient image quality and spectral fidelity, which affects the performance of subsequent analysis tasks.
Based on the U-Net network, and combined with the dual-branch parallel architecture of Mamba and linear attention blocks, multi-scale feature extraction and fusion are performed through a hybrid spatial spectral module, including 3D convolutional layers, parallel Mamba-linear attention blocks and gated feedforward networks, which perform parallel modeling and feature fusion of spatial and spectral information respectively, thereby optimizing feature extraction and computation efficiency.
It significantly improves the denoising accuracy of hyperspectral images, preserves the spectral fidelity and spatial details of the images, and is suitable for various application needs of hyperspectral remote sensing and environmental monitoring scenarios, demonstrating good engineering practicality.
Smart Images

Figure CN122453653A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of hyperspectral image restoration technology, specifically to a hyperspectral image denoising method and system based on Mamba and linear attention. Background Technology
[0002] Hyperspectral images can simultaneously acquire the spatial structure of a target and detailed spectral information across dozens to hundreds of consecutive narrow spectral bands. Compared to traditional RGB images, they possess stronger ground feature representation capabilities and have significant application value in remote sensing, environmental monitoring, geological exploration, and material analysis. However, due to limitations in sensor hardware and complex atmospheric environments, noise is inevitably introduced into hyperspectral images during acquisition, severely compromising visual quality and spectral fidelity, and significantly reducing the performance of downstream tasks such as feature extraction, target detection, and image classification. Therefore, hyperspectral image denoising is a crucial preprocessing step to ensure the reliability of subsequent analysis.
[0003] Current mainstream denoising methods have obvious technical bottlenecks: traditional model-based methods rely on manually designed regularization terms, which are difficult to adapt to the complex spatial-spectral coupling characteristics of hyperspectral data, resulting in limited denoising accuracy; in deep learning methods, convolutional neural networks are limited by local receptive fields, making it difficult to capture global long-range dependencies; although Transformer-type methods have strong long-range modeling capabilities, their computational complexity is high, making it difficult to balance denoising performance and computational efficiency. Summary of the Invention
[0004] To address the common problems of insufficient spatial-spectral feature extraction and difficulty in balancing performance and computational efficiency in existing denoising methods, which fail to achieve both high denoising accuracy and high computational efficiency in low-complexity hyperspectral image denoising and thus cannot meet the needs of practical applications, this invention aims to provide a hyperspectral image denoising method based on Mamba and linear attention. The specific technical solution adopted is as follows:
[0005] Hyperspectral images were acquired and preprocessed to form a training set;
[0006] A hybrid spatial spectral module is constructed, which is defined as the core feature extraction unit of the encoder and decoder of the U-Net network. The hybrid spatial spectral module includes 3D convolutional layers, parallel Mamba-linear attention blocks, and gated feedforward networks.
[0007] The training set is sequentially extracted and fused using a hybrid spectral module to output a denoised hyperspectral image.
[0008] Preferably, hyperspectral images are acquired and preprocessed to form a training set, specifically as follows:
[0009] Hyperspectral images were acquired using the ICVL hyperspectral dataset, and preprocessed with intensity normalization and data augmentation. The preprocessed hyperspectral images were then cropped into 3D image patches and integrated to form a training set.
[0010] Preferably, the parallel Mamba-linear attention block includes a spatial branch and a spectral branch, corresponding to the linear attention block and the spectral Mamba block, respectively.
[0011] Preferably, the training set is sequentially extracted and fused using a hybrid spectral module to output a denoised hyperspectral image, including:
[0012] A 3D convolutional layer is used to perform preliminary extraction of spatial-spectral features and channel dimension expansion on the training set to obtain denoised features;
[0013] By using a dual-branch parallel Mamba-linear attention block, spatial and spectral information are modeled and fused in parallel to obtain denoising enhancement features.
[0014] The denoising enhancement features are enhanced and redundant information is suppressed by a gated feedforward network, thereby improving the feature representation ability and outputting a denoised hyperspectral image.
[0015] Preferably, the denoising features are obtained by performing parallel modeling and feature fusion of spatial and spectral information on the denoising features through a dual-branch parallel Mamba-linear attention block, including:
[0016] In the spatial branch, spatial features are extracted from the denoising features using linear attention blocks;
[0017] In the spectral branch, spectral features are extracted from the denoising features using spectral Mamba blocks;
[0018] Spatial and spectral features are weighted and fused using an activation function, and then integrated through a linear layer to obtain denoising and enhanced features.
[0019] Preferably, in the spatial branch, spatial features are extracted from the denoising features using linear attention blocks, including:
[0020] The denoised features are subjected to average pooling along the spectral dimension and processed with linear attention blocks to generate intermediate values. The linear attention blocks are then combined to generate global spatial attention features.
[0021] The spatial features are output by combining global spatial attention features with the denoised features processed by spectral dimension average pooling and deep convolutional layers.
[0022] Preferably, in the spectral branch, spectral features are extracted from the denoising features using spectral Mamba blocks, including:
[0023] A bidirectional Mamba state space scan is performed on the denoised features after spatial dimension average pooling to feed back forward and reverse spectral features respectively.
[0024] The forward and reverse spectral features are added together and fused to output the spectral features.
[0025] Preferably, spatial and spectral features are weighted and fused using an activation function, and feature integration is completed through a linear layer to obtain denoising and enhanced features. The corresponding calculation formula is as follows:
[0026]
[0027] in, Indicates denoising and enhancement features; This indicates a feature channel splicing operation; This represents the Sigmoid activation function; Representing spatial characteristics; This represents element-wise multiplication; Represents the input residual features; Indicates spectral characteristics.
[0028] To address the aforementioned technical problems, this invention also provides a hyperspectral image denoising system based on Mamba and linear attention. The system includes a processor, a communication interface, a memory, and a communication bus. The processor, communication interface, and memory communicate with each other via the communication bus. The processor calls logical instructions from the memory to execute any of the aforementioned hyperspectral image denoising methods based on Mamba and linear attention.
[0029] The present invention has the following beneficial effects:
[0030] 1. Using U-Net as the overall framework and defining the hybrid spatial spectral module as the core feature extraction unit of its encoder and decoder, it can extract the effective spatial and spectral information of hyperspectral images at multiple scales. It not only relies on Mamba to achieve efficient long-range spectral dependency modeling, but also optimizes the computational efficiency of global spatial feature extraction through linear attention blocks, effectively solving the technical bottlenecks of insufficient feature extraction and difficulty in balancing denoising performance and computational efficiency in traditional methods. With the help of parallel Mamba-linear attention blocks for dual-branch parallel processing, it specifically models the spatial context information and spectral band correlations for the spatial-spectral coupling characteristics of hyperspectral images. After feature weighted fusion and multi-scale feature integration, it effectively removes redundant interference noise, significantly improves the denoising accuracy of hyperspectral images, and fully preserves the spectral fidelity and spatial details of the image. It is suitable for various application needs of hyperspectral remote sensing, environmental monitoring and other scenarios, and has good engineering practicality.
[0031] 2. The hyperspectral image denoising system based on Mamba and linear attention provided by this invention has the same beneficial effects as the hyperspectral image denoising method based on Mamba and linear attention provided by this invention, and will not be described in detail here. Attached Figure Description
[0032] To more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0033] Figure 1 This is a schematic diagram of the model architecture and hybrid spatial spectral module of a hyperspectral image denoising method based on Mamba and linear attention provided in an embodiment of the present invention.
[0034] Figure 2 This is a schematic diagram of the structure of a parallel Mamba-linear attention block, which is a hyperspectral image denoising method based on Mamba and linear attention, provided in an embodiment of the present invention. Detailed Implementation
[0035] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of a hyperspectral image denoising method and system based on Mamba and linear attention proposed according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0036] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0037] The following description, in conjunction with the accompanying drawings, details the specific scheme of the hyperspectral image denoising method and system based on Mamba and linear attention provided by this invention.
[0038] To better illustrate this point, given the large volume and rich detail of hyperspectral image data, any noise can negatively impact subsequent data analysis and applications. For example, noise can reduce the signal-to-noise ratio of an image, affecting its clarity and accuracy, and interfering with the identification and classification of ground features. Denoising effectively removes or reduces noise in images, improves image quality, and ensures the reliability of subsequent data processing, feature extraction, and model analysis, providing a more accurate and valuable information foundation for practical applications.
[0039] Therefore, in order to address the technical problems of insufficient spatial-spectral feature extraction and difficulty in balancing denoising accuracy and computation in existing hyperspectral image denoising methods, a hyperspectral image denoising method based on Mamba and linear attention is proposed. The overall method is based on the U-Net network framework, and the core adopts a dual-branch parallel architecture that combines Mamba and linear attention to achieve efficient and high-precision denoising of hyperspectral images.
[0040] Please see Figure 1 The first embodiment of the present invention provides a hyperspectral image denoising method based on Mamba and linear attention, the method comprising:
[0041] Step S1: Acquire hyperspectral images and preprocess them to form a training set;
[0042] Step S2: Construct a hybrid spatial spectral module, defining the hybrid spatial spectral module as the core feature extraction unit of the encoder and decoder of the U-Net network, and the hybrid spatial spectral module includes 3D convolutional layers, parallel Mamba-linear attention blocks, and gated feedforward networks;
[0043] Step S3: Extract and fuse multi-scale spatial-spectral features of the training set sequentially through the hybrid spectral module, and output the denoised hyperspectral image.
[0044] As explained, the U-Net network is a deep convolutional neural network widely used in the field of image segmentation. It captures the contextual semantic information of an image by progressively downsampling through the encoder, while the decoder gradually recovers spatial details through upsampling and skip connections, thereby achieving accurate extraction and reconstruction of image features.
[0045] Furthermore, in step S1, specifically:
[0046] Hyperspectral images were acquired using the ICVL hyperspectral dataset, and preprocessed with intensity normalization and data augmentation. The preprocessed hyperspectral images were then cropped into 3D image patches and integrated to form a training set.
[0047] Preferably, the ICVL hyperspectral dataset is used as the data source, which covers a wide range of spectral information and high-quality image data. In this embodiment, 100 images are randomly selected from it for subsequent preprocessing to form a training set, and another 50 images are randomly selected and uniformly cropped to a standard size of 512×512 to construct a model test set for subsequent auxiliary verification.
[0048] Specifically, the selected hyperspectral images undergo intensity normalization, are rotated 180° for attitude calibration, and then cropped to a standard size of 1024×1024. The normalized images are then scaled at multiple scales and divided into 64×64×31 three-dimensional volume blocks. Data augmentation operations, including random vertical flipping, 90°, 180°, or 270° rotation, and spectral inversion, are performed on the image blocks. After these processes are completed, all preprocessed hyperspectral images are integrated to form a training set. The size specifications can be adjusted according to the actual situation.
[0049] Furthermore, the parallel Mamba-linear attention block includes a spatial branch and a spectral branch, corresponding to the linear attention block and the spectral Mamba block, respectively.
[0050] It can be noted that in this embodiment, the mixed spatial-spectral module is referred to as MSSB (Mixed Spatial-Spectral Block), which integrates 3D convolutional layers, parallel Mamba-linear attention blocks, and gated feedforward networks internally. The parallel Mamba-linear attention block, or PMLB (Parallel Mamba-Linear Attention Block), contains two parallel branches to extract spatial and spectral features. The gated feedforward network, or GDFN (Gated-Dconv Feed-Forward Network), enhances the dynamic adjustment and filtering capabilities of ordinary feedforward networks by introducing a gating mechanism, thereby achieving more efficient feature extraction and information transmission.
[0051] It is explained that when the noisy hyperspectral image to be processed is input into the network during subsequent processing, its initial feature dimension is 64×64×31, corresponding to spatial height H=64, spatial width W=64, spectral dimension D=31, and initial number of channels C=1.
[0052] Furthermore, step S3 includes:
[0053] Step S31: Use 3D convolutional layers to perform preliminary extraction of spatial-spectral features and channel dimension expansion on the training set to obtain denoised features.
[0054] It is explained that implementing channel dimension expansion can effectively adapt to hyperspectral datasets with different spectral dimensions D, avoid model adaptability problems caused by differences in spectral dimensions of different datasets, significantly improve the model's generalization ability and cross-dataset applicability, and meet the application needs of hyperspectral image denoising in multiple scenarios.
[0055] Specifically, in actual operation, the initial features obtained from the hyperspectral image are input into the first MSSB module. The initial extraction of spatial-spectral integrated features and the expansion of channel dimensions are completed through 3D convolutional layers, mapping the features from 64×64×31×1 to 64×64×31×16. During this process, the spatial dimension and spectral dimension remain unchanged, and only the number of channels is expanded from 1 to 16 to obtain denoised features.
[0056] Step S32: By using the dual branches of the parallel Mamba-linear attention block, the spatial information and spectral information of the denoising features are modeled and fused in parallel to obtain the denoising enhancement features.
[0057] Further, step S32 includes:
[0058] Step S321: In the spatial branch, spatial features are extracted from the denoising features using linear attention blocks.
[0059] It is explained that the spatial branch implements a linear attention mechanism through a linear attention block to achieve accurate extraction and enhancement of global spatial features of hyperspectral images.
[0060] Understandably, the core technological advantage of linear attention mechanisms lies in their ability to integrate traditional self-attention... Time complexity optimized to It can complete global modeling of long-range spatial context dependencies with extremely low computational overhead, greatly improving the model's inference efficiency and adaptability to large-size hyperspectral images. However, linear attention has inherent limitations in its ability to capture local spatial details and its weak positional awareness. Therefore, in the analysis process, DWC (Depthwise Separable Convolution) and RoPE (Rotary Position Encoder) are introduced for synergistic enhancement: DWC extracts local spatial detail features to make up for the shortcomings of linear attention in local modeling; RoPE injects spatial positional information into the features to enhance the positional awareness of the features, ultimately achieving synergistic enhancement of global context and local details and positional information.
[0061] Further, step S321 includes:
[0062] Step S3211: Perform average pooling on the denoised features along the spectral dimension, and process them with linear attention blocks to generate intermediate values. Combine the linear attention blocks to generate global spatial attention features.
[0063] Specifically, performing average pooling along the spectral dimension compresses the feature dimension from H×W×D×C to H×W×C. This effectively compresses redundant spectral dimension features while fully preserving the spatial dimension structure information. This reduces subsequent computational complexity and focuses on effective spatial dimension features, laying the foundation for global modeling of linear attention.
[0064] The formula for generating intermediate values is as follows:
[0065]
[0066]
[0067]
[0068] in, Represents global spatial attention features; , All represent median values; The kernel function representing linear attention; Presentation layer normalization processing; This represents the average pooling operation performed along the spectral dimension; Indicates denoising features; Indicates a rotary position encoder; This indicates linear attention block processing; , These correspond to the query and the key, respectively.
[0069] It can be explained that the average pooling operation is performed along the spectral dimension. Kernel functions used for compressing spectral dimensions and focusing spatial dimension features; linear attention. To enhance the nonlinearity and numerical stability of feature representation; Rotary position encoder It is used to inject spatial location information into features, compensating for the lack of location awareness in linear attention blocks.
[0070] As explained, in this embodiment, the execution logic corresponding to the linear attention block processing is as follows:
[0071]
[0072] in, This indicates a query. Indicates key; Represents the value; This represents the transpose of the mean of the key features.
[0073] It can be explained that the mean of the key features Used to achieve normalized aggregation of features, thereby improving the robustness of feature representation.
[0074] Step S3212: Output spatial features by combining global spatial attention features with the denoised features processed by the spectral dimension average pooling and deep convolution layers.
[0075] Specifically, the corresponding calculation formula is:
[0076]
[0077] in, Representing spatial characteristics; Represents global spatial attention features; This represents a depthwise separable convolutional layer; This indicates average pooling processing along the spectral dimension; This indicates the denoising feature.
[0078] It can be explained that the global spatial attention features obtained by processing linear attention blocks are fused with the residuals of the local location features processed by DWC to obtain the final spatial enhancement features, i.e., the output spatial features; depthwise separable convolutional layers This method is used to extract local spatial detail features and enhance the local interaction capabilities of features; thus, it provides high-quality spatial dimension feature input for subsequent weighted fusion of dual-branch features.
[0079] Step S322: In the spectral branch, extract the spectral features from the denoising features using the spectral Mamba block.
[0080] It is explained that in the spectral branch, based on the inherent spectral band sequence characteristics of hyperspectral images, the Mamba state-space model is used as the core to achieve in-depth enhancement of spectral dimension features and long-range dependency modeling.
[0081] Further, step S322 includes:
[0082] Step S3221: Perform a bidirectional Mamba state space scan on the denoised features after spatial dimension average pooling to feed back forward and reverse spectral features respectively.
[0083] Specifically, average pooling is performed along the spatial dimension for the denoising features. That is, by performing global mean statistics on the spatial height and spatial width dimensions of the feature map, the feature dimension is compressed from H×W×D×C to 1×1×D×C spectral sequence features. This operation can remove redundant noise in the spatial dimension and focus on the effective features in the spectral dimension while completely preserving the band sequence structure and inter-band correlation information in the spectral dimension D. At the same time, it significantly reduces the computational cost of subsequent sequence modeling, laying the foundation for efficient sequence modeling of Mamba.
[0084] Next, based on the pooled spectral sequence features, a bidirectional Mamba state-space scanning mechanism is used for collaborative modeling: on the one hand, the forward Mamba state-space scanning unit is utilized. Long-range dependency modeling is performed along the natural band order of the spectral dimension to accurately capture the positive correlation and continuous semantic association between bands in hyperspectral images. , Indicates positive spectral characteristics; This represents a positive Mamba state-space scan cell along the spectral dimension, used to model the positive correlation of spectral bands; Representation layer normalization; This indicates a space-average pooling operation; This indicates the denoising feature.
[0085] On the other hand, constructing a reverse Mamba state space scanning unit By performing a mathematical dimension reversal on the spectral sequence, followed by a state-space scan, and finally restoring the sequence dimension, the inverse long-range dependency between spectral bands can be modeled. , Indicates reverse spectral characteristics; This represents the inverse Mamba state-space scan unit along the spectral dimension, which performs a scan and restores the spectral sequence after mathematical inversion, and is used to model the inverse correlation of spectral bands.
[0086] It can be noted that, compared to the limitation of unidirectional Mamba, which can only capture sequence correlations in a single direction, the bidirectional scanning mechanism can comprehensively cover the full-dimensional bidirectional correlations between spectral bands, avoiding the omission of feature information caused by unidirectional modeling, significantly improving the completeness and robustness of spectral feature expression, and effectively ensuring the spectral fidelity of the denoised hyperspectral image. Compared to traditional spectral feature extraction methods based on convolution or self-attention, the Mamba state-space model achieves long-order sequence dependency modeling with linear time complexity, significantly reducing computational overhead while ensuring the accuracy of global correlation modeling of spectral bands.
[0087] Step S3222: Add and fuse the forward spectral features and the reverse spectral features to output the spectral features.
[0088] Specifically, the corresponding calculation formula is:
[0089]
[0090] in, Indicates spectral characteristics.
[0091] It can be explained that the bidirectional spectral features output by forward and reverse Mamba scans, namely forward spectral features and reverse spectral features, are fused element-wise to achieve deep integration of bidirectional correlation information of spectral bands; the final output is a spectral feature with global spectral sequence representation capability, which provides high-quality spectral dimension feature support for subsequent weighted fusion and multi-scale integration of spatial-spectral bi-branch features.
[0092] Step S323: Spatial and spectral features are weighted and fused using an activation function, and feature integration is completed through a linear layer to obtain denoising and enhanced features.
[0093] The explanation is that adaptive weighted fusion and feature dimension integration are performed on spatial and spectral features to achieve deep coupling between spatial context information and spectral band correlation in hyperspectral images.
[0094] Furthermore, in step S323, the corresponding calculation formula is:
[0095]
[0096] in, Indicates denoising and enhancement features; This indicates a feature channel splicing operation; This represents the Sigmoid activation function; Representing spatial characteristics; This represents element-wise multiplication; Represents the input residual features; Indicates spectral characteristics.
[0097] What can be explained is the spatial characteristics Global spatial context and local detail information corresponding to hyperspectral images; spectral features The long-range correlation information of the spectral bands corresponding to the hyperspectral image is used to obtain the denoising and enhancement features by combining the two features with weights. The sigmoid activation function is used to generate the weights for the bi-branch features; the input residual features... This is used to preserve the low-level spatial-spectral feature information of the original input, avoiding the loss of details during deep feature extraction; feature channel concatenation operation. It is used to fuse spatial and spectral features along the channel dimension, realizing channel-level coupling of spatial and spectral features.
[0098] The explanation is as follows: Adaptive weights generated by the Sigmoid activation function dynamically weight spatial and spectral features, which can effectively highlight the spatial dimension's detailed features and suppress background noise, while strengthening the band correlation of the spectral dimension and weakening noise band interference. Combined with element-wise modulation of residual features, effective feature expression is enhanced while preserving the original input's low-level details, avoiding information loss caused by deep feature extraction. Deep fusion of dual-dimensional features is achieved through channel-level stitching, making up for the limitations of single-dimensional feature extraction. Ultimately, while significantly improving denoising accuracy, it effectively ensures the spatial detail fidelity and spectral fidelity of the denoised image, making it suitable for various hyperspectral image denoising scenarios such as remote sensing observation and environmental monitoring.
[0099] Step S33: The denoising enhancement features are enhanced and redundant information is suppressed through a gated feedforward network to improve feature representation ability and output the denoised hyperspectral image.
[0100] The gated feedforward network, by introducing a gating mechanism, can adaptively learn and retain key features in hyperspectral images that are relevant to the denoising task. Redundant information includes high-frequency interference caused by noise, repetitive spatial patterns, or background information unrelated to the target. Through dynamic weight allocation of the gated feedforward network, the network resources are concentrated on the feature components that contribute the most to denoising, thereby improving the visual quality of the denoised hyperspectral image and enhancing its reliability in subsequent applications.
[0101] Understandably, using U-Net as the overall framework and defining the hybrid spatial spectral module as the core feature extraction unit of its encoder and decoder, it can extract the effective spatial and spectral information of hyperspectral images at multiple scales. It relies on Mamba to achieve efficient long-range spectral dependency modeling and optimizes the computational efficiency of global spatial feature extraction through linear attention blocks, effectively solving the technical bottlenecks of insufficient feature extraction and difficulty in balancing denoising performance and computational efficiency in traditional methods. With the help of parallel Mamba-linear attention blocks for dual-branch parallel processing, it specifically models the spatial context information and spectral band correlations for the spatial-spectral coupling characteristics of hyperspectral images. After feature weighted fusion and multi-scale feature integration, it effectively removes redundant interference noise, significantly improves the denoising accuracy of hyperspectral images, and fully preserves the spectral fidelity and spatial details of the image. It is suitable for the application needs of various hyperspectral remote sensing, environmental monitoring and other scenarios, and has good engineering practicality.
[0102] Please see Figure 1To better illustrate this, in this embodiment, after initial feature extraction and dimension adaptation are completed, the features are sequentially passed through three encoder layers, that is, through three MSSB modules for downsampling and multi-scale deep feature extraction. The feature dimension gradually changes with the encoder layer, from the initial 64×64×31×16, to 32×32×31×32, and finally compressed to 16×16×31×64. During this process, the spatial dimension is halved one by one, the number of channels is doubled one by one, and the spectral dimension remains unchanged at 31 throughout, ensuring that the spectral band correlation features of the hyperspectral image are completely preserved.
[0103] After the encoder completes multi-scale deep feature extraction, the features are input to the three-layer decoder for upsampling, gradually restoring the spatial dimension to the initial 64×64 size. The encoder and the corresponding layer decoder achieve cross-layer feature transfer and fusion through skip connections. In this way, the shallow spatial detail features and deep spectral semantic features extracted by the encoder can be effectively transferred to the decoder, making up for the feature loss problem of a single decoding path and improving the spatial detail fidelity and spectral fidelity of the denoised image.
[0104] Finally, the fused features output by the decoder are processed by a 3×3×3 3D convolutional layer to complete feature dimension alignment and final denoising enhancement, resulting in a denoised hyperspectral image.
[0105] To verify the effectiveness of a hyperspectral image denoising method based on Mamba and linear attention, experiments were conducted to compare various algorithms under Gaussian noise and complex noise conditions.
[0106] Specifically, for Gaussian noise of different intensities ( Experimental results of hyperspectral image denoising under conditions of 30, 50, and 70 g / m² noise and blind noise were presented. Three core metrics were selected as quantification indicators: Peak Signal-to-Noise Ratio (PSNR), Structural Similarity (SSIM), and Spectral Angle Mapper (SAM). Six mainstream hyperspectral image denoising methods—BM4D, HSID-CNN, QRNN3D, TRQ3D, SST, and SERT—were compared. Table 1 shows the results of various algorithms under different intensities of Gaussian noise on the ICVL dataset.
[0107] Table 1. Results metrics of various algorithms on the ICVL dataset under different intensities of Gaussian noise.
[0108]
[0109] To address various complex noise interferences commonly encountered in practical hyperspectral imaging, comparative experiments were conducted on the denoising performance of the proposed method under multiple complex noise scenarios to verify its generalization ability. The experiments covered complex scenarios involving non-independent and identically distributed Gaussian noise, stripe noise, dead-line noise, impulse noise, and mixtures of multiple noise types. Gaussian noise refers to noise that follows a Gaussian distribution, manifesting as random fluctuations in pixel values in the image. Stripe noise is characterized by parallel or nearly parallel alternating bright and dark stripes in the image. Dead-line noise, also known as dark line noise or bad pixel noise, refers to black or white lines or dots appearing at fixed positions in the image. Impulse noise, also known as spike noise or impact noise, is characterized by suddenly appearing isolated bright or dark spots in the image, exhibiting suddenness and short duration. The evaluation metrics remained consistent with those used in the aforementioned Gaussian noise denoising experiments. Table 2 shows the quantitative denoising results of various mainstream denoising methods under the above scenarios.
[0110] Table 2. Quantization denoising results of various mainstream denoising methods in the above scenarios.
[0111]
[0112] It can be noted that the hyperspectral image denoising method proposed in this invention based on Mamba and linear attention achieves the best quantization denoising effect under different intensities of Gaussian noise, multiple types of complex noise, and mixed noise scenarios. The peak signal-to-noise ratio and structural similarity significantly outperform mainstream methods, and the spectral angle mapping index remains the lowest. It fully demonstrates excellent denoising performance, strong robustness to various types of noise, and generalization ability, and can be adapted to various practical application scenarios of hyperspectral imaging.
[0113] Based on this, in order to verify the core advantage of a hyperspectral image denoising method based on Mamba and linear attention in achieving high denoising accuracy with low computational complexity, a model complexity comparison experiment was conducted. Blind Gaussian noise, a typical complex scenario, was selected as the test benchmark. The model complexity was quantified from two dimensions: the number of parameters and the amount of floating-point operations. As shown in Table 3, the complexity and denoising performance of various algorithms under blind Gaussian noise are compared.
[0114] Table 3. Comparison of complexity and denoising performance of various algorithms under blind Gaussian noise.
[0115]
[0116] It can be shown that a hyperspectral image denoising method based on Mamba and linear attention achieves a peak signal-to-noise ratio of 43.31dB with only 0.89M parameters and 11.463G of floating-point operations (low computational complexity), which is significantly better than existing comparative methods such as HSID-CNN and SST. This fully verifies the high denoising accuracy advantage of this invention under low computational complexity and achieves the optimal trade-off between model complexity and denoising performance.
[0117] The second embodiment of the present invention provides a hyperspectral image denoising system based on Mamba and linear attention. The system includes a processor, a communication interface, a memory, and a communication bus. The processor, the communication interface, and the memory communicate with each other through the communication bus. The processor calls logical instructions in the memory to execute a hyperspectral image denoising method based on Mamba and linear attention as described in any embodiment of the present invention.
[0118] When it is in operation, it needs to use a hyperspectral image denoising method based on Mamba and linear attention. Therefore, whether the system and program data are integrated or different hardware is configured to produce a function with similar effect to that achieved by the present invention, it is within the protection scope of the present invention. The system has the same beneficial effect as the aforementioned hyperspectral image denoising method based on Mamba and linear attention, which will not be described in detail here.
[0119] It should be noted that the order of the above embodiments of the present invention is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. The processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0120] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.
Claims
1. A hyperspectral image denoising method based on Mamba and linear attention, characterized in that, The method includes: Hyperspectral images were acquired and preprocessed to form a training set; A hybrid spatial spectral module is constructed, which is defined as the core feature extraction unit of the encoder and decoder of the U-Net network. The hybrid spatial spectral module includes 3D convolutional layers, parallel Mamba-linear attention blocks, and gated feedforward networks. The training set is sequentially extracted and fused using a hybrid spectral module to output a denoised hyperspectral image.
2. The hyperspectral image denoising method based on Mamba and linear attention according to claim 1, characterized in that, Hyperspectral images were acquired and preprocessed to form a training set, specifically as follows: Hyperspectral images were acquired using the ICVL hyperspectral dataset, and preprocessed with intensity normalization and data augmentation. The preprocessed hyperspectral images were then cropped into 3D image patches and integrated to form a training set.
3. The hyperspectral image denoising method based on Mamba and linear attention according to claim 1, characterized in that, The parallel Mamba-linear attention block includes a spatial branch and a spectral branch, corresponding to the linear attention block and the spectral Mamba block, respectively.
4. The hyperspectral image denoising method based on Mamba and linear attention according to claim 3, characterized in that, The training set is sequentially processed and fused using a hybrid spectral module to extract and fuse multi-scale spatial-spectral features, outputting a denoised hyperspectral image, including: A 3D convolutional layer is used to perform preliminary extraction of spatial-spectral features and channel dimension expansion on the training set to obtain denoised features; By using a dual-branch parallel Mamba-linear attention block, spatial and spectral information are modeled and fused in parallel to obtain denoising enhancement features. The denoising enhancement features are enhanced and redundant information is suppressed by a gated feedforward network, thereby improving the feature representation ability and outputting a denoised hyperspectral image.
5. The hyperspectral image denoising method based on Mamba and linear attention according to claim 4, characterized in that, By employing a dual-branch approach with parallel Mamba-linear attention blocks, spatial and spectral information are modeled and fused in parallel to obtain denoising enhancement features, including: In the spatial branch, spatial features are extracted from the denoising features using linear attention blocks; In the spectral branch, spectral features are extracted from the denoising features using spectral Mamba blocks; Spatial and spectral features are weighted and fused using an activation function, and then integrated through a linear layer to obtain denoising and enhanced features.
6. The hyperspectral image denoising method based on Mamba and linear attention according to claim 5, characterized in that, In the spatial branch, spatial features are extracted from the denoised features using linear attention blocks, including: The denoised features are subjected to average pooling along the spectral dimension and processed with linear attention blocks to generate intermediate values. The linear attention blocks are then combined to generate global spatial attention features. The spatial features are output by combining global spatial attention features with the denoised features processed by spectral dimension average pooling and deep convolutional layers.
7. The hyperspectral image denoising method based on Mamba and linear attention according to claim 5, characterized in that, In the spectral branch, spectral features are extracted from the denoising features using the spectral Mamba block, including: A bidirectional Mamba state space scan is performed on the denoised features after spatial dimension average pooling to feed back forward and reverse spectral features respectively. The forward and reverse spectral features are added together and fused to output the spectral features.
8. The hyperspectral image denoising method based on Mamba and linear attention according to claim 5, characterized in that, Spatial and spectral features are weighted and fused using an activation function, and then integrated through a linear layer to obtain denoising and enhanced features. The corresponding calculation formula is as follows: ; in, Indicates denoising and enhancement features; This indicates a feature channel splicing operation; This represents the Sigmoid activation function; Representing spatial characteristics; This represents element-wise multiplication; Represents the input residual features; Indicates spectral characteristics.
9. A hyperspectral image denoising system based on Mamba and linear attention, characterized in that, The system includes a processor, a communication interface, a memory, and a communication bus. The processor, the communication interface, and the memory communicate with each other through the communication bus. The processor calls logical instructions in the memory to execute the hyperspectral image denoising method based on Mamba and linear attention as described in any one of claims 1 to 8.