TL;DR
Control Color (CtrlColor) is a novel multimodal diffusion-based framework that brings high-precision interactivity to image colorization. By leveraging Stable Diffusion and a unique content-guided deformable autoencoder, it allows users to manipulate colors using text prompts, brush strokes, or exemplar images—all while effectively eliminating the "color bleeding" artifacts that plague previous methods.
What Problem Does This Paper Address?
Automatic image colorization has come a long way, but it still faces a "control vs. quality" trade-off. Existing methods often suffer from:
- Lack of Interaction: Many models are "black boxes" that don't allow users to specify local colors.
- Color Overflow (Bleeding): Colors often spill over object boundaries (e.g., a blue sky leaking into a building).
- Inflexibility: Methods that do allow interaction often rely on rigid "hint points" rather than natural brush strokes.
- Low Vibrancy: Many models produce "safe" but dull, brownish-gray results.
While Diffusion Models (like Stable Diffusion) are great at generating vivid images, adapting them for precise colorization without losing the original image's structural details is a significant technical challenge.
Methods
CtrlColor builds on the Stable Diffusion (SD) architecture and ControlNet, but introduces three key innovations to handle the specific demands of colorization:
- Multimodal Encoding: The system accepts text (via CLIP), exemplars (via a contextual loss), and strokes. For strokes, the authors don't just provide color; they encode a pixel-level binary mask and the color hints directly into the latent space. This allows for much more precise local control than previous "point-based" methods.
- Content-guided Deformable Autoencoder: Standard SD decoders can sometimes "hallucinate" or misalign colors with textures. The authors replaced the standard decoder with one featuring deformable convolution layers. These layers are guided by the original grayscale image, essentially "snapping" the generated colors to the actual edges and textures of the input.
- Streamlined Self-Attention Guidance (SAG): During the inference (sampling) process, the model uses a training-free trick to identify areas where color might be overflowing. It blurs these "out-of-distribution" attention areas and re-predicts them based on the surrounding color distribution, smoothing out small artifacts.
To ensure the final image perfectly matches the original structure, the authors perform a post-processing step in Lab color space, replacing the generated Lightness (L) channel with the original grayscale input.
Datasets
The authors trained and evaluated their model using:
- ImageNet: Specifically the training set (filtered for colorful images) and the val5k and ctest subsets for evaluation.
- COCO-Stuff: Used to test the model's ability to handle complex, multi-object scenes.
Key Insights and Ideas
- The Power of the Mask: One of the "aha moments" is the realization that providing a binary mask for user strokes—rather than just the color points—drastically improves the model's ability to respect boundaries.
- Prior Knowledge Matters: By using a pre-trained Stable Diffusion model, CtrlColor inherits a "common sense" understanding of what colors objects should be, which helps it generate realistic colors even when user input is sparse.
- Structural Fidelity via Lab Space: By treating colorization as an $ab$ channel prediction task (while keeping the original $L$ channel), the model avoids the common pitfall of diffusion models where the output looks like a different version of the input rather than a colorized version of the same input.
Key Results
CtrlColor sets a new state-of-the-art (SOTA) in both quantitative and qualitative metrics:
- Vibrancy: It achieved the highest Colorfulness scores (e.g., 47.16 on ImageNet val5k) compared to competitors like UniColor and DDColor, which often hovered in the 30s or low 40s.
- Realism: It achieved superior FID (Fréchet Inception Distance) scores, indicating its generated images are distributionally closer to real photos.
- User Preference: In a user study, CtrlColor was overwhelmingly chosen as the "best" result for both unconditional and conditional (stroke/text/exemplar) tasks, often beating the next best method by a margin of 2x to 4x.
Limitations and Future Work
The authors acknowledge a few remaining hurdles:
- Small Region Sensitivity: If a user tries to colorize a very small region in an otherwise gray image, the model's global "gray" priors might occasionally wash out the local color hint.
- Boundary Overlap: While the deformable autoencoder helps, strokes that accidentally cross over object boundaries can still cause minor bleeding.
- Complex Exemplars: If an exemplar image has a very complex color distribution, the model might struggle to map it perfectly to the target image's geometry.
Future work may involve further refining the interaction between global text prompts and local strokes to prevent them from "competing" during the denoising process.
Summary updated