Try faceswap with Arch Linux

What is faceswap

See deepfakes/faceswap

Seems a little bit difficult to use it.

But worth to give it a try.

Make it work

Install anaconda

If you don’t have yay, check this post.

1
yay -S anaconda

Create a conda virtual environment

1
conda create -n faceswap python=3.6

python3.6 is recommended here.

Install Nvidia driver and cuda support

1
yay -S nvidia nvidia-utils cuda

We need cuda-10.0 here! If not match this version. try downgrade



How to downgrade?

1
2
yay -S downgrade
downgrade cudnn


Add cudnn to cuda

Download cuDNN-7.5 for cuda-10.0 on official site.

You neet to register and login first.

Then unzip the cudnn-10.0-linux-x64-v7.5.0.56.tgz file to /opt/cuda.

Get faceswap source code and install it

1
2
3
4
5
6
7
8
git clone https://github.com/deepfakes/faceswap.git
cd faceswap

# active conda virtual environment
source activate faceswap

# install
python setup.py


dlib problem?

You may got dlib problem when you run faceswap.

1
2
3
4
5
6
7
8
9
10
11
# replace blas with openblas
sudo pacman -S openblas

# get dlib source code
git clone https://github.com/davisking/dlib.git
cd dlib

# active conda virtual environment
source activate faceswap

python setup.py install


play with faceswap

1
2
# try gui
python faceswap.py gui

screenshot

Ref