PyTorch implementation of paper "UprightNet: Geometry-Aware Camera Orientation Estimation from Single Images", ICCV 2019 [Paper]
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.
Our upright and local coordinate systems are defined as follows (corresponding to the normal images in the pre-processed datasets):
- Z upward, Y right, X backward , equivalent to
- Roll negative -> image rotate counterclockwise, Pitch positive -> camera rotate up
- 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