PyTorch Implementation of NDDR-CNN
- PyTorch 1.1
 - NumPy
 - YACS
 - PIL
 - tensorboardX
 - argparse
 - tqdm
 
The above dependencies can be installed by the following commands via pip:
$ pip install torch torchvision numpy yacs pillow tensorboardX argparse tqdmFollow the instruction in the official repository to prepare the dataset.
Then Download the converted PyTorch models from here, then create a weights directory and unzip the models inside.
When you are all set, you should have the following file structure:
datasets/nyu_v2/list
datasets/nyu_v2/nyu_train_val
weights/vgg_deeplab_lfov/tf_deeplab.pth
weights/nyu_v2/tf_finetune_seg.pth
weights/nyu_v2/tf_finetune_normal.pth
All the arguments to train/eval an NDDR-CNN are shown in configs/defaults.py. The configuration files for different experiments are also provided in the configs directory. For example, to train an NDDR-CNN with VGG-16-shortcut architecture, simply call:
$ CUDA_VISIBLE_DEVICES=0 python train.py --config-file configs/vgg16_nddr_shortcut_sing.yamlTo evaluate an NDDR-CNN with VGG-16-shortcut architecture, call:
$ CUDA_VISIBLE_DEVICES=0 python eval.py --config-file configs/vgg16_nddr_shortcut_sing.yaml