(ICONIP 2020) MobileHand: Real-time 3D Hand Shape and Pose Estimation from Color Image

Overview

MobileHand: Real-time 3D Hand Shape and Pose Estimation from Color Image

This repo contains the source code for MobileHand, real-time estimation of 3D hand shape and pose from a single color image running at over 110 Hz on a GPU or 75 Hz on a CPU.

Paper | Project | Video

If you find MobileHand useful for your work, please consider citing

@inproceedings{MobileHand:2020,
  title     = {MobileHand: Real-time 3D Hand Shape and Pose Estimation from Color Image},
  author    = {Guan Ming, Lim and Prayook, Jatesiktat and Wei Tech, Ang},
  booktitle = {27th International Conference on Neural Information Processing (ICONIP)},
  year      = {2020}
}

Setup

The simplest way to run our implementation is to use anaconda and create an environment called mobilehand

conda env create -f environment.yaml
conda activate mobilehand

Next, download MANO right hand model

  • Go to MANO project page
  • Click on Sign In and register for your account
  • Download Models & Code (mano_v1_2.zip)
  • Unzip and copy the file mano_v1_2/models/MANO_RIGHT.pkl into the mobilehand/model folder

Demo

cd code/ # Change directory to the folder `mobilehand/code/`

python demo.py -m image -d stb      # Test on sample image (STB dataset)
python demo.py -m image -d freihand # Test on sample image (FreiHAND dataset)
python demo.py -m video             # Test on sample video
python demo.py -m camera            # Test with webcam
python demo.py -m camera -c         # Add -c to enable GPU processing

Dataset

[2017 ICIP] A Hand Pose Tracking Benchmark from Stereo Matching. [PDF] [Project] [Code]

Jiawei Zhang, Jianbo Jiao, Mingliang Chen, Liangqiong Qu, Xiaobin Xu, and Qingxiong Yang

[ICCV 2019] FreiHAND: A Dataset for Markerless Capture of Hand Pose and Shape from Single RGB Images. [PDF] [Project] [Code]

Christian Zimmermann, Duygu Ceylan, Jimei Yang, Bryan Russell, Max Argus, Thomas Brox

Related works

[CVPR 2019] Pushing the Envelope for RGB-based Dense 3D Hand Pose Estimation via Neural Rendering. [PDF]

Seungryul Baek, Kwang In Kim, Tae-Kyun Kim

[CVPR 2019] 3D Hand Shape and Pose from Images in the Wild. [PDF] [Code]

Adnane Boukhayma, Rodrigo de Bem, Philip H.S. Torr

[CVPR 2019] 3D Hand Shape and Pose Estimation from a Single RGB Image. [PDF] [Project] [Code] (Oral)

Liuhao Ge, Zhou Ren, Yuncheng Li, Zehao Xue, Yingying Wang, Jianfei Cai, Junsong Yuan

[CVPR 2019] Learning joint reconstruction of hands and manipulated objects. [PDF] [Code] [Code] [Project]

Yana Hasson, Gül Varol, Dimitris Tzionas, Igor Kalevatykh, Michael J. Black, Ivan Laptev, and Cordelia Schmid

[ICCV 2019] End-to-end Hand Mesh Recovery from a Monocular RGB Image. [PDF] [Code]

Xiong Zhang*, Qiang Li*, Wenbo Zhang, Wen Zheng

[CVPR 2020] Weakly-Supervised Mesh-Convolutional Hand Reconstruction in the Wild. [PDF] [Project] (Oral)

Dominik Kulon, Riza Alp Güler, Iasonas Kokkinos, Michael Bronstein, Stefanos Zafeiriou

[CVPR 2020] Monocular Real-time Hand Shape and Motion Capture using Multi-modal Data. [PDF] [Project] [Code]

Yuxiao Zhou, Marc Habermann, Weipeng Xu, Ikhsanul Habibie, Christian Theobalt, Feng Xu

Key references

[MVA 2019] Accurate Hand Keypoint Localization on Mobile Devices. [PDF] [Code]

Filippos Gouidis, Paschalis Panteleris, Iason Oikonomidis, Antonis Argyros

[CVPR 2018] End-to-end Recovery of Human Shape and Pose. [PDF] [Project] [Code]

Angjoo Kanazawa, Michael J Black, David W. Jacobs, Jitendra Malik

[SIGGRAPH ASIA 2017] Embodied Hands:Modeling and Capturing Hands and Bodies Together. [PDF] [Project]

Javier Romero, Dimitrios Tzionas, Michael J Black

Comments
  • why the rotate_finger function rotate about y axis can describe A/A and F/E?

    why the rotate_finger function rotate about y axis can describe A/A and F/E?

    Im confused about code:

    rotate_finger = lambda j1, j2 : rvec2rmat(np.array( [0,np.arctan((j1[2]-j2[2])/(j1[0]-j2[0])),0])) # Rotate about y axis Z[0:2,0:3] = rotate_finger(Jrest[1,:],Jrest[0,:])[1:3,:] # 0:MCP abduct/adduct, 1:MCP flex/ext

    why rotate y axis can get A/A & F/E movement

    opened by yfynb1111 4
  • Mesh result is not correct by running utils_mpi_model.py using freihand ground truth data

    Mesh result is not correct by running utils_mpi_model.py using freihand ground truth data

    Mesh result is not correct by running utils_mpi_model.py using freihand ground truth data.

        ### test freihand dataset ###
        freihand_root_dir = "FreiHAND_pub_v2/"
        freihand_K_path = os.path.join(freihand_root_dir, "training_K.json")
        freihand_mano_path = os.path.join(freihand_root_dir, "training_mano.json")
        freihand_xyz_path = os.path.join(freihand_root_dir, "training_xyz.json")
    
        K_list = json.load(open(freihand_K_path, 'r'))
        mano_list = json.load(open(freihand_mano_path, 'r'))
        xyz_list = json.load(open(freihand_xyz_path, 'r'))
        img_path_list = [os.path.join(freihand_root_dir, "training/rgb/%08d.jpg" % idx) \
                         for idx in range(len(mano_list))]
    
        select_index = 0
        img_path = img_path_list[select_index]
        K_param = K_list[select_index]
        mano_param = mano_list[select_index]
        mano_param = np.array(mano_param)[0]
        xyz_param = xyz_list[select_index]
    
        pose_param = mano_param[:48]
        shape_param = mano_param[48:58]
        uv_root_param = mano_param[58:60]
        scale_param = mano_param[60:]
    
        beta = torch.Tensor(shape_param).reshape([bs, 10])
        pose = torch.Tensor(pose_param[3:]).reshape([bs, 15, 3])
        rvec = torch.Tensor(pose_param[:3]).reshape([bs, 3])
        tvec = torch.Tensor(mano_param[58:61]).reshape([bs, 1, 3])
        xyz_root = torch.Tensor(xyz_param[0])
    
    opened by youngstu 4
  • Some questions about the Z mat.

    Some questions about the Z mat.

    Hi, very great work !

    I feel some puzzles about the generation of Z mat.

    # Convert rotation vector (3 by 1 or 1 by 3) to rotation matrix (3 by 3)
    rvec2rmat = lambda rvec : cv2.Rodrigues(rvec)[0]
    # Note: j1 is the joint of interest and j2 is its parent (1 by 3)
    rotate_finger = lambda j1, j2 : rvec2rmat(np.array([0, np.arctan((j1[2]-j2[2])/(j1[0]-j2[0])),0])) # Rotate about y axis
    
    Z[0:2,0:3] = rotate_finger(Jrest[1,:],Jrest[0,:])[1:3,:] # 0:MCP abduct/adduct, 1:MCP flex/ext
    

    If I understand correctly, the return of function rotate_finger is a rotation matrix, so why Z[0:2,0:3] = rotate_finger(...)[1:3,:] ? (bs, 23) dot (23, 45) = (bs, 45) and the pose of mano input should be 45 axis-angle values, I just can not understand why the Z mat can be generated by the rotation matrix such as Z[0:2,0:3] = rotate_finger(...)[1:3,:], are the results of (bs, 23) dot (23, 45) 45 axis-angle values?.

    opened by sean-001 2
  • Joint angle representation

    Joint angle representation

    Hi, I feel a little confused about the joint angle representation, can you please give me more details? (1) How does the 23 degrees defined and trained, are there any ground truth data? (2) How is the matrix T that transform the local joint angles to match MANO pose computed ?

    opened by sean-001 2
  • In Training stage, whether it should remove Chumpy from MANO model?

    In Training stage, whether it should remove Chumpy from MANO model?

    In Training stage, whether it should remove Chumpy from MANO model?

    Does utils_mpi_model.py file need to be modified during the training phase?

    What is the difference between the utils_mpi_model.py and manopth?

    opened by youngstu 1
  • Paper access

    Paper access

    Hi @gmntu , Thanks for opening source this program. I found that the original paper of this program is hosted on researchgate but I cannot reach it because of "some unusual traffic from my network". Could you upload the original paper to arixiv or send a copy of it by email to me? Sorry for this abnormal request.

    opened by vra 0
  • about the cam parameter converge

    about the cam parameter converge

    I found the cam params (scale tx, ty) converge worse with or without the cam loss, and i use weak perspective in my code, in which kpy_2d = scale(kyp3d[, :2]) + txy. I think the key reason is the focal length of the freihand dataset is different with each image, and it range from 400 mm to 800 mm. So does the scale (focal / global_z) differs with each image. So maybe the network cannot regress the scale well? I want to how to make cam params converget better? is there any tricks in training? thanks!

    opened by lvZic 0
  • mobilenet v3 not convernge

    mobilenet v3 not convernge

    hi, i try to replace resnet netwrok in HMR by mobilenet v3, according to your work. however, i found the training becomes not convernge and the loss becomes larger. I used the pretrained v3 small model by imagenet. Can u tell me where i missed?

    opened by lvZic 0
  • How to get 3D coordinates of camera coordinate system?

    How to get 3D coordinates of camera coordinate system?

    How to get 3D coordinates of camera coordinate system?

    Considering that the absolute coordinates of hand are not obtained, how can 3d hand tracking be applied to augmented reality scenes such as AR glasses?

    opened by youngstu 1
[ICCV 2021] Encoder-decoder with Multi-level Attention for 3D Human Shape and Pose Estimation

MAED: Encoder-decoder with Multi-level Attention for 3D Human Shape and Pose Estimation Getting Started Our codes are implemented and tested with pyth

ZiNiU WaN 176 Dec 15, 2022
Python and C++ implementation of "MarkerPose: Robust real-time planar target tracking for accurate stereo pose estimation". Accepted at LXCV @ CVPR 2021.

MarkerPose: Robust real-time planar target tracking for accurate stereo pose estimation This is a PyTorch and LibTorch implementation of MarkerPose: a

Jhacson Meza 47 Nov 18, 2022
WHENet: Real-time Fine-Grained Estimation for Wide Range Head Pose

WHENet: Real-time Fine-Grained Estimation for Wide Range Head Pose Yijun Zhou and James Gregson - BMVC2020 Abstract: We present an end-to-end head-pos

null 368 Dec 26, 2022
Demo for Real-time RGBD-based Extended Body Pose Estimation paper

Real-time RGBD-based Extended Body Pose Estimation This repository is a real-time demo for our paper that was published at WACV 2021 conference The ou

Renat Bashirov 118 Dec 26, 2022
This repo is official PyTorch implementation of MobileHumanPose: Toward real-time 3D human pose estimation in mobile devices(CVPRW 2021).

Github Code of "MobileHumanPose: Toward real-time 3D human pose estimation in mobile devices" Introduction This repo is official PyTorch implementatio

Choi Sang Bum 203 Jan 5, 2023
Real-time pose estimation accelerated with NVIDIA TensorRT

trt_pose Want to detect hand poses? Check out the new trt_pose_hand project for real-time hand pose and gesture recognition! trt_pose is aimed at enab

NVIDIA AI IOT 803 Jan 6, 2023
Light-weight network, depth estimation, knowledge distillation, real-time depth estimation, auxiliary data.

light-weight-depth-estimation Boosting Light-Weight Depth Estimation Via Knowledge Distillation, https://arxiv.org/abs/2105.06143 Junjie Hu, Chenyou F

Junjie Hu 13 Dec 10, 2022
SE3 Pose Interp - Interpolate camera pose or trajectory in SE3, pose interpolation, trajectory interpolation

SE3 Pose Interpolation Pose estimated from SLAM system are always discrete, and

Ran Cheng 4 Dec 15, 2022
《Unsupervised 3D Human Pose Representation with Viewpoint and Pose Disentanglement》(ECCV 2020) GitHub: [fig9]

Unsupervised 3D Human Pose Representation [Paper] The implementation of our paper Unsupervised 3D Human Pose Representation with Viewpoint and Pose Di

null 42 Nov 24, 2022
Adversarial Color Enhancement: Generating Unrestricted Adversarial Images by Optimizing a Color Filter

ACE Please find the preliminary version published at BMVC 2020 in the folder BMVC_version, and its extended journal version in Journal_version. Datase

null 28 Dec 25, 2022
Simple Pose: Rethinking and Improving a Bottom-up Approach for Multi-Person Pose Estimation

SimplePose Code and pre-trained models for our paper, “Simple Pose: Rethinking and Improving a Bottom-up Approach for Multi-Person Pose Estimation”, a

Jia Li 256 Dec 24, 2022
A hand tracking demo made with mediapipe where you can control lights with pinching your fingers and moving your hand up/down.

HandTrackingBrightnessControl A hand tracking demo made with mediapipe where you can control lights with pinching your fingers and moving your hand up

Teemu Laurila 19 Feb 12, 2022
MohammadReza Sharifi 27 Dec 13, 2022
A minimal solution to hand motion capture from a single color camera at over 100fps. Easy to use, plug to run.

Minimal Hand A minimal solution to hand motion capture from a single color camera at over 100fps. Easy to use, plug to run. This project provides the

Yuxiao Zhou 824 Jan 7, 2023
Repository for the paper "PoseAug: A Differentiable Pose Augmentation Framework for 3D Human Pose Estimation", CVPR 2021.

PoseAug: A Differentiable Pose Augmentation Framework for 3D Human Pose Estimation Code repository for the paper: PoseAug: A Differentiable Pose Augme

Pyjcsx 328 Dec 17, 2022
This repository contains codes of ICCV2021 paper: SO-Pose: Exploiting Self-Occlusion for Direct 6D Pose Estimation

SO-Pose This repository contains codes of ICCV2021 paper: SO-Pose: Exploiting Self-Occlusion for Direct 6D Pose Estimation This paper is basically an

shangbuhuan 52 Nov 25, 2022
Python scripts for performing 3D human pose estimation using the Mobile Human Pose model in ONNX.

Python scripts for performing 3D human pose estimation using the Mobile Human Pose model in ONNX.

Ibai Gorordo 99 Dec 31, 2022
Hand-distance-measurement-game - Hand Distance Measurement Game

Hand Distance Measurement Game This is program is made to calculate the distance

Priyansh 2 Jan 12, 2022