1 00:00:10,080 --> 00:00:18,780 Hello everyone, my name is Wang Yang, I am from Baidu, and I am very happy to come to DEF CON to share with you the new trends in the security industry. 2 00:00:18,780 --> 00:00:25,940 Today, I am going to introduce to you the work we do in the field of AI exchange chain detection. 3 00:00:29,660 --> 00:00:38,480 First of all, let me introduce to you how AI exchange chain is made and the technology behind it. 4 00:00:39,080 --> 00:00:44,040 Then I will introduce to you two methods of AI exchange chain detection. 5 00:00:50,860 --> 00:00:53,680 We already know how to exchange images or videos. 6 00:00:57,580 --> 00:01:05,720 In the past, we used Photoshop and other image editing software for manual operation. 7 00:01:05,860 --> 00:01:10,100 This requires certain skills for the operator. 8 00:01:10,560 --> 00:01:13,300 This process takes time and effort. 9 00:01:21,800 --> 00:01:25,160 Now, we have DeepFake. 10 00:01:25,300 --> 00:01:27,160 This is a technology that appeared at the end of 2017. 11 00:01:28,590 --> 00:01:31,500 It can automatically exchange images or videos. 12 00:01:33,510 --> 00:01:35,100 The efficiency is greatly improved. 13 00:01:36,200 --> 00:01:44,220 As long as the operator has a GPU machine, they can train the model and make it themselves. 14 00:01:45,440 --> 00:01:48,400 It is not just about operating the threshold. 15 00:01:48,780 --> 00:01:49,240 It is also about reducing the size of the image. 16 00:01:49,300 --> 00:01:54,560 And the video we make can also achieve the effect of using a fake needle. 17 00:01:55,880 --> 00:01:57,280 Please play the video. 18 00:02:16,960 --> 00:02:17,400 Video 19 00:02:17,400 --> 00:02:19,360 This is a video from Youtube. 20 00:02:22,420 --> 00:02:24,320 The left side of the video is a real face. 21 00:02:24,420 --> 00:02:26,120 And the right side is a fake one. 22 00:02:33,220 --> 00:02:48,540 大家看是不是做得很逼真 用AI进行视频换脸 这个技术有很广阔的应用前景 比如说美国一个博物馆在银屏上复活了艺术大师达里 23 00:02:50,240 --> 00:02:58,320 对于电视台 比如说北京电视台 它可以在节目中让不适合出现的主持人消失 24 00:03:02,540 --> 00:03:08,140 那DeepFake这项技术呢 就是让一个视频中让某些人出现 或者说让某些人消失 25 00:03:17,120 --> 00:03:18,520 既然人应该消失 26 00:03:24,540 --> 00:03:27,340 但在银眼很多情况下很难识别出假脸 那么人脸识别模型是不是可以呢 27 00:03:35,800 --> 00:03:45,820 大家看到的是微软的人脸识别服务 左边是真脸尼古拉斯凯奇 右边是星球大战的一个人物 他被换成了凯奇的脸 28 00:03:49,100 --> 00:03:51,900 他们这张脸的人脸对比呢 相似度有86 29 00:03:54,120 --> 00:03:55,520 这是第二张第二组图片 30 00:03:58,380 --> 00:03:59,780 被换脸的是总统美国总统 31 00:04:01,560 --> 00:04:04,400 相似度70.5% 32 00:04:09,160 --> 00:04:11,960 这个对于微软的人脸识别服务 他们会判定这两个人是一个人 33 00:04:16,600 --> 00:04:18,000 这是亚马逊的人脸识别服务 34 00:04:22,720 --> 00:04:24,460 对于亚马逊的人脸识别第一组图片的相似度能达到95% 35 00:04:28,080 --> 00:04:29,840 第二组图片相似度能达到87% 36 00:04:43,300 --> 00:04:44,700 既然机器和肉眼 37 00:04:46,500 --> 00:04:47,900 既然人脸识别服务和 38 00:04:47,900 --> 00:04:48,500 人脸识别服务和 39 00:04:48,520 --> 00:04:56,220 人肉眼都无法分辨,那么我们是如何来进行AI换脸检测的呢? 40 00:05:05,260 --> 00:05:10,100 首先我先给大家介绍一下DeepFake,AI换脸是怎么样,换脸视频是怎么样制作的。 41 00:05:17,660 --> 00:05:27,760 它首先是将视频的每一帧抽取每一帧,然后找到目标人脸,对人脸进行换脸,然后再放回到人脸原来的位置。 42 00:05:32,700 --> 00:05:35,500 它所伪造的人脸是人脸的中心区域,而不是整个的图像。 43 00:05:38,680 --> 00:05:40,080 所以这个过程不是端对端的, 44 00:05:44,540 --> 00:05:46,760 就不是说为给模型原图生成出是原图,不是这样的。 45 00:05:54,880 --> 00:06:02,280 DeepFake模型是基于自动编码器,它有两组自动编码器,每组都含有一个编码器和一个解码器。 46 00:06:08,200 --> 00:06:09,600 自动编码器会将图片进行降维表示。 47 00:06:09,600 --> 00:06:10,080 自动编码器会将图片进行降维表示。 48 00:06:12,600 --> 00:06:15,400 解码器会对图片进行解码,恢复到原图。 49 00:06:15,400 --> 00:06:27,240 在训练过程中,需要保持输入的图片和输出的图片差异尽量小。 50 00:06:34,560 --> 00:06:35,960 这两组编码器分别对两个人进行编码和解码。 51 00:06:35,960 --> 00:06:37,560 他们。 52 00:06:40,200 --> 00:06:49,060 这两组编码器的,这两组编码器的,这两组自动编码器的编码器是共享,是共享权重的。 53 00:06:49,060 --> 00:06:51,880 实际上呢,他们是属于一个编码器。 54 00:06:53,560 --> 00:07:02,240 在训练过程中,我们需要这两个人的许多张图片,分别训练这两组编码器。 55 00:07:05,740 --> 00:07:06,560 这样在转换的时候。 56 00:07:06,560 --> 00:07:16,620 转换的时候,A人脸通过编码,可以再通过B的编码器还原成B人脸。 57 00:07:16,620 --> 00:07:23,220 同样的,B人脸也可以被解码成A的人脸。 58 00:07:28,140 --> 00:07:29,540 在转换的过程中。 59 00:07:32,180 --> 00:07:34,980 首先我们要借助人脸,人脸检测。 60 00:07:34,980 --> 00:07:42,100 找到,先使用人脸检测系统,找到对齐的人脸。 61 00:07:42,100 --> 00:07:49,400 输入到编码器,然后呢,通过另一组解码器,得到伪造的人脸。 62 00:07:49,400 --> 00:07:53,020 再放回原图,然后进行融合。 63 00:07:53,020 --> 00:08:00,340 我们看到,这个女孩的人脸被凯琪的人脸所替换。 64 00:08:02,260 --> 00:08:03,660 他们俩的表情是一样的。 65 00:08:10,300 --> 00:08:11,700 我们介绍第一种方法。 66 00:08:15,640 --> 00:08:17,040 第一种方法是基于卷积神经网络。 67 00:08:17,040 --> 00:08:26,140 通过卷积神经网络,是目前进行图片分类的一种主流的方式。 68 00:08:29,880 --> 00:08:31,280 我们使用了一种浅层的CNN。 69 00:08:33,560 --> 00:08:34,260 我们试图让他抓住笔记。 70 00:08:38,440 --> 00:08:39,840 我们使用了一个比较低层次的图像特征。 71 00:08:46,160 --> 00:08:47,560 我们刚才看到的人脸视频。 72 00:08:48,260 --> 00:08:58,760 从目前来讲,DeepFake它目前所产生的假脸,有时候会产生一些容易被发现的痕迹。 73 00:08:58,760 --> 00:09:02,480 比如说,边缘生硬。 74 00:09:02,480 --> 00:09:04,240 比如说,边缘生硬。 75 00:09:04,240 --> 00:09:06,120 在视频中人脸会有抖动。 76 00:09:10,280 --> 00:09:11,680 还有颜色模糊。 77 00:09:11,680 --> 00:09:13,200 还有人脸扭曲。 78 00:09:13,200 --> 00:09:15,240 颜色不均等情况发生。 79 00:09:18,880 --> 00:09:20,280 颜色不均等情况发生。 80 00:09:20,280 --> 00:09:22,820 我们第一种方法就是呢。 81 00:09:26,980 --> 00:09:29,780 我们第一种方法输入模型的呢,就包含了这种融合边缘的信息。 82 00:09:29,780 --> 00:09:29,840 我们第一种方法输入模型的呢,就包含了这种融合边缘的信息。 83 00:09:29,840 --> 00:09:31,300 我们第一种方法输入模型的呢,就包含了这种融合边缘的信息。 84 00:09:31,300 --> 00:09:33,960 他首先利用。 85 00:09:33,960 --> 00:09:36,400 我们第一种方法就是呢,就包含了这种融合边缘的信息。 86 00:09:39,380 --> 00:09:42,180 人脸检测器来找到人脸的核心区域,然后进行外延。 87 00:09:42,180 --> 00:09:43,280 人脸检测器来找到人脸的核心区域,然后进行外延。 88 00:09:45,940 --> 00:09:47,340 这样就包含了融合边缘的信息。 89 00:09:47,340 --> 00:09:49,540 这样就包含了融合边缘的信息。 90 00:09:51,460 --> 00:09:52,160 我们的数据集是开源的。 91 00:10:02,540 --> 00:10:03,940 我们的数据集是开源的。 92 00:10:03,940 --> 00:10:05,820 There are high-quality and low-quality images. 93 00:10:09,860 --> 00:10:15,540 After using human face detection to find the core area of the human face, 94 00:10:17,400 --> 00:10:22,920 we used 0.5x, which is actually a 1.5x human face frame. 95 00:10:24,180 --> 00:10:26,820 During the training, we also improved the data 96 00:10:26,820 --> 00:10:30,560 and released the images. 97 00:10:36,360 --> 00:10:38,960 This is the model we used. 98 00:10:39,520 --> 00:10:43,320 As you can see, there are only three layers. 99 00:10:46,520 --> 00:10:50,240 We used the LE-2E LU function. 100 00:10:52,600 --> 00:10:54,220 Although it is simple, it is very effective. 101 00:10:54,480 --> 00:10:56,580 The accuracy rate can reach 99%. 102 00:11:00,620 --> 00:11:05,800 The accuracy rate of this method is very low. 103 00:11:05,920 --> 00:11:10,300 In other words, the real face is rarely identified as a fake face. 104 00:11:11,340 --> 00:11:13,760 This is a very good feature. 105 00:11:20,020 --> 00:11:24,020 Next, I will introduce you to our second method. 106 00:11:24,420 --> 00:11:26,300 It is based on the human face detection model. 107 00:11:27,740 --> 00:11:30,360 As I mentioned just now, 108 00:11:33,540 --> 00:11:39,720 the human face detection model is actually very difficult to distinguish between the real face and the fake face. 109 00:11:40,000 --> 00:11:43,900 However, the second method is to use the human face detection model. 110 00:11:44,720 --> 00:11:46,360 How do we do it? 111 00:11:49,540 --> 00:11:51,900 First, I will introduce you to FaceNet. 112 00:11:53,780 --> 00:11:54,900 FaceNet is open source. 113 00:11:54,900 --> 00:12:00,360 It is one of the most popular human face recognition frames right now. 114 00:12:00,420 --> 00:12:03,500 It is a typical depth CNN. 115 00:12:07,400 --> 00:12:10,300 FaceNet will print the input human face. 116 00:12:12,700 --> 00:12:17,240 It will print the image into the size of 512. 117 00:12:17,980 --> 00:12:24,880 It will print the image into the size of 512. 118 00:12:24,880 --> 00:12:30,060 When people compare faces, they actually calculate the corresponding distance between these two faces. 119 00:12:31,620 --> 00:12:35,220 For example, the European distance. 120 00:12:36,140 --> 00:12:39,060 The fewer the number, the more similar these two faces are. 121 00:12:44,760 --> 00:12:48,760 The method we use is similar to the one we just introduced. 122 00:12:54,880 --> 00:13:02,620 The only difference is that the images we use in this method are only the core area of the face. 123 00:13:06,340 --> 00:13:13,620 We use FistNet to extract the volume as the feature of our training model. 124 00:13:15,460 --> 00:13:19,800 We use SVM as our second class. 125 00:13:26,640 --> 00:13:33,420 Here, FistNet is actually used as a feature extractor. 126 00:13:36,940 --> 00:13:43,120 The accuracy of this method is 94%. 127 00:13:45,480 --> 00:13:53,320 This method actually uses higher-level features. 128 00:13:54,880 --> 00:13:55,940 This is the face-to-face feature. 129 00:14:02,610 --> 00:14:06,200 Next, I will show you the demonstration effect of the first method. 130 00:14:08,440 --> 00:14:09,720 Please play the video. 131 00:14:12,550 --> 00:14:15,200 This is based on the simple CNN method. 132 00:14:15,480 --> 00:14:18,200 The accuracy is 99%. 133 00:14:21,580 --> 00:14:24,000 This is the second method. 134 00:14:33,000 --> 00:14:36,560 Both methods received 98% accuracy. 135 00:14:39,180 --> 00:14:44,440 Please, try this method everyone. 136 00:14:44,480 --> 00:14:45,320 Please, try our second method. 137 00:14:45,320 --> 00:14:46,380 Finally, I would much like to underline that 138 00:14:46,380 --> 00:14:54,860 we have introduced an oligarch who is also a manager of SNS and digital technology. 139 00:14:54,860 --> 00:14:56,300 换脸视频的方法 140 00:14:59,500 --> 00:15:00,900 换脸视频有很多针 141 00:15:04,720 --> 00:15:06,120 实际上我们只要对某一些针 142 00:15:06,120 --> 00:15:07,380 确认它为假脸 143 00:15:07,380 --> 00:15:08,340 我们就可以判定 144 00:15:08,340 --> 00:15:10,800 它这个视频是伪造的 145 00:15:14,380 --> 00:15:15,780 目前伪造视频 146 00:15:17,860 --> 00:15:19,260 目前伪造视频 147 00:15:21,340 --> 00:15:22,740 有很严重的安全威胁 148 00:15:22,740 --> 00:15:25,420 举一个例子 149 00:15:30,080 --> 00:15:31,480 现在用DeepFake技术来制作假新闻 150 00:15:37,220 --> 00:15:40,020 用于诽谤 造谣这些勾当 151 00:15:43,340 --> 00:15:44,740 还有人利用DeepFake来制作 152 00:15:44,740 --> 00:15:46,940 勒索 敲诈这类的视频 153 00:15:49,940 --> 00:15:51,340 所以我们需要一个技术来检测 154 00:15:51,340 --> 00:15:52,640 这类 155 00:15:52,640 --> 00:15:54,940 这类安全威胁 156 00:15:58,280 --> 00:15:59,680 我们所介绍的第一种方法 157 00:15:59,680 --> 00:16:01,960 是基于CNN的 158 00:16:01,960 --> 00:16:04,480 是一个简单的CNN网络 159 00:16:04,480 --> 00:16:05,780 虽然简单 160 00:16:05,780 --> 00:16:07,340 但是它能工作得很好 161 00:16:09,380 --> 00:16:10,780 我们这种网络呢 162 00:16:13,220 --> 00:16:14,620 提取的更多的是低层次的特征 163 00:16:14,620 --> 00:16:17,040 基于人脸 164 00:16:19,000 --> 00:16:20,400 第二种基于人脸识别模型的检测方法 165 00:16:25,560 --> 00:16:26,960 它更多的是使用高层次的 166 00:16:26,960 --> 00:16:29,200 更抽象的人脸的特征 167 00:16:31,800 --> 00:16:34,600 在第一 我们发现在第一种方法 168 00:16:34,600 --> 00:16:36,880 所错误分类的图片中 169 00:16:36,880 --> 00:16:39,400 我们在使用第二种方法 170 00:16:39,400 --> 00:16:42,140 就是基于人脸识别模型进行检测的话 171 00:16:42,140 --> 00:16:44,480 准确率还能达到64% 172 00:16:44,480 --> 00:16:46,500 这说明这两种方法 173 00:16:46,500 --> 00:16:49,060 使用的特征是不一样的 174 00:16:52,640 --> 00:16:54,020 谢谢大家 175 00:16:54,020 --> 00:16:54,960 我的演讲讲完了