Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Cover image for A guide into deepfakes
Akash Pattnaik
Akash Pattnaik

Posted on

     

A guide into deepfakes

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 todeepfakes/faceswap and install all the stuff that it asks you to do and then open the terminal with infaceswap env from anaconda.

  • Start Terminal

Followthese 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 whichA 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📁
Enter fullscreen modeExit fullscreen mode

👾 Extracting Faces

Launch the GUI interface with the commandpython faceswap.py gui in the anaconda prompt.

Extract the faces of videoA tofolder A and same as toB

  • Extracting Faces

👟 Training Model

The Input refers to the folder containing the faces ["A", "B"].

Chose theModel Dir as the empty Model Folder in the project directory.

Training Model

⚠️ 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 ofA andB, 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, thusB.

Chose theModel Dir as the Model directory in the project. This is the trained data of the faces.
Chode theOutput Dir as the output directory in the Project.

  • Output Generation

Top comments(2)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss
CollapseExpand
 
newdev0 profile image
Devesh Pal
  • Joined

Please don't use it for faking someone's identity

CollapseExpand
 
akashpattnaik profile image
Akash Pattnaik
19 y/o student from India.

How did you know my plan to put your face on adult stars...

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

19 y/o student from India.
  • Location
    India
  • Education
    D.A.V Public School
  • Pronouns
    he/him
  • Work
    switch.pe
  • Joined

More fromAkash Pattnaik

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp