Skip to content

Latest commit

 

History

History

nyud2-dir

ConR on NYUD2-DIR

This repository contains the implementation of ConR on NYUD2-DIR

The imbalanced regression framework and LDS+FDS are based on the public repository of Ren et al., CVPR 2022.

Installation

Prerequisites

  1. Download and extract NYU v2 dataset to folder ./data using
python download_nyud2.py
  1. (Optional) We use required meta files nyu2_train_FDS_subset.csv and test_balanced_mask.npy provided by Yang et al.(ICML 2021), which is used to set up efficient FDS feature statistics computation and balanced test set mask in folder ./data. To reproduce the results in the paper, please directly use these two files. For different FDS computation subsets and balanced test set masks, you can run
python preprocess_nyud2.py

Dependencies

  • PyTorch (>= 1.2, tested on 1.6)
  • numpy, pandas, scipy, tqdm, matplotlib, PIL, gdown, tensorboardX

Getting Started

1. Train baselines

To use Balanced MSE

python train.py --bmse --imp bni --init_noise_sigma 1.0 --fix_noise_sigma

2. Train a model with ConR

python train.py --conr -w 0.2 --beta 0.2 -e 0.2

3. Evaluate and reproduce

python test.py --eval_model <path_to_evaluation_ckpt>