Realtime Data-Efficient Portrait Stylization Based On Geometric Alignment

Xinrui Wang, Zhuoru Li, Xiao Zhou, Yusuke Iwasawa, Yutaka Matsuo

TL;DR

This paper introduces a real-time, data-efficient portrait stylization framework that uses explicit geometric alignment to bridge the structural gap between real faces and artistic styles. By integrating differentiable Thin-Plate-Spline (TPS) modules into a lightweight GAN, the method achieves high-fidelity style transfer with up to 100x less computational complexity and 2x better data efficiency than previous methods. This allows for high-quality 512×512 portrait stylization at over 30 FPS directly on mobile devices.

What Problem Does This Paper Address?

Portrait stylization—transforming a standard photo into an artistic style like an animation or watercolor painting—faces a fundamental challenge: identity distortion. Artistic styles often feature exaggerated geometry (e.g., larger eyes, altered face shapes), creating a massive structural mismatch with real human faces.

Existing state-of-the-art methods rely on massive models (like StyleGAN or Diffusion models) and enormous datasets to learn how to map these differing distributions. This makes them computationally heavy, slow to run on edge devices, and prone to failing when style examples are scarce (rare styles). Smaller, lightweight models typically fail to maintain geometric consistency, leading to distorted facial features and lost identities.

Methods

The authors propose an end-to-end Generative Adversarial Network (GAN) framework driven by differentiable Thin-Plate-Spline (TPS) modules to explicitly align facial landmarks between the portrait and style domains.

Overview of the proposed cycle-consistency framework

Key components include:

  • Multi-scale TPS Generation: Integrated into a U-Net generator, TPS modules warp feature maps across multiple down-sampled scales to match the target style's geometry. The framework splits into a geometric warping branch (used during training to align domains) and a geometric invariant branch (used during inference for direct stylization without warping).
  • Spatial-Aware Discrimination: The discriminator evaluates pairs of portraits and style images that have been geometrically aligned. This forces the network to focus strictly on texture and style transfer rather than being confused by shape mismatches.
  • Local Alignment & Face Bank: To refine crucial facial details, the authors crop key features (eyes, nose, mouth) into a "Face Bank." Four auxiliary discriminators are trained specifically on these local patches to enhance local stylization quality.
  • Modified Cycle-Consistency: Cycle-consistency loss is applied exclusively to the geometric invariant branch using Learned Perceptual Image Patch Similarity (LPIPS) to preserve identity without fighting the geometric gap.

Datasets

The model was trained and evaluated using the following datasets:

  • FFHQ: 10,000 real portrait images used as the content domain source.
  • Wikiart: 300 facial images used for the oil paint style.
  • Custom Style Datasets: 800 images for animation style, 64 images for watercolor style, and 34 images for ink paint style.

Key Insights and Ideas

  • Geometry as a Prior Simplifies Style Learning: By explicitly warping features to align landmarks, the network doesn't have to waste capacity learning complex spatial correlations between domains. This structural shortcut allows a tiny 1.7M parameter model to match or outperform a 250M parameter model.
  • Local Patch Recombination Boosts Data Efficiency: Randomly sampling and aligning local patches (eyes, mouth) from a small "Face Bank" exponentially increases the combinations of content-style pairs during training. This acts as a powerful data augmentation technique, allowing the model to learn effectively from as few as 34 style images without overfitting.

Key Results

  • Speed and Efficiency: The lightweight model variant (Ours(S) with 1.7M parameters) achieves real-time inference at 33 FPS (31.8 ms) on a mobile Snapdragon 8Gen1 SoC at 512×512 resolution. It requires ~100x fewer FLOPs than heavy SOTA alternatives.
  • Quality: Quantitative evaluations using FID and Art-FID show that the proposed large model (Ours(L)) ranks 1st across all four styles, while the lightweight model (Ours(S)) consistently outperforms much larger baselines like AgileGAN and CycleGAN.
  • Robustness to Large Deformations: The explicit landmark alignment allows the model to successfully handle extreme geometric transformations, such as caricature styles, while still preserving the subject's core identity.
Figure 1: Input portraits and stylized results of our proposed method. Leveraging geometric alignment, our approach can synthesize stylized portraits in real-time (∼30 fps for 512 × 512 image) on mobile devices, even with limited style exemplars. Each example shows a portrait (center) and four stylized variants: Animation (a), Watercolor (b), Oilpaint (c), and Inkpaint (d).

Limitations and Future Work

  • Extreme Poses: The model's performance degrades under severe perspective changes, particularly large head rotations (yaw and pitch), as the 2D TPS warping struggles with 3D structural changes.
  • Facial Focus Only: The current pipeline is optimized exclusively for the facial region. The background is either left unstylized or poorly integrated. The authors suggest that incorporating a separate segmentation model to handle background stylization is a promising future direction.

Summary updated

BibTeX
@article{wang2025realtime,
  author = {Xinrui Wang and Zhuoru Li and Xiao Zhou and Yusuke Iwasawa and Yutaka Matsuo},
  title = {{Realtime Data-Efficient Portrait Stylization Based On Geometric Alignment}},
  journal = {Neural Networks},
  year = {2025},
  doi = {10.1016/j.neunet.2025.107774},
}
Figure