Abstract
Exemplar-based image colorization faces significant challenges in establishing accurate correspondences between grayscale target images and color reference images. We present the Semantic-Sparse Colorization Network (SSCN), a two-stage framework that first generates a coarse global colorization and then refines local details using a novel semantic-sparse attention mechanism. This approach bridges the information gap between grayscale and color domains while significantly reducing computational complexity and improving visual fidelity.
Introduction
Exemplar-based colorization aims to color a grayscale "target" image by borrowing colors from a "reference" image. The central challenge lies in correspondence: accurately mapping pixels in a grayscale image to the correct colors in a semantically similar but structurally different reference image.
Previous methods have struggled with two primary obstacles. First, the Information Gap: calculating correspondence between a luminance-only grayscale target and a color reference is inherently difficult due to the lack of semantic richness in grayscale data. Second, the Dense Burden: traditional models attempt "dense correspondence," matching every target pixel to every reference pixel. This is computationally expensive ($O((HW)^2)$) and often leads to "color bleeding" when semantically unrelated objects are incorrectly matched.
Methodology
The SSCN addresses these issues through a two-stage, coarse-to-fine architecture:
Stage 1: Global Color Transfer (GCT)
Instead of immediate pixel-matching, the network first performs a coarse colorization. Using an Adaptive Instance Normalization (AdaIN) operation, the GCT module migrates the global color style of the reference image onto the target. This produces a preliminary colorized image ($I_c$) that shares the same color distribution as the reference, effectively bridging the semantic gap for the next stage.
Stage 2: Local Details Transfer (LDT)
The LDT module refines the coarse result by calculating correspondence between $I_c$ and the reference image. Because both images are now in the color domain, the matching process is significantly more accurate and robust.
Semantic-Sparse Attention
To resolve the inefficiencies of dense matching, the authors introduce Semantic-Sparse Attention. This mechanism uses a Class Activation Map (CAM) to identify semantically significant regions (e.g., a bird or a car) and a set of random background points. By focusing only on these "sparse" points, the model ignores irrelevant regions, reducing noise and cutting computational complexity to $O((k+r)HW)$, where $k$ and $r$ are the numbers of semantic and background points, respectively.
Experimental Results
The SSCN was trained on the ImageNet training set and evaluated on a curated test set of 5,000 images from the ImageNet validation set. To simulate real-world conditions, the authors used geometric distortions (Thin Plate Splines, random rotation, and cropping) to create synthetic target-reference pairs.
Quantitative and Qualitative Performance
SSCN outperformed existing state-of-the-art (SOTA) methods across multiple metrics:
- Accuracy: On the self-augmentation benchmark, SSCN achieved a Mean PSNR of 34.73 and SSIM of 0.964, a substantial improvement over previous benchmarks (31.98 PSNR / 0.946 SSIM).
- Efficiency: The sparse attention mechanism proved to be 8 to 16 times faster than traditional dense attention.
- Visual Quality: Qualitative comparisons showed superior handling of fine details, such as bird feathers or small textures, without the "washed out" effects common in earlier models.
Conclusion and Future Work
The Semantic-Sparse Colorization Network demonstrates that "less is more" in correspondence matching. By prioritizing semantically relevant pixels and utilizing a coarse-to-fine color-to-color matching strategy, the model achieves high-fidelity results with improved efficiency. While the model's performance is sensitive to the selection of the number of sparse points ($k$ and $r$), it sets a new standard for exemplar-based colorization. Future research may focus on automating the optimization of these parameters to further enhance robustness across diverse image types.
Summary updated