您最近可能已经在互联网(rounds on the internet)上看到了一段尼古拉斯凯奇的脸被转换到另一个角色身上的视频。不,我们不是指电影Face/Off中的剪辑。这些都是尼古拉斯凯奇(Nicholas Cage)肯定没有出演的多部电影中的场景,但它们看起来确实很有说服力。他们是怎么做到的?
嗯,答案不是(answer isn)“巫术”,而是一种被称为“deepfake”的技术,它在各个行业和社区引起了不小的骚动。
什么是“深度伪造”?
“deepfake”这个词来自“深度学习”一词,当然还有“假”。深度学习(Deep learning)是
机器学习的一个专门分支,它又是(machine learning)人工智能(Artificial Intelligence)整个领域的一部分。
随着计算能力的急剧提高以及计算机处理和分析来自现实世界的大量数据的新发现方式,计算机现在可以突然完成我们大多数人无法想象的事情。Deepfakes应用这项技术来合成人类图像,创建人们从未做过和从未说过的事情的照片或视频。
Deepfake 技术是如何工作的?
(Deep learning)支持 deepfake 方法的深度学习描述了神经网络模拟在海量数据集上的现代应用。神经网络不是一个新概念或新技术(concept or technology),但直到现代它们还很初级。
人工神经网络至少在一定程度上模拟了生物大脑中发生的学习过程。(learning process)当你学习或以其他方式与外部世界打交道时,你的脑细胞之间的联系会发生变化。
它们形成电路和逻辑结构,加强一些联系,削弱另一些联系。当你掌握了一些东西,比如学习开车或打网球,这些大脑回路会变得快速而高效。最终,您在某事上是如此出色,以至于您甚至不必考虑去做。
这基本上与深度学习系统(learning system)发生的事情相同。它会查看大量示例,然后在“理解它”方面逐渐变得更好。
在 deepfakes 的情况下,该软件会查看您想要转置的面部示例以及您想要将其转置到的视频。通过足够的训练,它最终可以合成一张与训练数据匹配的人脸,然后将其无缝地叠加在任何其他人脸上。
什么软件(Software)用于制作 Deepfake?
有许多应用程序允许人们制作深度伪造。FakeApp是我们所知道的第一个旨在让普通人有机会制作 deepfake 内容的应用程序。该网站现在已经不存在了,找到一个副本一点也不容易。
deepfakes 的制造者现在已经在很大程度上转向了一个名为DeepFaceLab的应用程序,该应用程序托管在GitHub 上,并在(GitHub)Reddit等地方产生了源源不断的教程。
制作 Deepfake
这篇文章不是一个教程,所以我们将概述如何在实践中制作 deepfakes,但不提供如何自己制作的确切步骤。
造成这种情况的原因有几个,但主要原因是制造深度伪造的合法性备受争议。正如我们不会提供帮助您盗版软件或进行其他非法活动的确切步骤一样,我们也不会提供制作 deepfakes 的分步说明。
此外,DeepFaceLab的实际创建者发布了该软件的分步视频教程(step-by-step video tutorial),任何人都可以跟随,如果他们希望承担此类风险。
要了解这些东西有多好,请查看这个网站(check out this website),当您刷新页面时,会生成一张不存在的人的新照片。
我们的目标是帮助您了解这项技术,因为随着时间的推移,您一定会越来越多地遇到它。话虽如此,这些是使用DeepFaceLab(DeepFaceLab)创建 deepfake 的广泛阶段
。
下载并解压DeepFaceLab后,
您会看到一个包含许多其他文件夹和一系列批处理文件的文件夹。
有一个名为“workspace”的文件夹,其中包含训练模型、源视频(source videos)和输出。DeepFaceLab
使用特定的文件名和位置,以便批处理文件可以工作。例如,源文件(source file)始终命名为“data_src”,目标文件命名为“data_dst”。
没有大多数人都知道的软件界面。(software interface)只是代表过程步骤的编号批处理文件列表。首先(First)将源视频和目标视频(source and destination videos)的帧提取为图片文件。
然后运行几个分析步骤,然后是基于 GPU 的训练,其中神经网络了解它对两个视频中的人脸的需求来构建模型。最后产生一个新的复合视频。
滥用 Deepfake
正如我们上面提到的,deepfake 是非常有争议的。它可能违反一些国家的现行法律,并且正在制定新的法律来处理该技术及其应用。
Deepfakes 可用于制造恶作剧,例如总统说疯话的视频(video of a president saying crazy things)。它可以用来将人们插入色情电影,目的是骚扰(purpose or harassing)或以其他方式伤害他们。
正如您可能想象的那样,您可以通过令人信服的 deepfake 造成很多损害,如果您被抓到,后果可能会在不久的将来变得更加严重。
质疑一切
既然这项技术已经存在并且运行良好,这意味着我们必须以全新的眼光看待视频等媒体。如果有人在社交媒体上传播名人或政治家所说或做一些有争议的事情的视频,您首先必须询问该视频是否真实。
一旦你知道要寻找什么并且已经看过一些,大多数做得不好的深度伪造显然都是假的。然而,在某些情况下,即使是受过训练的眼睛也可能难以分辨出某种CG 操作(CG manipulation)正在发生,并且随着技术的改进,最终将变得不可能。
What is a Deepfake and How Are They Made?
You may have seen a video of Nicholas Сage’s face transpоsed onto another character doing the rounds on the internet recently. No, we don’t mean a clip from the movie Face/Off. These are scenes from various movies in which Nicholas Cage did definitely not play, yet they look very convincing indeed. How did they pull this off?
Well, the answer isn’t “witchcraft”, but a
technology that has been dubbed “deepfake” and it’s causing quite a ruckus in
various industries and communities.
What is a “Deepfake”?
The word “deepfake” comes from the term “deep
learning” and of course “fake”. Deep learning is a specialized branch of
machine learning, which is again part of
the overall area of Artificial Intelligence.
With the dramatic rise in computing power and
newly-discovered ways for computers to process and analyze massive amount of
data from the real world, computers can now suddenly do things most of us could
never imagine. Deepfakes apply this technology to synthesize human images,
creating photos or videos of things those people never did and never said.
How Does Deepfake Technology
Work?
Deep learning, which underpins deepfake
methods, describes the modern application of neural net simulation to massive
data sets. Neural nets are not a new concept or technology, but until modern
times they have been pretty rudimentary.
An artificial neural net simulates the learning process that happens in biological brains, at least to some extent. When you learn or otherwise deal with the outside world, the connections between your brain cells change.
They form circuits and logical structures, strengthening some connections and weakening others. As you master something, like learning to drive or play tennis, those brain circuits become fast and efficient. Eventually you are so good at something that you don’t even have to think about doing it.
That’s essentially the same thing that happens with a deep learning system. It looks at heaps of examples of something and then becomes progressively better at “understanding it”.
In the case of deepfakes the software looks at examples of the face you want to transpose as well as the video you want to transpose it to. With enough training it can eventually synthesize a face that matches the training data and then seamlessly overlay it on any other face.
What Software is Used to Make
Deepfakes?
There are a number of applications that allow
people to make deepfakes. FakeApp was the first app we know of aimed at giving
normal people a shot at making deepfake content. The website it now defunct and
finding a copy is not easy at all.
Makers of deepfakes have now largely moved on to an application called DeepFaceLab, which is hosted on GitHub and has spawned an endless stream of tutorials on places like Reddit.
Making a Deepfake
This article is not meant to be a tutorial, so
we are going to provide an overview of how deepfakes are made in practice, but
not provide exact steps on how to make one yourself.
There are a few reasons for this, but the main
one is that the legality of making deepfakes is highly-contentious. Just as we
wouldn’t provide exact steps to help you pirate software or do other illegal
activities, we won’t give step-by-step instructions for making deepfakes.
Besides, the actual creator of DeepFaceLab has released a step-by-step video tutorial for the software which anyone can follow along, should they wish to take responsibility for such a risk.
To get a gist of how good this stuff has become, check out this website where a new photograph of a person who does not exist is generated when you refresh the page.
Our goal is to help you understand the
technology, since you are bound to encounter it more and more as time goes by.
With that being said, these are the broad phases of creating a deepfake with
DeepFaceLab.
After downloading and unzipping DeepFaceLab
you are faced with a folder containing many other folders and a series of batch
files.
There’s a folder called “workspace” which
contains the training models, the source videos and the output. DeepFaceLab
works with specific file names and locations, so that the batch files can work.
For example, the source file is always named “data_src” and the destination is
named “data_dst”.
There is no software interface as most people know it. Just a list of numbered batch files representing the steps of the process. First the source and destination videos have their frames extracted as picture files.
Then several analysis steps are run, followed by GPU-based training, where the neural net learns what it needs about the faces in the two videos to build a model. Finally a new composite video is produced.
Misuse of Deepfakes
As we mentioned above, deepfakes are very
controversial. It may violate existing laws in some countries and new laws are
in the works to deal with the technology and its applications.
Deepfakes can be used to create hoaxes, such as a video of a president saying crazy things. It can be used to insert people into pornographic films with the purpose or harassing or otherwise harming them.
As you can probably imagine, you could do a lot of damage with a convincing deepfake and the consequences if you are caught may become much more severe in the near future.
Question Everything
Now that this technology exists and works as
well as it does, it means we have to look at media like videos in a whole new
light. If someone circulates a video on social media of a famous person or
politician saying or doing something controversial, you’ll first have to ask if
the video is even real.
Most poorly-done deepfakes are obviously fake,
once you know what to look for and have seen a few. However, in some cases even
a trained eye may have trouble telling that some sort of CG manipulation is
happening and as the tech improves it will eventually become impossible.