STAR: A Structure-aware Lightweight Transformer for Real-time Image Enhancement

Zhaoyang Zhang, Yitong Jiang, Jun Jiang, Xiaogang Wang, Ping Luo, Jinwei Gu

Abstract

Image enhancement on mobile devices requires a delicate balance between visual quality and computational efficiency. We present STAR, a Structure-aware Transformer designed for real-time enhancement tasks such as low-light correction and white balance. STAR utilizes a novel two-branch "Long-short Range" design to capture both global context and local details. Experimental results demonstrate that STAR achieves a 1.8dB PSNR improvement over state-of-the-art CNNs on the MIT-Adobe FiveK dataset while utilizing only 25% of the parameters and 13% of the computational operations (FLOPs).

Introduction

Image enhancement tasks—including fixing low-light photos, adjusting white balance, and professional retouching—are computationally demanding. Traditional approaches typically fall into two categories: deep CNNs, which excel at local details but struggle with global context and high computational costs, and global adjustments, which are fast but fail in complex "mixed lighting" scenarios. The challenge lies in creating a model that understands the global structure of an image to handle complex lighting while remaining lightweight enough for mobile deployment.

The STAR Architecture

The core of this research is the Structure-aware Transformer (STAR) module. Unlike standard Vision Transformers (ViTs) that are often too heavy for real-time applications, STAR introduces several key optimizations:

  • Efficient Tokenization: The image is divided into patches using "Mean Head" tokenization (adaptive average pooling). This reduces dimensionality early in the pipeline without sacrificing the structural information necessary for color and light adjustment.
  • Long-short Range Transformer Module: A dual-branch design where the Long-Range Branch uses standard Multi-Head Self-Attention for global dependencies, and the Short-Range Branch uses parallel 2D convolutions to capture local relationships.
  • Task-Specific Integration: STAR serves as a versatile backbone. It can predict enhancement curves for low-light tasks, replace encoders in U-Nets for white balance, or predict weights for 3D Look-Up Tables (LUTs) in photo retouching.

Key Insights

A primary finding of this work is that for color and tone mapping, high-frequency texture is less critical than the semantic structure of the scene. This allows for aggressive downsampling. Furthermore, by using a Transformer, the model performs implicit segmentation, naturally learning which regions (e.g., the sky or a person) belong together and applying consistent enhancements without requiring manual segmentation masks.

Experimental Results

STAR was evaluated across benchmark datasets including MIT-Adobe FiveK, Rendered WB, and HDR+. The model consistently outperformed heavier CNN baselines in both quality and efficiency.

Comparison of STAR against CNN baselines, showing enhanced results, efficiency metrics, and learned structure maps.

As shown in the comparison above, STAR-DCE achieved 24.5 dB PSNR using only 20.1K parameters and 0.04 GFLOPS. In contrast, the baseline DCE-Net achieved 22.7 dB while requiring 79.4K parameters and 5.2 GFLOPS. On an Nvidia 1080 Ti, STAR-DCE demonstrated a latency of just 0.0019 seconds per image, nearly doubling the speed of optimized CNN baselines while maintaining superior visual quality and avoiding artifacts in high-contrast areas.

Conclusion

STAR represents a significant step forward in bringing high-quality, transformer-based image enhancement to edge devices. While highly effective for parameter prediction, future work will explore scaling these architectures for high-resolution reconstruction tasks like denoising and super-resolution, where full-scale Transformer decoders currently face performance challenges.

Summary updated

BibTeX
@inproceedings{zhang2021star,
  author = {Zhaoyang Zhang and Yitong Jiang and Jun Jiang and Xiaogang Wang and Ping Luo and Jinwei Gu},
  title = {{STAR: A Structure-aware Lightweight Transformer for Real-time Image Enhancement}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2021},
  doi = {10.1109/iccv48922.2021.00407},
}
Figure