TL;DR
This paper introduces a novel approach to automatically generate diverse and consistent typographic styles for graphic documents. By formulating typography generation as a fine-grained attribute generation task and employing a structure-preserved sampling method, the authors enable the creation of visually appealing and contextually appropriate designs, outperforming existing methods.
What Problem Does This Paper Address?
Creating compelling graphic designs often relies on carefully chosen typography to convey specific impressions, legibility, and importance. However, selecting appropriate typographic styles is a complex and challenging task, involving a delicate interplay of message content, visual context, and layout. Existing automatic typography generation systems often struggle to produce diverse design options while maintaining consistency across multiple text elements within a document. This paper aims to bridge this gap by developing a system that can generate a variety of typographic styles that are both contextually relevant and stylistically coherent.
Methods
The core of this work lies in an autoregressive model built upon the Transformer architecture. This model takes into account the input context, including the canvas and text elements with their rough positions, to predict fine-grained typographic attributes such as font, color, alignment, letter spacing, and line spacing.
A key innovation is the structure-preserved sampling technique. This method addresses the challenge of generating diverse yet consistent typography. It operates in two steps:
- Infer initial prediction: The model first predicts a "typographic structure" using top-1 sampling, which represents the most likely consistent styling across text elements.
- Structure-preserved sampling: The model then autoregressively samples attributes, but crucially, it enforces the consistency predicted in the first step. This is achieved by clustering text elements based on their predicted structure and sampling attributes for these clusters, rather than individual elements, thereby preserving the overall typographic harmony.
Datasets
The authors utilize the Crello dataset for training and evaluation. This dataset consists of vector graphic documents. To enrich the dataset, they collected additional TTF files and parsed typographic details from the templates, resulting in a dataset of 23,475 templates with text elements in vector format. The dataset was split into training (80%), testing (10%), and validation (10%) sets.
Key Insights and Ideas
- Typography as Fine-Grained Attribute Generation: Framing typography generation as the prediction of numerous fine-grained attributes (beyond just font and color) is crucial for capturing nuanced design.
- The Importance of Typographic Structure: Simply generating diverse attributes independently can lead to inconsistent and visually jarring results. Explicitly modeling and preserving a "typographic structure" is key to coherence.
- Structure-Preserved Sampling for Diversity-Consistency Trade-off: The proposed sampling method elegantly balances generating diverse options with maintaining a consistent visual style, a common challenge in generative tasks.
- Attribute-based Generation's Advantage: Generating attributes directly, rather than raster images, avoids rasterization artifacts and makes the output easily usable in standard design tools like Adobe Illustrator.
Key Results
The proposed model demonstrates strong performance in both quantitative and qualitative evaluations.
- Quantitative: The model achieves the best scores in structure metrics across various attributes, indicating superior consistency compared to baselines like MFC and CanvasVAE*. While attribute metrics are competitive, the significant improvement in structure score highlights the effectiveness of the proposed approach. For instance, the "Ours+SS" model consistently maintains a high structure score even with increased diversity.
- Qualitative: The generated typography is described as sufficiently diverse and appropriate for the background context. The structure-preserved sampling successfully enforces consistent styling, such as uniform fonts across multiple texts. User studies also confirm that participants prefer the generated designs from the proposed model over the CanvasVAE baseline.
Limitations and Future Work
The authors acknowledge several limitations:
- Unintentional Spatial Overlaps: The model can sometimes generate overlapping text elements.
- Visibility of Colors: Certain generated color choices might be difficult to see against the background.
- Text Overflow: The model doesn't always account for the final text width, potentially leading to overflow.
- Failure to Capture Plausible Structure: In cases where the initial structure prediction is flawed, the generated results can be corrupted.
Future work includes analyzing the relationship between typographic attributes and human perception, particularly how color fidelity influences initial impressions. They also aim to study the preferred degree of diversity for users to build a more practical typography generation system. Additionally, exploring joint clustering across multiple attributes for structure preservation is suggested.
Summary updated