Installation of basic packages
1 2 3 |
sudo apt-get install git sudo apt-get install cmake sudo apt-get install build-essential |
Installation of the Lua programming language
1 |
sudo apt-get install lua5.2 |
Installation of LuaRocks (package manager for Lua modules)
1 |
sudo apt-get install luarocks |
Installation of LuaJIT (just-in-time compiler for Lua)
1 |
sudo apt-get install luajit |
Installation of Torch
(Software framework for scientific computing and machine learning. The script language is based on Lua)
1 2 |
sudo apt-get install curl curl -s https://raw.githubusercontent.com/torch/ezinstall/master/install-all | bash |
Alternative installation of Lua and Torch
1 2 3 4 5 |
cd ~/ curl -s https://raw.githubusercontent.com/torch/ezinstall/master/install-deps | bash git clone https://github.com/torch/distro.git ~/torch --recursive cd ~/torch; ./install.sh source ~/.bashrc |
Starting Torch and verifying the installation
1 |
luajit –ltorch |
Typing exit will close the Torch shell
Installation of loadcaffe
(package for neural networks)
1 2 |
sudo apt-get install libprotobuf-dev protobuf-compiler sudo luarocks install loadcaffe |
Updating packages
1 2 |
sudo luarocks install image sudo luarocks install nn |
Create new directory
1 |
mkdir mydirectory |
Switch to directory
1 |
cd mydirectory |
Installation of neural-style
1 |
sudo git clone https://github.com/jcjohnson/neural-style.git |
Switch to neural-style directory and download models
1 2 |
cd neural-style sudo sh models/download_models.sh |
Installation of CUDA drivers
1 2 3 4 |
wget http://developer.download.nvidia.com/compute/cuda/7_0/Prod/local_installers/rpmdeb/cuda-repo-ubuntu1404-7-0-local_7.0-28_amd64.deb sudo dpkg -i cuda-repo-ubuntu1404-7-0-local_7.0-28_amd64.deb sudo apt-get update sudo apt-get install cuda |
The system must then be booted
Installation of CUDA backend for Torch
1 2 3 4 |
cd ~/ cd neural-style sudo luarocks install cutorch sudo luarocks install cunn |
cuDNN implementation
To download cuDNN, you need to register with Nvidia’s developer portal: https://developer.nvidia.com/cudnn
The package is unzipped, copied and installed in the next step
1 2 3 4 |
tar -xzvf cudnn-7.0-linux-x64-v4.0-prod.tgz sudo cp cuda/lib64/libcudnn* /usr/local/cuda-7.0/lib64/ sudo cp cuda/include/cudnn.h /usr/local/cuda-7.0/include/ sudo luarocks install cudnn |
Installation of neural-style
Working with neural-style
Style Transfer for Video Clips
Post-production
Alternative Techniques