20.03.2021 Views

Deep-Learning-with-PyTorch

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

A pretrained model that fakes it until it makes it

29

GENERATOR

REAL

IMAGES

DISCRIMINATOR

REAL!

FAKE!

GETS BETtER

AT MAKING

STUFf UP

GENERATED

IMAGE

GETS BETtER

AT NOT BEING

FOoLED

DISCRIMINATOR WINS

LOoKS

LEGIT!

GENERATOR WINS

Figure 2.5

Concept of a GAN game

2.2.2 CycleGAN

An interesting evolution of this concept is the CycleGAN. A CycleGAN can turn

images of one domain into images of another domain (and back), without the need

for us to explicitly provide matching pairs in the training set.

In figure 2.6, we have a CycleGAN workflow for the task of turning a photo of a

horse into a zebra, and vice versa. Note that there are two separate generator networks,

as well as two distinct discriminators.

INPUT

G A2B

D B

D A

G B2A

REAL

ZEBRA!

REAL

HORSE!

...SAME PROCESs STARTING

FROM ZEBRA...

Figure 2.6

A CycleGAN trained to the point that it can fool both discriminator networks

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!