Really slow extraction
I'm currently extracting with roughly 25 seconds per item (yes, I'm not kidding, it's not the other way round). I just finished extracting for 600 images in 4-5 hours. What am I doing wrong?
These are my parameters for extracting:
python faceswap.py extract -i ./tmp -o ./tmp/aligned -ae -D cnn
According to the console output the extraction process is using my GPU (GTX 970).
I tried extracting with the hog model before, which was faster but yielded very bad results (many faces had been missed). My images are 16x900 png files.
My system:
OS: Ubuntu 17.10 GPU: GTX 970 4GB CPU: Intel i5-6600k
Did you compile DLIB yourself? If not then you are probably using the CPU for extraction. See here: https://github.com/davisking/dlib/issues/909
I did, with CUDA support. I used the cnn extractor from https://github.com/dfaker/df before and had an extraction rate of about 3 it/s. But I will verify that everything is still setup up correctly...
Okay, I reinstalled dlib with CUDA support - nothing changed.
According to nvidia-smi, python is using 3.6 GB of my VRAM (however GPU-util is only between 0% and 10%), so I guess it's running on the GPU(?).
Is there a way to check if dlib is running on the GPU or CPU?
I had a similar issue a while back, and it turned out something had gone wrong with my CUDA install, so I had to blow it all away and reinstall CUDA and cuDNN. It might be worth checking the CUDA Samples and making sure that they build correctly:
https://docs.nvidia.com/cuda/cuda-installation-guide-microsoft-windows/index.html#verify-installation
I had a similar problem with a different solution. For me, it turned out to be a broken version of a dlib extension module in the main 'site-packages' folder. Once I removed that, the good version of dlib in 'site-packages/dlib-[version]' is able to be called correctly, and everything works.
Finally found it! I somehow ended up with multiple versions of dlib installed next to each other... :man_facepalming:
Thanks for your time!
This issue can safely be closed now.