Source-linked AI summary

Multi-Content GAN for Few-Shot Font Style Transfer

Samaneh Azadi, Matthew Fisher, Vladimir Kim, Zhaowen Wang, Eli Shechtman, Trevor Darrell

arXiv:1712.00516v1cs.CV

TL;DR

Designing complete ornamented typefaces from only a few observed glyphs is labor-intensive and leaves unseen characters unavailable. The paper introduces a jointly trained, two-stage conditional GAN for glyph shape and ornamentation, producing remaining glyphs that users strongly preferred over existing texture-transfer approaches.

  • Problem

    Designing visually compatible glyphs is labor-intensive, while artists often create only subsets, making unseen characters difficult to synthesize or reuse.

  • Method

    A jointly trained stacked conditional GAN specializes GlyphNet for coarse shapes and OrnaNet for transferring color, texture, and ornamentation from a few examples.

  • Results

    Users strongly preferred the jointly trained model’s synthesized ornamented glyphs over existing texture-transfer approaches.

  • Takeaways & Limitations

    The study supports GANs as an effective approach for multi-content style transfer from a few stylized glyph examples.

  • Takeaways & Limitations

    The generalization evaluation includes synthetic-font data that was not used during training of the Glyph Network.

Abstract

from arXiv · show

In this work, we focus on the challenge of taking partial observations of highly-stylized text and generalizing the observations to generate unobserved glyphs in the ornamented typeface. To generate a set of multi-content images following a consistent style from very few examples, we propose an end-to-end stacked conditional GAN model considering content along channels and style along network layers. Our proposed network transfers the style of given glyphs to the contents of unseen ones, capturing highly stylized fonts found in the real-world such as those on movie posters or infographics. We seek to transfer both the typographic stylization (ex. serifs and ears) as well as the textual stylization (ex. color gradients and effects.) We base our experiments on our collected data set including 10,000 fonts with different styles and demonstrate effective generalization from a very small number of observed glyphs.

1. Introduction

The paper addresses the labor-intensive problem of completing and transferring highly stylized glyph designs from sparse observations. It proposes a jointly trained, typeface-specialized MC-GAN that predicts glyph shapes and synthesizes their color and texture.

  • Motivation: Artists often design only the glyph subset needed for a title or annotation, making later text alteration and font transfer difficult.Designing compatible glyph shapes and textures is labor intensive.
  • Related work: Earlier outline-based glyph synthesis was restricted to particular topologies and could not use image input.Deep neural networks subsequently enabled glyph modeling from images.
  • Approach: MC-GAN retrains a customized network for each observed character set using only a handful of observed glyphs, avoiding artifacts from directly generating fonts.The approach uses a multi-content GAN architecture rather than one network for all typeface ornamentations.
  • Architecture: The two-stage network first models overall glyph shape, then synthesizes final appearance with color and texture to transfer fine decorative elements.This separates coarse shape modeling from appearance synthesis.
  • Contributions: The paper presents the first end-to-end solution for synthesizing ornamented glyphs from images of a few same-style examples.Its stacked cGAN predicts coarse shapes, while an ornamentation network predicts final color and texture; both are jointly trained and specialized per typeface.

2. Related Work

Prior font glyph synthesis methods modeled shape transformations, radicals, strokes, or factorized style transfer, while artistic color and texture transfer was studied separately. Related graphics and vision work synthesizes missing content from partial observations, but glyphs share style without sharing structure.

  • Font Glyph Synthesis: Earlier font synthesis methods used explicit shape modeling, radical and stroke part models, statistical models, and bilinear factorization to infer or transfer glyph styles.These approaches primarily addressed glyph shape and stroke-style transformation between existing and novel glyphs.
  • Artistic Style Transfer: Artistic color and texture transfer to new glyphs was treated as distinct from overall shape inference, including patch-based synthesis over text skeletons.The cited approach assumed the unstylized glyph shape was given and mapped sub-effect patterns to correlated skeleton positions.
  • Partial-Observation Synthesis: Graphics and vision methods addressed synthesis from partial observations by learning domain-specific priors for novel views, image completion, and partial 3D-shape completion.Examples include encoder-decoder hallucination of novel views and CNN-based completion of missing image regions and new stereo or lightfield views.
  • Partial-Observation Synthesis: Unlike prior partial-observation problems involving one object across views, different glyphs in one font share style but not structure.This distinction motivates treating glyph style consistency separately from glyph content structure.

3. Multi-Content GAN Architecture

The proposed end-to-end MC-GAN generates unseen glyphs by separating glyph-mask generation from ornamentation transfer. GlyphNet learns cross-glyph style correlations from stacked inputs, while OrnaNet applies observed color and ornamentation through conditional GAN training and leave-one-out fine-tuning.

  • Architecture: MC-GAN divides font generation into GlyphNet for glyph masks and OrnaNet for transferring texture, color, and ornamentation.The model predicts the full A–Z set from a few stylized glyph observations.
  • GlyphNet: GlyphNet uses one input channel per glyph so correlations across contents are learned across network channels rather than through a tiled single image.Its generator is based on an image-transformation network with six ResNet blocks.
  • OrnaNet: OrnaNet receives grayscale glyphs as repeated RGB inputs and is trained on the few available observations to reproduce the specific ornamentation of each font.Unlike GlyphNet’s broad cross-font generalization, OrnaNet specializes in the ornamentation observed for a given font.
  • End-to-End Training: End-to-end training generates all 26 glyphs with pre-trained GlyphNet, uses leave-one-out cycles to create training pairs, and fine-tunes OrnaNet on observed letters.For five observed letters such as TOWER, the procedure repeatedly leaves out each observed glyph and extracts the remaining 21 generated letters.
  • Losses: The networks combine adversarial objectives with L1 reconstruction losses, while OrnaNet additionally minimizes MSE between output and input binary masks to preserve clean outlines.In final end-to-end training, OrnaNet backpropagates its objective and D1 is removed from GlyphNet.

4. Font Dataset

The dataset contains 10K grayscale Latin fonts with 26 capital letters, standardized as 64 × 64 glyphs. A baseline ornamented-font dataset expands these glyphs into 20K color-font examples using random color gradients and outlining.

  • Dataset composition: The collection includes 10K grayscale Latin fonts, each containing 26 capital letters.The fonts encode glyph outlines but not font ornamentations.
  • Glyph preprocessing: Each glyph is bounded, resized so its larger dimension reaches 64 pixels, and padded to 64 × 64.This preprocessing standardizes the glyph images.
  • Ornamented-font baseline: Random color gradients and outlining produce a 20K color-font baseline dataset from the grayscale glyphs.Two random color gradients are applied to each font.

5. Experiments and Results

Experiments evaluate MC-GAN through ablations, few-shot glyph correlation and observation-count studies, and comparisons with image-translation and patch-based baselines. The results show benefits from the proposed regularizers and end-to-end adaptation, including an 80.0% user preference rate over patch-based transfer.

  • Experimental setup: Experiments use ornamented web fonts excluded from the 10K-font training set, with model components assessed through ablation studies.Fonts were manually screened using nearest neighbors over black-and-white glyphs; training used λ1 = 300, λ2 = 300 before epoch 200, and λ2 = 3 afterward.
  • Comparison with image translation: The image-translation baseline cannot generalize gradient colors well at test time from only a few observed examples, whereas MC-GAN is fine-tuned end-to-end on each exemplar font.The comparison uses color-font examples with random gradients and generates all 26 RGB letters from a subset of input letters.
  • Ablation study: The full end-to-end MC-GAN performs best with randomly initialized OrnaNet and all proposed loss terms, while pre-training OrnaNet on gradient ornamentations is unhelpful.The ablation studies examine Lw,L1(G1), LMSE(G1), and LMSE(G2), whose regularization effects trade off fidelity to GlyphNet predictions against style-modification freedom.
  • GlyphNet analysis: SSIM analyses on 1,500 fonts show that correlations between observed and generated letters affect GlyphNet prediction quality, and increasing observed glyphs from 1 to 8 changes the score distributions.The study compares SSIM distributions when each letter is conditioned on specific informative or uninformative letters and when n observed letters are provided.
  • Comparison with patch-based transfer: 80.0% of users preferred MC-GAN character sets over the patch-based text-effect transfer method across 33 font examples evaluated by 11 people.The patch-based method often fails on synthesized grayscale letters and when source and target glyph shapes differ substantially, whereas both methods retain some failure cases on complex ornamentation.

6. Conclusion and Future Work

The work presents an end-to-end method for synthesizing ornamented glyphs from few examples, jointly predicting coarse shape and fine ornamentation. Its jointly trained shape and texture networks produce results users strongly prefer over existing glyph-focused texture-transfer approaches.

  • Conclusion: The method synthesizes ornamented glyphs from a few example images by predicting the remaining glyphs’ coarse shapes and fine ornamentations.It processes the examples as an input stack.
  • Conclusion: The approach trains two networks jointly: one for glyph shape and one for texture.The separate networks correspond to shape prediction and texture or ornamentation prediction.
  • Conclusion: User evaluations strongly preferred the jointly trained results over existing texture-transfer approaches focused on glyphs.The comparison concerns the proposed jointly trained shape-and-texture system and existing glyph-focused texture-transfer methods.

A. Appendix · A.1. Network Architectures

The appendix describes the generator as an encoder-decoder architecture based on an image transformation network. It introduces shorthand for several convolutional building blocks and specifies dense channel connectivity within each layer.

  • A.1. Network Architectures: The generator uses an encoder-decoder architecture based on an image transformation network introduced in prior work.The passage cites references [11] and [10] as the architecture’s sources.
  • A.1. Network Architectures: CRk denotes a Convolution-BatchNorm-ReLU block with k channels.This notation is part of the architecture specification.
  • A.1. Network Architectures: Ck denotes a Convolution-BatchNorm layer with k channels.The notation distinguishes this block from the ReLU- and Dropout-augmented variants.
  • A.1. Network Architectures: CRDk denotes a Convolution-BatchNorm-ReLU-Dropout block with k channels.The block includes Dropout in addition to convolution, batch normalization, and ReLU.
  • A.1. Network Architectures: CLk denotes a Convolution-LeakyReLU block with k channels.This notation identifies the LeakyReLU-based convolutional block.
  • A.1. Network Architectures: Each layer convolves all input channels to all output channels.The passage states this connectivity rule for the listed layer notations.

A.1.1 Generators Architecture

GlyphNet and OrnaNet use closely related encoder–decoder architectures, with OrnaNet differing by removing the encoder’s initial CR2626 layer. Both decoders use three ResNet-style blocks, followed by CR192, CR64, and a final 26-channel convolution with Tanh.

  • GlyphNet Encoder: GlyphNet’s encoder is CR2626-CR64-CR192-CR576-(CRD576-C576)-(CRD576-CR576)-(CRD576-C576), with each parenthesized pair forming a ResNet Block.Its convolutions down-sample by factors of 1, 1, 2, 2, 1, 1, 1, 1, 1, and 1, respectively.
  • OrnaNet Encoder: OrnaNet follows a similar encoder architecture but eliminates the first-layer CR2626.This is the stated architectural difference between the two encoders.
  • Shared Decoder: Both decoders comprise three (CRD576-C576) blocks, followed by CR192 and CR64, with up-sampling factors of 1, 1, 1, 1, 1, 1, 2, and 2.The final decoder layer adds a 26-channel convolution followed by a Tanh unit.

A.1.2 Discriminators Architecture

GlyphNet and OrnaNet use discriminators D1 and D2 composed of local and global components, with the local discriminator’s weights shared with the global discriminator. The local discriminator comprises CL64-CL128 followed by a convolution mapping 128 input channels to one output.

  • D1 and D2 are local-and-global discriminators for GlyphNet and OrnaNet, respectively, with local-discriminator weights shared by the global discriminator.
  • The local discriminator consists of CL64-CL128 followed by a convolution mapping 128 input channels to one output.
  • The listed convolutions down-sample by a factor of 2 −1 −1, respectively.
Loading 1712.00516v1…