Skip to content

PyTorch implementation of paper "UprightNet: Geometry-Aware Camera Orientation Estimation from Single Images", ICCV 2019

License

Notifications You must be signed in to change notification settings

PrendiProgramming/UprightNet

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UprightNet

PyTorch implementation of paper "UprightNet: Geometry-Aware Camera Orientation Estimation from Single Images", ICCV 2019 [Paper]

Dependency

The code is tested with Python3, Pytorch >= 1.0 and CUDA >= 10.0, the dependencies includes

  • tensorboardX
  • matplotlib
  • opencv
  • scikit-image
  • scipy

Dataset

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

Coordinate system

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

Training

  • 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

Testing:

  • 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

Inference

  • Download checkpoints.zip from link, unzip it and make sure checkpoints folder is in the root directory of codebase.

  • To run inference using an InteriorNet pretrained network on a custom image:

	python inference.py --mode ResNet --dataset interiornet --img_path /home/appuser/cutout/UprightNet/inference_images/2.jpg
  • To run inference using an ScanNet pretrained network on a custom image:
	python inference.py --mode ResNet --dataset scannet --img_path /home/appuser/cutout/UprightNet/inference_images/2.jpg

About

PyTorch implementation of paper "UprightNet: Geometry-Aware Camera Orientation Estimation from Single Images", ICCV 2019

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%