Skip to content

Latest commit

 

History

History
79 lines (59 loc) · 2.5 KB

INSTALL.md

File metadata and controls

79 lines (59 loc) · 2.5 KB

Installation

DenseCap is implemented in Torch, and depends on the following packages:

After installing torch, you can install / update these dependencies by running the following:

luarocks install torch
luarocks install nn
luarocks install image
luarocks install lua-cjson
luarocks install https://raw.githubusercontent.com/qassemoquab/stnbhwd/master/stnbhwd-scm-1.rockspec
luarocks install https://raw.githubusercontent.com/jcjohnson/torch-rnn/master/torch-rnn-scm-1.rockspec

(Optional) GPU acceleration

If have an NVIDIA GPU and want to accelerate the model with CUDA, you'll also need to install torch/cutorch and torch/cunn; you can install / update these by running:

luarocks install cutorch
luarocks install cunn
luarocks install cudnn

(Optional) cuDNN

If you want to use NVIDIA's cuDNN library, you'll need to register for the CUDA Developer Program (it's free) and download the library from NVIDIA's website; you'll also need to install the cuDNN bindings for Torch by running

luarocks install cudnn

(Optional) Training

There are some additional dependencies if you want to train your own model:

  • Python 2.7
  • Java JDK 1.5 or higher

You'll also need the development header files for Python 2.7 and for HDF5; you can install these on Ubuntu by running

sudo apt-get -y install python2.7-dev
sudo apt-get install libhdf5-dev

You'll need the following Python libraries:

  • numpy
  • scipy
  • Pillow
  • h5py

You will also need DeepMind's HDF5 bindings for Torch which you can install by running

luarocks install https://raw.githubusercontent.com/deepmind/torch-hdf5/master/hdf5-0-0.rockspec

You will need to download the pretrained VGG-16 model and the METEOR evaluation code; you can do this by running the following scripts from the root directory:

sh scripts/download_models.sh
sh scripts/setup_eval.sh