# 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>
![Screenshots](https://i.imgur.com/nWHFLDf.jpg)
<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>
Make sure you check out [INSTALL.md](INSTALL.md) before getting started.
- [deepfakes_faceswap](#deepfakesfaceswap)
- [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)
- [@torzdf](#torzdf)
- [@andenixa](#andenixa)
- [@kvrooman](#kvrooman)
- [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 faster than starting from nothing.
If there is not enough training data, start with someone who looks similar, then switch the data.
# Help I need support!
## Discord Server
Your best bet is to join the [FaceSwap Discord server](https://discord.gg/FdEwxXd) where there are plenty of users willing to help. Please note that, like this repo, this is a SFW Server!
## FaceSwap Forum
Alternatively, you can post questions in the [FaceSwap Forum](https://faceswap.dev/forum). Please do not post general support questions in this repo as they are liable to be deleted without response.
# Donate
The developers work tirelessly to improve and develop FaceSwap. Many hours have been put in to provide the software as it is today, but this is an extremely time-consuming process with no financial reward. If you enjoy using the software, please consider donating to the devs, s
没有合适的资源?快使用搜索试试~ 我知道了~
Python-Faceswap一个利用深度学习识别和交换图片与视频中脸部的工具
共175个文件
py:143个
png:9个
md:7个
需积分: 40 18 下载量 91 浏览量
2019-08-11
07:40:46
上传
评论
收藏 456KB ZIP 举报
温馨提示
Faceswap 一个利用深度学习识别和交换图片与视频中脸部的工具
资源推荐
资源详情
资源评论
收起资源包目录
Python-Faceswap一个利用深度学习识别和交换图片与视频中脸部的工具 (175个子文件)
setup.cfg 58B
Dockerfile.cpu 423B
.dockerignore 16B
.gitignore 339B
Dockerfile.gpu 791B
fs_logo.ico 104KB
git_install.inf 388B
.keep 0B
.keep 0B
.keep 0B
.keep 0B
.keep 0B
LICENSE 34KB
INSTALL.md 13KB
USAGE.md 12KB
README.md 12KB
CODE_OF_CONDUCT.md 3KB
ISSUE_TEMPLATE.md 1KB
bug_report.md 834B
feature_request.md 595B
install.nsi 13KB
MultiDetailPrint.nsi 2KB
logo.png 4KB
reset.png 773B
clear.png 691B
zoom.png 642B
graph.png 574B
move.png 550B
save.png 530B
open_file.png 406B
open_folder.png 263B
cli.py 58KB
jobs.py 49KB
utils.py 47KB
preview.py 42KB
jobs_manual.py 41KB
losses.py 37KB
_base.py 36KB
cli.py 33KB
display_analysis.py 32KB
setup.py 32KB
mtcnn.py 31KB
_base.py 31KB
convert.py 31KB
sort.py 29KB
effmpeg.py 25KB
training_data.py 23KB
command.py 22KB
stats.py 21KB
utils.py 20KB
fsmedia.py 19KB
memory_saving_gradients.py 19KB
multithreading.py 19KB
wrapper.py 18KB
alignments.py 15KB
config.py 14KB
_base.py 14KB
nn_blocks.py 14KB
train.py 14KB
media.py 14KB
sysinfo.py 13KB
display_graph.py 13KB
layers.py 13KB
display_command.py 12KB
normalization.py 12KB
pipeline.py 11KB
fan_amd.py 11KB
faces_detect.py 11KB
s3fd.py 11KB
extract.py 11KB
popup_configure.py 10KB
menu.py 10KB
options.py 10KB
convert.py 10KB
_base.py 10KB
gpu_stats.py 10KB
display_page.py 10KB
fan.py 9KB
realface.py 8KB
face_filter.py 8KB
color_transfer.py 8KB
plaidml_tools.py 8KB
aligner.py 8KB
initializers.py 8KB
ffmpeg_defaults.py 7KB
cv2_dnn.py 7KB
unbalanced.py 7KB
ffmpeg.py 7KB
backup_restore.py 7KB
_base.py 6KB
masks.py 6KB
logger.py 6KB
pillow_defaults.py 6KB
unbalanced_defaults.py 6KB
realface_defaults.py 6KB
manual_balance_defaults.py 6KB
original_defaults.py 6KB
sharpen_defaults.py 5KB
vgg_face.py 5KB
_config.py 5KB
共 175 条
- 1
- 2
资源评论
weixin_39840588
- 粉丝: 448
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- TG-2024-04-26-183849310.mp4
- 汇编语言的概要介绍与分析
- 个人博客系统设计与开发.zip
- 2023-04-06-项目笔记 - 第一百十五阶段 - 4.4.2.113全局变量的作用域-113 -2024.04.26
- 2023-04-06-项目笔记 - 第一百十五阶段 - 4.4.2.113全局变量的作用域-113 -2024.04.26
- htmlzwbjq_downyi.com.zip
- 无头单向非循环链表的实现(Test.c)
- 无头单向非循环链表的实现(SList.c)
- 浏览器重定向插件更新文件
- SSA-BP麻雀算法优化BP神经网络多特征分类预测(Matlab实现完整源码和数据)
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功