CPU Deepfake Tutorial (No Graphics Card Required!)

Deepfakery
14 Sept 202008:29

TLDRThis tutorial guides viewers through creating deepfake videos using only a CPU, without the need for a graphics card. It utilizes DeepFaceLab 2.0, focusing on optimized settings for CPU training. The process involves downloading and setting up the software, extracting images from videos, selecting and preparing face sets, training the deepfake model, and finally merging the faces to produce the final video. The tutorial emphasizes the use of specific batch files and settings within DeepFaceLab to achieve high-quality results.

Takeaways

  • 💻 Learn how to create deepfake videos using only a CPU, with no graphics card required.
  • 📂 Use DeepFaceLab 2.0, build 8 2 2020 for creating deepfakes on a Windows PC.
  • 📁 Download and install DeepFaceLab from GitHub, no setup is needed after extracting the files.
  • 📹 Organize your source and destination video clips in the 'data_src' and 'data_dst' folders.
  • 🔍 Extract images from videos using the '2 extract images from video data_src' and '3 extract images from video data_dst' batch files.
  • 🤖 Use the 'data_src face set extract' and 'data_dst face set extract' files to extract faces for the deepfake.
  • 📈 View and edit face sets with the '4.1 data_src view aligned result' and '5.1 data_dst view aligned results' files to refine the training data.
  • 🏋️‍♂️ Begin training the deepfake model using '6 train quick 96' and monitor the accuracy graph during training.
  • 🔄 Merge the trained faces onto the destination video using '7 merge quick 96' and adjust the erode and blur mask values for best results.
  • 🎞️ Compile the final deepfake video by merging the frames into a video file with the '8 merged to mp4' file.
  • 🎉 Congratulations, you've made a deepfake video! Experiment with training and merging settings to improve quality.

Q & A

  • What is the main topic of the video?

    -The main topic of the video is creating deepfake videos using only a CPU, without the need for a graphics card.

  • Which software is used in the tutorial?

    -DeepFaceLab 2.0, build 8 2 2020 is used in the tutorial.

  • What are the system requirements for running DeepFaceLab as per the tutorial?

    -The system requirement is a Windows PC with CPU resources available, and it's recommended to close all other applications using CPU resources.

  • How can one obtain DeepFaceLab software as mentioned in the video?

    -DeepFaceLab can be downloaded from the GitHub repository of iprov by selecting either the torrent magnet link or downloading from mega.nz.

  • What is the purpose of the 'workspace' folder in DeepFaceLab?

    -The 'workspace' folder in DeepFaceLab holds the images and trained model files for the deepfake process.

  • How does one extract images from a video in DeepFaceLab?

    -One can extract images from a video by double-clicking on the file labeled '2 extract images from video data src' and entering the desired frames per second for extraction.

  • What is the significance of the 'data_src' and 'data_dst' folders?

    -The 'data_src' folder contains the source video files, while 'data_dst' contains the destination video files used to produce face sets for the deepfake.

  • How can one adjust the image dimensions and quality during face extraction?

    -During face extraction, one can adjust the image dimensions by typing in a number that is a multiple of 256 and select the jpg quality, with the default setting recommended.

  • What is the role of the training step in creating a deepfake video?

    -The training step involves loading image files and running iterations to train the deepfake model, which is essential for generating a convincing face swap.

  • How does one merge the faces to create the final deepfake video?

    -The merging process is done by running the file labeled '7 merge quick 96', entering the model name, selecting the CPU, and using the interactive merger with keyboard commands to adjust settings and process frames.

  • What is the final step to complete the deepfake video creation?

    -The final step is to merge the new deepfake frames into a video file with the destination audio by double-clicking the file labeled '8 merged to mp4'.

Outlines

00:00

💻 Getting Started with Deepfake Creation

This paragraph introduces the process of creating deepfake videos using a CPU without the need for a graphics card. The tutorial utilizes DeepFaceLab 2.0, specifically build 8.2.2020, and requires a Windows PC with other applications closed to free up CPU resources. The video provides a step-by-step guide starting with downloading and installing DeepFaceLab from GitHub, setting up the workspace, and preparing video clips for face replacement. It covers extracting images from videos, selecting appropriate frame rates, and choosing image formats and dimensions for optimal processing. The paragraph also details the extraction of face sets from the source and destination videos, emphasizing the selection of face sizes and quality, and the adjustment of settings to manage data package size.

05:02

🔍 Reviewing and Training the Deepfake Model

The second paragraph delves into reviewing the extracted face sets and the training process of the deepfake model. It instructs on using specific files to view aligned results and remove unwanted faces to ensure the final video's quality. The training phase is initiated by running a training file, where the user can name the model and select the CPU for processing. The paragraph explains the use of a preview window to monitor training accuracy and provides keyboard commands for adjusting the model. It also covers the merging process to integrate the trained faces into the final video, including interactive merging settings and the use of commands to refine the deepfake appearance. The paragraph concludes with the final step of merging the deepfake frames into a video file with destination audio, resulting in a completed deepfake video that can be viewed and further refined.

Mindmap

Keywords

💡Deepfake

A deepfake is a synthetic media in which a person's likeness is superimposed onto another person's body in an image or video. This is typically done using artificial intelligence and machine learning algorithms. In the context of the video, deepfakes are created by training a model to replace the face in a video with another person's face, as demonstrated by the tutorial.

💡CPU

CPU stands for Central Processing Unit, which is the primary component of a computer that performs most of the processing inside the computer. The video emphasizes creating deepfakes using only the CPU, without the need for a dedicated graphics card, which is often used for such tasks due to its parallel processing capabilities.

💡Deep Face Lab

Deep Face Lab is a software tool used for creating deepfakes. In the video, Deep Face Lab 2.0 is specifically mentioned as the software that will be used to create deepfake videos. It is noted for its ability to run on a CPU, which is a key point of the tutorial.

💡Quick 96 Preset Trainer

This is a preset within Deep Face Lab that is used to train the deepfake model quickly. The 'Quick 96' likely refers to a balance between speed and quality, with '96' possibly indicating a specific configuration or version of the preset. The video mentions using this preset with lowered settings to accommodate CPU-only training.

💡Windows PC

A Windows PC refers to a personal computer that uses the Windows operating system. The video specifies that the tutorial is for users with access to a Windows PC, as the software and processes demonstrated are designed to be used on this platform.

💡Batch Files

Batch files are scripts in Windows that execute a series of commands. In the context of the video, batch files are used to automate various steps in the deepfake creation process, such as extracting images from videos and merging the final deepfake frames into a video file.

💡Face Sets

Face sets refer to collections of facial images that are extracted from videos and used to train the deepfake model. The video describes the process of extracting face sets from both the source and destination videos, which are essential for creating a convincing deepfake.

💡Model Training

Model training in the context of deepfakes involves feeding the software a set of images (face sets) so that it can learn to map one face onto another. The video walks through the steps of training a model using Deep Face Lab, which includes monitoring the accuracy and adjusting settings to improve the deepfake.

💡Interactive Merger

The interactive merger is a feature within Deep Face Lab used to fine-tune the merging of the deepfake face onto the destination video. The video mentions using this tool to adjust settings such as the erode and blur mask values to ensure a seamless integration of the fake face into the video.

💡FPS (Frames Per Second)

Frames per second (FPS) is a measure of how many individual frames are displayed in one second of video. The video script mentions setting FPS when extracting images from videos, which affects the number of images (and thus processing time and resources) that will be generated.

💡Merging

Merging in the context of the video refers to the final step of combining the trained deepfake face with the destination video to create the final video output. This involves aligning the deepfake face with the destination video's frames and ensuring a natural appearance.

Highlights

Learn to create deepfake videos using only a CPU, no graphics card required.

Use DeepFaceLab 2.0 build 8 2 2020 for creating deepfakes.

Ensure a Windows PC is available and close other CPU-intensive applications.

Download and install DeepFaceLab from GitHub.

Extract images from video using a specified frames per second rate.

Choose between .png or .jpg file types for image extraction.

Extract face sets for the deepfake using the CPU.

Select face size and image dimensions for the deepfake model.

View and edit face sets to remove unwanted or incorrect faces.

Begin training the deepfake model with the Quick 96 preset.

Monitor training accuracy and preview model images.

Save and exit the training process to continue later if needed.

Merge the faces to create the final deepfake video.

Use interactive merger settings to fine-tune the deepfake.

Adjust erode and blur mask values for a more realistic deepfake.

Merge the deepfake frames into a video file with destination audio.

View the completed deepfake video and assess the quality.

Restart training to improve the deepfake quality if necessary.

Experiment with merger settings to achieve desired deepfake results.