Skip to content

Installation

Davis edited this page Aug 29, 2018 · 6 revisions

Prerequisites

  • Anaconda3
  • CMake (version >= 3.5)
  • CUDA toolkit (version recommended by the Tensorflow installation)
  • Windows only
    • Visual studio 14 (2015)

Python environment

Create a conda environment with the following packages:

  • tensorflow-gpu
  • opencv-python
  • matplotlib
  • joblib
  • pillow
conda create --name interpolator python=3.5
conda activate interpolator
pip install tensorflow-gpu opencv-python matplotlib joblib pillow

Building ops

Linux

In a terminal with the conda environment activated:

mkdir build
cd build
cmake ..
cmake --build . --config Release --target install

Note that the built custom ops (e.g libcorrelation_op.so) must be in the build folder.

Windows

In powershell with the conda environment activated:

mkdir build
cd build
cmake -G "Visual Studio 14 2015 Win64" ..
cmake --build . --config Release --target install

Note that the built custom ops (e.g correlation_op.dll) must be in the build folder.

Common gotchas

CUDA not found

If cmake can't find CUDA, you may need to manually pass it the toolkit's root path:

cmake -D CUDA_TOOLKIT_ROOT_DIR=/path/to/cuda ..

TF_LIB_DIR not found

If you get an error saying TF_LIB_DIR could not be found. Make sure you are running this in an environment with Tensorflow installed. that likely means you haven't activated your conda environment.

Clone this wiki locally