wanghinc
wanghinc

Reputation: 81

How to fine tune a pre-trained GAN?

I would like to fine tune a pre-trained GAN available online using my own images. For example, BigGAN, which was trained on ImageNet, can generate realistic images. However, I do not want to generate the classes of images in ImageNet. I want to generate artificial images of my own image sets. How can I fine tune the pre-train models? Is it the same as fine-tuning other neural networks like a CNN image classification model? Is just replacing/retrain the last few layers is enough? It would be nice if I have see some examples in code of Tensorflow/Keras. Thanks so much!

BigGAN https://tfhub.dev/deepmind/biggan-deep-256/1

Upvotes: 6

Views: 3794

Answers (1)

Gli
Gli

Reputation: 172

A couple of ways to do it is by:

  1. freezing the lower layers of the discriminator,
  2. changing the embeddings.

References:

  1. Mo S, Cho M, Shin J. Freeze the discriminator: a simple baseline for fine-tuning gans. arXiv preprint arXiv:2002.10964. 2020 Feb 25. https://arxiv.org/pdf/2002.10964.pdf Code: https://github.com/sangwoomo/FreezeD
  2. Li Q, Mai L, Alcorn MA, Nguyen A. A cost-effective method for improving and re-purposing large, pre-trained GANs by fine-tuning their class-embeddings. InProceedings of the Asian Conference on Computer Vision 2020. https://anhnguyen.me/project/biggan-am/ Code: https://github.com/qilimk/biggan-am

Upvotes: 1

Related Questions