Generative Adversarial Networks Projects: Build next-generation generative models using TensorFlow and Keras
- Length: 316 pages
- Edition: 1
- Language: English
- Publisher: Packt Publishing
- Publication Date: 2019-01-31
- ISBN-10: 1789136679
- ISBN-13: 9781789136678
- Sales Rank: #1829299 (See Top 100 Books)
Explore various Generative Adversarial Network architectures using the Python ecosystem
Key Features
- Use different datasets to build advanced projects in the Generative Adversarial Network domain
- Implement projects ranging from generating 3D shapes to a face aging application
- Explore the power of GANs to contribute in open source research and projects
Book Description
Generative Adversarial Networks (GANs) have the potential to build next-generation models, as they can mimic any distribution of data. Major research and development work is being undertaken in this field since it is one of the rapidly growing areas of machine learning. This book will test unsupervised techniques for training neural networks as you build seven end-to-end projects in the GAN domain.
Generative Adversarial Network Projects begins by covering the concepts, tools, and libraries that you will use to build efficient projects. You will also use a variety of datasets for the different projects covered in the book. The level of complexity of the operations required increases with every chapter, helping you get to grips with using GANs. You will cover popular approaches such as 3D-GAN, DCGAN, StackGAN, and CycleGAN, and you’ll gain an understanding of the architecture and functioning of generative models through their practical implementation.
By the end of this book, you will be ready to build, train, and optimize your own end-to-end GAN models at work or in your own projects.
What you will learn
- Train a network on the 3D ShapeNet dataset to generate realistic shapes
- Generate anime characters using the Keras implementation of DCGAN
- Implement an SRGAN network to generate high-resolution images
- Train Age-cGAN on Wiki-Cropped images to improve face verification
- Use Conditional GANs for image-to-image translation
- Understand the generator and discriminator implementations of StackGAN in Keras
Who this book is for
If you’re a data scientist, machine learning developer, deep learning practitioner, or AI enthusiast looking for a project guide to test your knowledge and expertise in building real-world GANs models, this book is for you.
Table of Contents
- Introduction to Generative Adversarial Networks
- 3D-GAN – Generating Shapes Using GANs
- Face Aging Using Conditional GAN
- Generating Anime Characters Using DCGANs
- Using SRGANs to Generate Photo-Realistic Images
- StackGAN- Text to Photo-Realistic Image Synthesis
- CycleGAN- Turn Paintings into Photos
- Conditional GAN – Image-to-Image Translation Using Conditional Adversarial Networks
- Predicting the Future of GANs
Cover Title Page Copyright and Credits About Packt Contributors Table of Contents Preface Chapter 1: Introduction to Generative Adversarial Networks What is a GAN? What is a generator network? What is a discriminator network? Training through adversarial play in GANs Practical applications of GANs The detailed architecture of a GAN The architecture of the generator The architecture of the discriminator Important concepts related to GANs Kullback-Leibler divergence Jensen-Shannon divergence Nash equilibrium Objective functions Scoring algorithms The inception score The Fréchet inception distance Variants of GANs Deep convolutional generative adversarial networks StackGANs CycleGANs 3D-GANs Age-cGANs pix2pix Advantages of GANs Problems with training GANs Mode collapse Vanishing gradients Internal covariate shift Solving stability problems when training GANs Feature matching Mini-batch discrimination Historical averaging One-sided label smoothing Batch normalization Instance normalization Summary Chapter 2: 3D-GAN - Generating Shapes Using GANs Introduction to 3D-GANs 3D convolutions The architecture of a 3D-GAN The architecture of the generator network The architecture of the discriminator network Objective function Training 3D-GANs Setting up a project Preparing the data Download and extract the dataset Exploring the dataset What is a voxel? Loading and visualizing a 3D image Visualizing a 3D image A Keras implementation of a 3D-GAN The generator network The discriminator network Training a 3D-GAN Training the networks Saving the models Testing the models Visualizing losses Visualizing graphs Hyperparameter optimization Practical applications of 3D-GANs Summary Chapter 3: Face Aging Using Conditional GAN Introducing cGANs for face aging Understanding cGANs The architecture of the Age-cGAN The encoder network The generator network The discriminator network Face recognition network Stages of the Age-cGAN Conditional GAN training The training objective function Initial latent vector approximation Latent vector optimization Setting up the project Preparing the data Downloading the dataset Extracting the dataset A Keras implementation of an Age-cGAN The encoder network The generator network The discriminator network Training the cGAN Training the cGAN Initial latent vector approximation Latent vector optimization Visualizing the losses Visualizing the graphs Practical applications of Age-cGAN Summary Chapter 4: Generating Anime Characters Using DCGANs Introducing to DCGANs Architectural details of a DCGAN Configuring the generator network Configuring the discriminator network Setting up the project Downloading and preparing the anime characters dataset Downloading the dataset Exploring the dataset Cropping and resizing images in the dataset Implementing a DCGAN using Keras Generator Discriminator Training the DCGAN Loading the samples Building and compiling the networks Training the discriminator network Training the generator network Generating images Saving the model Visualizing generated images Visualizing losses Visualizing graphs Tuning the hyperparameters Practical applications of DCGAN Summary Chapter 5: Using SRGANs to Generate Photo-Realistic Images Introducing SRGANs The architecture of SRGANs The architecture of the generator network The architecture of the discriminator network The training objective function Content loss Pixel-wise MSE loss VGG loss Adversarial loss Setting up the project Downloading the CelebA dataset The Keras implementation of SRGAN The generator network The discriminator network VGG19 network The adversarial network Training the SRGAN Building and compiling the networks Training the discriminator network Training the generator network Saving the models Visualizing generated images Visualizing losses Visualizing graphs Practical applications of SRGANs Summary Chapter 6: StackGAN - Text to Photo-Realistic Image Synthesis Introduction to StackGAN Architecture of StackGAN The text encoder network The conditioning augmentation block Getting the conditioning augmentation variable Stage-I The generator network The discriminator network Losses for Stage-I of StackGAN Stack-II The generator network The discriminator network Losses for Stage-II of StackGAN Setting up the project Data preparation Downloading the dataset Extracting the dataset Exploring the dataset A Keras implementation of StackGAN Stage-I Text encoder network Conditional augmentation network The generator network The discriminator network The adversarial model Stage-II Generator network Downsampling blocks The residual blocks Upsampling Blocks The discriminator network Downsampling blocks The concatenation block The fully connected classifier Training a StackGAN Training the Stage-I StackGAN Loading the dataset Creating models Training the model Training the Stage-II StackGAN Loading the dataset Creating models Training the model Visualizing the generated images Visualizing losses Visualizing the graphs Practical applications of StackGAN Summary Chapter 7: CycleGAN - Turn Paintings into Photos An introduction to CycleGANs The architecture of a CycleGAN The architecture of the generator The architecture of the discriminator The training objective function Adversarial loss Cycle consistency loss Full objective function Setting up the project Downloading the dataset Keras implementation of CycleGAN The generator network The discriminator network Training the CycleGAN Loading the dataset Building and compiling the networks Creating and compiling an adversarial network Starting the training Training the discriminator networks Training the adversarial network Saving the model Visualizing the images generated Visualizing losses Visualizing the graphs Practical applications of CycleGANs Summary Further reading Chapter 8: Conditional GAN - Image-to-Image Translation Using Conditional Adversarial Networks Introducing Pix2pix The architecture of pix2pix The generator network The encoder network The decoder network The discriminator network The training objective function Setting up the project Preparing the data Visualizing images A Keras implementation of pix2pix The generator network The discriminator network The adversarial network Training the pix2pix network Saving the models Visualizing the generated images Visualizing the losses Visualizing the graphs Practical applications of a pix2pix network Summary Chapter 9: Predicting the Future of GANs Our predictions about the future of GANs Improving existing deep learning methods The evolution of the commercial applications of GANs Maturation of the GAN training process Potential future applications of GANs Creating infographics from text Generating website designs Compressing data Drug discovery and development GANs for generating text GANs for generating music Exploring GANs Summary Other Books You May Enjoy Index
Donate to keep this site alive
How to download source code?
1. Go to: https://github.com/PacktPublishing
2. In the Find a repository… box, search the book title: Generative Adversarial Networks Projects: Build next-generation generative models using TensorFlow and Keras
, sometime you may not get the results, please search the main title.
3. Click the book title in the search results.
3. Click Code to download.
1. Disable the AdBlock plugin. Otherwise, you may not get any links.
2. Solve the CAPTCHA.
3. Click download link.
4. Lead to download server to download.