LingCHN19 said:
dpfks said:
A simple way to update the app is to just download the .zip file from github, and replace your files that you've installed. I think faceapp and faceswap models are only interchangeable. I am not too sure about the rest but I am looking to change to a new app too (currently using faceswap).
Do you mind if I ask a question about Faceswap, do you know how to compile dlib with CUDA support?
I followed tutorials and tried several times, but even after it's built successfully, dlib-cnn is still very slow for me. I don't know how to fix it, so I can't use dlib-cnn in Faceswap.
dlib is probably causing tensorflow to use CPU and not GPU, hence the slow speed. So here's what worked for me (everything gets installed in the default directories):
Note: always add to PATH if asked during installations, even Anaconda (conda will warn you when you check the box. Ignore it.) All commands should be run through your virtual environment (see below). If you get messages about upgrading pip, don't. You want pip version 10. Just ignore the warnings.
I use Anaconda 3 with a Python 3.6.5 build on Win10 machine. Install CUDA 9.0. Install cudNN 7.05 (for CUDA 9.0). Install Visual Studio 2015. Install Cmake (latest stable build, I think it's 3.12). Install OpenCV. Make sure all your environment variables are set to PATH correctly. Not technically necessary in Anaconda, but for utility and safety purposes, create and activate a virtual environment through the conda prompt. In your virtual env, at the conda cmd line, enter "chcp 866", then after that enter "chcp 65001" (No quotes, of course.) If chcp is not a recognized internal or external command by conda, in your environment variables add to PATH
[font=Arial,]"C:\Windows\System32\". [/font]Now get the Faceswap files. I prefer to use the git for Faceswap. (If you don't know how, Youtube is your friend. It's easy. Search github tutorial.) I do not use the docker file. Still in your virtual env, now type "python setup.py" and let it do its thing. Watch for errors. If you have an error or errors, you can usually find good solutions by simply Googling the error message. When it's done, if you have no errors (or you've fixed them), still in your virtual env, type "pip uninstall dlib". Let it uninstall. Then get the latest dlib version from github (it's the davisking\dlib one). This time I downloaded the .zip file and extracted to my virtual env folder in Anaconda. Now type "python setup.py install --yes DLIB_USE_CUDA". Let it do it's thing. Once that is done, if you had no errors, you will need to change your tensorflow version, as it will not be compatible with cudNN 7.05. Type "pip install --upgrade --force-reinstall tensorflow-gpu==1.9.0 --user". Now you will find that face_recognition needs to be updated. Simply type "pip install face-recognition --upgrade". Now you should be good to go.
If this still doesn't work, then it is possible that you have another version or versions of dlib somewhere on your PC. You will need to find those, and remove them.
I hope this was helpful.