# luarocks sudo rm -rf ~/.cache/luarocks/ luarocks install loadcaffe luarocks install cutorch luarocks install cudnn luarocks install cunn luarocks install torch luarocks install nn luarocks install image luarocks install lua-cjson sudo apt-get -y install libpng++-dev libpng12-dev # install cudnn tar -xzvf ~/Downloads/cudnn-9.1-linux-x64-v7.1.tgz -C ~/Downloads sudo cp -P ~/Downloads/cuda/include/cudnn.h /usr/local/cuda/include sudo cp -P ~/Downloads/cuda/lib64/libcudnn* /usr/local/cuda/lib64/ sudo chmod a+r /usr/local/cuda/lib64/libcudnn* # get cudnn (https://developer.nvidia.com/cudnn) and then (assuming cudnn 7.*) ... git clone https://github.com/soumith/cudnn.torch.git -b R7 && cd cudnn.torch && luarocks make cudnn-scm-1.rockspec && cd .. && rm -rf cudnn.torch # more luarocks for densecap luarocks install https://raw.githubusercontent.com/genekogan/stnbhwd/master/stnbhwd-scm-1.rockspec luarocks install https://raw.githubusercontent.com/jcjohnson/torch-rnn/master/torch-rnn-scm-1.rockspec # setup densecap git clone https://github.com/jcjohnson/densecap cd densecap sh scripts/download_pretrained_model.sh # test densecap th run_model.lua -input_image imgs/elephant.jpg cd vis python -m http.server # go to localhost:8000