SHARP: Segmentation of Hands and Arms by Range using Pseudo-Depth for Enhanced Egocentric 3D Hand Pose Estimation and Action Recognition
Table of Contents
Abstract
Hand pose represents key information for action recognition in the egocentric perspective, where the user is interacting with objects. We propose to improve egocentric 3D hand pose estimation based on RGB frames only by using pseudo-depth images. Incorporating state-of-the-art single RGB image depth estimation techniques, we generate pseudo-depth representations of the frames and use distance knowledge to segment irrelevant parts of the scene. The resulting depth maps are then used as segmentation masks for the RGB frames. Experimental results on H2O Dataset confirm the high accuracy of the estimated pose with our method in an action recognition task. The 3D hand pose, together with information from object detection, is processed by a transformer-based action recognition network, resulting in an accuracy of 91.73%, outperforming all state-of-the-art methods. Estimations of 3D hand pose result in competitive performance with existing methods with a mean pose error of 28.66 mm. This method opens up new possibilities for employing distance information in egocentric 3D hand pose estimation without relying on depth sensors.
Usage:
Hand Pose Inference with SHARP
- Download H2O Dataset from project page: https://taeinkwon.com/projects/h2o/
- Install DPT-Hybrid from: https://huggingface.co/docs/transformers/model_doc/dpt
- For using SHARP generate pseudo-depth images running script:
python generate_depth_h2o.py
- For not using SHARP set config_h2o_3D_test.yaml:
use_depth: False
- For using SHARP with oracle ground truth data set config_h2o_3D_test.yaml:
use_depth: True depth_img_type: 'gt'
- Setup config file for testing config_h2o_3D_test.yaml with a path to downloaded weights and path to dataset
- Run command:
python test_pose.py -c cfgs/config_h2o_3d_test.yaml
Action Recognition Inference
To run inference using ground truth poses set up the config file ar_inference.yaml:
hand_pose_type: 'gt_hand_pose' load_checkpoint: True checkpoint_path: 'your path to downloaded checkpoint'
To get results on test subset, the script generates .zip file that has to be submitted to codelab challange: https://codalab.lisn.upsaclay.fr/competitions/4820
To get SHARP hand pose estimations:
python get_3D_pose.py --path "path to dataset" --imgs_path "path to imgs in dataset" --use_depth True --device 1 --load_model True --load_model_path "path to SHARP weights"
To get Yolo Object Detection for H2O please follow our second repository and update config from 'GT' to Yolov7
obj_pose_type: 'YoloV7'
To Re-run inference with SHARP weights
hand_pose_type: 'hand_pose_3d_own_masked' load_checkpoint: True checkpoint_path: 'your path to downloaded checkpoint'
Weights
SHARP Hand Pose Model Weights:
SHARP 3D Hand Pose Estimation with Oracle Grund Truth Model Weights
Action Recognition Model Weights:
Bibtex
If you find this work useful or the models in your research or applications, please cite the paper using this BibTeX
@article{mucha2024sharp, title={SHARP: Segmentation of Hands and Arms by Range using Pseudo-Depth for Enhanced Egocentric 3D Hand Pose Estimation and Action Recognition}, author={Mucha, Wiktor and Wray, Michael and Kampel, Martin}, journal={arXiv preprint arXiv:2408.10037}, year={2024} }
