{"id":13528498,"url":"https://github.com/deepdrive/deepdrive","last_synced_at":"2026-01-17T06:42:26.600Z","repository":{"id":40987111,"uuid":"111580433","full_name":"deepdrive/deepdrive","owner":"deepdrive","description":"Deepdrive is a simulator that allows anyone with a PC to push the state-of-the-art in self-driving","archived":false,"fork":false,"pushed_at":"2023-10-03T21:34:17.000Z","size":4412,"stargazers_count":910,"open_issues_count":40,"forks_count":149,"subscribers_count":61,"default_branch":"master","last_synced_at":"2025-04-01T13:38:42.873Z","etag":null,"topics":["competition","control","deep-learning","deep-reinforcement-learning","gym","python","reinforcement-learning","self-driving-car","sensorimotor","simulation","tensorflow","transfer-learning","unreal-engine","vision"],"latest_commit_sha":null,"homepage":"https://deepdrive.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deepdrive.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-11-21T17:28:45.000Z","updated_at":"2025-03-25T03:10:42.000Z","dependencies_parsed_at":"2022-08-10T01:29:25.775Z","dependency_job_id":"4e67ebda-c163-45df-a48f-d065c5e18f46","html_url":"https://github.com/deepdrive/deepdrive","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/deepdrive/deepdrive","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepdrive%2Fdeepdrive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepdrive%2Fdeepdrive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepdrive%2Fdeepdrive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepdrive%2Fdeepdrive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deepdrive","download_url":"https://codeload.github.com/deepdrive/deepdrive/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepdrive%2Fdeepdrive/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28502819,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T04:31:57.058Z","status":"ssl_error","status_checked_at":"2026-01-17T04:31:45.816Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["competition","control","deep-learning","deep-reinforcement-learning","gym","python","reinforcement-learning","self-driving-car","sensorimotor","simulation","tensorflow","transfer-learning","unreal-engine","vision"],"created_at":"2024-08-01T07:00:20.247Z","updated_at":"2026-01-17T06:42:26.583Z","avatar_url":"https://github.com/deepdrive.png","language":"Python","readme":"# Deepdrive [![Build Status](https://travis-ci.org/deepdrive/deepdrive.svg?branch=master)](https://travis-ci.org/deepdrive/deepdrive)\n\nThe easiest way to experiment with self-driving AI\n\n## Simulator requirements\n\n- Linux\n- Python 3.6+\n- 10GB disk space\n- 8GB RAM\n\n## Optional - baseline agent requirements\n\n- CUDA capable GPU (tested and developed on 970, 1070, and 1060's)\n- 1.7 \u003c= Tensorflow \u003c 2.0 [See Tensorflow install tips](#tensorflow-install-tips)\n\n## Install\n\n1. [Create a Miniconda env](/docs/miniconda.md)\n\n2. Clone\n\n```\ngit clone https://github.com/deepdrive/deepdrive\ncd deepdrive\n```\n\n\u003e Optional - Activate the Python conda env or virtualenv with Tensorflow installed, then\n\n\u003e Note: If you use Anaconda (we recommend Miniconda) - only use `pip install` in your deepdrive conda environment, never `conda install`\n\n3. Install\n\n```\npython install.py  # Do not run as sudo! Use Miniconda or virtualenv to install without sudo.\n```\n\n#### Cloud\n\n[Cloud setup instructions](/docs/tutorial/cloud/cloud.md)\n\n### Examples\n\n#### Forward-agent\n\n```\npython example.py\n```\n\n#### Synchronous forward-agent\n\n```\npython example_sync.py\n```\n\n* [Remote agent example](https://github.com/deepdrive/forward-agent) - operates over the network using the [deepdrive remote api](https://github.com/deepdrive/deepdrive-api)\n\n#### Mnet2 baseline agent\n```\npython main.py --mnet2-baseline --experiment my-baseline-test\n```\n\n#### Built-in C++ [FSM](https://github.com/deepdrive/deepdrive-sim/tree/c2d26a38692f1db61d48986263b20721ab136fe3/Plugins/DeepDrivePlugin/Source/DeepDrivePlugin/Private/Simulation/Agent/Controllers/LocalAI/States) / [PID](https://github.com/deepdrive/deepdrive-sim/blob/v3/Plugins/DeepDrivePlugin/Source/DeepDrivePlugin/Private/Simulation/Agent/Controllers/DeepDriveAgentSteeringController.cpp) agent that can overtake in the canyons map\n```\npython main.py --path-follower --experiment my-path-follower-test\n```\n\n#### Record training data for imitation learning / behavioral cloning\n```\npython main.py --record --jitter-actions --sync\n```\n\nNote that we recorded the baseline dataset in sync mode which is much slower than async mode. \nAsync mode _probably_ is fine to record in, we just haven't got around to trying it out for v3.\n\nOptional: Convert to HDF5 files to tfrecords (for training MNET2)\n```\npython main.py --hdf5-2-tfrecord\n```\n\n#### Train on recorded data\n```\npython main.py --train [--agent dagger|dagger_mobilenet_v2|bootstrapped_ppo2] --recording-dir \u003cyour-hdf5-or-tfrecord-dir\u003e\n```\n\n#### Train on our dataset\n\nGrab the [dataset](#dataset)\n```\npython main.py --train --recording-dir \u003cthe-directory-with-the-dataset\u003e [--agent dagger|dagger_mobilenet_v2|bootstrapped_ppo2]\n```\n\n#### Tensorboard\n\n```\ntensorboard --logdir=\"\u003cyour-deepdrive-home\u003e/tensorflow\"\n```\n\nWhere `\u003cyour-deepdrive-home\u003e` below is by default in `$HOME/Deepdrive` and can be configured in `$HOME/.deepdrive/deepdrive_dir`\n\n#### Running unit tests\n\n```\npytest tests/unit_tests/test_sanity.py\n```\n\n### Key binds \n\n* \u003ckbd\u003eEsc\u003c/kbd\u003e - Pause (Quit in Unreal Editor)\n* \u003ckbd\u003eEnter\u003c/kbd\u003e - Pause with no menu\n* \u003ckbd\u003eP\u003c/kbd\u003e - Pause in Unreal Editor\n* \u003ckbd\u003e1\u003c/kbd\u003e - Chase cam\n* \u003ckbd\u003e2\u003c/kbd\u003e - Orbit (side) cam\n* \u003ckbd\u003e3\u003c/kbd\u003e - Hood cam\n* \u003ckbd\u003e4\u003c/kbd\u003e - Free cam (use WASD to fly)\n* \u003ckbd\u003eSpace\u003c/kbd\u003e - Handbrake\n* \u003ckbd\u003eAlt+Tab\u003c/kbd\u003e - Control other windows / Show mouse\n* \u003ckbd\u003e`\u003c/kbd\u003e - Unreal console - do things like `stat FPS` \n* \u003ckbd\u003eM\u003c/kbd\u003e - Drive the car with the keyboard WASD - be sure sync is off - Also known issue: Only works in path-follower mode right now\n* \u003ckbd\u003eCtrl-number\u003c/kbd\u003e - Change sun position - works for 1 =\u003e 7\n* \u003ckbd\u003eB\u003c/kbd\u003e - Show vehicle bounding boxes\n* \u003ckbd\u003eN\u003c/kbd\u003e - Show vehicle collision boxes\n* \u003ckbd\u003ePage Up\u003c/kbd\u003e - Next vehicle\n* \u003ckbd\u003ePage Down\u003c/kbd\u003e - Prev vehicle\n\n## Observation data\n\nAll values returned in the observation keep Unreal conventions, specifically\n* All distances are in centimeters per Unreal's default data type\n* All rotations / angular values are in the order of roll, pitch, yaw in degrees\n* x,y,z is forward, right, up\n\n```\n\n{ \n  \n  'acceleration': array([-264.26913452, -227.578125  ,  105.16122437]),\n  'angular_acceleration': array([210980.234375, 105423.765625,  38187.28125 ]),\n  'angular_velocity': array([2.59908962, 3.8214705 , 1.87282801]),\n  'brake': 0.0,\n  'camera_count': 1,\n  'cameras': [{  'aspect_ratio': 1.0,\n                 'capture_height': 227,\n                 'capture_width': 227,\n                 'depth_data': array([0.9995  , 0.9995  , 0.9995  , ..., \n                     0.005146, 0.005146, 0.005146], dtype=float16),\n                 'horizontal_field_of_view': 1.7654,\n                 'id': 1,\n                 'image': array([[[ 40.,  78., 110.] ..., dtype=float32),\n                 'image_data': array([0.283  , 0.557  , 0.82, \n                     ..., 0.02321, 0.02574, 0.02599], dtype=float16),\n                 'image_raw': array([[[144, 195, 233]..., dtype=uint8),\n                 'type': 0\n              }],\n  'capture_timestamp': 4132.511303506,\n  'dimension': array([514.99609375, 514.99609375,  91.1796875 ]),  # Vehicle dimensions\n  'distance_along_route': 70658.828125,  # centimeters of progress made along route to destination\n  'distance_to_center_of_lane': 1038.8463134765625,  # centimeters to center of lane\n  'world': { 'vehicle_positions': [ [ -15800.8193359375,\n                                      38030.23828125,\n                                      19894.62890625],\n                                    [ -13854.9384765625,\n                                      39296.91015625,\n                                      20041.6484375],\n                                    [ -10323.2744140625,\n                                      39767.69921875,\n                                      20409.265625],\n                                    [ -6528.05810546875,\n                                      38875.75390625,\n                                      21034.83984375],\n                                    [ 4577.29150390625,\n                                      36155.37890625,\n                                      22704.166015625]]},\n  'distance_to_next_agent': 326125.625, # Next agent in our lane \n  'distance_to_next_opposing_agent': -1.0,  # Next agent in opposite lane\n  'distance_to_prev_agent': 30758.2734375,   # Next agent in our lane\n  'forward_vector': array([-0.8840133 , -0.4375411 , -0.16455328]),\n  'gym_action': [0, 1, 0, 0, True],\n  'gym_done': False,\n  'gym_reward': -2.4653405387152016,\n  'handbrake': 0,\n  'is_game_driving': 0,\n  'is_passing': 0,\n  'is_resetting': 205,\n  'lap_number': 0,\n  'last_collision': { 'collidee_velocity': array([0., 0., 0.]),\n                      'collision_location': 'rear_right_fender',\n                      'collision_normal': array([0., 0., 0.]),\n                      'time_since_last_collision': 0.0,\n                      'time_stamp': 4105.741911045,\n                      'time_utc': 1562958070},\n  'position': array([-10163.55371094,  17115.17382812,  22500.29492188]),\n  'right_vector': array([-0.8840133 , -0.4375411 , -0.16455328]),\n  'rotation': array([ 0.10010731, -0.16530512, -2.68199444]),\n  'route_length': 273551.21875,\n  'episode_return': { 'avg_kph': 0,\n             'closest_vehicle_cm': 15812.662932649602,\n             'closest_vehicle_cm_while_at_least_4kph': 15812.662932649602,\n             'cm_along_route': 18730.72265625,\n             'collided_with_vehicle': False,\n             'collided_with_non_actor': True,\n             'end_time': '1969-12-31T16:00:00-08:00',\n             'episode_time': 11.5,\n             'gforce_penalty': 90.68476390028613,\n             'got_stuck': False,\n             'lane_deviation_penalty': 255.7695629358121,\n             'max_gforce': 0.8785649610557551,\n             'max_kph': 138.7572978515625,\n             'max_lane_deviation_cm': 1038.8463134765625,\n             'num_steps': 0,\n             'prev_progress_pct': 6.70844576752594,\n             'progress_pct': 6.8472451856879175,\n             'progress_reward': 0.0,\n             'route_length_cm': 273551.21875,\n             'speed_reward': 371.6081579415893,\n             'start_time': '2019-07-12T12:00:59.003417-07:00',\n             'time_penalty': 0.0,\n             'total': 25.15383110549117,\n             'wrong_way': False},\n  'speed': 3854.369384765625,\n  'steering': 0.0,\n  'throttle': 1.0,\n  'up_vector': array([-0.8840133 , -0.4375411 , -0.16455328]),\n  'velocity': array([-3404.32958984, -1700.12841797,  -613.90289307]),\n  'view_mode': 'normal',\n}\n```\n\nAdditional observation data can be exposed without compiling C++ or Blueprints by accessing the Unreal API with [UnrealEnginePython](https://docs.deepdrive.io/v/v3/docs/tutorial/uepy/uepy). \n\n## Benchmark\n\nAgents are automatically graded via [Botleague](https://deepdrive.voyage.auto/leaderboard)\n\n## Dataset\n\n100GB (8.2 hours of driving) of camera, depth, steering, throttle, and brake of an 'oracle' path following agent. We rotate between three different cameras: normal, wide, and semi-truck - with random camera intrisic/extrinsic perturbations at the beginning of each episode (lap). This boosted performance on the benchmark by 3x. We also use DAgger to collect course correction data as in previous versions of Deepdrive.\n\n1. Get the [AWS CLI](https://github.com/aws/aws-cli)\n2. Ensure you have 104GB of free space\n3. Download our dataset of mixed Windows (Unreal PIE + Unreal packaged) and Linux + variable camera and corrective action recordings \n(generated with `--record`)\n```\ncd \u003cthe-directory-you-want\u003e\naws s3 sync s3://deepdrive/data/baseline_tfrecords .\n```\nor for the legacy HDF5 files for training AlexNet\n```\naws s3 sync s3://deepdrive/data/baseline .\n```\n\nIf you'd like to check out our Tensorboard training session, you can download the 1GB\n[tfevents files here](https://d1y4edi1yk5yok.cloudfront.net/tensorflow/mnet2_baseline_training_and_eval.zip),\nunzip, and run\n\n```\ntensorboard --logdir \u003cyour-unzipped-dir\u003e\n```\n\nand checkout [this view](http://localhost:6006/#scalars\u0026_smoothingWeight=0.935\u0026runSelectionState=eyIyMDE4LTA3LTE5X18wNS01My0yN1BNIjp0cnVlLCIyMDE4LTA3LTE5X18wNS01MC01NFBNIjp0cnVlfQ%3D%3D\u0026_ignoreYOutliers=false\u0026tagFilter=error)\n, which graphs wall time.\n\n## Architecture\n\n![Deepdrive Architecture](./docs/images/deepdrive-arch.png)\n\n## Frame rate issues on Linux\n\nIf you experience low frame rates on Linux, you may need to install NVIDIA’s display drivers including their OpenGL drivers. We recommend installing these with CUDA which bundles the version you will need to run the baseline agent. Also, make sure to [plugin your laptop](https://help.ubuntu.com/community/PowerManagement/ReducedPower). If CUDA is installed, skip to testing [OpenGL](#opengl).\n\n## Tensorflow install tips\n\n- Make sure to install the CUDA / cuDNN major and minor version the Tensorflow instructions specify.  i.e. CUDA 9.0 / cuDNN 7.3 for Tensorflow 1.12.0. These will likely be older than the latest version NVIDIA offers. You can see all [CUDA  releases here](https://developer.nvidia.com/cuda-toolkit-archive).\n- Use the packaged install, i.e. deb[local] on Ubuntu, referred to in [this guide](http://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html)\n- If you are feeling dangerous and use the runfile method, be sure to follow [NVIDIA’s instructions](http://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html) on how to disable the Nouveau drivers if you're on Ubuntu.\n- On Windows, use standard (non-CUDA packaged) display drivers which meet the min required. When installing CUDA, do a custom install and uncheck the display driver install.\n\n## OpenGL\n\n`glxinfo | grep OpenGL` should return something like:\n```\nOpenGL vendor string: NVIDIA Corporation\nOpenGL renderer string: GeForce GTX 980/PCIe/SSE2\nOpenGL core profile version string: 4.5.0 NVIDIA 384.90\nOpenGL core profile shading language version string: 4.50 NVIDIA\nOpenGL core profile context flags: (none)\nOpenGL core profile profile mask: core profile\nOpenGL core profile extensions:\nOpenGL version string: 4.5.0 NVIDIA 384.90\nOpenGL shading language version string: 4.50 NVIDIA\nOpenGL context flags: (none)\nOpenGL profile mask: (none)\nOpenGL extensions:\nOpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 384.90\nOpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20\nOpenGL ES profile extensions:\n```\nYou may need to disable secure boot in your BIOS in order for NVIDIA’s OpenGL and tools like nvidia-smi to work. This is not Deepdrive specific, but rather a general requirement of Ubuntu’s NVIDIA drivers.\n\n\n## Development\n\nTo run tests in PyCharm, go to File | Settings | Tools | Python Integrated Tools and change the default test runner \nto `pytest`.\n\nAlso, disable SciView per [this answer](https://stackoverflow.com/a/48421532/134077).\n","funding_links":[],"categories":["Environments","Simulation","时间序列"],"sub_categories":["Version Control","Calibration and Transformation","网络服务_其他"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepdrive%2Fdeepdrive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeepdrive%2Fdeepdrive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepdrive%2Fdeepdrive/lists"}