Skip to content
Implementation of HybridPose: 6D Object Pose Estimation under Hybrid Representation
Python C++ Cuda Other
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
assets add approach overview in README Jan 9, 2020
data initial upload Dec 11, 2019
lib use revised reweight once for pose refine, use median for pose error … Jan 5, 2020
trainers Merge branch 'master' of Jan 5, 2020
.gitmodules initial upload Dec 11, 2019 remove abstract from README --- too long Jan 9, 2020
requirements.txt initial upload Dec 11, 2019

HybridPose: 6D Object Pose Estimation under Hybrid Representations

This repository contains authors' implementation of HybridPose: 6D Object Pose Estimation under Hybrid Representations. Our implementation is based on PVNet. We warmly welcome any discussions related to our implementation and our paper. Please feel free to open an issue.


HybridPose consists of intermediate representation prediction networks and a pose regression module. The prediction networks take an image as input, and output predicted keypoints, edge vectors, and symmetry correspondences. The pose regression module consists of a initialization sub-module and a refinement sub-module. The initialization sub-module solves a linear system with predicted intermediate representations to obtain an initial pose. The refinement sub-module utilizes GM robust norm to obtain the final pose prediction. Approach overview


git clone --recurse-submodules

Environment set-up

Please install Anaconda first and execute the following commands:

conda create -y --name hybridpose python==3.7.4
conda install -y -q --name hybridpose -c pytorch -c anaconda -c conda-forge -c pypi --file requirements.txt
conda activate hybridpose

Compile the Ransac Voting Layer

The Ransac Voting Layer is used to generate keypoint coordinates from vector fields. Please execute the following commands (copied from PVNet):

cd lib/ransac_voting_gpu_layer
python build_ext --inplace

Compile the pose regressor

The pose regressor is written in C++ and has a Python wrapper. Please execute the following commands:

cd lib/regressor

Dataset set-up

We experimented HybridPose on Linemod and Occlusion Linemod. Let us first download the original datasets using the following commands:

python data/
python data/

Let us then download our augumented labels to these two datasets. Our augumented labels include:

  • Blender meshes on Linemod objects: For some reasons, pose labels on Linemod are not aligned perfectly with the 3D models. After discussions with the authors of PVNet, we followed their advice and used Blender meshes to correct Linemod pose labels.
  • Keypoints: both 2D and 3D coordinates. These labels are generated using FSP.
  • Symmetry: Symmetry correspondences in 2D and the normal of symmetry plane in 3D. These labels are generated using SymSeg.
  • Segmentation masks: On Linemod, we create segmentation masks by projecting 3D models. On Occlusion Linemod, we use the segmentation masks provided in PVNet.

They are uploaded here: Linemod, Occlusion Linemod.

The following commands unzip these labels to the correct directory:

unzip data/temp/ -d data/linemod
unzip data/temp/ -d data/occlusion_linemod


Please set the arguments in src/ execute the following command (note that we need to set LD_LIBRARY_PATH for the pose regressor):

# on bash shell
LD_LIBRARY_PATH=lib/regressor:$LD_LIBRARY_PATH python src/
# on fish shell
env LD_LIBRARY_PATH="lib/regressor:$LD_LIBRARY_PATH" python src/

If you use a different shell other than bash and fish, prepend "lib/regressor" to LD_LIBRARY_PATH and run python src/

Pre-trained weights

You can download our pre-trained weights below:

We have configured random seeds in src/ and expect you to re-produce identical weights by running our training script. Our training uses two graphics cards with a batch size of 12.

After you download the pre-trained weights, unzip them somewhere and configure --load_dir in src/ to the unzipped weights (e.g. saved_weights/occlusion_linemod/ape/checkpoints/0.02/499).

Running src/ now will save both ground truth and predicted poses to a directory called output.


To evaluate ADD(-S) accuracy of predicted poses, please set the arguments in src/ and run

python src/


If you find our work useful in your research, please kindly make a citation using:

    title={HybridPose: 6D Object Pose Estimation under Hybrid Representations},
    author={Chen Song and Jiaru Song and Qixing Huang},
You can’t perform that action at this time.