Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Exploring Deepfakes

You're reading from  Exploring Deepfakes

Product type Book
Published in Mar 2023
Publisher Packt
ISBN-13 9781801810692
Pages 192 pages
Edition 1st Edition
Languages
Authors (2):
Bryan Lyon Bryan Lyon
Profile icon Bryan Lyon
Matt Tora Matt Tora
Profile icon Matt Tora
View More author details

Table of Contents (15) Chapters

Preface Part 1: Understanding Deepfakes
Chapter 1: Surveying Deepfakes Chapter 2: Examining Deepfake Ethics and Dangers Chapter 3: Acquiring and Processing Data Chapter 4: The Deepfake Workflow Part 2: Getting Hands-On with the Deepfake Process
Chapter 5: Extracting Faces Chapter 6: Training a Deepfake Model Chapter 7: Swapping the Face Back into the Video Part 3: Where to Now?
Chapter 8: Applying the Lessons of Deepfakes Chapter 9: The Future of Generative AI Index Other Books You May Enjoy

Summary

In this chapter, we trained a neural network to swap faces. To do this, we had to explore what convolutional layers are and then build a foundational upscaler layer. Then we built the three networks. We built the encoder, then two decoders. Finally, we trained the model itself, including loading and preparing images, and made sure we saved previews and the final weights.

First, we built the models of the neural networks that we were going to train to perform the face-swapping process. This was broken down into the upscaler, the shared encoder, and the two decoders. The upscaler is used to increase the size of the image by turning depth into a larger image. The encoder is used to encode the face image down into a smaller encoded space that we then pass to the decoders, which are responsible for re-creating the original image. We also looked at activation layers to understand why they’re helpful.

Next, we covered the training code. We created instances of the network...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}