Generative AI with Python and TensorFlow 2
Harness the power of generative models to create images, text, and music
Joseph Babcock, Raghav Bali
- 488 Seiten
- English
- ePUB (handyfreundlich)
- Über iOS und Android verfügbar
Generative AI with Python and TensorFlow 2
Harness the power of generative models to create images, text, and music
Joseph Babcock, Raghav Bali
Über dieses Buch
Fun and exciting projects to learn what artificial minds can create
Key Features
- Code examples are in TensorFlow 2, which make it easy for PyTorch users to follow along
- Look inside the most famous deep generative models, from GPT to MuseGAN
- Learn to build and adapt your own models in TensorFlow 2.x
- Explore exciting, cutting-edge use cases for deep generative AI
Book Description
Machines are excelling at creative human skills such as painting, writing, and composing music. Could you be more creative than generative AI?
In this book, you'll explore the evolution of generative models, from restricted Boltzmann machines and deep belief networks to VAEs and GANs. You'll learn how to implement models yourself in TensorFlow and get to grips with the latest research on deep neural networks.
There's been an explosion in potential use cases for generative models. You'll look at Open AI's news generator, deepfakes, and training deep learning agents to navigate a simulated environment.
Recreate the code that's under the hood and uncover surprising links between text, image, and music generation.
What you will learn
- Export the code from GitHub into Google Colab to see how everything works for yourself
- Compose music using LSTM models, simple GANs, and MuseGAN
- Create deepfakes using facial landmarks, autoencoders, and pix2pix GAN
- Learn how attention and transformers have changed NLP
- Build several text generation pipelines based on LSTMs, BERT, and GPT-2
- Implement paired and unpaired style transfer with networks like StyleGAN
- Discover emerging applications of generative AI like folding proteins and creating videos from images
Who this book is for
This is a book for Python programmers who are keen to create and have some fun using generative models. To make the most out of this book, you should have a basic familiarity with math and statistics for machine learning.
Häufig gestellte Fragen
Information
8
Deepfakes with GANs
- Overview of the deepfakes technological landscape
- The different forms of deepfaking: replacement, re-enactment, and editing
- Key features leveraged by different architectures
- A high-level deepfakes workflow
- Swapping faces using autoencoders
- Re-enacting Obama's face movements using pix2pix
- Challenges and ethical issues
- A brief discussion of off-the-shelf implementations
Deepfakes overview
- Recreating history and famous personalities: There are a number of historical figures we would love to interact with and learn from. With the ability to manipulate and generate realistic content, deepfakes are just the right technology for such use cases. A large-scale experiment of this type was developed to bring famous surrealist painter Salvador Dali back to life. The Dali Museum, in collaboration with the ad agency GS&P, developed an exhibition entitled Dali Lives.2 The exhibition used archival footage and interviews to train a deepfake setup on thousands of hours of videos. The final outcome was a re-enactment of Dali's voice and facial expressions. Visitors to the museum were greeted by Dali, who then shared his life's stories with them. Toward the end, Dali even proposed a selfie with the visitors, and the output photographs were realistic selfies indeed.
- Movie translation: With the likes of Netflix becoming the norm these days, viewers are watching far more cross-lingual content than ever before. While subtitles and manual dubbing are viable options, they leave a lot to be desired. With deepfakes, using AI to autogenerate dubbed translations of any video is easier than ever. The social initiative known as Malaria Must Die created a powerful campaign leveraging a similar technique to help David Beckham, a famous footballer, speak in nine different languages to help spread awareness.3 Similarly, deepfakes have been used by a political party in India, where a candidate is seen speaking in different languages as part of his election campaign.4
- Fashion: Making use of GANs and other generative models to create new styles and fashion content is not new. With deepfakes, researchers, bloggers, and fashion houses are taking the fashion industry to new levels. We now have AI-generated digital models that are adorning new fashion line-ups and help in reducing costs. This technology is even being used to create renderings of models personalized to mimic a buyer's body type, to improve the chances of a purchase.5
- Video game characters: Video games have improved a lot over the years, with many modern games presenting cinema class graphics. Traditionally, human actors have been leveraged to create characters within such games. However, there is now a growing trend of using deepfakes and related technologies to develop characters and storylines. The developers of the game Call of Duty released a trailer showing former US president Ronald Reagan playing one of the characters in the game.6
- Stock images: Marketing flyers, advertisements, and official documents sometimes require certain individuals to be placed alongside the rest of t...