PyTorch implementation of paper "UprightNet: Geometry-Aware Camera Orientation Estimation from Single Images", ICCV 2019
The code is tested with Python3, Pytorch >= 1.0 and CUDA >= 10.0, the dependencies includes
- tensorboardX
- matplotlib
- opencv
- scikit-image
- scipy
- Download pre-processed InteriorNet and ScanNet, as well as their corresponding training/validation/testing txt files from link
- Modify the paths in train.py, test.py and txt files to match the dataset path in your machine.
- To train the network on the InteriorNet, run
python train.py --mode ResNet --dataset interiornet --w_grad 0.25 --w_pose 2.0- To train the network on the ScanNet, run
python train.py --mode ResNet --dataset scannet --w_grad 0.25 --w_pose 0.5-
Download checkpoints.zip from link, unzip it and make sure checkpoints folder is in the root directory of codebase.
-
To evaluate InteriorNet pretrained network on the InteriorNet testset, run
python test.py --mode ResNet --dataset interiornet- To evaluate ScanNet pretrained network on the ScanNet testset, run
python test.py --mode ResNet --dataset scannet