PVNet: Pixel-wise Voting Network for 6DoF Pose Estimation
Sida Peng, Yuan Liu, Qixing Huang, Xiaowei Zhou, Hujun Bao
CVPR 2019 oral
Project Page
Any questions or discussions are welcomed!
Check TRUNCATION_LINEMOD.md for information about the Truncation LINEMOD dataset.
The code uses PyTorch v0.4.0. After installing PyTorch, we need compile several files.
- Compile the Ransac Voting Layer
ROOT=/path/to/pvnet
cd $ROOT/lib/ransac_voting_gpu_layer
python setup.py build_ext --inplace
- Compile some extension utils
cd $ROOT/lib/utils/extend_utils
Revise the cuda_include
and dart
in build_extend_utils_cffi.py
to be compatible with the CUDA in your computer.
python build_extend_utils_cffi.py
Add the lib
under extend_utils
to the LD_LIDBRARY_PATH
export LD_LIDBRARY_PATH=$LD_LIDBRARY_PATH:/path/to/bb8-voter/lib/utils/extend_utils/lib
Download the LINEMOD
wget -O LINEMOD.tar --no-check-certificate "https://onedrive.live.com/download?cid=05750EBEE1537631&resid=5750EBEE1537631%21135&authkey=AJRHFmZbcjXxTmI"
Download the LINEMOD_ORIG, which can be found at here.
Download the OCCLUSION_LINEMOD, which can be found at here
mkdir $ROOT/data
ln -s path/to/LINEMOD $ROOT/data/LINEMOD
ln -s path/to/LINEMOD_ORIG $ROOT/data/LINEMOD_ORIG
ln -s path/to/OCCLUSION_LINEMOD $ROOT/data/OCCLUSION_LINEMOD
python lib/utils/data_utils.py
See pvnet-rendering for information about the image synthesis.
Before training, remember to add the lib
under extend_utils
to the LD_LIDBRARY_PATH
export LD_LIDBRARY_PATH=$LD_LIDBRARY_PATH:/path/to/bb8-voter/lib/utils/extend_utils/lib
Training
python tools/train_linemod.py --cfg_file configs/linemod_train.json --linemod_cls cat
We provide the pretrained models of each object, which can be found at here.
Testing
python tools/train_linemod.py --cfg_file configs/linemod_train.json --linemod_cls cat --test_model