NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Unsupervised Spectral Demosaicing with Lightweight Spectral Attention Networks

Kai Feng, Yongqiang Zhao, Seong G. Kong, Haijin Zeng · DOI

Introduction

Snapshot spectral cameras utilize Spectral Filter Arrays (SFAs) to capture spatial and spectral information simultaneously. However, because each pixel records only a single wavelength, the resulting "mosaic" image must undergo a demosaicing process to reconstruct the full multi-band spectral cube. Traditional deep learning approaches for this task face two significant challenges: the "synthetic gap"—where models trained on synthetic data fail to generalize to real-world physics—and high computational complexity, which hinders deployment on edge devices.

This paper introduces an unsupervised framework for spectral demosaicing that eliminates the need for labeled ground truth data. By combining a novel Lightweight Spectral Attention (LSA) module with a self-supervised training loop, the proposed method achieves state-of-the-art results on real-world images while remaining efficient enough for on-device deployment.

Raw mosaic image showing the sparse sampling pattern of a spectral filter array.

Methodology

The Unsupervised Spectral Demosaicing (USD) framework is built upon three core pillars:

  • Equivariant Learning Loop: Instead of comparing the output to a ground truth image, the model uses a self-consistency loop. It predicts a spectral cube from a raw mosaic, applies random geometric transformations (flipping, rotating, shifting), re-samples it back into a mosaic, and then reconstructs it again. The loss is calculated based on how well the model maintains consistency throughout this cycle.
  • Lightweight Spectral Attention (LSA): Standard attention mechanisms learn a massive 3D tensor. LSA decomposes this into 2D spatial matrices (shared across channels) and a 1D channel vector. This "divide and conquer" approach reduces parameters by 99.8% compared to traditional Heavyweight Spectral Attention (HSA) without sacrificing performance.
  • Interpolation Branch: To prevent "model collapse" (where the network simply learns to output the input mosaic), a parallel weighted bilinear interpolation branch is added. This forces the neural network to focus on learning high-frequency residuals rather than basic low-frequency structures.

To prevent overfitting on mosaic patterns during unsupervised training, the authors also developed a Self-Evaluation Index (SEI) that detects periodic distortions and triggers early stopping.

Experimental Evaluation

The framework was tested on the ICVL synthetic dataset and a new benchmark, Mosaic25, consisting of real-world 25-band hyperspectral mosaic images captured with an IMEC snapshot imager.

Key Results

The proposed method demonstrates a significant advantage on real-world data. Supervised models like SpNet and MCAN, despite high performance on synthetic data, often exhibit "grid" artifacts when applied to real hardware due to the synthetic gap. The USD framework avoids these distortions by learning directly from the camera's sampling physics.

Visual comparison of demosaicing methods on real-world data.
  • Efficiency: The model can process images at over 200 frames per second on a GPU, making it suitable for real-time hyperspectral video.
  • Quantitative Performance: On synthetic data (ICVL), the model achieved a PSNR of 48.89 dB, nearly matching the performance of fully supervised models (50.19 dB) despite the lack of ground truth during training.

Conclusion

By leveraging unsupervised learning and a parameter-efficient attention module, the USD framework effectively bridges the gap between synthetic training and real-world application. Future work will focus on joint denoising and demosaicing to further improve output quality in noisy sensor environments.

Summary updated

BibTeX
@article{feng2024unsupervised,
  author = {Kai Feng and Yongqiang Zhao and Seong G. Kong and Haijin Zeng},
  title = {{Unsupervised Spectral Demosaicing with Lightweight Spectral Attention Networks}},
  journal = {IEEE Trans. Image Process.},
  year = {2024},
  doi = {10.1109/tip.2024.3364064},
}
Figure