Hi,

In our previous post, GAN Training Challenges: DCGAN for Color Images, you learned about the challenges with training GANs. Check out our new tutorial by Margaret Maynard-Reid, Anime Faces with WGAN and WGAN-GP, to learn how to address the training instability with the Wasserstein loss and generate colorful 64×64 anime faces.

Image

We discuss the key concepts introduced by Wasserstein GAN (WGAN): Wasserstein distance, Wasserstein loss, and a critic that meets the 1-Lipschitz constraint with weight clipping. Afterward, we walk through step by step how to implement the WGAN in TensorFlow 2 / Keras. 

The tutorial also discusses how to improve WGAN with a few changes to make Wasserstein GAN with Gradient Penalty (WGAN-GP). Using gradient penalty to constraint the 1-Lipschitz constraint resulted in much more stable training and better quality for the generated images. 

Click here to read the full tutorial

This lesson is part of PyImageSearch University, our flagship product that provides the full code, a video walkthrough of the code, and a Colab notebook for this and all lessons.

Click here to join PyImageSearch University

Have fun learning! 
 

The PyImageSearch Team 

P.S. PyImageSearch University helps you master computer vision, deep learning, and OpenCV with content from experts. It has 35+ courses (updated regularly), 39+ hours of on-demand video, and access to centralized code repos for all 500+ tutorials on the PyImageSearch blog. In addition, you can follow each lesson easily with code in Colab notebooks in a web browser on any OS.