Chapter 9. CycleGAN

 

This chapter covers

  • Expanding on the idea of Conditional GANs by conditioning on an entire image
  • Exploring one of the most powerful and complex GAN architectures: CycleGAN
  • Presenting an object-oriented design of GANs and the architecture of its four main components
  • Implementing a CycleGAN to run a conversion of apples to oranges

Finally, a technological breakthrough of almost universal appeal, seeing as everyone seems to love comparing apples to oranges. In this chapter, you will learn how! But this is no small feat, so we will need at least two sets of Discriminators and two Generators to achieve this. That obviously complicates the architecture, so we will have to spend more time discussing it, but at the very least, it is a great point to start thinking in a fully object-oriented programming (OOP) way.

9.1. Image-to-image translation

One fascinating area of GANs’ application that we touched on at the end of the previous chapter is image-to-image translation. In this use, GANs have been massively successful—in video, static images, or even style transfer. Indeed, GANs have been at the forefront of many of these applications as they enable almost a new class of uses. Because of their visual nature, the more successful GAN variants typically make their rounds on YouTube and Twitter, so if you have not seen these videos, we encourage you to check them out by searching for pix2pix, CycleGAN, or vid2vid.

9.2. Cycle-consistency loss: There and back aGAN

 
 
 

9.3. Adversarial loss

 
 
 

9.4. Identity loss

 
 
 
 

9.5. Architecture

 
 

9.5.1. CycleGAN architecture: building the network

 
 

9.5.2. Generator architecture

 

9.5.3. Discriminator architecture

 

9.6. Object-oriented design of GANs

 
 
 
 

9.7. Tutorial: CycleGAN

 
 
 
 

9.7.1. Building the network

 
 

9.7.2. Building the Generator

 

9.7.3. Building the Discriminator

 

9.7.4. Training the CycleGAN

 
 
 

CycleGAN training algorithm

 
 

9.7.5. Running CycleGAN

 
 

9.8. Expansions, augmentations, and applications

 

9.8.1. Augmented CycleGAN

 
 

9.8.2. Applications

 
 
 
 

Summary

 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage