Code for Watch and Match: Supercharging Imitation with Regularized Optimal Transport

Related tags

Admin Panels ROT
Overview

Watch and Match: Supercharging Imitation with Regularized Optimal Transport

This is a repository containing the code for the paper "Watch and Match: Supercharging Imitation with Regularized Optimal Transport".

github_intro

Download expert demonstrations, weights and environment libraries [link]

The link contains the following:

  • The expert demonstrations for all tasks in the paper.
  • The weight files for the expert (DrQ-v2) and behavior cloning (BC).
  • The supporting libraries for environments (Gym-Robotics, metaworld) in the paper.
  • Extract the files provided in the link
    • set the path/to/dir portion of the root_dir path variable in cfgs/config.yaml to the path of the ROT repository.
    • place the expert_demos and weights folders in ${root_dir}/ROT.

Instructions

  • Install Mujoco based on the instructions given here.
  • Install the following libraries:
sudo apt update
sudo apt install libosmesa6-dev libgl1-mesa-glx libglfw3
  • Install dependencies

    • Set up Environment
    conda env create -f conda_env.yml
    conda activate rot
    
    • Install Gym-Robotics
    pip install -e /path/to/dir/Gym-Robotics
    
    • Install Meta-World
    pip install -e /path/to/dir/metaworld
    
    • Install particle environment (for experiment in Fig. 2 in the paper)
    pip install -e /path/to/dir/gym-envs
    
  • Train BC agent - We provide three different commands for running the code on the DeepMind Control Suite, OpenAI Robotics Suite and the Meta-World Benchmark

    • For pixel-based input
    python train.py agent=bc suite=dmc obs_type=pixels suite/dmc_task=walker_run num_demos=10
    
    python train.py agent=bc suite=openaigym obs_type=pixels suite/openaigym_task=fetch_reach num_demos=50
    
    python train.py agent=bc suite=metaworld obs_type=pixels suite/metaworld_task=hammer num_demos=1
    
    python train_robot.py agent=bc suite=robot_gym obs_type=pixels suite/robotgym_task=reach num_demos=1
    
    • For state-based input
    python train.py agent=bc suite=dmc obs_type=features suite/dmc_task=walker_run num_demos=10
    
    python train.py agent=bc suite=openaigym obs_type=features suite/openaigym_task=fetch_reach num_demos=50
    
    python train.py agent=bc suite=metaworld obs_type=features suite/metaworld_task=hammer num_demos=1
    
  • Train ROT - We provide three different commands for running the code on the DeepMind Control Suite, OpenAI Robotics Suite and the Meta-World Benchmark

    • For pixel-based input
    python train.py agent=potil suite=dmc obs_type=pixels suite/dmc_task=walker_run load_bc=true bc_regularize=true num_demos=10
    
    python train.py agent=potil suite=openaigym obs_type=pixels suite/openaigym_task=fetch_reach load_bc=true bc_regularize=true num_demos=50
    
    python train.py agent=potil suite=metaworld obs_type=pixels suite/metaworld_task=hammer load_bc=true bc_regularize=true num_demos=1
    
    python train_robot.py agent=potil suite=robotgym obs_type=pixels suite/robotgym_task=reach load_bc=true bc_regularize=true num_demos=1
    
    • For state-based input
    python train.py agent=potil suite=dmc obs_type=features suite/dmc_task=walker_run load_bc=true bc_regularize=true num_demos=10
    
    python train.py agent=potil suite=openaigym obs_type=features suite/openaigym_task=fetch_reach load_bc=true bc_regularize=true num_demos=50
    
    python train.py agent=potil suite=metaworld obs_type=features suite/metaworld_task=hammer load_bc=true bc_regularize=true num_demos=1
    
  • Monitor results

tensorboard --logdir exp_local
You might also like...

A cli to browse and watch movies

mov-cli A cli to browse and watch movies. This tool scrapes the site theflix. Installation This project is a work in progress Contributing Pull reques

Jan 2, 2023

[CVPR 2022] WALT: Watch And Learn 2D amodal representation from Time-lapse imagery

[CVPR 2022] WALT: Watch And Learn 2D amodal representation from Time-lapse imagery

WALT:Watch and Learn 2D Amodal Representation using time-lapse imagery N Dinesh Reddy, Robert T, Srinivasa G. Narasimhan IEEE Conference on Computer V

Dec 4, 2022

River incision, 10Be production and transport in a source-to-sink sediment system (Var catchment, SW Alps).

10Be Production & Transport from Source-to-Sink Credit: Carole Petit Université Côte d'Azur, CNRS, Observatoire de la Côte d'Azur, IRD, Géoazur 250 ru

Jul 27, 2022

BLURtooth: Exploiting Cross-Transport Key Derivation in Bluetooth Classic and Bluetooth Low Energy [CVE-2020-15802] [CVE-2022-20361]

README Repository about the BLUR attacks presented at AsiaCCS'22 in the paper titled: BLURtooth: Exploiting Cross-Transport Key Derivation in Bluetoot

Jan 4, 2023

watch and launch your valorant account(s) without loggin in

watch and launch your valorant account(s) without loggin in

____ ____ .__ __ __ __ .__ \ \ / _____ | | ____/ \ / _____ _/ |_ ____ |

Nov 8, 2022

Match drivers, flats and refugee groups

Installation guide This is a pretty standard django app, install should be like this (tested on Ubuntu 20.04): # Install python3-venv if not available

Mar 25, 2022

Formats your Image to match with r/place's pixelated form and color palette.

reddit-Place-Image-Formatter Formats your Image to match with r/place's pixelated form and color palette. HOW TO USE: run.py, Console Menu: To create

Apr 16, 2022

Explore-and-Match: A New Paradigm for Temporal Video Grounding with Natural Language

Explore and Match: A New Paradigm for Temporal Video Grounding with Natural Language Implementation of "Explore and Match: A New Paradigm for Temporal

Dec 16, 2022

A Python tool for formatting GA4 data to match and be backfilled with historical GA3 data in BigQuery.

A Python tool for formatting GA4 data to match and be backfilled with historical GA3 data in BigQuery.

GA3toGA4 A Python tool for formatting GA4 data to match and be backfilled with historical GA3 data in BigQuery. About Welcome to GA3 to GA4 tool ⚠️ Wa

Dec 18, 2022
Comments
  • Generate expert demonstrations for Meta-World

    Generate expert demonstrations for Meta-World

    Hi! Thank you very much for the nice paper and open sourcing this great codebase.

    I want to generate more expert demonstrations. For DeepMind Control tasks, I can use the DrQv2 weight to generate more demonstrations. But I can't find the script and any instructions to generate demonstrations for Meta-World tasks. Can you provide the code (using your environment wrapper) to generate Meta-World demonstration?

    opened by Alxead 2
  • A bug?

    A bug?

    https://github.com/siddhanthaldar/ROT/blob/main/ROT/agent/dac.py#L187

    dist = self.actor(obs, stddev)
    next_action = dist.sample(clip=self.stddev_clip)
    target_Q1, target_Q2 = self.critic_target(next_obs, next_action)
    

    This is computing the action for the next observation, but you write obs instead of next_obs here.

    opened by Ericonaldo 1
Owner
Siddhant Haldar
PhD Student at CILVR Lab, NYU Courant
Siddhant Haldar
InfoOT: Information Maximizing Optimal Transport

InfoOT: Information Maximizing Optimal Transport Optimal transport aligns samples across distributions by minimizing the transportation cost between t

Ching-Yao Chuang 20 Nov 15, 2022
MM2022 Workshop-Perceptual Conversational Head Generation with Regularized Driver and Enhanced Renderer

Perceptual Conversational Head Generation with Regularized Driver and Enhanced Renderer YouTube | arXiv Introduction This project is the implement of

MEGVII Research 34 Dec 23, 2022
Code for EMNLP 2022 main conference paper "Information-Transport-based Policy for Simultaneous Translation"

Information-Transport-based Policy for Simultaneous Translation Source code for our EMNLP 2022 main conference paper "Information-Transport-based Poli

ICTNLP 9 Nov 25, 2022
[CVPR 2022] PoseTriplet: Co-evolving 3D Human Pose Estimation, Imitation, and Hallucination under Self-supervision (Oral)

PoseTriplet: Co-evolving 3D Human Pose Estimation, Imitation, and Hallucination under Self-supervision Kehong Gong*, Bingbing Li*, Jianfeng Zhang*, Ta

null 256 Dec 28, 2022
Gesture Imitation Using MediaPipe,OpenCV and Arduino

Computer Vision Gesture Imitation Finger Gesture's are projected on to a robotic arm with the application of Deep Learning and Computer Vision Techniq

Hari Shankar VS 2 Aug 4, 2022
[MICCAI 2022] ShapePU: A New PU Learning Framework Regularized by Global Consistency for Scribble Supervised Cardiac Segmentation

ShapePU This project is developed for our MICCAI 2022 paper: ShapePU: A New PU Learning Framework Regularized by Global Consistency for Scribble Super

Ke Zhang 23 Dec 23, 2022
EMNLP 2022: "R-AT: Regularized Adversarial Training for Natural Language Understanding"

R-AT: Regularized Adversarial Training for Natural Language Understanding Currently, adversarial training has become a popular and powerful regulariza

Intelligent Knowledge Management Laboratory 1 Oct 16, 2022
DexMV: Imitation Learning for Dexterous Manipulation from Human Videos, ECCV 2022

DexMV: Imitation Learning for Dexterous Manipulation from Human Videos [Project Page] [Paper] [Demonstration Files] DexMV: Imitation Learning for Dext

Yuzhe Qin 45 Nov 24, 2022
Resolving Copycat Problems in Visual Imitation Learning via Residual Action Prediction

This is an official code for paper Resolving Copycat Problems in Visual Imitation Learning via Residual Action Prediction

dlyang 3 Nov 4, 2022
A CLI tool to watch Twitch live streams and videos with the help of mpv and youtube-dl.

cwitch A CLI tool for watching Twitch live streams and videos with the help of mpv and youtube-dl. Features Watch one or more video with the ID. Play

zer0-x 3 Nov 1, 2022