Abstract
The Wavelength-Embedding-guided Filter-Array Transformer (WeFAT) addresses the critical challenge of hardware dependency in hyperspectral imaging (HSI) demosaicing. By incorporating physical priors—specifically wavelength bands and sensor layouts—into a Transformer-based architecture via specialized attention mechanisms, WeFAT achieves state-of-the-art performance and exceptional generalization across diverse camera systems without the need for retraining.
Introduction
Hyperspectral imaging (HSI) captures detailed spectral information across numerous narrow bands, enabling material identification beyond the capabilities of standard RGB sensors. Single-shot HSI often utilizes Multispectral Filter Arrays (MSFAs), which sample different wavelengths in a mosaic pattern. Reconstructing the full 3D spectral cube from this sparse mosaic—a process known as spectral demosaicing—is a critical computational challenge.
Existing deep learning approaches often suffer from "spectral blindness," failing to capture long-range dependencies between distant bands. More critically, these models are typically "hardware-rigid," meaning a model trained for one specific sensor's wavelength distribution performs poorly on another. Finally, many models ignore the underlying physical geometry of the MSFA, treating the input as generic image data.
Proposed Method: WeFAT
The authors propose the Wavelength-Embedding-guided Filter-Array Transformer (WeFAT), a novel architecture designed to be inherently "hardware-aware."
Wavelength-Embedding-guided Multi-head Self-Attention (We-MSA)
A key innovation is treating wavelength as a continuous coordinate rather than a discrete index. Inspired by timestep embeddings in diffusion models, WeFAT injects normalized wavelength values (in nanometers) directly into the attention mechanism. This "wavelength memory" allows the model to adapt to varying spectral distributions across different camera hardwares.
MSFA-attention Mechanism (MaM) and GAT Block
To leverage the known geometry of the sensor, the MSFA-attention Mechanism (MaM) guides the spatial attention by identifying high-fidelity sampled regions versus interpolated areas. These components are integrated into the Group Attention Transformer (GAT) block, which splits features to process wavelength and spatial information in parallel before fusion, ensuring computational efficiency.
Experimental Results
WeFAT was evaluated on the ARAD dataset (16 bands) and tested for generalization on the KAIST dataset and real-world IMEC data.
Quantitative Performance and Generalization
On the ARAD benchmark, WeFAT achieved a Peak Signal-to-Noise Ratio (PSNR) of 48.03 dB, significantly outperforming previous leaders like MCAN (43.22 dB). The model's hardware-aware design enables remarkable cross-dataset performance. When a WeFAT model trained on ARAD was tested on the KAIST dataset (which features different wavelengths and filter patterns), it maintained a PSNR of 43.63 dB. In contrast, competing models saw performance drops to the 35–36 dB range, demonstrating WeFAT's robust generalization.
Visual Fidelity and Efficiency
Qualitative analysis shows that WeFAT effectively eliminates periodic artifacts and ghosting common in other demosaicing methods. Despite its Transformer backbone, the "Small" variant (WeFAT-S) remains efficient with only 1.33M parameters, making it relatively lightweight compared to other high-performance models.
Conclusion
WeFAT represents a significant step forward in hyperspectral demosaicing by bridging the gap between deep learning and physical sensor constraints. By embedding wavelength and sensor geometry directly into the attention mechanism, the model achieves superior accuracy and unprecedented generalization, paving the way for more flexible and robust hyperspectral imaging systems.
Summary updated