FCRN-DepthPrediction-cpp
FCRN-DepthPrediction-cpp copied to clipboard
TensorFlow C++ inference for single view depth estimation (FCRN-DepthPrediction)
TensorFlow C++ inference of FCRN-Depth-Prediction
This is a TensorFlow c++ inference code of FCRN-DepthPrediction (single-view deep depth prediction) for indoor scenes.
This code uses cppflow, which doesn't require either TensorFlow compile or bazel (this installation is known as a very difficult task [1, 2]).
Environment
- Ubuntu18.04 (GPU: NVIDIA GeForce GTX 1080)
- CUDA10.0
- cuDNN7.4
- Python3.6.9 (for preparing pb-file)
- TensorFlow for C 1.13.1 (this version requires CUDA10.0 & cuDNN7.4)
You need to download libtensorflow & install it referring to official page.
wget https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-gpu-linux-x86_64-1.13.1.tar.gz
sudo tar -C /usr/local -xzf libtensorflow-gpu-linux-x86_64-1.13.1.tar.gz
sudo ldconfig
How to run it
See README in freeze_graph, and prepare pb-file of pretrained FCRN-DepthPrediction model.
cd freeze_graph/pb_file
./download.sh
Build our code (based on cppflow) with following commands.
mkdir build && cd build
cmake ..
make
Specifying the path to the pb-file & target image directory (samples from NYUDepthv2), execute as follows.
./inference_fcrn \
pb_file="../freeze_graph/pb_file/NYU_FCRN.pb" \
img_dir="../samples/home_office_0013"