Few-Shot Unsupervised Image-to-Image Translation

Ming-Yu Liu, Xun Huang, Arun Mallya, Tero Karras, Timo Aila, Jaakko Lehtinen, Jan Kautz

Abstract

Unsupervised image-to-image translation methods learn to map images in a given class to an analogous image in a different class, drawing on unstructured (non-registered) datasets of images. While remarkably successful, current methods require access to many images in both source and destination classes at training time. We argue this greatly limits their use. Drawing inspiration from the human capability of picking up the essence of a novel object from a small number of examples and generalizing from there, we seek a few-shot, unsupervised image-to-image translation algorithm that works on previously unseen target classes that are specified, at test time, only by a few example images. Our model achieves this few-shot generation capability by coupling an adversarial training scheme with a novel network design. Through extensive experimental validation and comparisons to several baseline methods on benchmark datasets, we verify the effectiveness of the proposed framework. Our implementation and datasets are available at https://github.com/NVlabs/FUNIT .

Introduction

Traditional unsupervised image-to-image (I2I) translation models, such as CycleGAN or UNIT, have demonstrated impressive results in mapping images between specific domains, like turning horses into zebras. However, these models face two significant hurdles: they require thousands of images from both source and target domains during training, and they lack the ability to generalize to new, unseen categories without retraining from scratch.

Humans, by contrast, can easily imagine a novel object in a different pose after seeing only a few examples. The Few-shot UNsupervised Image-to-image Translation (FUNIT) framework aims to replicate this ability. By disentangling content (pose and structure) from class-specific appearance, FUNIT allows a model to generalize to new object categories on the fly, using only a few images of the target class at test time.

Methodology

The FUNIT framework is built upon a Generative Adversarial Network (GAN) architecture designed to separate an image's structural content from its class-specific style. The system consists of three primary components:

  • Content Encoder ($E_x$): This module extracts class-invariant features, such as the pose of an animal or the spatial arrangement of its features, from the input image.
  • Class Encoder ($E_y$): This encoder takes $K$ images of a target class (the "few shots") and extracts a latent representation of their shared appearance. By using a mean operation to aggregate features across these samples, the model becomes robust to variations within the target class examples.
  • Decoder ($F_x$): The decoder merges the content and class codes using Adaptive Instance Normalization (AdaIN) residual blocks. The class code dictates the global appearance (texture, color, fur pattern), while the content code maintains the local structure.
The FUNIT framework consists of a training phase on source classes and a deployment phase where it translates images to previously unseen target classes using only a few examples.

To ensure high-fidelity results, the model employs a Multi-task Adversarial Discriminator. Instead of a simple binary classification, the discriminator performs multiple binary classification tasks simultaneously—one for each source class in the training set. This forces the generator to produce images that precisely match the fine-grained characteristics of the target class.

Experimental Results

The researchers evaluated FUNIT across several diverse datasets, including Animal Faces (149 classes), North American Birds (555 species), Flowers, Foods, and Celebrity Faces.

Quantitative and Qualitative Performance

FUNIT significantly outperformed existing baselines like CycleGAN and StarGAN in few-shot settings. On the Animal Faces dataset, FUNIT achieved a 97.96% Top-5 translation accuracy in a 20-shot setting, meaning a pre-trained classifier correctly identified the generated image as the target class in nearly every instance. In user studies, human participants preferred FUNIT's results over StarGAN by a margin of 86% to 14%.

Qualitative results of FUNIT across multiple datasets (animals, birds, flowers, and food), showing the model's ability to preserve source structure (x) while adopting target class appearance (y1, y2) to produce the translation (x-bar).

Key Insights

  • Diversity and Generalization: The model's ability to translate to unseen classes scales with the number of classes seen during training. A broader training set helps the model learn a more "universal" appearance extractor.
  • Data Augmentation: FUNIT can be used to "hallucinate" new images for rare classes, which can then be used to train more robust classifiers, outperforming standard feature-level augmentation methods.

Conclusion

FUNIT represents a significant step toward more flexible and human-like generative models. While it excels at translating between related categories, it still struggles when the domain gap is too large (e.g., translating a dog into a flower). Future research will likely focus on bridging these larger distribution gaps and developing even more flexible latent representations to handle significant morphological changes.

Summary updated

BibTeX
@inproceedings{liu2019few,
  author = {Ming-Yu Liu and Xun Huang and Arun Mallya and Tero Karras and Timo Aila and Jaakko Lehtinen and Jan Kautz},
  title = {{Few-Shot Unsupervised Image-to-Image Translation}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2019},
  url = {https://openreview.net/forum?id=HnsIIZkW9dF},
}
Figure