Git Product home page Git Product logo

mask2hand's Introduction

Mask2Hand

PyTorch implementation of "Mask2Hand: Learning to Predict the 3D Hand Pose and Shape from Shadow",
Li-Jen Chang, Yu-Cheng Liao, Chia-Hui Lin, and Hwann-Tzong Chen
arXiv preprint arXiv:2205.15553
[Paper]

Environment Setup

  • Create the environment from the provided environment.yml file.
    cd Mask2Hand
    conda env create -f environment.yml
    conda activate pytorch3d
    
  • Download the pretrained model from Dropbox link and put it in the directory checkpoint using the following commands.
    mkdir -p ./checkpoint
    wget -O ./checkpoint/model_pretrained.pth https://www.dropbox.com/s/mujjj8ov5e8r9ok/model_pretrained.pth?dl=1
    
  • Download FreiHAND Dataset v2 from the official website and unzip it into the directory dataset/freihand/.
    mkdir -p ./dataset/freihand
    cd dataset
    wget https://lmb.informatik.uni-freiburg.de/data/freihand/FreiHAND_pub_v2.zip
    unzip -q ./FreiHAND_pub_v2.zip -d ./freihand
    cd ..
    

Run a Demo

  • If you want to use GPU, run
    CUDA_VISIBLE_DEVICES=0 python demo.py
    
  • Otherwise, run
    python demo.py
    
  • The demo results will be saved in the directory demo_output.

Evaluation

  • Calculate the error of the predicted hand joints and meshes
    CUDA_VISIBLE_DEVICES=0 python test.py
    
  • Calculate the mIoU between the ground-truth and projected silhouettes
    CUDA_VISIBLE_DEVICES=0 python test_iou.py
    

Training

Run the following script to train a model from scratch.

CUDA_VISIBLE_DEVICES=0 python train.py

Citation

@article{chang2022mask2hand,
  author={Li-Jen Chang and Yu-Cheng Liao and Chia-Hui Lin and Hwann-Tzong Chen},
  title={Mask2Hand: Learning to Predict the 3D Hand Pose and Shape from Shadow},
  journal={CoRR},
  volume={abs/2205.15553},
  year={2022}
}

Acknowledgement

The PyTorch implementation of MANO comes from GrabNet and some visualization utilities are modified from CMR.

mask2hand's People

Contributors

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