Probabilistic color-by-numbers: suggesting pattern colorizations using factor graphs

Sharon Lin, Daniel Ritchie, Matthew Fisher, Pat HanrahanACM Trans. Graphics 2013 · DOI

TL;DR

This paper introduces a probabilistic factor graph model that automatically generates diverse and aesthetically pleasing colorizations for 2D patterns. By learning from artist-created examples, the model captures stylistic nuances and spatial color relationships, offering a powerful tool for designers to explore and refine color palettes.

What Problem Does This Paper Address?

Creating attractive colorizations for patterns is a time-consuming and iterative process, even for experienced designers. While color harmony rules exist, their application to specific patterns and styles is complex. Designers often rely on trial-and-error to find pleasing color combinations, especially when dealing with patterns that have predefined regions that must share the same color (akin to "color-by-numbers"). This paper addresses the need for an automated system that can suggest a variety of good colorizations, adapt to user preferences, and facilitate creative exploration.

Methods

The core of the paper is a probabilistic factor graph model. This model decomposes the complex problem of pattern colorization into smaller, manageable factors. Key components include:

  • Unary Color Functions: These score the color of individual pattern regions based on their spatial features (e.g., size, shape, compactness) and predicted color properties like lightness and saturation.
  • Pairwise Color Functions: These score the color relationships between adjacent regions, considering features like perceptual difference, relative lightness, and saturation.
  • Color Compatibility Function: This global function, based on existing work, scores the overall harmony of a set of colors (specifically, the five largest color groups).

The model is trained on example patterns to learn the weights of these factors, statistically capturing desirable properties. Markov Chain Monte Carlo (MCMC) sampling, specifically using parallel tempering, is employed to generate diverse colorings by exploring the probability distribution defined by the factor graph. The system also supports user interaction through conditional inference and soft constraints to guide the suggestions.

Datasets

The primary dataset used is collected from COLOURlovers, an online community for color design. This dataset consists of approximately 8200 colored patterns from 82 artists, covering 2908 unique pattern templates. The authors preprocess these rasterized patterns to create pattern templates for training.

Key Insights and Ideas

  • Beyond Global Color Harmony: The paper highlights that simply enforcing global color compatibility is insufficient for good pattern colorization. Spatial arrangement and local color properties are crucial.
  • Data-Driven Style Capture: By training on artist-created patterns, the model can learn and reproduce specific stylistic preferences, such as preferred background lightness or contrast levels.
  • Probabilistic Framework for Diversity: The use of factor graphs and MCMC sampling allows for the generation of a diverse set of suggestions, rather than a single optimal solution, which is vital for creative exploration.
  • User Control is Key: The model's flexibility in incorporating user-defined constraints (hard or soft) makes it a practical tool for designers who may have partial ideas or want to refine suggestions.

Key Results

  • Perceptual Study: A user study showed that automatically colored patterns generated by their model were significantly preferred over random colorings and colorings that only respected global color compatibility.
  • Artist Style Mimicry: The model can capture and reproduce the distinct styles of individual artists, as demonstrated by sampling results from models trained on specific artists.
  • Application Versatility: The model's effectiveness is shown across various applications, including 3D scene design, web design, and fashion, by adapting the factor graph with specific constraints.
  • Performance: Generating 20 diverse suggestions takes approximately 73 seconds on average, with MCMC sampling being the dominant factor.

Limitations and Future Work

  • Lack of Semantic Constraints: The current model does not encode semantic constraints (e.g., skies are blue, plants are green). Future work could address this by incorporating semantic tags or using sketch classification.
  • Vector Artwork Handling: The model currently works with rasterized patterns. Future research could extend it to handle vector artwork, which may have more complex color blending.
  • General Image Colorization: Extending the system to colorize arbitrary images, not just predefined templates, is a significant future direction. This would require more sophisticated techniques for template extraction and inference.
  • Real-time Interaction: Improving performance for real-time suggestions through GPU acceleration or gradient-based MCMC methods is a promising avenue.
  • Understanding Color Biases: Further research is needed to understand how different groups of people have varying biases in color preference.

Summary updated

BibTeX
@article{lin2013probabilistic,
  author = {Sharon Lin and Daniel Ritchie and Matthew Fisher and Pat Hanrahan},
  title = {{Probabilistic color-by-numbers: suggesting pattern colorizations using factor graphs}},
  journal = {ACM Trans. Graphics},
  year = {2013},
  doi = {10.1145/2461912.2461988},
}
Figure