Reader small image

You're reading from  Exploring Deepfakes

Product typeBook
Published inMar 2023
Reading LevelBeginner
PublisherPackt
ISBN-139781801810692
Edition1st Edition
Languages
Right arrow
Authors (2):
Bryan Lyon
Bryan Lyon
author image
Bryan Lyon

Bryan Lyon is a developer for Faceswap.
Read more about Bryan Lyon

Matt Tora
Matt Tora
author image
Matt Tora

Matt Tora is a developer for Faceswap.
Read more about Matt Tora

View More author details
Right arrow

Summary

In this chapter, we ran the convert process on a folder full of images, replacing the faces using a trained model. We also turned the images back into a video, including changes to account for frame rate and copying audio.

We started by going over how to prepare a video for conversion. The convert process requires data created by the extract process from Chapter 5, Extracting Faces, and a trained AI model from Chapter 6, Training a Deepfake Model. With all the parts from the previous chapters, we were ready to convert.

We then walked through the code for the conversion process. This involved looking at the initialization, where we covered getting the Python script ready to operate. We then loaded the AI models and got them set up to work on a GPU if we have one. Next, we got the data ready for us to convert the faces in each frame. Finally, we ran two nested loops, which processed every face in every frame, swapping them to the other face. This part gave us a folder filled...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Exploring Deepfakes
Published in: Mar 2023Publisher: PacktISBN-13: 9781801810692

Authors (2)

author image
Bryan Lyon

Bryan Lyon is a developer for Faceswap.
Read more about Bryan Lyon

author image
Matt Tora

Matt Tora is a developer for Faceswap.
Read more about Matt Tora