Wav2Lip-GFPGAN用法

下载官网:

https://github.com/ajay-sainy/Wav2Lip-GFPGAN

下载:

https://www.adrianbulat.com/downloads/python-fan/s3fd-619a316812.pth
改名为:s3fd.pth
存放到 /Wav2Lip-master/face_detection/detection/sfd/s3fd.pth

下载

https://drive.google.com/uc?id=1fQtBSYEyuai9MjBOF8j7zZ4oQ9W2N64q
需要梯子,文件体积 420m,挺大的模型
存放到 /Wav2Lip-master/checkpoints/wav2lip.pth

下载

https://github.com/xinntao/facexlib/releases/download/v0.2.2/parsing_parsenet.pth
存放到
e:\anaconda3\lib\site-packages\facexlib\weights\parsing_parsenet.pth

下载

https://github.com/xinntao/facexlib/releases/download/v0.1.0/detection_Resnet50_Final.pth
存放到
e:\anaconda3\lib\site-packages\facexlib\weights\detection_Resnet50_Final.pth

根目录下建个outputs文件夹

安装ffmpeg

官网:http://ffmpeg.org/

下面两个下载哪个都行
Windows builds from gyan.dev
Windows builds by BtbN
https://www.gyan.dev/ffmpeg/builds/ffmpeg-git-essentials.7z

下载后配置环境变量

【debug】TypeError: mel() takes 0 positional arguments but 2 positional arguments (and 3 keyword解决

报错,TypeError: mel() takes 0 positional arguments but 2 positional arguments (and 3 keyword-only arguments) were given。
经查是librosa版本问题。原版本0.9.0,改成0.7.1后,问题解决。

pip uninstall librosa
pip install librosa==0.7.1 -i https://pypi.tuna.tsinghua.edu.cn/simple

No module named 'numba.decorators'

找到你安装的librosa的库中的decorators.py文件
一般在这里.\Lib\site-packages\librosa\util\decorators.py。

然后注释对应部分
注释前:

注释后:

运行

python inference.py --checkpoint_path checkpoints/wav2lip.pth --face E:\Lip-syncing\Wav2Lip-GFPGAN-main\inputs\kim_7s_raw.mp4 --audio E:\Lip-syncing\Wav2Lip-GFPGAN-main\inputs\kim_audio.mp3 --outfile E:\Lip-syncing\Wav2Lip-GFPGAN-main\outputs\abc.mp4

下载:

https://github.com/TencentARC/GFPGAN/releases/download/v1.3.0/GFPGANv1.3.pth

posted on 2023-04-11 11:20  耀扬  阅读(3042)  评论(1编辑  收藏  举报

导航