GithubHelp home page GithubHelp logo

ml-project-2-hope-generator's Introduction

HOPE Generator: human-object interaction data synthesis

Hands are the primary means by which humans manipulate objects in the real-world, and measuring hand-object interactions (HOI) and hand-object pose estimation (HOPE) hold great potential for understanding human behavior. However, existing datasets are to small and lack comprehensive awareness of the object’s affordance and the hand’s interactions with it. For this reason, they are insufficient to elucidate fundamental principles of human movement.

In this project, we aim to create a simple machine learning pipeline to synthesize large-scale human-object interaction dataset that would help to gain better insights into the sensorimotor control in the long term. We apply novel machine learning techniques and develop our own algorithms to computationally generate new data. We propose to apply and refine deep learning algorithms to synthesize naturalistic movement.

Alt text

Remark: We assume that all the commands below are executed from the ./HOPE-Generator as a working directory.

Installation

The core of HOPE Generator is based on GOAL, therefore it requires to install its all dependencies.

All experiments were done and tested using Red Hat Enterprise Linux Server 7.7 (Maipo), NVIDIA Tesla V100, and CUDA toolkit 11.6.

Environment setup:

conda create -n hope-gen python=3.9
conda activate hope-gen
conda install -c pytorch pytorch=1.9.1 torchvision cudatoolkit=11.6

Install PyTorch3D using instructions in the official repository. After successful installation of the pre-requisities, install requirements of the HOPE Generator:

pip install -r requirements.txt

For evaluation, trimesh library requires openSCAD and blender as backend, so please install them if you plan to run evaluation metrics. However, these requirements are not necessary to run the standard pipeline of HOPE Generator.

Datasets

We support three large-scale HOI datasets. To download them, perform the following steps:

  • GRAB: ./datasets/grab/download_grab.sh
  • OakInk: ./datasets/oakink/download_oakink.sh && export OAKINK_DIR=./_SOURCE_DATA/OakInk
  • HOI4D (optional): Download HOI4D dataset using the instructions given in ./datasets/hoi4d/README.md

To learn more about the datasets, i.e. to visualize their content, follow the README.md files in their corresponding directories.

Body models

We use common body models such as SMPL-X and MANO. To download them, run the following script:

./body_models/download_body_models.sh

Pre-trained weights

We provide pre-trained weights for the neural networks. To download them, run the following script:

./models/download_models.sh

Data preprocessing

Prepare data for GNet (grasp generation) and MNet (motion generation):

python ./data_preparation/process_data_gnet.py
python ./data_preparation/process_data_mnet.py

Generation

After performing the above steps, your project should have the following structure:

HOPE-Generator
├── _BODY_MODELS
│   ├── model_correspondences
│   └── models
├── _DATA
│   ├── GNet_data
│   └── MNet_data
├── _SOURCE_DATA
│   ├── GRAB
│   └── OakInk
├── models
│   ├── GNet_model.py
│   ├── MNet_model.py
│   └── ...
├── ...
├── ...
└── run_generation.py

Next, you can use pre-trained weights to generate HOI for unseen objects.

For 5 test objects from the GRAB dataset run:

python ./run_generation.py --dataset-choice GRAB

For 1800 objects from the OakInk dataset run:

python ./run_generation.py --dataset-choice OakInk

Results (optional)

Because large-scale HOI generation is time-consuming, we provide our results for 100 sequences as a reference. To download them, run the following script:

./download_results.sh

It will generate two folders with the results that contain static whole-body grasps as well as sequences of motion:

  • Visualizations: ./_RESULTS/Downloaded/objects_meshes/
  • Sequences with 3D meshes: ./_RESULTS/Downloaded/objects_visualized/

Alternatively, one can download an example interaction directly from GitHub and open it as an .html file in the browser:

  • Motion: img/s5_C90001_1_motion.html
  • Static grasp: img/s5_C91001_1_grasp.html

Evaluation (optional)

After downloading the results, to generate the evaluation metrics run the following command:

python eval.py
Remark: Evaluation requires additional dependencies specified in the installation section.

Training (optional)

We allow the user to retrain the neural networks with custom parameters. To train the models from scratch, run the following commands:

  • GNet: python ./train/GNet_train.py
  • MNet: python ./train/MNet_train.py

Authors:

ml-project-2-hope-generator's People

Contributors

borzyszkowski avatar miraliahmadli avatar 17immanuel17 avatar

Watchers

Matteo Pagliardini avatar Martin Jaggi avatar Roberto Castello avatar Lie He avatar ztzthu avatar  avatar  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.