Reconstructing Hand-Held Objects from Monocular Video
Di Huang, Xiaopeng Ji, Xingyi He, Jiaming Sun, Tong He, Qing Shuai, Wanli Ouyang, Xiaowei Zhou
Siggraph Asia 2022 Conference Track
Note: The hand tracking code will be released with the EasyMocap repo.
conda create -n hhorv1 python=3.7
# PyTorch
conda install pytorch==1.8.0 torchvision==0.9.0 torchaudio==0.8.0 cudatoolkit=10.2 -c pytorch
# requirements
pip install -r requirements.txt
We use the following 3rd party libraries and directly add their code to this repo(NanoDet, EasyMocap, BackgroundMattingV2, MMSegmentation). Our dense reconstruction code is built upon NeuS. Thanks for their great work and we appreciate their contribution to the community. Please follow their installation instructions and LICENSE.
# NanoDet (for detection during hand tracking)
cd nanodet
python setup.py develop --user
# EasyMocap (for hand tracking)
cd EasyMocap
python setup.py develop --user
# Background Matting (for foreground segmentation)
# MMSegmentation (for hand segmentation)
cd mmsegmentation
pip install mmcv-full==1.4.0
python setup.py develop --user
mmsegmentation/work_dirs
.nanodet/data
.data/DEMO
.# Edit 0_set_path.sh
vim apps/0_set_path.sh
# Prepare video to images (done in the demo data)
# sh apps/1_video_to_imgs.sh
# Run hand tracking (done in the demo data)
# sh apps/2_run_easymocap.sh
# Run mask generation
sh apps/3_background_matting.sh
# Generate camera poses by MANO
sh apps/4_get_mano_camera.sh
# Run hand segmentation
sh apps/5_run_segmentation.sh
# Dense reconstruction
cd NeuS
vim confs/demo/hand_scanner_wmask_wbarf_wsem_warp10.0_mask5_demo.conf # Edit the path to the demo data
CUDA_VISIBLE_DEVICES=0 python exp_runner.py --mode train --conf ./confs/demo/hand_scanner_wmask_wbarf_wsem_warp10.0_mask5_demo.conf --case demo
CUDA_VISIBLE_DEVICES=0 python exp_runner.py --mode validate_mesh --conf ./confs/demo/hand_scanner_wmask_wbarf_wsem_warp10.0_mask5_demo.conf --case demo --is_continue
After running the above commands, you can find the reconstructed mesh in NeuS/exp/demo/handscanner/meshes/00100000_org.ply
and NeuS/exp/demo/handscanner/meshes/00100000_obj.ply
. The *_org.ply
is the reconstructed mesh with the hand and the *_obj.ply
is the reconstructed mesh without the hand. For 00100000_obj.ply
, you can use MeshLab to remove the useless parts (e.g., the remaining hand) and complete the hole with Poisson reconstruction or
hole_fixer.
@inproceedings{huang2022hhor,
title={Reconstructing Hand-Held Objects from Monocular Video},
author={Huang, Di and Ji, Xiaopeng and He, Xingyi and Sun, Jiaming and He, Tong and Shuai, Qing and Ouyang, Wanli and Zhou, Xiaowei},
booktitle={SIGGRAPH Asia Conference Proceedings},
year={2022},
}