Skip to content

PyTorch Implementation of "NDDR-CNN: Layerwise Feature Fusing in Multi-Task CNNs by Neural Discriminative Dimensionality Reduction"

License

Notifications You must be signed in to change notification settings

bhpfelix/NDDR-CNN-PyTorch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NDDR-CNN-PyTorch

PyTorch Implementation of NDDR-CNN

Usage

Requirements

  • PyTorch 1.1
  • NumPy
  • YACS
  • PIL
  • tensorboardX
  • argparse
  • tqdm

Setup

The above dependencies can be installed by the following commands via pip:

$ pip install torch torchvision numpy yacs pillow tensorboardX argparse tqdm

Dataset

Follow 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

Training

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.yaml

Evaluation

To 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

Downloads

  • Preprocessed Dataset (link)
  • PyTorch weight initializations converted from TensorFlow pretrained models (link)
  • A rough script for converting TensorFlow model to PyTorch is available here

Reference:

About

PyTorch Implementation of "NDDR-CNN: Layerwise Feature Fusing in Multi-Task CNNs by Neural Discriminative Dimensionality Reduction"

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages