Git Product home page Git Product logo

motionbert's Introduction

MotionBERT: Unified Pretraining for Human Motion Analysis

PWCPWC

Project Page | Paper

This is the official PyTorch implementation of the paper "MotionBERT: Unified Pretraining for Human Motion Analysis".

Installation

conda create -n motionbert python=3.7 anaconda
conda activate motionbert
# Please install PyTorch according to your CUDA version.
conda install pytorch torchvision torchaudio pytorch-cuda=11.6 -c pytorch -c nvidia
pip install -r requirements.txt

Usage

Task Document
Pretrain TBD
3D human pose estimation docs/pose3d.md
Skeleton-based action recognition docs/action.md
Mesh recovery docs/mesh.md

Using MotionBERT for new tasks

'''	    
  x: 2D skeletons 
    type = <class 'torch.Tensor'>
    shape = [batch size * frames * joints(17) * channels(3)]
    
  MotionBERT: pretrained MotionBERT
    type = <class 'lib.model.DSTformer.DSTformer'>
    
  E: encoded motion representation
    type = <class 'torch.Tensor'>
    shape = [batch size * frames * joints(17) * channels(512)]
'''
E = MotionBERT.get_representation(x)

Hints

  1. The model could handle different input lengths (no more than 243 frames). No need to explicitly specify the input length elsewhere.
  2. The model uses 17 body keypoints (H36M format). If you are using other formats, please convert them before feeding to MotionBERT.
  3. Please refer to model_action.py and model_mesh.py for examples of (easily) adapting MotionBERT to different downstream tasks.

Model Zoo

Model Download Link Performance
MotionBERT (pretrained motion encoder weights) OneDrive -
3D Pose (H36M-SH, scratch) OneDrive 39.1mm (MPJPE)
3D Pose (H36M-SH, finetuned) OneDrive 37.4mm (MPJPE)
Action Recognition (NTU-RGB+D x-sub, finetuned) OneDrive 97.3% (Top1 Acc)
Action Recognition (NTU-RGB+D x-view, finetuned) OneDrive 92.8% (Top1 Acc)
Action Recognition (NTU-RGB+D-120 one-shot, finetuned) OneDrive 67.4% (Top1 Acc)
Mesh Recovery (with 3DPW, finetuned) OneDrive 94.2mm (MPVE)

TODO

  • Scripts and docs for pretraining

  • Demo for custom videos

BibTeX

If you find our work useful for your research, please consider citing the paper:

@article{motionbert2022,
  title   =   {MotionBERT: Unified Pretraining for Human Motion Analysis}, 
  author  =   {Zhu, Wentao and Ma, Xiaoxuan and Liu, Zhaoyang and Liu, Libin and Wu, Wayne and Wang, Yizhou},
  year    =   {2022},
  journal =   {arXiv preprint arXiv:2210.06551},
}

motionbert's People

Contributors

walter0807 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.