Converting photos to paintings using a CycleGAN

Now we will learn how to implement a CycleGAN in TensorFlow. We will see how to convert pictures to paintings using a CycleGAN:

The dataset used in this section can be downloaded from https://people.eecs.berkeley.edu/~taesung_park/CycleGAN/datasets/monet2photo.zip. Once you have downloaded the dataset, unzip the archive; it will consist of four folders, trainA, trainB, testA, and testB, with training and testing images.

The trainA folder consists of paintings (Monet) and the trainB folder consists of photos. Since we are mapping photos (x) to the paintings (y), the trainB folder, which consists ...

Get Hands-On Deep Learning Algorithms with Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.