Had some issues with my home computer so used vast.ai to rent instances. A GTX 1080-TI runs about 0.1$/hour.
When creating instances use the tensorflow/tensorflow:1.15.2-gpu-py3-jupyter image
Here's the script I run to setup the enviroment, put it in a .sh file. Open a terminal and do a "chmod +x" on the file and then run the file. Zip is not necessary but useful when downloading the model.
Upload faces and alignment files.
Code: Select all
#!/bin/bash
apt update -y
apt-get install -y zip
apt-get install -y git
apt-get install -y libsm6 libxext6 libxrender-dev
apt-get install -y libgl1-mesa-dev
git clone -b r1.0 https://github.com/deepfakes/faceswap.git
cd faceswap
pip install -U pip
pip install -r requirements_nvidia.txt
python faceswap.py
Run "python faceswap/faceswap.py" once to setup faceswap for NVIDIA and then run the training.
Edit faceswap/config/training.ini to setup which mask to use and other parameters.
Here's my example training command
Code: Select all
python ./faceswap/faceswap.py train -A ./A -ala ./A.fsa -B ./B -alb ./B.fsa -m ./model -t dfl-h128 -bs 16 -it 1000000 -g 1 -s 100 -ss 25000 -ps 100 -w -ag -L VERBOSE
Check the training_preview.jpg to evaluate progress.
Update: added forced branch r1.0 until I can figure out how to get python3.7 running on vast instances.