{"id":19707112,"url":"https://github.com/geyang/gym-distracting-control","last_synced_at":"2025-04-29T16:33:48.834Z","repository":{"id":42567135,"uuid":"365020129","full_name":"geyang/gym-distracting-control","owner":"geyang","description":"this is a packaged version of the distracting control suite from Stone et al.","archived":false,"fork":false,"pushed_at":"2022-06-20T09:01:59.000Z","size":1757,"stargazers_count":6,"open_issues_count":2,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-05T18:12:33.791Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/geyang.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-05-06T19:45:23.000Z","updated_at":"2024-05-25T08:47:05.000Z","dependencies_parsed_at":"2022-08-12T10:01:47.607Z","dependency_job_id":null,"html_url":"https://github.com/geyang/gym-distracting-control","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geyang%2Fgym-distracting-control","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geyang%2Fgym-distracting-control/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geyang%2Fgym-distracting-control/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geyang%2Fgym-distracting-control/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geyang","download_url":"https://codeload.github.com/geyang/gym-distracting-control/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251540580,"owners_count":21605932,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T21:37:57.480Z","updated_at":"2025-04-29T16:33:43.824Z","avatar_url":"https://github.com/geyang.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"The Distracting Control Suite\n=============================\n\nThis is a packaged version of the ``distracting_control`` suite from\n*Stone et al*. We provide OpenAI gym bindings, to make the original code-block\nbase easier to use.\n\nGetting Started\n---------------\n\n.. code-block:: bash\n\n   pip install distracting_control\n\nThen in your python script:\n\n.. code-block:: python\n\n   import gym\n\n   env = gyn.make('gdc:Hopper-hop-easy-v1', from_pixel=True)\n   obs = env.reset()\n   doc.figure(obs, \"figures/hopper_readme.png?raw=true\")\n\nDetailed API\n------------\n\nTake a look at the test file in the `https://github.com/geyang/distracting_control/blob/master/specs \u003chttps://github.com/geyang/distracting_control/blob/master/specs\u003e`__ folder, and\nthe source code-block. DeepMind control has a lot of low level binding burried\nin the source code-block.\n\n.. code-block:: python\n\n   def test_max_episode_steps():\n       env = gym.make('distracting_control:Walker-walk-easy-v1')\n       assert env._max_episode_steps == 250\n\n\n   def test_flat_obs():\n       env = gym.make('distracting_control:Walker-walk-easy-v1', frame_skip=4)\n       env.env.env.env.observation_spec()\n       assert env.reset().shape == (24,)\n\n\n   def test_frame_skip():\n       env = gym.make('distracting_control:Walker-walk-easy-v1', from_pixels=True, frame_skip=8)\n       assert env._max_episode_steps == 125\n\n\n   def test_channel_first():\n       env = gym.make('distracting_control:Walker-walk-easy-v1', from_pixels=True, channels_first=True)\n       assert env.reset().shape == (3, 84, 84)\n\n\n   def test_channel_last():\n       env = gym.make('distracting_control:Walker-walk-easy-v1', from_pixels=True, frame_skip=8, channels_first=False)\n       assert env._max_episode_steps == 125\n       assert env.reset().shape == (84, 84, 3)\n\nImportant Changes from *Stone et al*\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n1. [planned] remove tensorflow dependency\n2. [planned] increase ground floor transparency in ``Hopper``\n\nOriginal README\n---------------\n\n``distracting_control`` extends ``dm_control`` with static or dynamic\nvisual distractions in the form of changing colors, backgrounds, and\ncamera poses. Details and experimental results can be found in our\n`paper \u003chttps://arxiv.org/pdf/2101.02722.pdf\u003e`__.\n\nRequirements and Installation\n-----------------------------\n\n-  Clone this repository\n-  ``sh run.sh``\n-  Follow the instructions and install\n   `dm_control \u003chttps://github.com/deepmind/dm_control#requirements-and-installation\u003e`__.\n   Make sure you setup your MuJoCo keys correctly.\n-  Download the `DAVIS 2017\n   dataset \u003chttps://davischallenge.org/davis2017/code-block.html\u003e`__. Make\n   sure to select the 2017 TrainVal - Images and Annotations (480p). The\n   training images will be used as distracting backgrounds.\n\nInstructions\n------------\n\n-  You can run the ``distracting_control_demo`` to generate sample\n   images of the different tasks at different difficulties:\n\n   ::\n\n      python distracting_control_demo --davis_path=$HOME/DAVIS/JPEGImages/480p/\n      --output_dir=/tmp/distrtacting_control_demo\n\n-  As seen from the demo to generate an instance of the environment you\n   simply need to import the suite and use ``suite.load`` while\n   specifying the ``dm_control`` domain and task, then choosing a\n   difficulty and providing the dataset_path.\n\n-  Note the environment follows the dm_control environment APIs.\n\nPaper\n-----\n\nIf you use this code-block, please cite the accompanying\n`paper \u003chttps://arxiv.org/pdf/2101.02722.pdf\u003e`__ as:\n\n::\n\n   @article{stone2021distracting,\n         title={The Distracting Control Suite -- A Challenging Benchmark for Reinforcement Learning from Pixels}, \n         author={Austin Stone and Oscar Ramirez and Kurt Konolige and Rico Jonschkowski},\n         year={2021},\n         journal={arXiv preprint arXiv:2101.02722},\n   }\n\nDisclaimer\n----------\n\nThis is not an official Google product.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeyang%2Fgym-distracting-control","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeyang%2Fgym-distracting-control","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeyang%2Fgym-distracting-control/lists"}