Git Product home page Git Product logo

robust-policies-via-midlevel-vision's Introduction

Robust Policies via Mid-Level Visual Representations

Anonymized code in submission for CoRL 2020

Paper ID:526

All citations for the code can be found in this README.

Requirements

Set up RLKit: https://github.com/vitchyr/rlkit

(RLKit is in this github)

Use the conda env setup from this. 

Set up RLBench/PyRep/CoppeliaSim: https://github.com/stepjam/RLBench

(RLBench/PyRep are in this github)

Need to install the right version of CoppeliaSim, and have a working display for your setup, i.e. using XVFB. 

Install OpenAI Gym: https://github.com/openai/gym

Instructions

To train a policy:

python mid_level_train.py --feature_task normal --env reach \
--models_path /path/to/representations
--noise eps --lr 1e-4 --max_path_length 50 --min_num_steps_before_training 1000 --special_name ExpName

Representation should be put in a path such as /pathname/segment_img/bestModel.pth. Sample policies will be uploaded with main release.

The results will be saved to rlkit/data/ExpName/, where debug.log will show training details in a human-readable format, and progress.csv will contain full information.

The mid-level representation training is asynchronous. To do so, first, generate a dataset:

python -m environments.dataset_generator --name=reach --env=reach \
    -f --max_steps_per_epoch 150 --num-episode 25 \
    --save-path save_path_here/ 

Train / finetune the representation networks on the dataset

python train.py --name insert_name --feature_task normal --batch_size 32 --num_epochs 500 --data_path /path/to/train/data/ --lr 3e-4

Citations

rlkit/ code was adapted from https://github.com/vitchyr/rlkit.

We use RLBench, PyRep, and CoppeliaSim: https://github.com/stepjam/RLBench, https://github.com/stepjam/PyRep, https://coppeliarobotics.com/

robotics-rl-srl/ code was adapted from https://github.com/araffin/robotics-rl-srl

gym from https://github.com/openai/gym

VisualPriors package https://github.com/alexsax/midlevel-reps

midlevel_features/ code adapted from PyTorch docs

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.