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

Preparing to convert video

Conversion is not just a “one-and-done” script. It requires you to have turned a video into a series of frames and run C5-face_detection.py on those frames. This gets the data that you need for the conversion process in the right form. The conversion process will require the full extraction of every frame, as well as the face_alignments.json file that is generated by the extract process:

Figure 7.1 – Example of a folder that has been extracted already. Note the face_images folder created by the extract process

Figure 7.1 – Example of a folder that has been extracted already. Note the face_images folder created by the extract process

If you haven’t done the extract process on the video you want to convert, then you should go back to Chapter 5, Extracting Faces, and extract the video.

We need to do this because this is how the model knows which faces to convert. AI can detect all faces in a frame but won’t know which ones should be swapped, meaning that all faces will be swapped. By running the extract process and...

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