One-Shot GAN: Learning To Generate Samples From Single Images and Videos

Vadim Sushko, Jürgen Gall, Anna Khoreva

Introduction

Generative Adversarial Networks (GANs) typically require massive datasets to produce high-quality results. However, in many real-world scenarios—such as rare medical conditions or specific historical events—data is extremely scarce. Previous "single-image" GANs, like SinGAN, attempted to learn from internal patch distributions but often produced unrealistic layouts or distorted objects due to "patch-shuffling" artifacts. One-Shot GAN addresses these issues by learning to produce diverse, high-quality images from just a single training sample.

Training images (red boxes) and diverse samples generated from a single image or video clip.

Methodology

The core innovation of One-Shot GAN is its Two-Branch Discriminator, which separates scene "content" from "layout" to prevent the generator from simply memorizing the training sample.

Content-Layout Disentanglement

The discriminator splits into two specialized branches after initial shared layers:

  • Content Branch: This branch uses Global Average Pooling to strip away spatial information. It focuses entirely on what is in the image (e.g., "Does this look like a realistic car?"), forcing the generator to produce high-fidelity objects regardless of their location.
  • Layout Branch: This branch uses 1x1 convolutions to focus on the spatial arrangement (the "where"). It ensures that the overall structure of the scene—such as the horizon line or the placement of objects—remains coherent.
The One-Shot GAN generator architecture, which maps noise to realistic image samples.

Diversity Regularization (DR)

To avoid "mode collapse," where the model produces identical outputs, the authors introduce a uniform diversity loss. Unlike prior methods, this regularization is applied in the feature space of the generator's internal layers, encouraging variety in both high-level composition and low-level texture.

Learning from Video

The framework also introduces training on a single short video clip (2-10 seconds). A video acts as a "super-image," providing multiple angles and motion cues that allow the model to naturally disentangle objects from backgrounds without the need for manual labels or masks.

Key Results

One-Shot GAN was evaluated on the Places, DAVIS, and YFCC100M datasets using standard metrics:

  • Higher Quality: On the SIFID metric, which measures how well the generated distribution matches the original, One-Shot GAN outperformed SinGAN and ConSinGAN across both image and video datasets.
  • Greater Diversity: Using LPIPS (a measure of perceptual diversity), the model produced significantly more varied images than FastGAN, which tended to only slightly tweak the original image.
  • Qualitative Success: The model successfully changes object counts (e.g., generating multiple balloons from one) and edits landscape contours while maintaining a globally coherent perspective, avoiding the artifacts common in earlier patch-based approaches.

Conclusion and Future Work

By disentangling content and layout, One-Shot GAN moves beyond simple patch-matching to a more semantic understanding of single-sample generation. While the model currently focuses on static image generation, extending this framework to produce temporally consistent video sequences remains a promising direction for future research.

Summary updated

BibTeX
@inproceedings{sushko2021one,
  author = {Vadim Sushko and Jürgen Gall and Anna Khoreva},
  title = {{One-Shot GAN: Learning To Generate Samples From Single Images and Videos}},
  booktitle = {Workshops @ CVPR},
  year = {2021},
  doi = {10.1109/cvprw53098.2021.00293},
}
Figure