Book Image

Exploring Deepfakes

By : Bryan Lyon, Matt Tora
Book Image

Exploring Deepfakes

By: Bryan Lyon, Matt Tora

Overview of this book

Applying Deepfakes will allow you to tackle a wide range of scenarios creatively. Learning from experienced authors will help you to intuitively understand what is going on inside the model. You’ll learn what deepfakes are and what makes them different from other machine learning techniques, and understand the entire process from beginning to end, from finding faces to preparing them, training the model, and performing the final swap. We’ll discuss various uses for face replacement before we begin building our own pipeline. Spending some extra time thinking about how you collect your input data can make a huge difference to the quality of the final video. We look at the importance of this data and guide you with simple concepts to understand what your data needs to really be successful. No discussion of deepfakes can avoid discussing the controversial, unethical uses for which the technology initially became known. We’ll go over some potential issues, and talk about the value that deepfakes can bring to a variety of educational and artistic use cases, from video game avatars to filmmaking. By the end of the book, you’ll understand what deepfakes are, how they work at a fundamental level, and how to apply those techniques to your own needs.
Table of Contents (15 chapters)
1
Part 1: Understanding Deepfakes
6
Part 2: Getting Hands-On with the Deepfake Process
10
Part 3: Where to Now?

Why data is important

Neural networks work by taking data that is known and processing it in order to train the deepfake AI (see Chapter 1, Surveying Deepfakes, for an explanation of the whole process). We call this set of data, simply enough, a dataset. To create a dataset, the data has to be processed and prepared for the neural network so that it has something to train with. In the case of deepfakes, we use faces, which need to be detected, aligned, and cleaned in order to create an effective dataset.

Without a properly formatted and prepared dataset, the neural network simply cannot be trained. There is another potential problem when it comes to generative networks like deepfakes – a poor quality dataset leads to poor swaps. Unfortunately, it’s hard to know at the beginning whether a dataset will produce a good swap or not. This is a skill that takes time to learn, and your first few deepfakes are unlikely to turn out well as you learn the importance of data.

...