roop工具使用方法

一、roop工具的效果

roop说明:Take a video and replace the face in it with a face of your choice. You only need one image of the desired face. No dataset, no training。

原图如左边所示,roop替换后的效果如右边所示。

二、linux下安装方法

1、github上下载代码

链接地址:GitHub - s0md3v/roop: one-click deepfake (face swap)

2、源码中requirements.txt的python包都安装一下

3、安装roop模型

onnx模型地址:https://huggingface.co/henryruhs/roop/resolve/main/inswapper_128.onnx

 模型放到roop根目录/models/下

4、下载insightface模型

链接地址:https://github.com/deepinsight/insightface/releases/download/v0.7/buffalo_l.zip

 下载后解压该文件,放到/root/.insightface/models/下

三、roop使用

1、单张照片替换的命令

python run.py -s /data/work/xiehao/temp/pic/gaoyuanyuan.jpg -t /data/work/xiehao/temp/pic/00010.png -o test.png

执行日志如下:

2、视频替换的命令

python run.py -s /data/work/xiehao/temp/pic/gaoyuanyuan.jpg -t /data/work/xiehao/temp/video/tiemo2.mp4 -o ./output/tiemo2_1.mp4 --keep-fps --keep-frames

执行日志如下:

猜你喜欢

转载自blog.csdn.net/benben044/article/details/131765243