Abstract
Hyperspectral image (HSI) reconstruction from 2D compressed measurements is a challenging task in Coded Aperture Snapshot Spectral Imaging (CASSI). Traditional methods often struggle with long-range spectral dependencies or high computational costs. We present the Mask-guided Spectral-wise Transformer (MST), which treats spectral channels as tokens and leverages the physical camera mask to guide attention. MST achieves state-of-the-art performance, improving PSNR by up to 2.5 dB while being significantly more efficient than previous CNN-based approaches.
Introduction
Hyperspectral imaging (HSI) captures rich spectral information across dozens of bands, enabling applications far beyond standard RGB imaging. However, the 3D nature of HSI data cubes typically requires slow scanning processes. Coded Aperture Snapshot Spectral Imaging (CASSI) addresses this by using a physical mask and a prism to compress 3D spectral information into a single 2D sensor measurement in one shot.
The core challenge lies in the reconstruction: recovering the high-fidelity 3D cube from the "smeared" 2D image. Existing Convolutional Neural Networks (CNNs) are limited by local receptive fields, failing to capture long-range spectral dependencies. Meanwhile, standard spatial-patch Transformers suffer from quadratic computational complexity relative to image size and often ignore the inherent spectral correlations and the physical priors provided by the camera mask.
Methods: Mask-guided Spectral-wise Transformer
The proposed MST architecture utilizes a U-shaped design centered on the Mask-guided Spectral-wise Attention Block (MSAB). It introduces two primary innovations to overcome the limitations of previous methods.
Spectral-wise Multi-head Self-Attention (S-MSA)
Unlike conventional Transformers that tokenize spatial patches, S-MSA treats each spectral channel as a token. This design choice is motivated by the observation that HSI data is spatially sparse but highly correlated across the spectrum. By modeling inter-channel relationships, S-MSA achieves a global receptive field across wavelengths with computational complexity that scales linearly with spatial resolution ($H \times W$).
Mask-guided Mechanism (MM)
In CASSI systems, the physical mask (coded aperture) dictates the reliability of information across different spatial regions. The Mask-guided Mechanism exploits this physical prior by generating a spatial attention map from the known mask pattern. This map directs the S-MSA to prioritize spatial regions where the modulated spectral representations are most trustworthy, effectively integrating the hardware's physics into the learning process.
Experimental Results
The MST model was evaluated on standard HSI datasets (CAVE and KAIST) and real-world data captured by a physical CASSI system.
Performance and Efficiency
MST variants (Small, Medium, and Large) consistently outperform existing state-of-the-art (SOTA) methods. MST-L achieved an average PSNR of 35.18 dB, a 2.55 dB improvement over the previous best method, DGSMP. Remarkably, this performance gain comes with a significant reduction in computational overhead. MST-L uses only 2.03M parameters and 28.15G FLOPs, making it over 20 times more efficient than DGSMP (646.65G FLOPs).
Qualitative Analysis
Visual results demonstrate that MST-L recovers sharper textures and more accurate spectral signatures compared to CNN-based approaches, which often produce over-smoothed or blotchy artifacts. Testing on real-world data confirmed the model's robustness to hardware-induced noise and its ability to generalize beyond simulated environments.
Conclusion
The Mask-guided Spectral-wise Transformer (MST) represents a significant advancement in efficient HSI reconstruction. By aligning the Transformer architecture with the spectral characteristics of HSI data and the physical constraints of the CASSI system, MST achieves superior reconstruction quality at a fraction of the cost. Future work includes addressing the dependency on fixed mask patterns and further narrowing the gap between simulated and real-world performance for seamless hardware integration.
Summary updated