Hello everyone, I'm Akash and I'm gonna guide you through the process of deepfake someone. Let's just get into it, you can get to know about deepfakes from google, I'm just gonna get right into it.
π» System Requirements
- Either a good GPU or CPU.
- Any operating system [
I'm using windows 11
] - A good data source
β Initializing
Head over to deepfakes/faceswap and install all the stuff that it asks you to do and then open the terminal with in faceswap
env from anaconda.
Follow these instructions to install and setup faceswap.
π Data Requirments
Deepfaking is a heavy and very long process. You need a large amount of data for the output to be remotely precise. So it's best if you get monologue videos and extract frames from them.
We will need 2 videos -
- A - The video of the person who's face you want to copy
- B - The video of a person on which A will be implemented into.
π Directory Setup
You need to create a new directory and the structure will be something like this -
FaceSwapProject
|--- A π
|--- B π
|--- A.mp4
|--- B.mp4
|--- Model π
|--- output π
πΎ Extracting Faces
Launch the GUI interface with the command python faceswap.py gui
in the anaconda prompt.
Extract the faces of video A to folder A and same as to B
π Training Model
The Input refers to the folder containing the faces ["A", "B"].
Chose the Model Dir as the empty Model Folder in the project directory.
β οΈ Important While Training
- Training time doesn't matter if you don't have a good data source.
- The more you train, the better the result.
- Stop looking at the loss of A and B, rather use the preview as the indicator to know when to stop the training.
Output β
In the output section, the input need the video in which the face is to be changed, thus B.
Chose the Model Dir as the Model directory in the project. This is the trained data of the faces.
Chode the Output Dir as the output directory in the Project.
Top comments (2)
Please don't use it for faking someone's identity
How did you know my plan to put your face on adult stars...