DeepFaceLab:视频中有多人,仅替换特定人脸的方法!
Posted wangpg
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了DeepFaceLab:视频中有多人,仅替换特定人脸的方法!相关的知识,希望对你有一定的参考价值。
DeepFaceLab自带的视频素材,一个是钢铁侠托尼斯塔克,一个是变形金刚男主角山姆。每一个视频中只有一个人。所以当你第一次玩的时候很顺畅,什么都不用管,一步一步按教程来就好好了。
直到有一天你换了一个新的视频。而一个视频中出现的人物不止一个,或者一个画面中就有一群人。这个时候你就会遇到一个问题:如何只换你想换的那个人?
按默认的流程来走的话,是所有人的脸都会被换掉。
此时,你就必须学会一个新技能,如何指定换脸的对象。这个问题,其实软件本身已经考虑到了。 下面我具体说一下,如何实现只换一个人。
假设我们有一个视频,是《权力的游戏》中狼家四兄妹囧恩,三傻,二丫,布兰相聚的一个片段。而我们只是想要把囧恩换掉。 那我们就按正常流程,视频转图片,从图片中提取脸部,然后退得到一堆脸。
因为这个视频中出现的人物有四个,而且同一个画面中出现了三个人。所以默认情况下,提取完脸部后,在workspacedata_dstaligned 会生成所有人的人脸。大致情况如下:
而这个aligned目录就是解决我们的问题的关键。 请记住一个规则,只要是在aligned目录中存在的人脸都会进行替换,换言之如果你不想替换二丫,三傻,布兰,那么直只需要把他们的头像从这个目录中删掉即可。
这么说应该很清楚了吧。aligned的头像是可以删的,只要留下目标人物的头像即可。这样换出来的视频就是你想要的样子了。
如果你觉得一张一张删除有点麻烦,可以先用名字中带有sort的bat文件对头像进行排序,排序后同一个人就会在一起,删除起来就方便多了。
--------------------------------------------------------
获取更多Deepfakes/AI换脸内容可访问 deepfakes中文网
第一时间获取相关文章可关注微信公众号:托尼斯塔克(TonyIsStark)
!--{cke_protected}{C}%3C!%2D%2D5f39ae17-8c62-4a45-bc43-b32064c9388a%3AW3siYmxvY2tJZCI6IjU5ODgtMTU2Nzc4MzE3MzkyNCIsImJsb2NrVHlwZSI6InBhcmFncmFwaCIsInN0eWxlcyI6eyJhbGlnbi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FyIjoi77yJIn1dLCJpc1JpY2hUZXh0Ijp0cnVlLCJrZWVwTGluZUJyZWFrIjp0cnVlfX1d%2D%2D%3E-->以上是关于DeepFaceLab:视频中有多人,仅替换特定人脸的方法!的主要内容,如果未能解决你的问题,请参考以下文章
可以提高DeepFaceLab(DeepFake)合成最终视频速度的方法