TL;DR
CtlGAN is a novel framework for few-shot artistic portrait generation that can adapt a pretrained StyleGAN2 to a new style using as few as 10 (or even just 1) target images. By introducing a Cross-Domain Triplet (CDT) loss and a specialized dual-path $Z+$ encoder, it generates high-quality, diverse stylized portraits that preserve the subject's identity while avoiding the common pitfall of overfitting to the small training set.
What Problem Does This Paper Address?
Generating high-quality artistic portraits (sketches, cartoons, caricatures) typically requires massive datasets of paired or unpaired images. When data is scarce—a "few-shot" scenario—traditional Image-to-Image (I2I) translation models tend to overfit.
Overfitting in this context often manifests as "mode collapse," where the model generates the same artistic face regardless of the input photo's identity. While recent transfer learning methods have tried to adapt pretrained GANs to small datasets, they often struggle to balance style accuracy with identity preservation. The authors of CtlGAN set out to bridge this gap: how can we teach a machine a new art style from a handful of examples without losing the unique features of the person being drawn?
Methods
CtlGAN consists of two main components: a Domain Adaptation Decoder and a Style Encoder.
1. Contrastive Transfer Learning (The Decoder)
The researchers adapted a StyleGAN2 pretrained on real faces (FFHQ) to a target artistic domain. To prevent the model from simply memorizing the few training images, they introduced the Cross-Domain Triplet (CDT) loss.
Unlike standard triplet losses, the CDT loss uses:
- Anchor: A source image generated from a latent code ($G_s(z_i)$).
- Positive: The target artistic image generated from the same code ($G_t(z_i)$).
- Negative: Target artistic images generated from different latent codes ($G_t(z_j)$).
This explicitly forces the model to ensure that different people (different latent codes) result in different artistic portraits, effectively killing the "same-face" overfitting problem.
2. Dual-Path $Z+$ Encoder
To turn a real photo into a latent code the decoder understands, the authors proposed a new encoder. While most StyleGAN inversion uses the $W+$ space, the authors found that the $Z+$ space (an extended version of the initial latent space) better preserves structure during domain adaptation.
They also implemented a dual-path training strategy:
- Path 1: Standard reconstruction of real faces.
- Path 2 (Cycle Path): The encoder is trained on images synthesized by the GAN itself. This ensures the encoder's output follows a Gaussian distribution, making it perfectly compatible with the decoder's expectations.
Datasets
- Source Domain: FFHQ (70,000 high-quality real face photos).
- Target Domains (Few-shot):
- Sketches: CUHK face sketch dataset.
- Caricatures: Scraped from the web.
- Cartoons: Toonify dataset.
- Artistic Styles: Raphael and Roy Lichtenstein from the Artistic-Faces dataset.
- Non-face domains: LSUN Cat and LSUN Church (to test generalizability).
- Evaluation: 5,000 images from CelebA-HQ were used as test inputs.
Key Insights and Ideas
- Diversity via Contrast: The "aha moment" is that few-shot GANs don't just need to learn the target style; they need to be reminded to stay diverse. The CDT loss acts as this reminder by penalizing the model if it tries to map different identities to the same stylized output.
- $Z+$ is for Stylization: While $W+$ is the gold standard for perfectly reconstructing a specific photo, $Z+$ is more robust for transforming that photo. It maintains the "DNA" of the original StyleGAN better during the stressful process of domain adaptation.
- The Power of 1-Shot: The model is surprisingly effective even with a single reference image, outperforming CLIP-based methods in identity preservation.
Key Results
CtlGAN significantly outperformed state-of-the-art (SOTA) methods like FSGA and StyleGAN-NADA across multiple metrics:
- Quantitative: It achieved the lowest Fréchet Inception Distance (FID) on Sketches (49.85 vs. FSGA's 52.35) and Cartoon styles, indicating higher image quality and style similarity.
- Qualitative: As seen in Figure 2, CtlGAN avoids the cluttered lines and identity loss seen in TGAN or Freeze-D.
- User Study: In a blind test with 62 participants, CtlGAN's results were ranked as the best in 59.6% of cases, dwarfing the next best competitor (FSGA at 25.7%).
Limitations and Future Work
While CtlGAN excels at global style transfer, it has limitations in local editing. For example, when adapting to a "Sunglasses" domain, the model sometimes inadvertently changes the subject's haircut or skin details along with adding the glasses. The authors suggest that future work should focus on models that can decouple global style changes from local semantic editing.
Summary updated