L-CoDer: Language-Based Colorization with Color-Object Decoupling Transformer

Zheng Chang, Shuchen Weng, Yu Li, Si Li, Boxin Shi

Abstract

Image colorization is a challenging, ill-posed problem where a single grayscale input can correspond to multiple valid color outputs. While language captions provide essential guidance, existing models often struggle with the modality gap between vision and language, leading to inconsistent results or "color bleeding." This paper presents L-CoDer, a unified Transformer-based architecture that treats image patches and text descriptions as a single set of tokens. By implementing a novel color-object decoupling mechanism, L-CoDer achieves superior global consistency and semantic accuracy, outperforming previous state-of-the-art methods in both quantitative metrics and human preference.

Introduction

The task of transforming grayscale images into color is inherently ambiguous. To resolve this, researchers have turned to natural language captions to provide semantic constraints. However, traditional approaches face three primary challenges:

  1. The Modality Gap: Disparate architectures for image (CNNs) and text (LSTMs) processing often fail to align features effectively.
  2. Static Language Features: Textual information is typically injected as a fixed vector, failing to adapt to the specific visual context of the grayscale image.
  3. Local Vulnerability: CNN-based models lack a global receptive field, which often results in "color bleeding" across object boundaries.

L-CoDer addresses these issues by unifying image and text processing within a single Transformer framework, allowing for dynamic interaction and global context awareness.

Methods: The Color-Object Decoupling Transformer

L-CoDer moves away from hybrid CNN-LSTM architectures in favor of a unified Transformer approach. The core of the system is the Color-Object Decoupling Transformer, which processes three distinct types of tokens: image patches, noun tokens (objects), and adjective tokens (colors).

The L-CoDer architecture featuring the Decoupled Tokens Encoder and the Color-object Decoupling Transformer.

Key Components

  • Decoupled Tokens Encoder: Uses a Vision Transformer (ViT) for image patches and BERT for text. It explicitly separates nouns and adjectives to facilitate precise color-to-object mapping.
  • Decoupling Attention (DA): A specialized attention mechanism ensures that color adjectives only influence the specific objects they describe, preventing global color leakage.
  • Coarse-to-Fine Evolution: Through multiple Transformer layers, noun tokens align with image regions, while adjective tokens refine their color representations based on local texture and lighting.

Results and Discussion

L-CoDer was evaluated on the extended COCO-Stuff dataset, which includes detailed object-color correspondences.

Quantitative Performance

L-CoDer achieved state-of-the-art results across several benchmarks, including a PSNR of 25.504 and an SSIM of 91.963%. It also recorded a lower LPIPS (0.159), indicating higher perceptual similarity to ground truth images.

Qualitative Analysis

Visual comparisons demonstrate L-CoDer's ability to maintain sharp boundaries and adhere strictly to caption instructions. Unlike previous models like L-CoDe, L-CoDer handles complex scenes and abstract terms (e.g., "colorful") with significantly higher realism.

Qualitative comparison between L-CoDe and L-CoDer (Ours) across various scenes, demonstrating superior boundary preservation and caption adherence.

Human evaluations further support these findings, with participants preferring L-CoDer's results for both realism (37% preference) and caption consistency (30% preference) over competing methods.

Conclusion

L-CoDer represents a significant step forward in language-based image colorization by bridging the semantic gap through a unified Transformer architecture. While the model demonstrates superior performance, the computational cost of Transformers remains a challenge for high-resolution scaling. Future research will focus on optimizing Transformer efficiency to bring these high-quality colorization capabilities to larger-scale applications.

Summary updated

BibTeX
@inproceedings{chang2022l,
  author = {Zheng Chang and Shuchen Weng and Yu Li and Si Li and Boxin Shi},
  title = {{L-CoDer: Language-Based Colorization with Color-Object Decoupling Transformer}},
  booktitle = {European Conference on Computer Vision},
  year = {2022},
  doi = {10.1007/978-3-031-19797-0\_21},
}
Figure