/DnnSetup

This page includes Deep Learning environment setup instruction

DnnSetup

This page includes Deep Learning environment setup instruction and other useful projects This instruction is for linux 16.04 with Nivida GPU

CUDA setup

  1. Nvidia Graphics driver installation
    $ sudo add-apt-repository ppa:graphics-drivers/ppa
    $ sudo apt-get update
    $ sudo apt-get install nvidia-375

After this, reboot $ sudo reboot

When u type $ nvidia-smi , you should see the following message.

Alt text

  1. CUDA toolkit installation
    please download cuda_8.0.61_375.26_linux.run from the following link
    https://drive.google.com/open?id=1f_HjxCg30BCD9r8OfhtsaXyKChhAiy8s
    Then run the following command for installation
    $ sudo sh cuda_8.0.61_375.26_linux.run

You will see long license. Just keep entering until you see the following questions. Please answer the questions as follows

Alt text

  1. Run folloiinwg commands for the environment settings
    $ echo -e "\n## CUDA and cuDNN paths" >> ~/.bashrc
    $ echo 'export PATH=/usr/local/cuda-8.0/bin:${PATH}' >> ~/.bashrc
    $ echo 'export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64:${LD_LIBRARY_PATH}' >> ~/.bashrc

Check if the following lines are created in the ~./bashrc

export PATH = /usr/local/cuda-8.0/bin : $ { PATH }
export LD_LIBRARY_PATH = /usr/local/cuda-8.0/lib64 : $ { LD_LIBRARY_PATH }

  1. Run following commands to check if CUDA is installed properly
    $ source ~/.bashrc
    $ nvcc --version
    nvcc: NVIDIA (R) Cuda compiler driver
    Copyright (c) 2005-2016 NVIDIA Corporation
    Built on Tue_Jan_10_13:22:03_CST_2017
    Cuda compilation tools, release 8.0, V8.0.61

  2. As a final step of CUDA installation, check the CUDA path $ which nvcc
    /usr/local/cuda-8.0/bin/nvcc

CuDNN v5.1

  1. Join the site in the following link and download CuDNN v5.1 Library (cudnn-8.0-linux-x64-v5.1.tgz) for Linux https://developer.nvidia.com/rdp/cudnn-download

You can also download cudnn-8.0-linux-x64-v5.1.tgz from the following link
https://drive.google.com/open?id=1f_HjxCg30BCD9r8OfhtsaXyKChhAiy8s

  1. Run the following commands Note: If nvcc result is not "/usr/local/cuda-8.0/bin/nvcc", use nvcc output instead of "/usr/local/cuda-8.0/bin/nvcc" after "which nvcc"

$ tar xzvf cudnn-8.0-linux-x64-v5.1.tgz
$ which nvcc
/usr/local/cuda-8.0/bin/nvcc
$ sudo cp cuda/lib64/* /usr/local/cuda-8.0/lib64/
$ sudo cp cuda/include/* /usr/local/cuda-8.0/include/
$ sudo chmod a+r /usr/local/cuda-8.0/lib64/libcudnn*
$ sudo chmod a+r /usr/local/cuda-8.0/include/cudnn.h

NVIDIA CUDA Profile Tools Interface

sudo apt-get install libcupti-dev

TensorFlow setup

Install python 3.6.3 first. Keep Enterng and select yes for all question during installation process
$ bash Anaconda3-4.3.0-Linux-x86_64.sh
$ source ~/.bashrc

Run python and check version
$ python
Python 3.6.0 |Anaconda 4.3.0 (64-bit)| (default, Dec 23 2016, 12:22:00)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.

Install tensorflow following instruction in the following link
https://www.tensorflow.org/install/install_linux
 Note: There are multiple installatio method introduced in the website. Just use pip3 based installation unless you really want isolated development environment.

TensorFlow tutorial & example

Here is the best tensorflow tutorial
https://github.com/Lab930boss/DeepLearningZeroToAll.git

Though the vidoe lecture is in Korean, the example is self-contained and well coded.
You will immediately tell what each lab does when you read lab project file name
Fyi there is lecture note link. The lecture note is written in English
https://goo.gl/jPtWNt

OpenCV setup instruction for Ubuntu

https://github.com/jayrambhia/Install-OpenCV

Yolo2 darknet

all about Yolo https://github.com/AlexeyAB/darknet#how-to-train-tiny-yolo-to-detect-your-custom-objects

Best Yolo tutorial website https://blog.paperspace.com/how-to-implement-a-yolo-object-detector-in-pytorch/

FaceNet