Skip to content

This is a fork of "RL-ViGen: A Reinforcement Learning Benchmark for Visual Generalization" to make it more portable for ease of use in research. The goal of this repository is to provide an easier way to install RL-ViGen environments (only envs) in already established repos with minimal dependencies.

License

Notifications You must be signed in to change notification settings

AlexandreBrown/RL-ViGen-Portable

 
 

Repository files navigation

RL-ViGen: A Reinforcement Learning Benchmark for Visual Generalization

This repository is a fork of the original RL-ViGen repository that allows easy installation of just the environments while requiring the strict minimum of dependencies (no PyTorch pinned version restriction, no Hydra, no Tensorboard, no Weights & Biases dependencies).
This is useful to quickly install and instantiate the environments for R&D purposes and quick prototyping.

Note : This repo is a WIP currently

RL-ViGen Authors' Website | RL-ViGen Paper

Portable Installation

The following will install the dependencies and environments required by RL-ViGen.
After the installation, one can import the environments in python and create them for train/eval purposes.

  1. Manually download Gibson Full scene datasets : https://github.com/facebookresearch/habitat-sim/blob/main/DATASETS.md#gibson-and-3dscenegraph-datasets
    • This step is manual because you must sign a form to download the data (out of our control).
  2. Extract the gibson scene dataset archive to data/datasets/gibson_full/
  3. Create a conda environment
    conda create -f environment.yaml -y
    • This will create a conda env named rl-vigen-portable, alternatively, take a look at the environment.yaml file and add the dependencies to your existing conda environment.
  4. Activate the conda environment
    conda activate rl-vigen-portable
  5. Download external datasets & setup Carla sim
    bash setup.sh
  6. Add wrappers and carla to your PYTHONPATH, run the following from the root of the repository :
    export PYTHONPATH=$(pwd):third_party/CARLA_0.9.12/PythonAPI/carla:$PYTHONPATH

At the end, your data/ folder should look like this :

data/
  |
  -- datasets/
        |
        -- gibson_full/
        -- pointnav/

Documentation

See doc/ folder for documentation on how to create environments, a README with minimum working examples is created for each environment.

Important

Many code changes were done so that the environments no longer depend on a Hydra config to be created. Instead, the functions that allow the creation of the environments expect a python dictionary with the config for the environment.
An easy way to use this is to use Hydra in your own repository and simply convert your hydra DictConfig object to a python dict using OmegaConf.to_container(my_hydra_dict_config).
This was done to make you the owner of the Hydra config, you can setup Hydra the way you want and simply pass a dict now.

Code Structure

  • envs: various RL-ViGen benchmark environments. In addtion, each sub-folder contains specific README.md for the introduction of the environment.
  • third_party: submodules from third parties. We won't frequently change the code in this folder.
  • wrappers: includes the wrappers for each environment.

If you find RL-ViGen useful in your research, please consider citing the authors work as follows:

Citations

@article{yuan2023rl,
  title={RL-ViGen: A Reinforcement Learning Benchmark for Visual Generalization},
  author={Yuan, Zhecheng and Yang, Sizhe and Hua, Pu and Chang, Can and Hu, Kaizhe and Wang, Xiaolong and Xu, Huazhe},
  journal={arXiv preprint arXiv:2307.10224},
  year={2023}
}

About

This is a fork of "RL-ViGen: A Reinforcement Learning Benchmark for Visual Generalization" to make it more portable for ease of use in research. The goal of this repository is to provide an easier way to install RL-ViGen environments (only envs) in already established repos with minimal dependencies.

Topics

Resources

License

Stars

Watchers

Forks

Languages

  • Python 86.6%
  • Cython 8.6%
  • Jupyter Notebook 2.8%
  • C 1.9%
  • Makefile 0.1%
  • Dockerfile 0.0%