16.03.2021 Views

Advanced Deep Learning with Keras

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Cross-Domain GANs

In this chapter, we will explore the following:

• The principles of CycleGAN, including its implementation in Keras

• Example applications of CycleGAN, including the colorization of grayscale

images using the CIFAR10 dataset and style transfer as applied on MNIST

digits and Street View House Numbers (SVHN) [1] datasets

Principles of CycleGAN

Figure 7.1.1: Example of aligned image pair: left, original image and right, transformed image

using a Canny edge detector. Original photos were taken by the author.

Translating an image from one domain to another is a common task in computer

vision, computer graphics, and image processing. The preceding figure shows

edge detection which is a common image translation task. In this example, we can

consider the real photo (left) as an image in the source domain and the edge detected

photo (right) as a sample in the target domain. There are many other cross-domain

translation procedures that have practical applications such as:

• Satellite image to map

• Face image to emoji, caricature or anime

• Body image to the avatar

• Colorization of grayscale photos

• Medical scan to a real photo

• Real photo to an artist's painting

[ 204 ]

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

Saved successfully!

Ooh no, something went wrong!