Closed ZeroCool22 closed 6 years ago
This is happening to me too https://github.com/deepfakes/faceswap/issues/175
I reinstall all from zero but not success.
Did you rebuild dlib with GPU support? If you use "-D cnn" and haven't done that it uses a CPU version of dlib, which is crazy slow during the face detection step.
@rifterbater My DLIB installation was:
python setup.py install --yes USE_AVX_INSTRUCTIONS --yes DLIB_USE_CUDA
Maybe double check dlib console output during setup.py to be certain it went successfully. Even with DLIB_USE_CUDA it can still fail to use cuda and you'll end up with a plain CPU build. There's lots of issues with cuda requiring very specific versions of visual studio to be installed, so it fails to include support frequently.
@rifterbater What version of VS i should have installed?
I have these ones:
It's real mess. There's no one answer because it's a cuda issue and so varies based on your exact cuda version. Uninstalling VS 2017 and having VS 2015 updated with all the latest patches seems to work the most frequently.
Yeah, i never installed the VS 2017, always was the 2015 and i think i have it with all the updates.
Don't understand what's wrong.
I manually install dlib
to be sure with no error and with CUDA enable.
Tried to downgrade to cuDNN 5.1
(from cuDNN 6
) and reinstall dlib
with no luck.
All is installed with no errors but CNN not work with GPU and not sure if this affect the Train too.
Notice so many warnings when install dlib
:
d:\dlib-master\dlib\config.h(22): warning C4005: 'DLIB_JPEG_SUPPORT': macro redefinition (compiling source file D:\dlib-master\tools\python\src\numpy_returns.cpp) [D:\dli b-master\build\temp.win-amd64-3.6\Release\dlib_python.vcxproj] d:\dlib-master\dlib\config.h(23): warning C4005: 'DLIB_PNG_SUPPORT': macro redefinition (compiling source file D:\dlib-master\tools\python\src\numpy_returns.cpp) [D:\dlib -master\build\temp.win-amd64-3.6\Release\dlib_python.vcxproj] d:\dlib-master\dlib\config.h(28): warning C4005: 'DLIB_USE_CUDA': macro redefinition (compiling source file D:\dlib-master\tools\python\src\numpy_returns.cpp) [D:\dlib-ma ster\build\temp.win-amd64-3.6\Release\dlib_python.vcxproj] d:\dlib-master\dlib\config.h(22): warning C4005: 'DLIB_JPEG_SUPPORT': macro redefinition (compiling source file D:\dlib-master\tools\python\src\gui.cpp) [D:\dlib-master\b uild\temp.win-amd64-3.6\Release\dlib_python.vcxproj] d:\dlib-master\dlib\config.h(23): warning C4005: 'DLIB_PNG_SUPPORT': macro redefinition (compiling source file D:\dlib-master\tools\python\src\gui.cpp) [D:\dlib-master\bu ild\temp.win-amd64-3.6\Release\dlib_python.vcxproj] d:\dlib-master\dlib\config.h(28): warning C4005: 'DLIB_USE_CUDA': macro redefinition (compiling source file D:\dlib-master\tools\python\src\gui.cpp) [D:\dlib-master\build \temp.win-amd64-3.6\Release\dlib_python.vcxproj]
416 Warning(s) 0 Error(s)
Time Elapsed 00:10:07.06 creating build\bdist.win-amd64 creating build\bdist.win-amd64\egg copying build\lib.win-amd64-3.6\dlib.cp36-win_amd64.pyd -> build\bdist.win-amd64\egg creating stub loader for dlib.cp36-win_amd64.pyd byte-compiling build\bdist.win-amd64\egg\dlib.py to dlib.cpython-36.pyc creating build\bdist.win-amd64\egg\EGG-INFO copying dlib.egg-info\PKG-INFO -> build\bdist.win-amd64\egg\EGG-INFO copying dlib.egg-info\SOURCES.txt -> build\bdist.win-amd64\egg\EGG-INFO copying dlib.egg-info\dependency_links.txt -> build\bdist.win-amd64\egg\EGG-INFO copying dlib.egg-info\not-zip-safe -> build\bdist.win-amd64\egg\EGG-INFO copying dlib.egg-info\top_level.txt -> build\bdist.win-amd64\egg\EGG-INFO writing build\bdist.win-amd64\egg\EGG-INFO\native_libs.txt creating dist creating 'dist\dlib-19.9.99-py3.6-win-amd64.egg' and adding 'build\bdist.win-amd64\egg' to it removing 'build\bdist.win-amd64\egg' (and everything under it) Processing dlib-19.9.99-py3.6-win-amd64.egg creating d:\lib\site-packages\dlib-19.9.99-py3.6-win-amd64.egg Extracting dlib-19.9.99-py3.6-win-amd64.egg to d:\lib\site-packages Adding dlib 19.9.99 to easy-install.pth file
Installed d:\lib\site-packages\dlib-19.9.99-py3.6-win-amd64.egg Processing dependencies for dlib==19.9.99 Finished processing dependencies for dlib==19.9.99
Chequed in tensorflow if GPU is enable:
sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))
2018-02-11 03:27:20.363564: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\platform\cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX 2018-02-11 03:27:20.747300: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\gpu\gpu_device.cc:1030] Found device 0 with properties: name: GeForce GTX 1060 6GB major: 6 minor: 1 memoryClockRate(GHz): 1.7845 pciBusID: 0000:02:00.0 totalMemory: 6.00GiB freeMemory: 4.97GiB 2018-02-11 03:27:20.747460: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\gpu\gpu_device.cc:1120] Creating TensorFlow device (/device:GPU:0) -> (device: 0, name: GeForce GTX 1060 6GB, pci bus id: 0000:02:00.0, compute capability: 6.1) Device mapping: /job:localhost/replica:0/task:0/device:GPU:0 -> device: 0, name: GeForce GTX 1060 6GB, pci bus id: 0000:02:00.0, compute capability: 6.1 2018-02-11 03:27:20.933639: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\common_runtime\direct_session.cc:299] Device mapping: /job:localhost/replica:0/task:0/device:GPU:0 -> device: 0, name: GeForce GTX 1060 6GB, pci bus id: 0000:02:00.0, compute capability: 6.1
Test dlib:
cmake -G "Visual Studio 14 2015 Win64"
-- Selecting Windows SDK version to target Windows 10.0.16299. -- The C compiler identification is MSVC 19.0.24215.1 -- The CXX compiler identification is MSVC 19.0.24215.1 -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Looking for sys/types.h -- Looking for sys/types.h - found -- Looking for stdint.h -- Looking for stdint.h - found -- Looking for stddef.h -- Looking for stddef.h - found -- Check size of void -- Check size of void - done -- Enabling SSE2 instructions -- Searching for BLAS and LAPACK -- Searching for BLAS and LAPACK -- Looking for pthread.h -- Looking for pthread.h - not found -- Found Threads: TRUE -- A library with BLAS API not found. Please specify library location. -- LAPACK requires BLAS -- Found CUDA: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0 (found suitable version "8.0", minimum required is "7.5") -- Looking for cuDNN install... -- Found cuDNN: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/lib/x64/cudnn.lib -- Building a CUDA test project to see if your compiler is compatible with CUDA... -- Checking if you have the right version of cuDNN installed. -- Enabling CUDA support for dlib. DLIB WILL USE CUDA -- C++11 activated. -- Configuring done -- Generating done -- Build files have been written to: D:/fy/fs/faceswap_env/dlib-master
Can you also post the version of python you are using with python --V
python -V
Python 3.6.4
Please reopen in faceswap-playground if still relevant
I'm very far away from being a Python expert, but if you look at the Anaconda window, it say "Using TensorFlow backend" and shows the model of my GPU ,etc... So from that lecture i understand it should be using the GPU, but NO!
On TRAIN
"python faceswap.py train -A C:/faceswap/A/aligned -B C:/faceswap/B/aligned -m C:/faceswap/models -p -t GAN"
it use it (low usage but at least it use it):conda list
OS: Windows 10 creators. CPU: 7700k RAM; 32gb GPU: MSI GTX 1080TI