This repository contains the implementation of ANSCH, a canonical representation for different articulated objects in a given category, together with an efficient neural network for pose estimation and joints regression of articulated objects from a single depth point cloud.
If you find this code useful in your work, please consider citing:
@article{li2019category,
title={Category-Level Articulated Object Pose Estimation},
author={Li, Xiaolong and Wang, He and Yi, Li and Guibas, Leonidas and Abbott, A Lynn and Song, Shuran},
journal={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition},
year={2020}
}
This implementation has been tested on Ubuntu 16.04 LTS, and CentOS 7.0, make sure CUDA and CUDNN are installed.
Two configurations have been tested:
Clone the repository
git clone https://github.com/dragonlong/articulated-pose.git
Setup python environment
conda create -n articulated-pose python=3.6
source activate articulated-pose
pip install -r requirements.txt
sh compile_op.sh
You could check our online CodeLab demo to reproduce some of our results.
You could simply download our pre-processed dataset to ./dataset folder. Below is a step-by-step tutorial on rendering your dataset using Pybullet, here we take eyeglasses in shape2motion for example:
Setup global path infos
vim global_info.py
Download shape2motion dataset
bash download_shape2motion.sh
Create URDF
cd tools && python json2urdf.py
Rendering Data
python render_synthetic.py --dataset='shape2motion' --item='eyeglasses' --num=30 --cnt=31 --pitch="-90,5" --roll="-10,10" --yaw="-180,180" --min_angles="0,0" --max_angles="90,90"
Preprocessing
python preprocess_data.py --dataset='shape2motion' --item='eyeglasses'
Train/test split and visualization
cd ../lib && python dataset.py --item=eyeglasses --dataset=shape2motion --is_split --show_fig
Please download our pretrained models from here(updated on April 22nd, 2020), and put into the ./results/model/ folder. Below are links to pretrained models of different categories, results might be slightly different with these checkpoints as we updated our training.
To train the network
python main.py --item='eyeglasses' --nocs_type='ancsh' --gpu='0'
python main.py --item='eyeglasses' --nocs_type='npcs' --gpu='1'
To generate estimation and evaluation results on per-part pose estimation, 3D iou, joint states, and joint parameters, you could simply run: bash evaluation.sh. Below is a detailed step by step tutorial:
python main.py --item='eyeglasses' --nocs_type='ancsh' --test
python main.py --item='eyeglasses' --nocs_type='npcs' --test
cd evaluation
python compute_gt_pose.py --item='eyeglasses' --domain='unseen' --nocs='ANCSH' --save
# npcs baseline estimation
python baseline_npcs.py --item='eyeglasses' --domain='unseen' --nocs='NPCS'
# run non-linear optimization over test group
python pose_multi_process.py --item='eyeglasses' --domain='unseen'
# pose & relative
python eval_pose_err.py --item='eyeglasses' --domain='unseen' --nocs='ANCSH'
# 3d miou estimation
python compute_miou.py --item='eyeglasses' --domain='unseen' --nocs='ANCSH'
# evaluate joint estimations
python eval_joint_params.py --item='eyeglasses' --domain='unseen' --nocs='ANCSH'
Please check the online demo for further visualizations.
Demo with point cloud rendering is inspired by: https://github.com/zekunhao1995/PointFlowRenderer.