portal-cornell / interact

6 stars 1 forks source link

InteRACT: Transformer Models for Human Intent Prediction Conditioned on Robot Actions

Kushal Kedia, Atiksh Bhardwaj, Prithwish Dan, Sanjiban Choudhury

Cornell University

ICRA 2024

Project Page | arxiv

Installation

Follow these steps to install InteRACT:

  1. Create and activate the conda environment:
    cd interact
    conda create --name interact python=3.8.16
    conda activate interact
    pip install -r requirements.txt
    pip install -e . 

Preliminaries

  1. Set the base_dev_dir to your working directory in all of the config files

  2. Create a new directory for data under interact so that the repo has the following structure:

    Repo Structure

    ├── config
    │   ├── *.yaml files 
    ├── interact
    |   ├── checkpoints
    |     ├── HH_checkpoints
    |     ├── HR_checkpoints
    |   ├── data
    |     ├── cmu_mocap
    |     ├── comad_data
    |     ├── comad_hr
    |     ├── mapping
    |     ├── synthetic_amass
    |   ├── model
    |     ├── model architecture files...
    |   ├── utils
    |     ├── utility files...
    |   ├── scripts
    |     ├── eval_hh.py / eval_hr.py        <- evaluation scripts
    |     ├── pretrain_intent_forecaster.py  <- pretraining on H-H 
    |     |── finetune_intent_forecaster.py  <- finetuning on H-H
    |     |── hr_transfer.py                 <- transferring to H-R
    |
    ├── environment.yml
    ├── README.md
    ├── setup.py
    
  3. Download the data from this link Data

Training

  1. Run the pretraining script on large-scale H-H data:
    python scripts/pretrain_intent_forecaster.py
  2. Run the finetuning script on H-H interaction data.
    python scripts/finetune_intent_forecaster.py
  3. Run the script to transfer the model to the H-R setting.
    python scripts/hr_transfer.py

Evaluation

  1. Run the evaluation script for H-H:
    python scripts/eval_hh.py
  2. Run the evaluation script for H-R:
    python scripts/eval_hr.py

BibTeX

   @article{kedia2023interact,
    title={InteRACT: Transformer Models for Human Intent Prediction Conditioned on Robot Actions},
    author={Kedia, Kushal and Bhardwaj, Atiksh and Dan, Prithwish and Choudhury, Sanjiban},
    journal={arXiv preprint arXiv:2311.12943},
    year={2023}
  }

Acknowledgement