Coder Social home page Coder Social logo

shaurya0108 / handnet-pipeline Goto Github PK

View Code? Open in Web Editor NEW

This project forked from irvlutd/handnet-pipeline

0.0 0.0 0.0 36.87 MB

Hand Detection + Pose Estimation | https://arxiv.org/abs/2207.02959 | https://openreview.net/forum?id=OzP68WT3UA

Home Page: https://irvlutd.github.io/NeuralGrasps/

License: GNU General Public License v3.0

Shell 1.30% Python 96.75% C 0.85% MATLAB 0.16% Cython 0.94%

handnet-pipeline's Introduction

HandNet-Pipeline

A pipeline for hand detection and hand pose estimation using FCOS and A2J. Training and inference scripts are provided. Below is a demo of HandNet-Pipeline on ROS.

Demo

If you find this code useful for your research, consider citing the publication this pipeline was developed for:

@inproceedings{
    khargonkar2022neuralgrasps,
    title={NeuralGrasps: Learning Implicit Representations for Grasps of Multiple Robotic Hands},
    author={Ninad Khargonkar and Neil Song and Zesheng Xu and B Prabhakaran and Yu Xiang},
    booktitle={6th Annual Conference on Robot Learning},
    year={2022},
    url={https://openreview.net/forum?id=OzP68WT3UA}
}

Environment setup

  1. Make sure to have Anaconda installed before initializing the environment.
  2. Download MANO models and code (mano_v1_2.zip) from the MANO website, unzip, and place models/MANO_*.pkl files under misc/mano.
  3. Run the following command to install the dependencies:
    ./scripts/init_env.sh
    
  4. Activate the environment using the following command:
    conda activate handnet_pipeline
    
  5. Download the pretrained models using the following command:
    ./scripts/download_models.sh
    

ROS Demo

  1. Make sure ROS environment variables are exported before running the demo and your active shell environment is bash.
  2. Run the following command to start the demo (with pretrained models):
    python ros_demo.py
    

Training

Detector Training

  • Download 100DOH (Pascal VOC format) and unzip into data directory
  • Run the following command to train the detector:
    python trainval_net_fcos.py
    

Detector Testing

  • Run the following command to test the detector:
    python trainval_net_fcos.py --test-only --resume=/path/to/checkpoint
    

A2J Training

  • Download DexYCB (subject 1 required), unzip, and run the following command

    export DEX_YCB_DIR=/path/to/dex-ycb

    $DEX_YCB_DIR should be a folder with the following structure:

    ├── 20200709-subject-01/
    ├── 20200813-subject-02/
    ├── ...
    ├── calibration/
    └── models/
  • Run index preprocessing for DexYCB

    python3 refine_idx_gen.py
    
  • Run the following command to train the A2J model:

    python trainval_net_a2j.py fit
    

A2J Testing

  • Modify config/a2j.yaml to set the path to the trained A2J checkpoint.
  • Run the following command to test the A2J model:
    python trainval_net_a2j.py test
    
  • If using pretrained model, load pretrained weights in LightningModule init instead (line 273).

Acknowledgements

Without these works, HandNet-Pipeline would not be possible. A huge thanks to the authors for their work and releasing their code.

FCOS

Code related to FCOS is adapted from the official Torchvision implementation

A2J

Code related to A2J is adapted from the official implementation

100 Days of Hands

Code related to 100 Days of Hands is adapted from the official implementation

DexYCB

Code related to DexYCB is adapted from the official implementation

handnet-pipeline's People

Contributors

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