Code Monkey home page Code Monkey logo

htt's Introduction

Hierarchical Temporal Transformer for 3D Hand Pose Estimation and Action Recognition from Egocentric RGB Videos

Original implementation of the paper Yilin Wen, Hao Pan, Lei Yang, Jia Pan, Taku Komura and Wenping Wang, "Hierarchical Temporal Transformer for 3D Hand Pose Estimation and Action Recognition from Egocentric RGB Videos", CVPR, 2023. [Paper][Supplementary Video]

A version of extended abstract was accpeted by the Human Body, Hands, and Activities from Egocentric and Multi-view Cameras Workshop, ECCV, 2022. [Extended Abstract]

Requirements

Environment

The code is tested with the following environment:

Ubuntu 20.04
python 3.9
pytorch 1.10.0
torchvision 0.11.0

Other dependent packages as included in requirements.txt can be installed by pip. Note that we also refer to the utility functions in libyana. To install this libyana library, we follow LPC, CVPR 2020 to run:

pip install git+https://github.com/hassony2/[email protected]

Data Preprocessing

To facilitate computation, for downloaded FPHA and H2O datasets: We resize all images into the 480x270 pixels, and use lmdb to manage the training images. One may refer to the preprocess_utils.py for related functions.

Pretrained Model

Our pretrained weights for FPHA and H2O, and other related data for running the demo code of the inference stage can be downloaded via the following link: [Inference Data] (included in the ws.zip)

which includes:

  1. ./ckpts/: The pretrained ckpt files for the FPHA and H2O datasets.
  2. ./curves/: .npz files for visualizing the 3D PCK(-RA) at different error thresholds on FPHA and H2O.

You may keep the downloaded ws folder under the root directory of this git repository.

Quick Start

Plot 3D PCK(-RA) Curves for Hand Pose Estimation

Run

python plot_pck_curves.py

to plot the curves the 3D PCK(-RA) at different error thresholds on FPHA and H2O.

Evaluation for Hand Pose Estimation and Action Recognition

Run

CUDA_VISIBLE_DEVICES=0 python eval.py --batch_size <batch_size> \
--val_split <val_split> --train_dataset <dataset> --val_dataset <dataset> \
--dataset_folder <path_to_dataset_root> \
--resume_path <path_to_pth>

for evaluation on the dataset and split given by <dataset> and <val_split>.

Note that for the test split of H2O, we report the hand MEPE and action recall rate by referring to our submitted results in the H2O challenge codalab.

Training

Run python train.py with parsed arguments to train a network with regard to your training data.

Acknowledgement

For the transformer architecture, we rely on the code of DETR, ECCV 2020 and Attention is All You Need, NeurIPS 2017.

For evaluation of 3D hand pose estimation, we follow the code of libyana and original ColorHandPose3DNetwork, ICCV 2017.

For data processing and augmentation, resnet architecture, and other utility functions, our code is heavily relied on the code of LPC, CVPR 2020 and libyana.

Citiation

If you find this work helpful, please consider citing

@article{wen2023hierarchical,
  title={Hierarchical Temporal Transformer for 3D Hand Pose Estimation and Action Recognition from Egocentric RGB Videos},
  author={Wen, Yilin and Pan, Hao and Yang, Lei and Pan, Jia and Komura, Taku and Wang, Wenping},
  journal={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year={2023}
}

htt's People

Contributors

fylwen avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.