TL;DR
This paper introduces "CompColor," a new benchmark for evaluating how well text-to-image models understand and render complex color specifications in multi-object scenes. They also propose "Color Bind," a novel, training-free editing method that significantly improves color accuracy and object-color binding in generated images, outperforming existing techniques.
What Problem Does This Paper Address?
Modern text-to-image models like Stable Diffusion and FLUX can generate impressive images from text prompts. However, they often struggle with accurately capturing the precise semantics of complex prompts, especially when multiple objects with distinct color attributes are involved. This leads to "color leakage" or misbinding, where colors intended for one object appear on another, or the overall color composition is inaccurate. While existing methods try to mitigate these issues, they often rely on coarse evaluation metrics or introduce trade-offs, degrading performance on simpler prompts. This paper aims to rigorously evaluate this color perception problem and introduce a practical solution.
Methods
The core of the paper's contribution lies in two parts:
- CompColor Benchmark: This benchmark is designed to specifically test fine-grained semantic alignment for color attributes in multi-object prompts. It uses a curated set of 35 colors and constructs prompts with pairs of objects and their specified colors. Crucially, it evaluates performance using perceptually uniform color spaces (CIELAB) and a segmentation-based approach to measure color accuracy.
- Color Bind Editing Method: This is a training-free, inference-time approach that refines existing text-to-image generations. It employs two key objectives:
- Stroop Attention Loss: Inspired by the Stroop effect, this loss uses a simplified, color-less text prompt to generate "pseudo-ground-truth" cross-attention maps. It then encourages the full prompt's cross-attention maps to align with these simplified maps, effectively guiding color tokens to attend to the correct object regions.
- Color Loss: This loss directly enforces the specified RGB color values on segmented objects within the generated image, ensuring color fidelity. The method integrates these losses into the diffusion model's backward process, modifying the latent representations to achieve accurate color binding and precise color rendering while preserving image structure.
Datasets
The paper introduces a new benchmark called CompColor. This benchmark is constructed using:
- A set of 35 colors derived from the HTML color names table, selected for consistent recognition by baseline models.
- Pairs of colors (close and distant based on perceptual similarity) and objects.
- Prompts structured as "a {color1} colored {object1} and a {color2} colored {object2}".
The paper also evaluates existing text-to-image models, which are typically trained on large, diverse datasets like LAION.
Key Insights and Ideas
- Color is a Revealing Diagnostic: The paper argues that color, being a fundamental and perceptually measurable attribute, serves as an excellent testbed for evaluating the compositional understanding of text-to-image models.
- Multi-Object Color is Hard: Pretrained models perform significantly worse on multi-object, multi-color prompts compared to single-object prompts, highlighting a fundamental limitation in their compositional abilities.
- Existing Metrics Fall Short: Standard metrics like CLIP similarity and VQA scores are insufficient for accurately evaluating fine-grained semantic alignment in complex prompts, often scoring misaligned generations highly.
- Inference-Time Methods Have Trade-offs: While inference-time methods aim to improve attribute binding, they can inadvertently degrade performance on simpler, single-object prompts by introducing unwanted complexity or over-correction.
- Stroop Effect Analogy for Attention: The paper ingeniously applies the Stroop effect's principle of interference to guide attention maps, using a color-less prompt to create a "clean" attention signal for object localization.
Key Results
- Benchmark Performance: The CompColor benchmark reveals that pretrained models struggle significantly with multi-color, multi-object prompts, especially with distant color pairs. Inference-time methods show improvement but still lag behind the proposed "Color Bind" method.
- Color Bind Superiority: The proposed "Color Bind" method consistently outperforms existing editing approaches (AnySD, MagicBrush, InstructPix2Pix, FPE, MasaCtrl) across various base models (SD 1.4, 1.5, 2.1, FLUX) and prompt types (Close/Distant colors). For instance, on SD 2.1 with distant colors, "Color Bind" achieves a significantly higher accuracy (e.g., 55.36% vs. 22.32% for MasaCtrl).
- Qualitative Improvements: Visual examples demonstrate that "Color Bind" accurately changes target colors while preserving object shape and background, unlike other methods that might introduce artifacts or affect unrelated parts of the image.
Limitations and Future Work
- Limitations:
- The paper notes that inference-time methods can sometimes degrade single-object color fidelity, suggesting a trade-off between compositional control and simple prompt performance.
- While the method addresses color binding, it doesn't explicitly handle more complex semantic misalignments beyond color.
- Future Work:
- The authors suggest extending the framework to analyze other visual attributes beyond color.
- They also propose incorporating lighting conditions into the evaluation framework, acknowledging its crucial role in color perception.
- The potential for creative design tools that leverage this fine-grained, text-guided editing capability is highlighted.
Summary updated