Transferring GANs: Generating Images from Limited Data

Yaxing Wang, Chenshen Wu, Luis Herranz, Joost van de Weijer, Abel Gonzalez-Garcia, Bogdan Raducanu

Abstract

Transferring knowledge of pre-trained networks to new domains by means of fine-tuning is a widely used practice for applications based on discriminative models. To the best of our knowledge this practice has not been studied within the context of generative deep networks. Therefore, we study domain adaptation applied to image generation with generative adversarial networks. We evaluate several aspects of domain adaptation, including the impact of target domain size, the relative distance between source and target domain, and the initialization of conditional GANs. Our results show that using knowledge from pre-trained networks can shorten the convergence time and can significantly improve the quality of the generated images, especially when target data is limited. We show that these conclusions can also be drawn for conditional GANs even when the pre-trained model was trained without conditioning. Our results also suggest that density is more important than diversity and a dataset with one or few densely sampled classes is a better source model than more diverse datasets such as ImageNet or Places.

Introduction

Training Generative Adversarial Networks (GANs) from scratch is notoriously difficult. To produce realistic, high-resolution images, these models typically require massive training sets like ImageNet or LSUN. When data is scarce—for instance, only 1,000 images of a specific category—GANs often fail to converge, suffer from mode collapse, or produce low-quality results. While fine-tuning is a staple in discriminative tasks like classification, its systematic application to generative models has been largely unexplored. This paper investigates whether "transferring" the learned priors of a GAN can enable high-quality image synthesis in data-limited domains.

Methodology

The researchers utilized the WGAN-GP (Wasserstein GAN with Gradient Penalty) architecture with ResNet blocks for its training stability. The core approach involves taking a GAN pre-trained on a large source domain and continuing its training on a smaller target domain.

Experimental Setup

  • Transfer Configurations: The study evaluated the impact of transferring the Generator, the Discriminator, or both.
  • Conditional Adaptation: The authors explored initializing conditional GANs (AC-GAN framework) using unconditional pre-trained models.
  • Datasets: Source models were trained on large-scale datasets like ImageNet (1M images), Places (2.4M), and LSUN Bedrooms (3M). Target domains included Oxford Flowers (8K), LSUN Kitchens (50K), and Cityscapes (3.5K). To test data scarcity, subsets of LSUN Bedrooms ranging from 1,000 to 1 million images were used.

Analysis and Key Insights

The experiments revealed several critical findings regarding the mechanics of GAN transfer learning:

  1. The Discriminator as a Teacher: Transferring the discriminator proved more critical than the generator. A pre-trained discriminator possesses knowledge of low-level features (edges, textures) that provides immediate, high-quality feedback to the generator from iteration zero.
  2. Density Over Diversity: Unlike classification, where diverse sources like ImageNet are preferred, GANs benefit more from source "density." A model pre-trained on Bedrooms was a superior starting point for Kitchens compared to the broader ImageNet.
  3. Cross-Domain Morphing: Visual analysis shows the GAN utilizes the source's structural priors and gradually morphs them into target features, maintaining image coherence during adaptation.
Figure 1: Quantitative comparison of FID and IW metrics between training from scratch and using a pre-trained ImageNet model. Pre-training leads to faster convergence and superior final scores.

Results

The benefits of transfer learning are most pronounced when target data is extremely limited.

  • Efficiency and Convergence: Pre-trained models reach acceptable quality in a fraction of the iterations required by scratch models. Quantitatively, an adapted GAN requires 2 to 5 times fewer images to achieve the same Fréchet Inception Distance (FID) as one trained from scratch.
  • Quality in Low-Data Regimes: On a dataset of only 1,000 images, the FID dropped significantly from 256.1 (scratch) to 93.4 (pre-trained). Human evaluations mirrored this, with subjects preferring pre-trained results 67% of the time in low-data scenarios.
Figure 4: Qualitative comparison of generated images at different data scales (1K to 1M images) for scratch vs. pre-trained models. The pre-trained model produces recognizable structures even at the 1K scale.

Conclusion

This work demonstrates that transfer learning is a powerful tool for GANs, particularly for overcoming the challenges of limited data. While selecting the optimal source model remains a challenge—with "density" being a key factor—the practice significantly reduces training time and improves image quality. Future research may explore more complex weight-sharing schemes or automated methods for source-target domain pairing.

Summary updated

BibTeX
@inproceedings{wang2018transferring,
  author = {Yaxing Wang and Chenshen Wu and Luis Herranz and Joost van de Weijer and Abel Gonzalez-Garcia and Bogdan Raducanu},
  title = {{Transferring GANs: Generating Images from Limited Data}},
  booktitle = {European Conference on Computer Vision},
  year = {2018},
  url = {https://openreview.net/forum?id=HkVdLY-_-r},
}
Figure