Shakerato

dlib(cuda enabled), face_recognition ubuntu 16.04에 설치하기 본문

Research

dlib(cuda enabled), face_recognition ubuntu 16.04에 설치하기

Shakeratto 2018. 8. 8. 10:50

1. CUDA 설치

(설치전 Nouveau kernel driver should be disabled: https://askubuntu.com/questions/841876/how-to-disable-nouveau-kernel-driver)

http://www.kwangsiklee.com/2017/07/%EC%9A%B0%EB%B6%84%ED%88%AC-16-04%EC%97%90%EC%84%9C-cuda-%EC%84%B1%EA%B3%B5%EC%A0%81%EC%9C%BC%EB%A1%9C-%EC%84%A4%EC%B9%98%ED%95%98%EA%B8%B0/


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"


4. Anaconda 환경 생성

> 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


Comments