ChromaFusionNet (CFNet): Natural Fusion of Fine-Grained Color Editing

Yi Dong, Yuxi Wang, Ruoxi Fan, Wenqi Ouyang, Zhiqi Shen, Peiran Ren, Xuansong XieAAAI 2024

Abstract

Digital image enhancement aims to deliver visually striking, pleasing images that align with human perception. While global techniques can elevate the image's overall aesthetics, fine-grained color enhancement can further boost visual appeal and expressiveness. However, colorists frequently face challenges in achieving accurate, localized color adjustments. Direct composition of these local edits can result in spatial color inconsistencies. Existing methods, including color style transfer and image harmonization, exhibit inconsistencies, especially at boundary regions. Addressing this, we present ChromaFusionNet (CFNet), a novel approach that views the color fusion problem through the lens of image color inpainting. Built on the Vision Transformer architecture, CFNet captures global context and delivers high-fidelity outputs, seamlessly blending colors while preserving boundary integrity. Empirical studies on ImageNet and COCO datasets demonstrate CFNet's superiority over existing methods in maintaining color harmony and color fidelity. Robustness evaluations and user studies have further validated the effectiveness of CFNet. In conclusion, CFNet introduces an innovative approach to seamless, fine-grained color fusion, paving the way for advancements in the domain of fine-grained color editing.

Introduction: The Challenge of Local Color Editing

Professional colorists often perform "fine-grained" editing—changing the color of a specific object (like a car or a shirt) or a region (like the sky) without affecting the rest of the image. Traditionally, this requires meticulous manual edge refinement.

When these local edits are composed directly using spatial masks, they often result in spatial color inconsistencies. Common artifacts include "halos," jagged edges, or abrupt color shifts where the edited region meets the original background. Existing automated solutions fall short: Color Style Transfer often shifts the entire image's palette; Image Harmonization struggles with precise boundaries; and simple feathering leads to a loss of sharpness. CFNet identifies that these boundary discrepancies are essentially "holes" in the color spectrum that need to be filled intelligently.

Methodology: Color Fusion as Inpainting

The core innovation of CFNet is treating color fusion as a color inpainting problem. Rather than trying to blend two existing colors, CFNet assumes the boundary color is missing and inpaints it from scratch based on the surrounding context.

Architecture and Pipeline

The model operates in the CIELab color space, preserving the original Lightness ($L$) channel to maintain sharp textures while focusing entirely on predicting the $a$ and $b$ (color) channels. The architecture, as illustrated in the figure below, consists of three primary stages:

  1. Data Preparation: The input image and a mask of the transition area are processed to create a masked-out color representation.
  2. Coarse Prediction: Built on a Vision Transformer (ViT), this stage captures global context, ensuring the local edit feels harmonious with the overall image. The decoder uses pixel-shuffling to maintain high-fidelity boundary filling.
  3. Refinement Module: A sequence of Residual-in-Residual Dense Blocks (RRDB) further polishes the output to ensure smooth transitions and color coherence.
The architecture of CFNet, featuring a Vision Transformer for coarse prediction and RRDB blocks for refinement.

Experimental Results and Evaluation

CFNet was evaluated on the ImageNet and COCO datasets, demonstrating significant improvements over baselines like Color Matcher and S2CRNet.

  • Quantitative Performance: On the ImageNet dataset, CFNet achieved a Color Deviation ($W_1$) score of 1.66, nearly 50% better than the next best style transfer baseline (3.15). It also consistently achieved the best scores in the "Inharmonious Metric" (IP), indicating superior color harmony.
  • Qualitative Superiority: Visual comparisons highlight CFNet's ability to produce seamless transitions. While other methods leave visible artifacts or unnatural color shifts at the edges of the edited regions, CFNet maintains boundary integrity and color fidelity.
Qualitative comparison of CFNet against baseline methods. CFNet achieves more natural transitions at the boundaries of local edits.

Key Insights and Robustness

  • Global Context: By using a Transformer, the model looks at the whole image to understand how local colors should naturally bleed into the surrounding scene based on lighting and environment.
  • Texture Preservation: By decoupling lightness and color, the model avoids the common pitfall of "blurring" or "smudging" textures during image-to-image translation.
  • Robustness: The model is remarkably resilient, accurately reconstructing image colors even when up to 50% of the color information is masked out.

Limitations and Future Work

While CFNet marks a significant advancement, it currently struggles with transparent regions (e.g., glass or water) where complex background-foreground interactions occur. Additionally, because it assumes the $L$ channel remains unchanged, it cannot fix lightness-based inconsistencies. Future work may involve combining CFNet with lightness-fusion algorithms to provide a more comprehensive editing suite.

Summary updated

BibTeX
@inproceedings{dong2024chromafusionnet,
  author = {Yi Dong and Yuxi Wang and Ruoxi Fan and Wenqi Ouyang and Zhiqi Shen and Peiran Ren and Xuansong Xie},
  title = {{ChromaFusionNet (CFNet): Natural Fusion of Fine-Grained Color Editing}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2024},
  url = {https://openreview.net/forum?id=7r1J9rn0jt},
}
Figure