Segmentation Guided Sparse Transformer for Under-Display Camera Image Restoration

Jingyun Xue, Tao Wang, Pengwen Dai, Kaihao Zhang

TL;DR

Under-display cameras (UDCs) offer true full-screen displays but suffer from severe image degradation due to light attenuating and diffracting through the screen panel. This paper introduces SGSFormer, a novel image restoration method that leverages instance segmentation maps to guide a sparse Transformer network. By filtering out global noise and redundant information, SGSFormer achieves state-of-the-art restoration quality on benchmark UDC datasets.

What Problem Does This Paper Address?

To achieve seamless, notch-free smartphone displays, manufacturers place the front-facing camera directly underneath the OLED screen. However, this hardware layout introduces a major optical challenge: incident light must pass through multiple thin-film layers and pixel apertures before reaching the camera sensor. This causes severe image degradation, including complex blurriness, intense glare, low light, and systematic color shifts.

Structural diagrams of regular OLED and UDC screens showing how light passes through the panel.

While Vision Transformers (ViTs) excel at global feature modeling for image restoration, applying standard "dense" global attention to UDC images backfires. Because UDC images are high-resolution but contain low-density semantic information buried under heavy diffraction noise, vanilla ViTs waste computation sampling redundant noise and artifacts across the entire image. This paper aims to solve this by forcing the Transformer to focus only on the most relevant regions needing reconstruction.

Methods

The authors propose the Segmentation Guided Sparse Transformer (SGSFormer), which uses an asymmetric U-Net architecture embedded with a new attention mechanism.

  1. Segmentation Guided Sparse Attention (SGSA): Instead of calculating attention across all pixel pairs indiscriminately, SGSA uses a top-$k$ ranking strategy to keep only the most highly correlated features and zero out the rest. Crucially, it incorporates prior semantic knowledge by multiplying the attention's Key and Value matrices with an instance segmentation map.
  2. Segment Module: To generate these guiding maps without heavy domain-specific training, the authors fine-tuned the zero-shot Segment Anything Model (SAM) on small UDC datasets. The resulting object masks are color-averaged and blended with the degraded image to provide structural boundaries.
  3. Asymmetric Architecture:
  4. Encoders utilize a lightweight version of the sparse attention block (l-SGSA) to maximize feature extraction efficiency without wasting resources on global sampling.
  5. Decoders alternate between the proposed SGS-Transformer and standard Dense Transformers to simultaneously capture local structural details and global context (like overall color offsets).
  6. Mixed Gated-Dconv Feed-forward Network (MGFN): Replaces standard feed-forward networks with a multi-scale gating mechanism (using 3x3 and 5x5 depth-wise convolutions) to improve local texture learning.
Overview of the proposed SGSFormer asymmetric encoder-decoder architecture.

Datasets

The model was evaluated on two widely accepted benchmark UDC datasets:

  • T-OLED (Transparent OLED): Simulates a display with sparsely arranged sub-pixels and no substrate. It features high light transmittance but suffers from severe blur caused by diffraction.
  • P-OLED (Pentile OLED): Simulates a dense sub-pixel layout on a yellow substrate. It features low transmittance, leading to low-light conditions and heavy color deviation.
Fig. 2. The illustration of the UDC imaging system for P-OLED dataset and T-OLED dataset. In the optical system of P-OLED, sub-pixels are densely arranged on a yellow substrate, leading to low transmittance. Consequently, the imaging exhibits significant color deviation and low light degradation. In the optical system of T-OLED, the sub-pixels are sparsely arranged and there is no substrate, resulting in a high transmittance. The imaging is blurred caused by diffraction.

Key Insights and Ideas

  • Semantic Boundaries as Noise Filters: The core "aha moment" is that instance segmentation maps can act as a powerful constraint for sparse attention. By knowing where object boundaries lie, the network can better judge which regional features are valid and which are merely diffraction artifacts or glare bleeding across boundaries.
  • The Danger of Purely Global Attention: Dense global attention actually harms pixel-level restoration in UDC images because it propagates localized glare and blur across the entire feature map.
  • Asymmetry is Optimal: Encoding benefits from purely sparse attention to avoid sampling noise early on, whereas decoding requires an alternating mix of sparse and dense attention to correct systematic global issues like color cast while preserving sharp edges.
Receptive fields comparing dense attention, standard sparse attention, and the proposed segmentation-guided sparse attention.

Key Results

SGSFormer was compared against leading CNN-based UDC restoration methods and general Transformer-based restoration networks (e.g., Restormer, Uformer).

Quantitative Performance: * T-OLED Dataset: SGSFormer achieved state-of-the-art results across all metrics, reaching a PSNR of 38.42 dB (outperforming Uformer's 38.33 dB) and significantly reducing perceptual error metrics like LPIPS (0.0926) and DISTS (0.0883). * P-OLED Dataset: It achieved the highest structural similarity (SSIM of 0.9627) and perceptual scores, while ranking second in PSNR (33.28 dB vs. BNUDC's 33.39 dB, though BNUDC uses a much more complex two-branch setup).

Qualitative Performance: Visual comparisons showed that SGSFormer successfully recovered sharp text contours and finer background details with significantly less color smudging and halo artifacts compared to prior methods.

Limitations and Future Work

Despite its strong performance, the authors note two primary limitations:

  1. Segmentation Bottleneck: Relying on a fine-tuned SAM model means the restoration quality is partially bounded by the segmentation network's accuracy. If SAM fails to segment a heavily degraded object, the guidance quality drops.
  2. Computational Overhead: Like most Transformer architectures, SGSFormer suffers from a high parameter count and notable computational overhead, making real-time deployment on mobile devices challenging without further optimization.

Future work will focus on addressing these efficiency bottlenecks and extending the segmentation-guided sparse attention paradigm to other low-level vision tasks like defogging or deraining.

Summary updated

BibTeX
@inproceedings{xue2024segmentation,
  author = {Jingyun Xue and Tao Wang and Pengwen Dai and Kaihao Zhang},
  title = {{Segmentation Guided Sparse Transformer for Under-Display Camera Image Restoration}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2024},
  url = {https://openreview.net/forum?id=e5onBvlE6K},
}
Figure