# deepfakes_faceswap
<p align="center">
<a href="https://faceswap.dev"><img src="https://i.imgur.com/zHvjHnb.png"></img></a>
<br />FaceSwap is a tool that utilizes deep learning to recognize and swap faces in pictures and videos.
</p>
<p align="center">
<img src = "https://i.imgur.com/nWHFLDf.jpg"></img>
</p>
<p align="center">
<a href="https://www.patreon.com/bePatron?u=23238350"><img src="https://c5.patreon.com/external/logo/become_a_patron_button.png"></img></a>
<a href="https://discord.gg/FC54sYg"><img src="https://i.imgur.com/gIpztkv.png"></img></a></p>
<p align="center">
<a href="https://www.dailymotion.com/video/x810mot"><img src="https://user-images.githubusercontent.com/36920800/178301720-b69841bb-a1ca-4c20-91db-a2a10f5692ca.png"></img></a>
<br />Emma Stone/Scarlett Johansson FaceSwap using the Phaze-A model
</p>
<p align="center">
<a href="https://www.youtube.com/watch?v=r1jng79a5xc"><img src="https://img.youtube.com/vi/r1jng79a5xc/0.jpg"></img></a>
<br />Jennifer Lawrence/Steve Buscemi FaceSwap using the Villain model
</p>
![Build Status](https://github.com/deepfakes/faceswap/actions/workflows/pytest.yml/badge.svg) [![Documentation Status](https://readthedocs.org/projects/faceswap/badge/?version=latest)](https://faceswap.readthedocs.io/en/latest/?badge=latest)
Make sure you check out [INSTALL.md](INSTALL.md) before getting started.
- [deepfakes_faceswap](#deepfakes_faceswap)
- [Manifesto](#manifesto)
- [FaceSwap has ethical uses.](#faceswap-has-ethical-uses)
- [How To setup and run the project](#how-to-setup-and-run-the-project)
- [Overview](#overview)
- [Extract](#extract)
- [Train](#train)
- [Convert](#convert)
- [GUI](#gui)
- [General notes:](#general-notes)
- [Help I need support!](#help-i-need-support)
- [Discord Server](#discord-server)
- [FaceSwap Forum](#faceswap-forum)
- [Donate](#donate)
- [Patreon](#patreon)
- [One time Donations](#one-time-donations)
- [@torzdf](#torzdf)
- [@andenixa](#andenixa)
- [How to contribute](#how-to-contribute)
- [For people interested in the generative models](#for-people-interested-in-the-generative-models)
- [For devs](#for-devs)
- [For non-dev advanced users](#for-non-dev-advanced-users)
- [For end-users](#for-end-users)
- [For haters](#for-haters)
- [About github.com/deepfakes](#about-githubcomdeepfakes)
- [What is this repo?](#what-is-this-repo)
- [Why this repo?](#why-this-repo)
- [Why is it named 'deepfakes' if it is not /u/deepfakes?](#why-is-it-named-deepfakes-if-it-is-not-udeepfakes)
- [What if /u/deepfakes feels bad about that?](#what-if-udeepfakes-feels-bad-about-that)
- [About machine learning](#about-machine-learning)
- [How does a computer know how to recognize/shape faces? How does machine learning work? What is a neural network?](#how-does-a-computer-know-how-to-recognizeshape-faces-how-does-machine-learning-work-what-is-a-neural-network)
# Manifesto
## FaceSwap has ethical uses.
When faceswapping was first developed and published, the technology was groundbreaking, it was a huge step in AI development. It was also completely ignored outside of academia because the code was confusing and fragmentary. It required a thorough understanding of complicated AI techniques and took a lot of effort to figure it out. Until one individual brought it together into a single, cohesive collection. It ran, it worked, and as is so often the way with new technology emerging on the internet, it was immediately used to create inappropriate content. Despite the inappropriate uses the software was given originally, it was the first AI code that anyone could download, run and learn by experimentation without having a Ph.D. in math, computer theory, psychology, and more. Before "deepfakes" these techniques were like black magic, only practiced by those who could understand all of the inner workings as described in esoteric and endlessly complicated books and papers.
"Deepfakes" changed all that and anyone could participate in AI development. To us, developers, the release of this code opened up a fantastic learning opportunity. It allowed us to build on ideas developed by others, collaborate with a variety of skilled coders, experiment with AI whilst learning new skills and ultimately contribute towards an emerging technology which will only see more mainstream use as it progresses.
Are there some out there doing horrible things with similar software? Yes. And because of this, the developers have been following strict ethical standards. Many of us don't even use it to create videos, we just tinker with the code to see what it does. Sadly, the media concentrates only on the unethical uses of this software. That is, unfortunately, the nature of how it was first exposed to the public, but it is not representative of why it was created, how we use it now, or what we see in its future. Like any technology, it can be used for good or it can be abused. It is our intention to develop FaceSwap in a way that its potential for abuse is minimized whilst maximizing its potential as a tool for learning, experimenting and, yes, for legitimate faceswapping.
We are not trying to denigrate celebrities or to demean anyone. We are programmers, we are engineers, we are Hollywood VFX artists, we are activists, we are hobbyists, we are human beings. To this end, we feel that it's time to come out with a standard statement of what this software is and isn't as far as us developers are concerned.
- FaceSwap is not for creating inappropriate content.
- FaceSwap is not for changing faces without consent or with the intent of hiding its use.
- FaceSwap is not for any illicit, unethical, or questionable purposes.
- FaceSwap exists to experiment and discover AI techniques, for social or political commentary, for movies, and for any number of ethical and reasonable uses.
We are very troubled by the fact that FaceSwap can be used for unethical and disreputable things. However, we support the development of tools and techniques that can be used ethically as well as provide education and experience in AI for anyone who wants to learn it hands-on. We will take a zero tolerance approach to anyone using this software for any unethical purposes and will actively discourage any such uses.
# How To setup and run the project
FaceSwap is a Python program that will run on multiple Operating Systems including Windows, Linux, and MacOS.
See [INSTALL.md](INSTALL.md) for full installation instructions. You will need a modern GPU with CUDA support for best performance. AMD GPUs are partially supported.
# Overview
The project has multiple entry points. You will have to:
- Gather photos and/or videos
- **Extract** faces from your raw photos
- **Train** a model on the faces extracted from the photos/videos
- **Convert** your sources with the model
Check out [USAGE.md](USAGE.md) for more detailed instructions.
## Extract
From your setup folder, run `python faceswap.py extract`. This will take photos from `src` folder and extract faces into `extract` folder.
## Train
From your setup folder, run `python faceswap.py train`. This will take photos from two folders containing pictures of both faces and train a model that will be saved inside the `models` folder.
## Convert
From your setup folder, run `python faceswap.py convert`. This will take photos from `original` folder and apply new faces into `modified` folder.
## GUI
Alternatively, you can run the GUI by running `python faceswap.py gui`
# General notes:
- All of the scripts mentioned have `-h`/`--help` options with arguments that they will accept. You're smart, you can figure out how this works, right?!
NB: there is a conversion tool for video. This can be accessed by running `python tools.py effmpeg -h`. Alternatively, you can use [ffmpeg](https://www.ffmpeg.org) to convert video into photos, process images, and convert images back to the video.
**Some tips:**
Reusing existing models will train much f
没有合适的资源?快使用搜索试试~ 我知道了~
深度换脸技术代码faceswap-2.10.0
共487个文件
py:259个
png:47个
rst:41个
2 下载量 167 浏览量
2024-01-30
14:16:19
上传
评论
收藏 1.63MB ZIP 举报
温馨提示
深度换脸技术代码FaceSwap是一个Python程序,将在包括Windows、Linux和MacOS在内的多个操作系统上运行。 将需要一个具有CUDA支持的现代GPU以获得最佳性能。部分支持AMD GPU。 该项目有多个入口点。您必须: 收集照片和/或视频 从原始照片中提取人脸 根据从照片/视频中提取的人脸训练模型 使用模型转换源。
资源推荐
资源详情
资源评论
收起资源包目录
深度换脸技术代码faceswap-2.10.0 (487个子文件)
setup.cfg 1KB
Dockerfile.cpu 624B
.dockerignore 33B
.gitignore 1KB
Dockerfile.gpu 1KB
fs_logo.ico 142KB
fs_logo.ico 104KB
fs_logo_32.ico 104KB
default.json 6KB
model_phaze_a_sym384_preset.json 1KB
model_phaze_a_dny1024_preset.json 1KB
model_phaze_a_dny256_preset.json 1KB
model_phaze_a_dny512_preset.json 1KB
model_phaze_a_stojo_preset.json 1KB
model_phaze_a_dfl-sae-liae_preset.json 1KB
model_phaze_a_original_preset.json 1KB
model_phaze_a_dfl-sae-df_preset.json 1KB
model_phaze_a_dfl-h128_preset.json 1KB
model_phaze_a_dfaker_preset.json 1KB
model_phaze_a_dfl-saehd-liae_preset.json 1KB
model_phaze_a_iae_preset.json 1KB
model_phaze_a_dfl-saehd-df_preset.json 1KB
model_phaze_a_lightweight_preset.json 1KB
.keep 0B
.keep 0B
.keep 0B
.keep 0B
.keep 0B
.keep 0B
LICENSE 34KB
INSTALL.md 17KB
README.md 13KB
USAGE.md 12KB
CODE_OF_CONDUCT.md 3KB
ISSUE_TEMPLATE.md 1KB
bug_report.md 1KB
feature_request.md 595B
LICENSE.md 147B
lib.cli.args.mo 62KB
plugins.train._config.mo 52KB
lib.cli.args.mo 47KB
lib.cli.args.mo 46KB
tools.sort.cli.mo 20KB
tools.sort.cli.mo 15KB
tools.sort.cli.mo 15KB
tools.alignments.cli.mo 15KB
tools.mask.cli.mo 13KB
tools.alignments.cli.mo 12KB
tools.alignments.cli.mo 11KB
tools.manual.mo 11KB
tools.mask.cli.mo 10KB
tools.mask.cli.mo 10KB
plugins.extract._config.mo 9KB
tools.effmpeg.cli.mo 8KB
tools.manual.mo 8KB
tools.manual.mo 8KB
tools.effmpeg.cli.mo 7KB
tools.effmpeg.cli.mo 6KB
gui.tooltips.mo 6KB
gui.tooltips.mo 5KB
gui.tooltips.mo 4KB
tools.model.cli.mo 4KB
tools.model.cli.mo 3KB
tools.model.cli.mo 3KB
gui.menu.mo 3KB
tools.preview.mo 3KB
tools.preview.mo 2KB
tools.preview.mo 2KB
gui.menu.mo 1KB
gui.menu.mo 1KB
lib.config.mo 1KB
faceswap.mo 1KB
faceswap.mo 886B
faceswap.mo 885B
install.nsi 14KB
MultiDetailPrint.nsi 2KB
settings_convert.png 8KB
reload.png 8KB
reload2.png 8KB
settings.png 8KB
clear2.png 7KB
logo.png 7KB
clear.png 7KB
settings_extract.png 7KB
graph.png 6KB
move.png 6KB
settings_train.png 6KB
zoom.png 6KB
mask2.png 6KB
start.png 6KB
erase.png 5KB
model.png 5KB
picture.png 5KB
save_as2.png 5KB
save_as.png 5KB
end.png 5KB
beginning.png 5KB
stop.png 5KB
landmarks.png 5KB
mask.png 5KB
共 487 条
- 1
- 2
- 3
- 4
- 5
资源评论
技术探秘者
- 粉丝: 1083
- 资源: 48
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功