dlib(cuda enabled), face_recognition ubuntu 16.04에 설치하기
1. CUDA 설치
(설치전 Nouveau kernel driver should be disabled: https://askubuntu.com/questions/841876/how-to-disable-nouveau-kernel-driver)
2. cuDNN 설치
Download cuDNN*.deb on https://developer.nvidia.com/cudnn
cuda버전에 맞는 cudnn 중 다음 두개를 다운받아야함)
cuDNN v7.2.1 Runtime Library for Ubuntu16.04 (Deb)
cuDNN v7.2.1 Developer Library for Ubuntu16.04 (Deb)
> dpkg -i cuDNN*.deb
3. Anaconda 설치
http://snowdeer.github.io/linux/2018/01/22/ubuntu-16p04-how-to-install-anaconda/
> export PATH=~/anaconda3/bin:"$PATH"
> conda create -n <envname> python=3.6 anaconda
5. source activate <envname>
6. dlib 설치
https://www.learnopencv.com/install-dlib-on-ubuntu/
(마지막에 python에 dlib를 설치해는걸 잊으면 안됨: python setup.py install)
* 중간에 CUDA ENABLED 메세지가 있어야 GPU를 사용할 수 있음
** apt-get install -f (dependency 에러 뜨는 경우 -f 를 붙이면 에러 없이 설치 가능)
7. face_recognition 설치
(face_recognition github: https://github.com/ageitgey/face_recognition)
> apt-get install git
> git clone https://github.com/ageitgey/face_recognition.git
> cd face_recognition
> vi requirements.txt
-> Have to delete the line for installing dlib
> vi requirements_dev.txt
-> Have to delete the line for installing dlib
> python setup.py install