CAST-LUT: Tokenizer-Guided HSV Look-Up Tables for Purple Flare Removal

Pu Wang, Shuning Sun, Jialang Lu, Chen Wu, Zhihua Zhang, Youshan Zhang, Chenggang Shan, Dianjie Lu, Guijuan Zhang, Zhuoran Zheng · 2025

Read CAST-LUT: Tokenizer-Guided HSV Look-Up Tables for Purple Flare Removal by Pu Wang, Shuning Sun, Jialang Lu, Chen Wu, Zhihua Zhang, Youshan Zhang, Chenggang Shan, Dianjie Lu, Guijuan Zhang, Zhuoran Zheng (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2511-06764.txt.

Introduction

Pu Wang and co-authors remove purple flare, the hazy violet fringe that blooms around bright spots in photographs. Classic fixes rely on rigid hand-crafted rules, and deep learning starves for paired training examples of this artifact. Their network instead corrects color through look-up tables in hue, saturation, and value space, adjusting each component on its own.

A chroma-aware tokenizer first reads the image and encodes the flare's status as semantic tokens from the hue and value channels. Those tokens drive a module that generates separate correction curves for all three channels. The team also built the first large-scale purple flare dataset with fresh metrics and a tailored loss, and their model led on every quantitative measure.

Catalog record

CREATORPu Wang, Shuning Sun, Jialang Lu, Chen Wu, Zhihua Zhang, Youshan Zhang, Chenggang Shan, Dianjie Lu, Guijuan Zhang, Zhuoran Zheng
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE47 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2511-06764

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

CAST-LUT: Tokenizer-Guided HSV Look-Up Tables for Purple Flare Removal Pu Wang, Shuning Sun, Jialang Lu, Chen Wu, Zhihua Zhang, Youshan Zhang, Chenggang Shan, Dianjie Lu, Guijuan Zhang, Zhuoran Zheng Abstract Purple flare, a diffuse chromatic aberration artifact commonly found around highlight areas, severely degrades the tone transition and color of the image. Existing traditional methods are based on hand-crafted features, which lack flexibility and rely entirely on fixed priors, while the scarcity of paired training data critically hampers deep learning. To address this issue, we propose a novel network built upon decoupled HSV Look-Up Tables (LUTs). The method aims to simplify color correction by adjusting the Hue (H), Saturation (S), and Value (V) components independently. This approach resolves the inherent color coupling problems in traditional methods. Our model adopts a two-stage architecture: First, a Chroma-Aware Spectral Tokenizer (CAST) converts the input image from RGB space to HSV space and independently encodes the Hue (H) and Value (V) channels into a set of semantic tokens describing the Purple flare status; second, the HSV-LUT module takes these tokens as input and dynamically generates independent correction curves (1D-LUTs) for the three channels H, S, and V. To effectively train and validate our model, we built the first large-scale purple flare dataset with diverse scenes. We also proposed new metrics and a loss function specifically designed for this task. Extensive experiments demonstrate that our model not only significantly outperforms existing methods in visual effects but also achieves state-of-the-art performance on all quantitative metrics. Code — https://github.com/Pu-Wang-alt/Reduce-Purple-Flare/ Datasets — https://huggingface.co/datasets/PuWang0/purple˙flare Formal version — Introduction In complex lighting environments, images are often affected by various color artifacts ( 39 ; 1 ) , with the purple flare being one of the most common. Unlike general image degradations such as noise or blur, purple flare presents a unique challenge due to its diffuse nature, color specificity, and strong spatial correlation with highlight regions, severely impacting the image’s color fidelity ( 27 ; 3 ) . This issue is especially prominent in mobile photography, consumer-grade cameras, and low-cost optical systems, primarily caused by factors such as internal lens reflections, sensor saturation, and chromatic dispersion ( 31 ) . Figure 1: Color space analysis and CAST-guided correction comparison. (a) RGB vs. HSV: HSV decouples purple flare characteristics more clearly. (b) CAST-guided effect: The CAST module significantly improves performance. Recently, image enhancement techniques have made significant progress in areas such as deraining ( 24 ) , dehazing ( 28 ; 16 ; 2 ) , and color restoration ( 4 ; 21 ) . However, the purple flare has not been systematically studied yet. Early attempts relied on traditional methods utilizing decoupled color spaces like HSV or Lab ( 17 ; 15 ; 33 ) . These methods are constrained by their reliance on hand-crafted, fixed thresholds, which causes them to lack flexibility and generalization capability in complex scenes, limiting their practical application. To overcome the limitations of traditional methods, researchers have turned to deep learning. Wu et al. ( 34 ) pioneered the application of end-to-end CNNs to general flare removal by constructing a large-scale semi-synthetic dataset. To further bridge the domain gap between synthetic data and real-world flares, Deng et al. ( 8 ) proposed a knowledge-driven hybrid approach that utilizes a flare-level estimator as prior knowledge to guide the restoration network. While these methods represent the state-of-the-art, they are essentially pixel-to-pixel restoration networks operating in the coupled RGB color space, lacking precise control over color decoupling for specific chromatic artifacts. Among them, driven by the need for efficiency, LUT-based methods have emerged as a prominent choice for lightweight architectures. However, existing LUT methods rely on the RGB space and are not sensitive to capturing the purple flare of local region transformation (see Fig. 1 (a)). We observed that the HSV space can amplify the characteristic of local purple flare. Still, the non-linear transformation from RGB to HSV can amplify local color space noise, creating new artifacts in the final result ( 9 ) . To leverage the benefits of the decoupled HSV color space without incurring the instability of traditional conversion, we propose CAST-LUT. This method employs a Chroma-Aware Spectral Tokenizer (CAST) to generate stable, high-level semantic representations of the purple flare. Fig. 1 (b) illustrates the critical guiding role of the CAST module. These semantic tokens then guide the generation of independent 1D-LUTs for the H, S, and V channels. Additionally, we constructed the Purple Flare Synthesis Dataset (PFSD), comprising 4,987 training pairs, 608 validation pairs, and 618 testing pairs. To simulate optical lens characteristics, we identify highlight regions at object contour edges as candidates, apply a Gaussian blur, and fuse purple flare into raw images. This is the first large-scale paired image collection for this task. Due to the localized nature of purple flare, averaging errors across the entire image can mask residual artifacts in small regions, making traditional global metrics ineffective for accurate evaluation. We therefore introduce new metrics: using a purple flare mask, we separate flare-region PSNR (PSNR-F) and non-flare-region PSNR (PSNR-NF) to assess flare restoration and clean-region fidelity, respectively. For color correction, we propose Hue Alignment Error (HAE), which quantifies hue differences in flare regions to evaluate color recovery. • We propose CAST-LUT, which avoids traditional RGB-to-HSV noise amplification. Its Chroma-Aware Spectral Tokenizer (CAST) diagnoses purple flare into semantic tokens that guide an adaptive 1D-LUT for precise correction of each HSV channel. • To address the data scarcity for the purple flare removal task, we construct a large-scale, high-quality purple flare dataset containing diverse scenes and devices, providing a fair benchmark for training and evaluation. • We introduce a new loss function and metrics for accurate evaluation. PSNR-F/NF assesses flare removal and detail preservation, respectively, while our proposed Hue Alignment Error (HAE) metric measures color fidelity. Related Work Chromatic Aberration and Flare Removal. Traditional methods note limitations in processing purple flare directly in sRGB space, as intense luminance variations interfere with color assessment. Researchers have explored other color spaces ( 26 ) . Chung et al. ( 5 ) identified chromatic fringes by comparing R, G, B channel intensities but faced false positives due to ambiguous purple definitions. To better separate chrominance from luminance, subsequent works shifted to other color spaces. Kim et al. ( 15 ) used CIExy for luminance normalization, while Ju et al. leveraged YCbCr’s chrominance channels (Cb-Cr) to analyze color deviations independently ( 14 ) . However, a common bottleneck is their reliance on static, experimentally determined absolute thresholds to filter high-contrast or near-saturated areas. Given varied purple flare characteristics across cameras and scenes, fixed thresholds lack universality and robustness. Considering degraded image representation reconstruction ability, we propose using a word segmenter to aid in detail reconstruction. Discrete Semantic Representation with Vector Quantization. Vector Quantization (VQ) is widely used to generate semantic tokens, a key component of modern perceptual systems. Its core principle maps high-dimensional feature vectors to a finite set of learned codebook embeddings. This technique gained prominence with VQ-VAE ( 32 ) , which established a discrete latent space in an autoencoder architecture and integrated a discrete latent bottleneck into such frameworks. A discrete latent space offers significant advantages: it enables learning rich, semantically meaningful representations,

Read the complete text