• Stars
    star
    27,272
  • Rank 716 (Top 0.02 %)
  • Language
    Python
  • License
    GNU General Publi...
  • Created over 1 year ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

one-click face swap

Take a video and replace the face in it with a face of your choice. You only need one image of the desired face. No dataset, no training.

You can watch some demos here. A StableDiffusion extension is also available, here.

demo-gif

Disclaimer

This software is meant to be a productive contribution to the rapidly growing AI-generated media industry. It will help artists with tasks such as animating a custom character or using the character as a model for clothing etc.

The developers of this software are aware of its possible unethical applicaitons and are committed to take preventative measures against them. It has a built-in check which prevents the program from working on inappropriate media including but not limited to nudity, graphic content, sensitive material such as war footage etc. We will continue to develop this project in the positive direction while adhering to law and ethics. This project may be shut down or include watermarks on the output if requested by law.

Users of this software are expected to use this software responsibly while abiding the local law. If face of a real person is being used, users are suggested to get consent from the concerned person and clearly mention that it is a deepfake when posting content online. Developers of this software will not be responsible for actions of end-users.

How do I install it?

Issues regarding installation will be closed from now on, we cannot handle the amount of requests.

  • Basic: It is more likely to work on your computer but it will also be very slow. You can follow instructions for the basic install here.

  • Acceleration: If you have a good GPU and are ready for solving any software issues you may face, you can enable GPU which is wayyy faster. To do this, first follow the basic install instructions given above and then follow GPU-specific instructions here.

How do I use it?

Note: When you run this program for the first time, it will download some models ~300MB in size.

Executing python run.py command will launch this window: gui-demo

Choose a face (image with desired face) and the target image/video (image/video in which you want to replace the face) and click on Start. Open file explorer and navigate to the directory you select your output to be in. You will find a directory named <video_title> where you can see the frames being swapped in realtime. Once the processing is done, it will create the output file. That's it.

Additional command line arguments are given below. To learn out what they do, check this guide.

options:
  -h, --help                                               show this help message and exit
  -s SOURCE_PATH, --source SOURCE_PATH                     select an source image
  -t TARGET_PATH, --target TARGET_PATH                     select an target image or video
  -o OUTPUT_PATH, --output OUTPUT_PATH                     select output file or directory
  --frame-processor FRAME_PROCESSOR [FRAME_PROCESSOR ...]  frame processors (choices: face_swapper, face_enhancer, ...)
  --keep-fps                                               keep original fps
  --keep-audio                                             keep original audio
  --keep-frames                                            keep temporary frames
  --many-faces                                             process every face
  --video-encoder {libx264,libx265,libvpx-vp9}             adjust output video encoder
  --video-quality [0-51]                                   adjust output video quality
  --max-memory MAX_MEMORY                                  maximum amount of RAM in GB
  --execution-provider {cpu} [{cpu} ...]                   available execution provider (choices: cpu, ...)
  --execution-threads EXECUTION_THREADS                    number of execution threads
  -v, --version                                            show program's version number and exit

Looking for a CLI mode? Using the -s/--source argument will make the run program in cli mode.

Credits

  • henryruhs: for being an irreplaceable contributor to the project
  • ffmpeg: for making video related operations easy
  • deepinsight: for their insightface project which provided a well-made library and models.
  • and all developers behind libraries used in this project.

More Repositories

1

XSStrike

Most advanced XSS scanner.
Python
13,111
star
2

Photon

Incredibly fast crawler designed for OSINT.
Python
10,869
star
3

Arjun

HTTP parameter discovery suite.
Python
5,093
star
4

AwesomeXSS

Awesome XSS stuff
JavaScript
4,730
star
5

sd-webui-roop

roop extension for StableDiffusion web-ui
Python
3,349
star
6

Smap

a drop-in replacement for Nmap powered by shodan.io
Go
2,860
star
7

Striker

Striker is an offensive information and vulnerability scanner.
Python
2,213
star
8

be-a-hacker

roadmap for a self-taught hacker
1,839
star
9

ReconDog

Reconnaissance Swiss Army Knife
Python
1,776
star
10

Hash-Buster

Crack hashes in seconds.
Python
1,716
star
11

huepy

Print awesomely in terminals.
Python
1,462
star
12

Corsy

CORS Misconfiguration Scanner
Python
1,335
star
13

uro

declutters url lists for crawling/pentesting
Python
1,105
star
14

Silver

Mass scan IPs for vulnerable services
Python
1,024
star
15

Decodify

Detect and decode encoded strings, recursively.
Python
864
star
16

Diggy

Extract endpoints from apk files.
Shell
862
star
17

Blazy

Blazy is a modern login bruteforcer which also tests for CSRF, Clickjacking, Cloudflare and WAF .
Python
833
star
18

Breacher

An advanced multithreaded admin panel finder written in python.
Python
717
star
19

ote

Generate Email, Register for anything, Get the OTP/Link
Python
569
star
20

goop

Google Search Scraper
Python
564
star
21

Parth

Heuristic Vulnerable Parameter Scanner
Python
559
star
22

Zen

Find emails of Github users
Python
553
star
23

Bolt

CSRF Scanner
Python
532
star
24

Orbit

Blockchain Transactions Investigation Tool
Python
524
star
25

JShell

JShell - Get a JavaScript shell with XSS.
Python
506
star
26

MyPapers

Repository for hosting my research papers
Python
498
star
27

Cloak

Cloak can backdoor any python script with some tricks.
Python
479
star
28

nano

Nano is a family of PHP web shells which are code golfed for stealth.
PHP
431
star
29

sqlmate

A friend of SQLmap which will do what you always expected from SQLmap.
Python
424
star
30

SubGPT

Find subdomains with GPT, for free
Python
332
star
31

dump

Stuff that doesn't deserves its own repository.
Python
300
star
32

hardcodes

find hardcoded strings from source code
Python
273
star
33

Quark

Quark is a data visualization framework.
JavaScript
213
star
34

proxify

A python module for dumping usable proxies.
Python
152
star
35

Predator

Anti-Automation System
CSS
120
star
36

Shiva

Improved DOS exploit for wordpress websites (CVE-2018-6389)
Python
112
star
37

velocity

DNS caching for humans
Python
89
star
38

ifnude

nudity detector that works
Python
83
star
39

zetanize

HTML form parser for humans.
Python
73
star
40

rewise

Google auto-complete wrapper
Python
73
star
41

Locky

Locky generates "really" strong yet easy to remember passwords.
Python
63
star
42

Entropy

Entropy is a (prototype) WAF driven by maths.
Python
54
star
43

meta

Explains and tests HTTP response headers
Python
39
star
44

fonetic-go

golang implementation of fonetic (https://github.com/s0md3v/fonetic)
Go
37
star
45

fonetic

assess pronounciblity of text
Python
33
star
46

shades

Shell
26
star
47

wl

convert case style of words
Go
21
star
48

s0md3v.github.io

my personal blog
SCSS
15
star
49

s0md3v

11
star
50

dishtance

JavaScript
6
star
51

.github

my default .github files
5
star
52

BG3-Mutant

Mod for Baldur's Gate 3 that adds a Mutant class to the game.
2
star