Home

Awesome

News:

CDPN: Coordinates-based Disentangled Pose Network for Real-time RGB-based 6-DoF Object Pose Estimation

CDPN: Coordinates-based Disentangled Pose Network for Real-time RGB-based 6-DoF Object Pose Estimation
Zhigang Li, Gu Wang, Xiangyang Ji
ICCV 2019 (Oral) paper, supplement, oral

We provide the clean-version training code of our ICCV 2019 paper "CDPN: Coordinates-based Disentangled Pose Network for Real-time RGB-based 6-DoF Object Pose Estimation". This code can perfectly reproduce the impressive results of our paper.

If you find this code useful for your research, please cite our paper:

@InProceedings{Li_2019_ICCV,
author = {Li, Zhigang and Wang, Gu and Ji, Xiangyang},
title = {CDPN: Coordinates-Based Disentangled Pose Network for Real-Time RGB-Based 6-DoF Object Pose Estimation},
booktitle = {Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV)},
month = {October},
year = {2019}
}

Overview

6-DoF object pose estimation from a single RGB image is a fundamental and long-standing problem in computer vision. Current leading approaches solve it by training deep networks to either regress both rotation and translation from image directly or to construct 2D-3D correspondences and further solve them via PnP indirectly. We argue that rotation and translation should be treated differently for their significant difference. In this work, we propose a novel 6-DoF pose estimation approach: Coordinates-based Disentangled Pose Network (CDPN), which disentangles the pose to predict rotation and translation separately to achieve highly accurate and robust pose estimation. Our method is flexible, efficient, highly accurate and can deal with texture-less and occluded objects. Extensive experiments on LINEMOD and Occlusion datasets are conducted and demonstrate the superiority of our approach. Concretely, our approach significantly exceeds the state-of-theart RGB-based methods on commonly used metrics.

overview

Results in our paper

result_in_paper

Environment

Set up python 3.6.7 environment:

pytorch==1.4.0
torchvision==0.5.0
numpy==1.19.3
opencv==4.5.0
tensorboardx==2.1

Other dependencies: 
yaml, pickle, pyparsing, progress, plyfile, scipy, tqdm, glob, os, sys...

Prepare the dataset

  1. Download training and test data of LINEMOD dataset:

    • The OpenGL training data can be found here (password: b7kt).
    • The real training data can be found here (password: sesw).
    • The test data can be found here (password: mhko).
    • The 3D object models can be found here (password: ba4f).
  2. Download VOC2012 dataset from official website (http://host.robots.ox.ac.uk/pascal/VOC/index.html).

    Note: The VOC2012 is only used as background data, which can also be replaced with other real-world datasets such as MS COCO dataset, SUN datset, and so on.

  3. Prepare the dataset as follows:

Root
├── dataset
│   ├── bg_images
│   │   └── VOC2012
│   └── lm
│       ├── models
│       │   ├── ape
│       │   └── ...
│       ├── imgn
│       │   ├── ape
│       │   └── ...
│       ├── real_test
│       │   ├── ape
│       │   └── ...
│       └── real_train
│           ├── ape
│           └── ...
├── asserts
├── tools
├── lib
├── dataset_cache (automatically built in the first running)
└── exp (automatically built in running)

Training

1. Stage 1:

sh train_stage1.sh

2. Stage 2:

sh train_stage2.sh

3. Stage 3:

sh train_stage3.sh

Testing

For testing various models trained in stage1, stage2 and stage3:

  1. Edit the config file by:
    • Setting the "test" from False to True.
    • Setting the "load_model" with path of the testing model.
  2. cd tools; and run:
python main.py --cfg=exps_cfg/path_to_your_config_file.yaml

Our trained models

Our trained model (download link, password: 92e2) and log file (download link, password: n792) of stage 1:

Object/Metric5^\circ \ 5cmADDProj.\ 2D
ape84.7615.2495.9
benchvise97.3894.8695.44
camera98.0471.7698.53
can98.3387.697.54
cat94.7154.8998.7
driller96.8391.9794.55
duck90.3325.5497.93
eggbox96.6299.2598.69
glue80.3190.3597.59
holepuncher9874.699.81
iron94.9994.0895.71
lamp97.2296.8392.9
phone91.1283.7698.3
Average93.7475.4497.05

Our trained model (download link, password: q8rq) and log file (download, password: mdle) of stage 2:

Object/Metric2cm5cm
ape89.7199.14
benchvise92.8299.9
camera95.199.9
can94.7899.8
cat93.1199.8
driller83.5599.31
duck91.0899.72
eggbox95.0299.62
glue82.2499.42
holepuncher94.0199.71
iron89.4899.49
lamp89.8399.71
phone83.6698.87
Average90.3499.57

Our trained model (download, password: ksoo) and log file (download, password: tb1q) of stage 3:

Object/Metric5^\circ \ 5cmADDProj.\ 2D
ape86.6767.3397.52
benchvise98.3598.7498.74
camera98.7392.8498.63
can98.9296.5699.61
cat95.6186.6399.30
driller96.9395.1494.85
duck92.3075.2198.40
eggbox97.8499.6299.06
glue82.2499.6198.36
holepuncher98.4889.7299.52
iron95.7197.8597.85
lamp97.7997.7995.68
phone92.1690.6596.79
Average94.7591.3698.02

Acknowledgement

This work is affliated with Tsinghua University Xiangyang Ji's Lab. For business cooperation, welcome to contact: lzg15@mails.tsinghua.edu.cn & xyji@tsinghua.edu.cn.

Copyright (c) Tsinghua University Xiangyang Ji's Lab. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.