https://github.com/deepfakes/faceswap
https://faceswap.dev/
修改等
.condarc
channels:
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
show_channel_urls: true
安裝是在線安裝,因為被qiang,安裝過程中可能會出現各種各樣錯誤配合手動。
需要安裝conda,也可以選擇miniconda。
安裝好后的圖標,如下
比如:
Tensorflow raised an unknown error. This is most likely caused by a failure to launch cuDNN which can occur for some GPU/Tensorflow combinations. You should enable `allow_growth` to attempt to resolve this issue
您應該啟用“allow\ u growth”來嘗試解決此問題
02/09/2021 16:55:13 CRITICAL An unexpected crash has occurred. Crash report written to 'D:\Program Files (x86)\faceswap\crash_report.2021.02.09.165511698101.log'. You MUST provide this file if seeking assistance. Please verify you are running the latest version of faceswap before reporting
基本使用:
提取切片
排序
清除無關
合並多個alignments
訓練
轉換
合成
需安裝
conda uninstall ffmpeg
conda install ffmpeg
python tools.py effmpeg -a gen-vid -i 輸入圖片文件夾 -o 輸出文件名 -fps 幀率
Eg.1:
python tools.py effmpeg -a gen-vid -i C:\Users\KASPAR\Desktop\1\outputdir -o C:\Users\KASPAR\Desktop\1\outputdir\123.mp4 -tps 24
python tools.py effmpeg -a gen-vid -i 輸入圖片文件夾 -o 輸出文件名 -fps 幀率
Eg.2:
python tools.py effmpeg -a gen-vid -i C:\Users\Administrator\Desktop\a\testoutput -o C:\Users\Administrator\Desktop\a\123.mp4 -fps 24
~需要混音
python tools.py effmpeg -a gen-vid -i 輸入圖片文件夾 -o 輸出文件名 -fps 幀率 -m -r 原視頻路徑
Eg.3:
python tools.py effmpeg -a gen-vid -i C:\Users\Administrator\Desktop\a\testoutput -o C:\Users\Administrator\Desktop\a\123.mp4 -fps 24 -m -r C:\Users\Administrator\Desktop\a\a.mp4
python tools.py effmpeg -i cage.mp4 -o input -s 00:0148 -e 00:0156
總結:效果還是很好的,但需要大量時間去訓練,訓練的模型直接影響到替換效果。並且模型唯一。