FaceSwap is a tool that uses deep learning to identify and exchange faces in pictures and videos.
When faceswapping was first developed and released, the technology was groundbreaking and it was a big step in the development of AI. Outside of academia, it was also completely ignored because the code was messy and fragmented. It required a comprehensive understanding of complex AI technologies and a lot of effort was spent to solve it. Until one person put them together into one. It runs, works, just like new technologies that emerge on the internet, and it is quickly used to create inappropriate content. Despite the initial misuse of the software, it is the first AI code that anyone can download, run and learn through experiments without requiring a PhD in mathematics, computer theory, psychology, etc. Before “deep fakery,” these techniques were like witchcraft, and were used only by those who could understand all the internal workings described in books and papers of profound and infinite complexity.
"Deepfakes" has changed all this and anyone can participate in the development of artificial intelligence. For us developers, the release of this code provides an excellent learning opportunity.它使我们能够建立在他人开发的想法之上,与各种熟练的程序员合作,在学习新技能的同时进行人工智能实验,并最终为一项新兴技术做出贡献,随着技术的进步,这种技术只会得到更主流的应用.
Are there some people doing horrible things with similar software? Yes. Because of this, developers have always followed strict ethical standards. Many of us don't even use it to create videos, we just modify the code and see what it can do. Unfortunately, the media only focuses on the immoral use of this software. Unfortunately, that's the essence of how it was initially revealed to the public, but it doesn't represent why it was created, how we use it now, or what we see in the future. Like any technology, it can be used in good terms and abused.我们的目的是开发FaceSwap,使其滥用的可能性降到最低,同时最大限度地发挥其作为学习、实验工具的潜力,当然,还有作为合法的faceswapping工具的潜力.
我们不想诋毁名人或贬低任何人。 We are programmers, we are engineers, we are Hollywood special effects artists, we are activists, we are enthusiasts, we are humans. To achieve this goal, we feel it is time to give a standard explanation of this software.
我们非常困扰的事实,FaceSwap可以用于不道德和不体面的事情。然而,我们支持开发可在道德上使用的工具和技术,并为任何希望亲自学习人工智能的人提供人工智能方面的教育和经验。我们将对任何出于不道德目的使用本软件的人采取零容忍的态度,并将积极劝阻任何此类使用。
FaceSwap是一个Python程序,可以在多个操作系统上运行,包括Windows、Linux和MacOS。
INSTALL.md 参阅完整的安装说明。 You will need a modern GPU with CUDA to support optimal performance.部分支持AMD gpu。
项目有多个入口点。你必须: -收集照片和/或视频
See USAGE.md for more detailed instructions.
从安装文件夹中运行python faceswap.py extract 。这将采取照片从src文件夹和提取的面孔到extract文件夹。
从安装文件夹中运行python faceswap.py train 。这将从两个包含两张面孔照片的文件夹中拍摄照片,并训练一个模型,该模型将保存在models文件夹中。
从安装文件夹中运行python faceswap.py convert 。这将从“原始”文件夹中拍摄照片,并将新面孔应用到modified文件夹中。
另外,您可以通过运行来运行GUI python faceswap.py gui
-h / --help选项,它们的参数都是可以接受的。 You know, little loser! Also: There is a video conversion tool.这可以通过运行python tools.py effmpeg -h 。 Alternatively, you can use ffmpeg to convert videos to photos, process images, and convert images back to video.
一些技巧:重用现有的模型比从零开始训练要快得多。 如果没有足够的训练数据,就从长相相似的人开始,然后转换数据。