[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"tool-Emerge-Lab--gpudrive":3,"similar-Emerge-Lab--gpudrive":120},{"id":4,"github_repo":5,"name":6,"description_en":7,"description_zh":8,"ai_summary_zh":9,"readme_en":10,"readme_zh":11,"quickstart_zh":12,"use_case_zh":13,"hero_image_url":14,"owner_login":15,"owner_name":16,"owner_avatar_url":17,"owner_bio":18,"owner_company":19,"owner_location":19,"owner_email":19,"owner_twitter":19,"owner_website":20,"owner_url":21,"languages":22,"stars":42,"forks":43,"last_commit_at":44,"license":45,"difficulty_score":46,"env_os":47,"env_gpu":48,"env_ram":49,"env_deps":50,"category_tags":63,"github_topics":19,"view_count":66,"oss_zip_url":19,"oss_zip_packed_at":19,"status":67,"created_at":68,"updated_at":69,"faqs":70,"releases":100},7881,"Emerge-Lab\u002Fgpudrive","gpudrive","1 million FPS multi-agent driving simulator","gpudrive 是一款基于 C++ 构建的超高速数据驱动驾驶模拟器，专为多智能体自动驾驶研发而设计。它核心解决了传统仿真环境运行速度慢、难以支撑大规模并行训练与评估的痛点，借助 Madrona 引擎的强大算力，实现了惊人的每秒 100 万帧（1M FPS）模拟速度。\n\n这款工具非常适合自动驾驶算法研究人员、强化学习开发者以及需要处理海量场景数据的工程师使用。gpudrive 不仅兼容包含超过 10 万个真实人类驾驶场景的 Waymo 开放数据集，还支持车辆、骑行者和行人等多种智能体类型的混合仿真，让模型训练更贴近复杂现实路况。\n\n在技术亮点方面，gpudrive 提供了便捷的 Python 接口，并原生支持 PyTorch 和 JAX 框架，能够无缝对接 Gymnasium 标准。用户可以直接利用 Stable-Baselines3、CleanRL 或 Pufferlib 等主流库快速部署 PPO 等强化学习算法，无需从零搭建训练基础设施。此外，它还允许灵活配置模拟器状态与智能体观测视角，帮助开发者高效调试策略。无论是进行大规模算法预训练，还是对现有模型进行严谨评估，gpudrive","gpudrive 是一款基于 C++ 构建的超高速数据驱动驾驶模拟器，专为多智能体自动驾驶研发而设计。它核心解决了传统仿真环境运行速度慢、难以支撑大规模并行训练与评估的痛点，借助 Madrona 引擎的强大算力，实现了惊人的每秒 100 万帧（1M FPS）模拟速度。\n\n这款工具非常适合自动驾驶算法研究人员、强化学习开发者以及需要处理海量场景数据的工程师使用。gpudrive 不仅兼容包含超过 10 万个真实人类驾驶场景的 Waymo 开放数据集，还支持车辆、骑行者和行人等多种智能体类型的混合仿真，让模型训练更贴近复杂现实路况。\n\n在技术亮点方面，gpudrive 提供了便捷的 Python 接口，并原生支持 PyTorch 和 JAX 框架，能够无缝对接 Gymnasium 标准。用户可以直接利用 Stable-Baselines3、CleanRL 或 Pufferlib 等主流库快速部署 PPO 等强化学习算法，无需从零搭建训练基础设施。此外，它还允许灵活配置模拟器状态与智能体观测视角，帮助开发者高效调试策略。无论是进行大规模算法预训练，还是对现有模型进行严谨评估，gpudrive 都能以极高的效率加速研发进程，是推动自动驾驶技术落地的重要利器。","GPUDrive\n========\n\n[![Paper](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FarXiv-2408.01584-b31b1b.svg)](https:\u002F\u002Farxiv.org\u002Fabs\u002F2408.01584)\n[![GitHub CI](https:\u002F\u002Fgithub.com\u002FEmerge-Lab\u002Fgpudrive\u002Factions\u002Fworkflows\u002Fci.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002FEmerge-Lab\u002Fgpudrive\u002Factions\u002Fworkflows\u002Fci.yml)\n[![License](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002FEmerge-Lab\u002Fgpudrive)](LICENSE)\n![Python version](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPython-3.11-blue)\n\nAn extremely fast, data-driven driving simulator written in C++.\n\n## Highlights\n\n- ⚡️ Fast simulation for agent development and evaluation at 1 million FPS through the [Madrona engine](https:\u002F\u002Fmadrona-engine.github.io\u002F).\n- 🐍 Provides Python bindings and `gymnasium` wrappers in `torch` and `jax`.\n- 🏃‍➡️ Compatible with the [Waymo Open Motion Dataset](https:\u002F\u002Fgithub.com\u002Fwaymo-research\u002Fwaymo-open-dataset), featuring over 100K scenarios with human demonstrations.\n- 📜 Readily available PPO implementations via [SB3](https:\u002F\u002Fgithub.com\u002FDLR-RM\u002Fstable-baselines3) and [CleanRL](https:\u002F\u002Fgithub.com\u002Fvwxyzjn\u002Fcleanrl) \u002F [Pufferlib](https:\u002F\u002Fpuffer.ai\u002F).\n- 👀 Easily configure the simulator and agent views.\n- 🎨 Diverse agent types: Vehicles, cyclists and pedestrians.\n\n\u003Cdiv align=\"center\">\n\n| Simulator state                                                  | Agent observation                                                |\n| ---------------------------------------------------------------- | ---------------------------------------------------------------- |\n| \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FEmerge-Lab_gpudrive_readme_dd827e4b33dc.gif\" width=\"320px\">    | \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FEmerge-Lab_gpudrive_readme_e0d7bbcfafc7.gif\" width=\"320px\"> |\n| \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FEmerge-Lab_gpudrive_readme_9b16f3f3302d.gif\" width=\"320px\"> | \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FEmerge-Lab_gpudrive_readme_ecba607596c9.gif\" width=\"320px\"> |\n\n\u003C\u002Fdiv>\n\nFor details, see our [paper](https:\u002F\u002Farxiv.org\u002Fabs\u002F2408.01584) and the [introduction tutorials](https:\u002F\u002Fgithub.com\u002FEmerge-Lab\u002Fgpudrive\u002Ftree\u002Fmain\u002Fexamples\u002Ftutorials), which guide you through the basic usage.\n\n## Installation\n\nTo build GPUDrive, ensure you have all the required dependencies listed [here](https:\u002F\u002Fgithub.com\u002Fshacklettbp\u002Fmadrona#dependencies) including CMake, Python, and the CUDA Toolkit. See the details below.\n\n\u003Cdetails> \u003Csummary>Dependencies\u003C\u002Fsummary>\n\n- CMake >= 3.24\n- Python >= 3.11\n- CUDA Toolkit >= 12.2 and \u003C= 12.4 (We do not support CUDA versions 12.5+ at this time. Verify your CUDA version using nvcc --version.)\n- On macOS and Windows, install the required dependencies for XCode and Visual Studio C++ tools, respectively.\n\n\u003C\u002Fdetails>\n\nAfter installing the necessary dependencies, clone the repository (don't forget the --recursive flag!):\n\n```bash\ngit clone --recursive https:\u002F\u002Fgithub.com\u002FEmerge-Lab\u002Fgpudrive.git\ncd gpudrive\n```\n\nThen, there are two options for building the simulator:\n\n---\n\n\u003Cdetails>\n  \u003Csummary>🔧 Option 1. Manual install \u003C\u002Fsummary>\n\nFor Linux and macOS, use the following commands:\n\n```bash\nmkdir build\ncd build\ncmake .. -DCMAKE_BUILD_TYPE=Release\nmake -j # cores to build with, e.g. 32\ncd ..\n```\n\nFor Windows, open the cloned repository in Visual Studio and build the project using the integrated `cmake` functionality.\n\nNext, set up a Python environment\n\n#### With uv (Recommended)\n\nCreate a virtual environment and install the Python components of the repository:\n\n```bash\nuv sync --frozen\n```\n\n#### With pyenv\n\n Create a virtual environment:\n\n ```bash\n pyenv virtualenv 3.11 gpudrive\n pyenv activate gpudrive\n ```\n\n Set it for the current project directory (optional):\n\n ```bash\n pyenv local gpudrive\n ```\n\n#### With conda\n\n```bash\nconda env create -f .\u002Fenvironment.yml\nconda activate gpudrive\n```\n\n### Install Python package\n\nFinally, install the Python components of the repository using pip (this step is not required for the `uv` installation):\n\n```bash\n# macOS and Linux.\npip install -e .\n```\n\nDependency-groups include `pufferlib`, `sb3`, `vbd`, and `tests`.\n\n```bash\n# On Windows.\npip install -e . -Cpackages.madrona_escape_room.ext-out-dir=\u003CPATH_TO_YOUR_BUILD_DIR on Windows>\n```\n\n\u003C\u002Fdetails>\n\n---\n\n---\n\n\u003Cdetails>\n  \u003Csummary> 🐳  Option 2. Docker \u003C\u002Fsummary>\n\nTo get started quickly, we provide a Dockerfile in the root directory.\n\n### Prerequisites\nEnsure you have the following installed:\n- [Docker](https:\u002F\u002Fdocs.docker.com\u002Fget-docker\u002F)\n- [NVIDIA Container Toolkit](https:\u002F\u002Fdocs.nvidia.com\u002Fdatacenter\u002Fcloud-native\u002Fcontainer-toolkit\u002Flatest\u002Finstall-guide.html)\n\n### Building the Docker mage\nOnce installed, you can build the container with:\n\n```bash\nDOCKER_BUILDKIT=1 docker build --build-arg USE_CUDA=true --tag gpudrive:latest --progress=plain .\n```\n\n### Running the Container\nTo run the container with GPU support and shared memory:\n\n```bash\ndocker run --gpus all -it --rm --shm-size=20G -v ${PWD}:\u002Fworkspace gpudrive:latest \u002Fbin\u002Fbash\n```\n\n\u003C\u002Fdetails>\n\n---\n\nTest whether the installation was successful by importing the simulator:\n\n```Python\nimport madrona_gpudrive\n```\n\nTo avoid compiling on GPU mode everytime, the following environment variable can be set with any custom path. For example, you can store the compiled program in a cache called `gpudrive_cache`:\n\n```bash\nexport MADRONA_MWGPU_KERNEL_CACHE=.\u002Fgpudrive_cache\n```\n\nPlease remember that if you make any changes in C++, you need to delete the cache and recompile.\n\n---\n\n\u003Cdetails>\n  \u003Csummary>Optional: If you want to use the Madrona viewer in C++\u003C\u002Fsummary>\n\n#### Extra dependencies to use Madrona viewer\n\n  To build the simulator with visualization support on Linux (`build\u002Fviewer`), you will need to install X11 and OpenGL development libraries. Equivalent dependencies are already installed by Xcode on macOS. For example, on Ubuntu:\n\n```bash\n  sudo apt install libx11-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev mesa-common-dev libc++1\n```\n\n\u003C\u002Fdetails>\n\n---\n\n## Integrations\n\n\n| What                                                                                                    | Info                                                                                                                                                                         | Run                                    | Training SPS |\n| ------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------- | ------------------------------ |\n| **IPPO** implementation [SB3](https:\u002F\u002Fgithub.com\u002FDLR-RM\u002Fstable-baselines3\u002Ftree\u002Fmaster) | [IPPO](https:\u002F\u002Fproceedings.neurips.cc\u002Fpaper_files\u002Fpaper\u002F2022\u002Ffile\u002F9c1535a02f0ce079433344e14d910597-Paper-Datasets_and_Benchmarks.pdf), [PufferLib](https:\u002F\u002Farxiv.org\u002Fpdf\u002F2406.12905), [Implementation](https:\u002F\u002Fgithub.com\u002FEmerge-Lab\u002Fgpudrive\u002Fblob\u002Fmain\u002Fintegrations\u002Fppo\u002Fpuffer) | `python baselines\u002Fppo\u002Fppo_sb3.py`      | 25 - 50K                       |\n| **IPPO** implementation [PufferLib](https:\u002F\u002Fgithub.com\u002FPufferAI\u002FPufferLib) 🐡                           | [PPO](https:\u002F\u002Farxiv.org\u002Fpdf\u002F2406.12905)                                                   | `python baselines\u002Fppo\u002Fppo_pufferlib.py`       | 100 - 300K                     |\n\n\n## Getting started\n\nTo get started, see these entry points:\n\n- Our [intro tutorials](https:\u002F\u002Fgithub.com\u002FEmerge-Lab\u002Fgpudrive\u002Ftree\u002Fmain\u002Fexamples\u002Ftutorials). These tutorials take approximately 30-60 minutes to complete and will guide you through the dataset, simulator, and how to populate the simulator with different types of actors.\n- The [environment docs](https:\u002F\u002Fgithub.com\u002FEmerge-Lab\u002Fgpudrive\u002Ftree\u002Fmain\u002Fgpudrive\u002Fenv) provide detailed info on environment settings and supported features.\n\n\u003C!-- \u003Cp align=\"center\">\n  \u003Cimg src=\"assets\u002FGPUDrive_docs_flow.png\" width=\"1300\" title=\"Getting started\">\n\u003C\u002Fp> -->\n\n\u003C!-- ## 📈 Tests\n\nTo further test the setup, you can run the pytests in the root directory:\n\n```bash\npytest\n```\n\nTo test if the simulator compiled correctly (and python lib did not), try running the headless program from the build directory.\n\n```bash\ncd build\n.\u002Fheadless CPU 1 # Run on CPU, 1 step\n``` -->\n\n## Pre-trained policies\n\nSeveral pre-trained policies are available via the `PyTorchModelHubMixin` class on 🤗 huggingface_hub.\n\n- **Best Policy (10,000 Scenarios).** The best policy from [Building reliable sim driving agents by scaling self-play](https:\u002F\u002Farxiv.org\u002Fabs\u002F2502.14706) is available here [here](https:\u002F\u002Fhuggingface.co\u002Fdaphne-cornelisse\u002Fpolicy_S10_000_02_27). This policy was trained on 10,000 randomly sampled scenarios from the WOMD training dataset.\n\n- **Alternative Policy (1,000 Scenarios).** A policy trained on 1,000 scenarios can be found [here](https:\u002F\u002Fhuggingface.co\u002Fdaphne-cornelisse\u002Fpolicy_S1000_02_27)\n\n---\n\n> Note: These models were trained with the environment configurations defined in `examples\u002Fexperimental\u002Fconfig\u002Freliable_agents_params.yaml`, changing environment\u002Fobservation configurations will affect performance.\n\n---\n\n### Usage\n\nTo load a pre-trained policy, use the following:\n```Python\nfrom gpudrive.networks.late_fusion import NeuralNet\n\n# Load pre-trained model via huggingface_hub\nagent = NeuralNet.from_pretrained(\"daphne-cornelisse\u002Fpolicy_S10_000_02_27\")\n```\n\nSee [tutorial 04](https:\u002F\u002Fgithub.com\u002FEmerge-Lab\u002Fgpudrive\u002Ftree\u002Fmain\u002Fexamples\u002Ftutorials\u002F04_use_pretrained_sim_agent.ipynb) for all the details.\n\n## Dataset\n\n### Download the dataset\n\n- Two versions of the dataset are available, a [mini version](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002FEMERGE-lab\u002FGPUDrive_mini) with a 1000 training files and 300 test\u002Fvalidation files, and a [large dataset](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002FEMERGE-lab\u002FGPUDrive) with 100k unique scenes.\n- Replace 'GPUDrive_mini' with 'GPUDrive' below if you wish to download the full dataset.\n\n\u003Cdetails>\n  \u003Csummary>Download the dataset\u003C\u002Fsummary>\n\nTo download the dataset you need the huggingface_hub library\n\n```bash\npip install huggingface_hub\n```\n\nThen you can download the dataset using python or just `huggingface-cli`.\n\n- **Option 1**: Using Python\n\n```python\n>>> from huggingface_hub import snapshot_download\n>>> snapshot_download(repo_id=\"EMERGE-lab\u002FGPUDrive_mini\", repo_type=\"dataset\", local_dir=\"data\u002Fprocessed\")\n```\n\n- **Option 2**: Use the huggingface-cli\n\n1. Log in to your Hugging Face account:\n\n```bash\nhuggingface-cli login\n```\n\n2. Download the dataset:\n\n```bash\nhuggingface-cli download EMERGE-lab\u002FGPUDrive_mini --local-dir data\u002Fprocessed --repo-type \"dataset\"\n```\n\n- **Option 3**: Manual Download\n\n1. Visit https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002FEMERGE-lab\u002FGPUDrive_mini\n2. Navigate to the Files and versions tab.\n3. Download the desired files\u002Fdirectories.\n\n_NOTE_: If you downloaded the full-sized dataset, it is grouped to subdirectories of 10k files each (according to hugging face constraints). In order for the path to work with GPUDrive, you need to run\n\n```python\npython data_utils\u002Fpost_processing.py #use --help if you've used a custom download path\n```\n\n\u003C\u002Fdetails>\n\n### Re-build the dataset\n\nIf you wish to manually generate the dataset, GPUDrive is compatible with the complete [Waymo Open Motion Dataset](https:\u002F\u002Fgithub.com\u002Fwaymo-research\u002Fwaymo-open-dataset), which contains well over 100,000 scenarios. To download new files and create scenarios for the simulator, follow the steps below.\n\n\u003Cdetails>\n  \u003Csummary>Re-build the dataset in 3 steps\u003C\u002Fsummary>\n\n1. First, head to [https:\u002F\u002Fwaymo.com\u002Fopen\u002F](https:\u002F\u002Fwaymo.com\u002Fopen\u002F) and click on the \"download\" button a the top. After registering, click on the files from `v1.2.1 March 2024`, the newest version of the dataset at the time of wrting (10\u002F2024). This will lead you a Google Cloud page. From here, you should see a folder structure like this:\n\n```\nwaymo_open_dataset_motion_v_1_2_1\u002F\n│\n├── uncompressed\u002F\n│   ├── lidar_and_camera\u002F\n│   ├── scenario\u002F\n│   │   ├── testing_interactive\u002F\n│   │   ├── testing\u002F\n│   │   ├── training_20s\u002F\n│   │   ├── training\u002F\n│   │   ├── validation_interactive\u002F\n│   │   └── validation\u002F\n│   └── tf_example\u002F\n```\n\n2. Now, download files from testing, training and\u002For validation in the **`scenario`** folder. An easy way to do this is through `gsutil`.  First register using:\n\n```bash\ngcloud auth login\n```\n\n...then run the command below to download the dataset you prefer. For example, to download the validation dataset:\n\n```bash\ngsutil -m cp -r gs:\u002F\u002Fwaymo_open_dataset_motion_v_1_2_1\u002Funcompressed\u002Fscenario\u002Fvalidation\u002F data\u002Fraw\n```\n\nwhere `data\u002Fraw` is your local storage folder. Note that this can take a while, depending on the size of the dataset you're downloading.\n\n3. The last thing we need to do is convert the raw data to a format that is compatible with the simulator using:\n\n```bash\npython data_utils\u002Fprocess_waymo_files.py '\u003Craw-data-path>' '\u003Cstorage-path>' '\u003Cdataset>'\n```\n\nNote: Due to an open [issue](https:\u002F\u002Fgithub.com\u002Fwaymo-research\u002Fwaymo-open-dataset\u002Fissues\u002F868), installation of `waymo-open-dataset-tf-2.12.0` fails for Python 3.11. To use the script, in a separate Python 3.10 environment, run\n\n```bash\npip install waymo-open-dataset-tf-2-12-0 trimesh[easy] python-fcl\n```\n\nThen for example, if you want to process the validation data, run:\n\n```bash\npython data_utils\u002Fprocess_waymo_files.py 'data\u002Fraw\u002F' 'data\u002Fprocessed\u002F' 'validation'\n>>>\nProcessing Waymo files: 100%|████████████████████████████████████████████████████████████████| 150\u002F150 [00:05\u003C00:00, 28.18it\u002Fs]\nINFO:root:Done!\n```\n\nand that's it!\n\n> **🧐 Caveat**: A single Waymo tfrecord file contains approximately 500 traffic scenarios. Processing speed is about 250 scenes\u002Fmin on a 16 core CPU. Trying to process the entire validation set for example (150 tfrecords) is a LOT of time.\n\n\u003C\u002Fdetails>\n\n### Post-processing\n- Running `python data_utils\u002Fpostprocessing.py` filters out corrupted files and undoes hugging face directory grouping.\n\n## 📜 Citing GPUDrive\n\nIf you use GPUDrive in your research, please cite our ICLR 2025 paper\n```bibtex\n@inproceedings{kazemkhani2025gpudrive,\n      title={GPUDrive: Data-driven, multi-agent driving simulation at 1 million FPS},\n      author={Saman Kazemkhani and Aarav Pandya and Daphne Cornelisse and Brennan Shacklett and Eugene Vinitsky},\n      booktitle={Proceedings of the International Conference on Learning Representations (ICLR)},\n      year={2025},\n      url={https:\u002F\u002Farxiv.org\u002Fabs\u002F2408.01584},\n      eprint={2408.01584},\n      archivePrefix={arXiv},\n      primaryClass={cs.AI},\n}\n```\n\n## Contributing\n\nIf you encounter a bug, notice a missing feature, or want to contribute, feel free to create an issue or reach out! We'd be excited to have you involved in the project.\n","GPUDrive\n========\n\n[![论文](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FarXiv-2408.01584-b31b1b.svg)](https:\u002F\u002Farxiv.org\u002Fabs\u002F2408.01584)\n[![GitHub CI](https:\u002F\u002Fgithub.com\u002FEmerge-Lab\u002Fgpudrive\u002Factions\u002Fworkflows\u002Fci.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002FEmerge-Lab\u002Fgpudrive\u002Factions\u002Fworkflows\u002Fci.yml)\n[![许可证](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002FEmerge-Lab\u002Fgpudrive)](LICENSE)\n![Python版本](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPython-3.11-blue)\n\n一款用C++编写的极速、数据驱动的自动驾驶仿真器。\n\n## 亮点\n\n- ⚡️ 通过[Madrona引擎](https:\u002F\u002Fmadrona-engine.github.io\u002F)实现每秒100万帧的高速仿真，适用于智能体开发与评估。\n- 🐍 提供Python绑定及基于`torch`和`jax`的`gymnasium`封装。\n- 🏃‍➡️ 兼容[Waymo开放运动数据集](https:\u002F\u002Fgithub.com\u002Fwaymo-research\u002Fwaymo-open-dataset)，包含超过10万个由人类驾驶演示的场景。\n- 📜 可通过[SB3](https:\u002F\u002Fgithub.com\u002FDLR-RM\u002Fstable-baselines3)和[CleanRL](https:\u002F\u002Fgithub.com\u002Fvwxyzjn\u002Fcleanrl) \u002F [Pufferlib](https:\u002F\u002Fpuffer.ai\u002F)轻松获取现成的PPO实现。\n- 👀 轻松配置仿真器和智能体视角。\n- 🎨 多样化的智能体类型：车辆、骑行者和行人。\n\n\u003Cdiv align=\"center\">\n\n| 仿真器状态                                                  | 智能体观测                                                |\n| ---------------------------------------------------------------- | ---------------------------------------------------------------- |\n| \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FEmerge-Lab_gpudrive_readme_dd827e4b33dc.gif\" width=\"320px\">    | \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FEmerge-Lab_gpudrive_readme_e0d7bbcfafc7.gif\" width=\"320px\"> |\n| \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FEmerge-Lab_gpudrive_readme_9b16f3f3302d.gif\" width=\"320px\"> | \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FEmerge-Lab_gpudrive_readme_ecba607596c9.gif\" width=\"320px\"> |\n\n\u003C\u002Fdiv>\n\n更多详情请参阅我们的[论文](https:\u002F\u002Farxiv.org\u002Fabs\u002F2408.01584)以及[入门教程](https:\u002F\u002Fgithub.com\u002FEmerge-Lab\u002Fgpudrive\u002Ftree\u002Fmain\u002Fexamples\u002Ftutorials)，其中将引导您完成基本使用。\n\n## 安装\n\n要构建GPUDrive，请确保已安装所有必需的依赖项，这些依赖项列于[此处](https:\u002F\u002Fgithub.com\u002Fshacklettbp\u002Fmadrona#dependencies)，包括CMake、Python和CUDA工具包。具体步骤如下。\n\n\u003Cdetails> \u003Csummary>依赖项\u003C\u002Fsummary>\n\n- CMake >= 3.24\n- Python >= 3.11\n- CUDA工具包 >= 12.2且\u003C= 12.4（目前我们不支持12.5及以上版本的CUDA。请使用nvcc --version验证您的CUDA版本。）\n- 在macOS和Windows上，分别安装XCode和Visual Studio C++工具所需的依赖项。\n\n\u003C\u002Fdetails>\n\n安装完必要依赖后，克隆仓库（别忘了加上--recursive标志！）：\n\n```bash\ngit clone --recursive https:\u002F\u002Fgithub.com\u002FEmerge-Lab\u002Fgpudrive.git\ncd gpudrive\n```\n\n随后有两种方式来构建仿真器：\n\n---\n\n\u003Cdetails>\n  \u003Csummary>🔧 选项1：手动安装 \u003C\u002Fsummary>\n\n对于Linux和macOS，使用以下命令：\n\n```bash\nmkdir build\ncd build\ncmake .. -DCMAKE_BUILD_TYPE=Release\nmake -j # 核心数，例如32\ncd ..\n```\n\n对于Windows，打开克隆的仓库到Visual Studio中，并使用内置的`cmake`功能构建项目。\n\n接下来，设置Python环境\n\n#### 使用uv（推荐）\n\n创建虚拟环境并安装仓库中的Python组件：\n\n```bash\nuv sync --frozen\n```\n\n#### 使用pyenv\n\n 创建虚拟环境：\n\n ```bash\n pyenv virtualenv 3.11 gpudrive\n pyenv activate gpudrive\n ```\n\n 将其设置为当前项目目录（可选）：\n\n ```bash\n pyenv local gpudrive\n ```\n\n#### 使用conda\n\n```bash\nconda env create -f .\u002Fenvironment.yml\nconda activate gpudrive\n```\n\n### 安装Python包\n\n最后，使用pip安装仓库中的Python组件（此步骤对`uv`安装无需执行）：\n\n```bash\n# macOS和Linux。\npip install -e .\n```\n\n依赖组包括`pufferlib`、`sb3`、`vbd`和`tests`。\n\n```bash\n# Windows。\npip install -e . -Cpackages.madrona_escape_room.ext-out-dir=\u003CPATH_TO_YOUR_BUILD_DIR on Windows>\n```\n\n\u003C\u002Fdetails>\n\n---\n\n---\n\n\u003Cdetails>\n  \u003Csummary> 🐳 选项2：Docker \u003C\u002Fsummary>\n\n为了快速上手，我们在根目录下提供了Dockerfile。\n\n### 前提条件\n请确保已安装以下内容：\n- [Docker](https:\u002F\u002Fdocs.docker.com\u002Fget-docker\u002F)\n- [NVIDIA容器工具包](https:\u002F\u002Fdocs.nvidia.com\u002Fdatacenter\u002Fcloud-native\u002Fcontainer-toolkit\u002Flatest\u002Finstall-guide.html)\n\n### 构建Docker镜像\n安装完成后，您可以使用以下命令构建容器：\n\n```bash\nDOCKER_BUILDKIT=1 docker build --build-arg USE_CUDA=true --tag gpudrive:latest --progress=plain .\n```\n\n### 运行容器\n要以GPU支持和共享内存的方式运行容器：\n\n```bash\ndocker run --gpus all -it --rm --shm-size=20G -v ${PWD}:\u002Fworkspace gpudrive:latest \u002Fbin\u002Fbash\n```\n\n\u003C\u002Fdetails>\n\n---\n\n通过导入仿真器来测试安装是否成功：\n\n```Python\nimport madrona_gpudrive\n```\n\n为避免每次都在GPU模式下编译，可以设置以下环境变量，并指定自定义路径。例如，您可以将编译后的程序存储在名为`gpudrive_cache`的缓存中：\n\n```bash\nexport MADRONA_MWGPU_KERNEL_CACHE=.\u002Fgpudrive_cache\n```\n\n请注意，如果对C++代码进行任何更改，都需要删除缓存并重新编译。\n\n---\n\n\u003Cdetails>\n  \u003Csummary>可选：如果您想使用C++中的Madrona查看器\u003C\u002Fsummary>\n\n#### 使用Madrona查看器所需的额外依赖\n\n  若要在Linux上构建带有可视化支持的仿真器（build\u002Fviewer），您需要安装X11和OpenGL开发库。而在macOS上，这些依赖项已由Xcode自动安装。例如，在Ubuntu系统上：\n\n```bash\n  sudo apt install libx11-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev mesa-common-dev libc++1\n```\n\n\u003C\u002Fdetails>\n\n---\n\n## 集成\n\n\n| 项目                                                                                                    | 信息                                                                                                                                                                         | 运行命令                                    | 训练步数 |\n| ------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------- | ------------------------------ |\n| **IPPO** 实现 [SB3](https:\u002F\u002Fgithub.com\u002FDLR-RM\u002Fstable-baselines3\u002Ftree\u002Fmaster) | [IPPO](https:\u002F\u002Fproceedings.neurips.cc\u002Fpaper_files\u002Fpaper\u002F2022\u002Ffile\u002F9c1535a02f0ce079433344e14d910597-Paper-Datasets_and_Benchmarks.pdf), [PufferLib](https:\u002F\u002Farxiv.org\u002Fpdf\u002F2406.12905), [实现](https:\u002F\u002Fgithub.com\u002FEmerge-Lab\u002Fgpudrive\u002Fblob\u002Fmain\u002Fintegrations\u002Fppo\u002Fpuffer) | `python baselines\u002Fppo\u002Fppo_sb3.py`      | 25 - 50K                       |\n| **IPPO** 实现 [PufferLib](https:\u002F\u002Fgithub.com\u002FPufferAI\u002FPufferLib) 🐡                           | [PPO](https:\u002F\u002Farxiv.org\u002Fpdf\u002F2406.12905)                                                   | `python baselines\u002Fppo\u002Fppo_pufferlib.py`       | 100 - 300K                     |\n\n\n## 入门指南\n\n要开始使用，请参考以下入门资源：\n\n- 我们的[入门教程](https:\u002F\u002Fgithub.com\u002FEmerge-Lab\u002Fgpudrive\u002Ftree\u002Fmain\u002Fexamples\u002Ftutorials)。这些教程大约需要30–60分钟完成，将引导您了解数据集、模拟器以及如何在模拟器中添加不同类型的智能体。\n- [环境文档](https:\u002F\u002Fgithub.com\u002FEmerge-Lab\u002Fgpudrive\u002Ftree\u002Fmain\u002Fgpudrive\u002Fenv) 提供了关于环境设置和支持功能的详细信息。\n\n\u003C!-- \u003Cp align=\"center\">\n  \u003Cimg src=\"assets\u002FGPUDrive_docs_flow.png\" width=\"1300\" title=\"Getting started\">\n\u003C\u002Fp> -->\n\n\u003C!-- ## 📈 测试\n\n为进一步测试设置，您可以在根目录下运行 pytest：\n\n```bash\npytest\n```\n\n要测试模拟器是否正确编译（以及 Python 库是否正常工作），可以尝试从构建目录运行无头程序。\n\n```bash\ncd build\n.\u002Fheadless CPU 1 # 在 CPU 上运行，执行一步\n``` -->\n\n## 预训练策略\n\n通过 🤗 huggingface_hub 中的 `PyTorchModelHubMixin` 类，提供了若干预训练策略。\n\n- **最佳策略（10,000 场景）**。来自论文《通过扩展自我博弈构建可靠的自动驾驶代理》的最佳策略在此处提供：[链接](https:\u002F\u002Fhuggingface.co\u002Fdaphne-cornelisse\u002Fpolicy_S10_000_02_27)。该策略基于 WOMD 训练数据集中随机采样的 10,000 个场景进行训练。\n\n- **备选策略（1,000 场景）**。一个基于 1,000 个场景训练的策略可在此处找到：[链接](https:\u002F\u002Fhuggingface.co\u002Fdaphne-cornelisse\u002Fpolicy_S1000_02_27)\n\n---\n\n> 注意：这些模型是在 `examples\u002Fexperimental\u002Fconfig\u002Freliable_agents_params.yaml` 中定义的环境配置下训练的，更改环境或观测配置将影响性能。\n\n---\n\n### 使用方法\n\n要加载预训练策略，可以使用以下代码：\n```Python\nfrom gpudrive.networks.late_fusion import NeuralNet\n\n# 通过 huggingface_hub 加载预训练模型\nagent = NeuralNet.from_pretrained(\"daphne-cornelisse\u002Fpolicy_S10_000_02_27\")\n```\n\n更多详细信息请参阅[教程 04](https:\u002F\u002Fgithub.com\u002FEmerge-Lab\u002Fgpudrive\u002Ftree\u002Fmain\u002Fexamples\u002Ftutorials\u002F04_use_pretrained_sim_agent.ipynb)。\n\n## 数据集\n\n### 下载数据集\n\n- 数据集有两个版本：一个包含 1,000 个训练文件和 300 个测试\u002F验证文件的[迷你版](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002FEMERGE-lab\u002FGPUDrive_mini)，以及一个包含 10 万个唯一场景的[大型数据集](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002FEMERGE-lab\u002FGPUDrive)。\n- 如果您希望下载完整数据集，请将下方路径中的“GPUDrive_mini”替换为“GPUDrive”。\n\n\u003Cdetails>\n  \u003Csummary>下载数据集\u003C\u002Fsummary>\n\n下载数据集需要安装 huggingface_hub 库：\n\n```bash\npip install huggingface_hub\n```\n\n然后您可以使用 Python 或 huggingface-cli 下载数据集。\n\n- **选项 1**：使用 Python\n\n```python\n>>> from huggingface_hub import snapshot_download\n>>> snapshot_download(repo_id=\"EMERGE-lab\u002FGPUDrive_mini\", repo_type=\"dataset\", local_dir=\"data\u002Fprocessed\")\n```\n\n- **选项 2**：使用 huggingface-cli\n\n1. 登录您的 Hugging Face 账户：\n\n```bash\nhuggingface-cli login\n```\n\n2. 下载数据集：\n\n```bash\nhuggingface-cli download EMERGE-lab\u002FGPUDrive_mini --local-dir data\u002Fprocessed --repo-type \"dataset\"\n```\n\n- **选项 3**：手动下载\n\n1. 访问 https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002FEMERGE-lab\u002FGPUDrive_mini\n2. 进入“Files and versions”选项卡。\n3. 下载所需的文件或目录。\n\n_注意_：如果您下载的是完整数据集，它会按照 Hugging Face 的限制被分成每 10,000 个文件一个子目录。为了使路径能够与 GPUDrive 正常配合使用，您需要运行：\n\n```python\npython data_utils\u002Fpost_processing.py # 如果您使用了自定义下载路径，请使用 --help 参数\n```\n\n\u003C\u002Fdetails>\n\n### 重新构建数据集\n\n如果您希望手动生成数据集，GPUDrive 兼容完整的 [Waymo 开放运动数据集](https:\u002F\u002Fgithub.com\u002Fwaymo-research\u002Fwaymo-open-dataset)，该数据集包含超过 10 万个场景。要下载新文件并为模拟器创建场景，请按照以下步骤操作。\n\n\u003Cdetails>\n  \u003Csummary>分三步重新构建数据集\u003C\u002Fsummary>\n\n1. 首先，访问 [https:\u002F\u002Fwaymo.com\u002Fopen\u002F](https:\u002F\u002Fwaymo.com\u002Fopen\u002F) 并点击顶部的“下载”按钮。注册后，选择 `v1.2.1 March 2024` 版本的文件，这是撰写本文时（2024年10月）最新的数据集版本。这将引导您进入 Google Cloud 页面。在此页面上，您应会看到如下文件夹结构：\n\n```\nwaymo_open_dataset_motion_v_1_2_1\u002F\n│\n├── uncompressed\u002F\n│   ├── lidar_and_camera\u002F\n│   ├── scenario\u002F\n│   │   ├── testing_interactive\u002F\n│   │   ├── testing\u002F\n│   │   ├── training_20s\u002F\n│   │   ├── training\u002F\n│   │   ├── validation_interactive\u002F\n│   │   └── validation\u002F\n│   └── tf_example\u002F\n```\n\n2. 现在，从 **`scenario`** 文件夹中下载测试、训练和\u002F或验证数据集文件。一种简便的方法是使用 `gsutil`。首先通过以下命令进行登录：\n\n```bash\ngcloud auth login\n```\n\n然后运行以下命令来下载您所需的数据集。例如，下载验证数据集：\n\n```bash\ngsutil -m cp -r gs:\u002F\u002Fwaymo_open_dataset_motion_v_1_2_1\u002Funcompressed\u002Fscenario\u002Fvalidation\u002F data\u002Fraw\n```\n\n其中 `data\u002Fraw` 是您的本地存储文件夹。请注意，根据您下载的数据集大小，此过程可能需要较长时间。\n\n3. 最后一步是将原始数据转换为与模拟器兼容的格式，使用以下命令：\n\n```bash\npython data_utils\u002Fprocess_waymo_files.py '\u003Craw-data-path>' '\u003Cstorage-path>' '\u003Cdataset>'\n```\n\n注意：由于存在一个未解决的 [问题](https:\u002F\u002Fgithub.com\u002Fwaymo-research\u002Fwaymo-open-dataset\u002Fissues\u002F868)，在 Python 3.11 中安装 `waymo-open-dataset-tf-2.12.0` 会失败。为了使用该脚本，请在单独的 Python 3.10 环境中运行：\n\n```bash\npip install waymo-open-dataset-tf-2-12-0 trimesh[easy] python-fcl\n```\n\n然后，例如，如果您想处理验证数据集，可以运行：\n\n```bash\npython data_utils\u002Fprocess_waymo_files.py 'data\u002Fraw\u002F' 'data\u002Fprocessed\u002F' 'validation'\n>>>\nProcessing Waymo files: 100%|████████████████████████████████████████████████████████████████| 150\u002F150 [00:05\u003C00:00, 28.18it\u002Fs]\nINFO:root:Done!\n```\n\n这样就完成了！\n\n> **🧐 注意事项**：单个 Waymo tfrecord 文件大约包含 500 个交通场景。在 16 核 CPU 上，处理速度约为每分钟 250 个场景。例如，尝试处理整个验证数据集（150 个 tfrecord 文件）将耗费大量时间。\n\n\u003C\u002Fdetails>\n\n### 后处理\n- 运行 `python data_utils\u002Fpostprocessing.py` 可以过滤掉损坏的文件，并取消 Hugging Face 的目录分组。\n\n## 📜 引用 GPUDrive\n\n如果您在研究中使用了 GPUDrive，请引用我们即将发表于 ICLR 2025 的论文：\n\n```bibtex\n@inproceedings{kazemkhani2025gpudrive,\n      title={GPUDrive: Data-driven, multi-agent driving simulation at 1 million FPS},\n      author={Saman Kazemkhani and Aarav Pandya and Daphne Cornelisse and Brennan Shacklett and Eugene Vinitsky},\n      booktitle={Proceedings of the International Conference on Learning Representations (ICLR)},\n      year={2025},\n      url={https:\u002F\u002Farxiv.org\u002Fabs\u002F2408.01584},\n      eprint={2408.01584},\n      archivePrefix={arXiv},\n      primaryClass={cs.AI},\n}\n```\n\n## 贡献\n如果您遇到 bug、发现缺少功能，或希望参与贡献，请随时创建 issue 或联系我们！我们非常期待您的加入！","# GPUDrive 快速上手指南\n\nGPUDrive 是一个基于 C++ 开发的超高速数据驱动驾驶模拟器，利用 Madrona 引擎可实现百万级 FPS 的仿真速度，支持 PyTorch 和 JAX，并兼容 Waymo Open Motion Dataset。\n\n## 环境准备\n\n在开始之前，请确保您的系统满足以下要求：\n\n*   **操作系统**: Linux (推荐), macOS, 或 Windows\n*   **Python**: >= 3.11\n*   **CMake**: >= 3.24\n*   **CUDA Toolkit**: >= 12.2 且 \u003C= 12.4 (**注意**: 暂不支持 12.5 及以上版本)\n    *   验证版本命令：`nvcc --version`\n*   **编译工具**:\n    *   Linux: GCC\u002FG++\n    *   macOS: Xcode Command Line Tools\n    *   Windows: Visual Studio C++ 工具\n\n> **提示**: 国内用户若遇到依赖下载缓慢，可配置 pip 使用清华或阿里镜像源。\n\n## 安装步骤\n\n### 1. 克隆仓库\n务必使用 `--recursive` 参数以拉取子模块：\n\n```bash\ngit clone --recursive https:\u002F\u002Fgithub.com\u002FEmerge-Lab\u002Fgpudrive.git\ncd gpudrive\n```\n\n### 2. 构建模拟器 (二选一)\n\n#### 方案 A：手动编译 (推荐 Linux\u002FmacOS)\n\n```bash\nmkdir build\ncd build\ncmake .. -DCMAKE_BUILD_TYPE=Release\nmake -j # 根据 CPU 核心数调整，例如 make -j32\ncd ..\n```\n\n*Windows 用户*: 请使用 Visual Studio 打开克隆的目录，利用内置的 CMake 功能进行构建。\n\n#### 方案 B：Docker 快速启动\n\n确保已安装 Docker 和 NVIDIA Container Toolkit。\n\n**构建镜像:**\n```bash\nDOCKER_BUILDKIT=1 docker build --build-arg USE_CUDA=true --tag gpudrive:latest --progress=plain .\n```\n\n**运行容器:**\n```bash\ndocker run --gpus all -it --rm --shm-size=20G -v ${PWD}:\u002Fworkspace gpudrive:latest \u002Fbin\u002Fbash\n```\n\n### 3. 配置 Python 环境\n\n推荐使用 `uv` (最快)，也可选择 `conda` 或 `pyenv`。\n\n**使用 uv (推荐):**\n```bash\nuv sync --frozen\n```\n\n**使用 conda:**\n```bash\nconda env create -f .\u002Fenvironment.yml\nconda activate gpudrive\n```\n\n### 4. 安装 Python 包\n\n如果是通过 `uv` 安装的可跳过此步（Linux\u002FmacOS），其他情况需执行：\n\n**Linux\u002FmacOS:**\n```bash\npip install -e .\n```\n\n**Windows:**\n```bash\npip install -e . -Cpackages.madrona_escape_room.ext-out-dir=\u003CPATH_TO_YOUR_BUILD_DIR>\n```\n*(请将 `\u003CPATH_TO_YOUR_BUILD_DIR>` 替换为实际的 build 目录路径)*\n\n### 5. 验证安装\n\n尝试导入模块，若无报错则安装成功：\n\n```python\nimport madrona_gpudrive\n```\n\n> **优化建议**: 为避免每次重复编译 GPU 内核，可设置缓存路径：\n> ```bash\n> export MADRONA_MWGPU_KERNEL_CACHE=.\u002Fgpudrive_cache\n> ```\n> *注意：若修改了 C++ 代码，需删除缓存并重新编译。*\n\n## 基本使用\n\n### 加载预训练模型\nGPUDrive 提供了基于 Hugging Face 的预训练策略。以下是最简单的加载示例：\n\n```python\nfrom gpudrive.networks.late_fusion import NeuralNet\n\n# 加载在 10,000 个场景上训练的最佳策略\nagent = NeuralNet.from_pretrained(\"daphne-cornelisse\u002Fpolicy_S10_000_02_27\")\n```\n\n### 获取数据集\n模拟器兼容 Waymo Open Motion Dataset。您可以下载精简版（Mini）或完整版。\n\n**下载精简版数据集 (约 1000 个训练文件):**\n\n1. 安装依赖：\n   ```bash\n   pip install huggingface_hub\n   ```\n\n2. 使用 Python 下载：\n   ```python\n   from huggingface_hub import snapshot_download\n   \n   # 下载到本地 data\u002Fprocessed 目录\n   snapshot_download(repo_id=\"EMERGE-lab\u002FGPUDrive_mini\", repo_type=\"dataset\", local_dir=\"data\u002Fprocessed\")\n   ```\n\n### 下一步学习\n*   **入门教程**: 查看 `examples\u002Ftutorials` 目录，包含约 30-60 分钟的完整引导，涵盖数据集处理、模拟器配置及智能体设置。\n*   **环境文档**: 参考 `gpudrive\u002Fenv` 了解详细的环境参数配置。\n*   **基线训练**: 运行内置的 PPO 基线脚本开始训练：\n    ```bash\n    python baselines\u002Fppo\u002Fppo_sb3.py\n    ```","某自动驾驶算法团队正在基于 Waymo 开放数据集，训练一个能同时处理车辆、行人和骑行者的复杂多智能体决策模型。\n\n### 没有 gpudrive 时\n- **仿真速度极慢**：传统 CPU 模拟器每秒仅能运行几十帧，训练百万步策略需数周时间，严重拖慢迭代节奏。\n- **场景覆盖不足**：难以高效复用 Waymo 数据集中超过 10 万种真实人类驾驶场景，导致模型在长尾案例（如突发横穿马路）上表现不佳。\n- **多智能体支持弱**：同时模拟大量异构代理（车、人、自行车）时计算负载过高，常被迫简化交通密度，无法还原真实路况。\n- **框架适配繁琐**：将仿真环境对接 PyTorch 或 JAX 等深度学习框架需要大量自定义代码，容易引入 Bug 且维护成本高。\n\n### 使用 gpudrive 后\n- **百万级帧率加速**：借助 Madrona 引擎的 GPU 并行能力，gpudrive 实现每秒 100 万帧的仿真速度，将原本数周的训练周期压缩至数小时。\n- **数据驱动无缝集成**：直接加载 Waymo 开源数据集中的 10 万 + 真实场景，让模型在丰富的人类驾驶演示中快速学习复杂交互逻辑。\n- **高密度异构模拟**：轻松在同一场景中渲染并计算数千个车辆、行人和骑行者的动态，显著提升模型应对拥堵和混合交通的能力。\n- **主流框架即插即用**：提供原生的 Gymnasium 封装及 Stable-Baselines3、CleanRL 等 PPO 算法实现，研究人员可立即开始实验而无需编写底层接口。\n\ngpudrive 通过极致的 GPU 加速仿真，让自动驾驶多智能体训练从“等待结果”转变为“即时验证”，极大提升了算法研发效率。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FEmerge-Lab_gpudrive_dd827e4b.gif","Emerge-Lab","Emerge Lab","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002FEmerge-Lab_cc396f0b.png","The Emerge Lab at New York University. ",null,"https:\u002F\u002Femerge-lab.github.io\u002F","https:\u002F\u002Fgithub.com\u002FEmerge-Lab",[23,27,31,35,39],{"name":24,"color":25,"percentage":26},"Jupyter Notebook","#DA5B0B",92.3,{"name":28,"color":29,"percentage":30},"Python","#3572A5",5.2,{"name":32,"color":33,"percentage":34},"C++","#f34b7d",2.5,{"name":36,"color":37,"percentage":38},"CMake","#DA3434",0,{"name":40,"color":41,"percentage":38},"Dockerfile","#384d54",590,85,"2026-04-09T14:07:05","MIT",4,"Linux, macOS, Windows","需要 NVIDIA GPU，CUDA Toolkit 版本需在 12.2 到 12.4 之间（不支持 12.5+），显存大小未说明","未说明（Docker 运行建议共享内存 20GB）",{"notes":51,"python":52,"dependencies":53},"核心引擎基于 C++ (Madrona)，需手动编译或使用 Docker。Windows 用户需安装 Visual Studio C++ 工具，macOS 需 XCode。若需启用 C++ 可视化查看器 (Viewer)，Linux 系统需额外安装 X11 和 OpenGL 开发库。推荐使用 uv、pyenv 或 conda 管理 Python 环境。首次导入时需编译 GPU 内核，可通过设置环境变量缓存编译结果以加速后续启动。数据集兼容 Waymo Open Motion Dataset。","3.11+",[54,55,56,57,58,59,60,61,62],"CMake>=3.24","CUDA Toolkit 12.2-12.4","torch","jax","gymnasium","stable-baselines3","cleanrl","pufferlib","huggingface_hub",[64,65],"Agent","其他",2,"ready","2026-03-27T02:49:30.150509","2026-04-16T08:11:54.650652",[71,76,81,86,91,96],{"id":72,"question_zh":73,"answer_zh":74,"source_url":75},35305,"使用 CUDA 编译 gpudrive 时遇到链接错误（symbol multiply defined）怎么办？","该问题通常与 CUDA 版本兼容性或环境配置有关。维护者已合并并测试了 Docker 镜像，建议优先尝试使用官方提供的 Docker 环境来避免编译问题。如果必须在学术集群上运行且不支持 Docker，可以使用 Luke Rowe 生成的 Singularity (`.sif`) 文件，该文件已在 Mila 等集群上验证可用。","https:\u002F\u002Fgithub.com\u002FEmerge-Lab\u002Fgpudrive\u002Fissues\u002F243",{"id":77,"question_zh":78,"answer_zh":79,"source_url":80},35306,"为什么训练日志显示性能良好，但评估脚本得出的成功率低且碰撞率高？","这通常是由于训练配置不当导致的。主要原因包括：1. PPO batch size 过小（如 ~30k）而 world size 过大（如 50），导致策略更新时包含大量未完成的片段式 episode，特别是在车辆较少的场景中，策略长期基于不成功的局部数据进行更新。2. 训练日志是基于已完成的 episode 记录的，可能掩盖了部分场景下的表现不佳。建议增大 batch size 或调整 world size 以减少片段式更新的影响。","https:\u002F\u002Fgithub.com\u002FEmerge-Lab\u002Fgpudrive\u002Fissues\u002F462",{"id":82,"question_zh":83,"answer_zh":84,"source_url":85},35307,"运行教程时出现 Segfault 或断言失败（numRoadSegments \u003C= kMaxRoadEntityCount）如何解决？","这是一个已知问题，通常发生在处理特定地图数据时。目前的临时解决方案是增加 polyline 简化阈值（polyline reduction threshold）。如果问题持续，建议向底层依赖库 Madrona 提交 Issue。维护者正在修复教程中的相关配置以规避此错误。","https:\u002F\u002Fgithub.com\u002FEmerge-Lab\u002Fgpudrive\u002Fissues\u002F361",{"id":87,"question_zh":88,"answer_zh":89,"source_url":90},35308,"如果模型输出是轨迹（trajectory），如何将其转换为离散动作（discrete action）？","目前仓库尚未直接支持从轨迹到离散动作的自动转换功能。建议参考源码 `src\u002Fdynamics.hpp` 中实现的逆运动学（inverse kinematics）逻辑，自行编写策略将期望轨迹映射为具体的控制命令（如加速度和转向角）。这是一个复杂的转换过程，需要确保运动学约束的一致性。","https:\u002F\u002Fgithub.com\u002FEmerge-Lab\u002Fgpudrive\u002Fissues\u002F268",{"id":92,"question_zh":93,"answer_zh":94,"source_url":95},35309,"循环创建新环境时出现 \"Core dumped\" 和 \"invalid argument\" 错误是什么原因？","该错误通常是因为显存（VRAM）不足，无法同时加载过多的 `num_worlds` 或代理数量。解决方案包括：1. 分批进行实验，不要一次性加载所有场景；2. 通过修改源码 `src\u002Fconsts.hpp` 中的 `MaxAgentCount` 常量来限制环境中最大代理数量，修改后需重新编译项目。","https:\u002F\u002Fgithub.com\u002FEmerge-Lab\u002Fgpudrive\u002Fissues\u002F438",{"id":97,"question_zh":98,"answer_zh":99,"source_url":90},35310,"如何在模拟器中动态设置或重采样交通场景以遍历完整数据集？","项目已合并支持动态设置交通场景的功能。用户可以查阅 `pygpudrive\u002Fenv\u002FREADME` 文档中的 \"Resampling Traffic Scenarios\" 章节，了解如何配置环境以在训练过程中迭代整个数据集，而不仅限于固定的几个示例场景。",[101,106,111,116],{"id":102,"version":103,"summary_zh":104,"released_at":105},280361,"v0.4.0","## 发布说明\n\n### 功能增强\n- **简易安装**：GPUDrive 现已提供易于安装的软件包，支持手动安装和 Docker 安装两种方式。\n- **数据加载与迭代优化**：通过全新的数据加载器，可在 WOMD 数据集中高效训练多个场景，提升数据处理能力。\n- **PPO 循环优化**：对 PPO 循环进行了优化，显著提升了收敛速度，并改进了基准性能。\n- **预训练策略**：发布了预训练策略，在模拟环境中达到了 99% 的性能水平。\n- **可视化增强**：升级了 2D 和 3D 可视化工具，提升了渲染质量，同时提供了更直观的用户体验。\n\n### 其他更新\n- **ICLR 2025 录用**：GPUDrive 已被 ICLR 2025 接收！更新后的论文现已发布，可在此查看：[链接](https:\u002F\u002Farxiv.org\u002Fabs\u002F2403.19648)\n\n### 文档\n- **教程与 README 更新**：所有教程和文档均已测试并更新，以反映最新的改进内容。","2025-02-20T18:23:57",{"id":107,"version":108,"summary_zh":109,"released_at":110},280362,"v0.3","使用 GPUDrive 处理的新版 WOMD 数据集。**警告**：与[之前的 Nocturne 数据集](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fnocturne?tab=readme-ov-file#dataset)相比，存在破坏性变更。请使用 README 中链接的更新版数据集。此外，该版本还包含一个新的可视化工具；它使用 matplotlib 而非 pygame。","2024-12-19T15:28:51",{"id":112,"version":113,"summary_zh":114,"released_at":115},280363,"v0.2","所有的强化学习代码都能成功训练智能体。不过，还有一些提升开发体验的小改进尚未实现。","2024-08-06T16:37:49",{"id":117,"version":118,"summary_zh":19,"released_at":119},280364,"v0.1","2024-06-13T17:19:04",[121,133,141,150,158,167],{"id":122,"name":123,"github_repo":124,"description_zh":125,"stars":126,"difficulty_score":127,"last_commit_at":128,"category_tags":129,"status":67},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[64,130,131,132],"开发框架","图像","数据工具",{"id":134,"name":135,"github_repo":136,"description_zh":137,"stars":138,"difficulty_score":127,"last_commit_at":139,"category_tags":140,"status":67},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,"2026-04-05T11:01:52",[130,131,64],{"id":142,"name":143,"github_repo":144,"description_zh":145,"stars":146,"difficulty_score":66,"last_commit_at":147,"category_tags":148,"status":67},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",157379,"2026-04-15T23:32:42",[130,64,149],"语言模型",{"id":151,"name":152,"github_repo":153,"description_zh":154,"stars":155,"difficulty_score":66,"last_commit_at":156,"category_tags":157,"status":67},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",108322,"2026-04-10T11:39:34",[130,131,64],{"id":159,"name":160,"github_repo":161,"description_zh":162,"stars":163,"difficulty_score":66,"last_commit_at":164,"category_tags":165,"status":67},6121,"gemini-cli","google-gemini\u002Fgemini-cli","gemini-cli 是一款由谷歌推出的开源 AI 命令行工具，它将强大的 Gemini 大模型能力直接集成到用户的终端环境中。对于习惯在命令行工作的开发者而言，它提供了一条从输入提示词到获取模型响应的最短路径，无需切换窗口即可享受智能辅助。\n\n这款工具主要解决了开发过程中频繁上下文切换的痛点，让用户能在熟悉的终端界面内直接完成代码理解、生成、调试以及自动化运维任务。无论是查询大型代码库、根据草图生成应用，还是执行复杂的 Git 操作，gemini-cli 都能通过自然语言指令高效处理。\n\n它特别适合广大软件工程师、DevOps 人员及技术研究人员使用。其核心亮点包括支持高达 100 万 token 的超长上下文窗口，具备出色的逻辑推理能力；内置 Google 搜索、文件操作及 Shell 命令执行等实用工具；更独特的是，它支持 MCP（模型上下文协议），允许用户灵活扩展自定义集成，连接如图像生成等外部能力。此外，个人谷歌账号即可享受免费的额度支持，且项目基于 Apache 2.0 协议完全开源，是提升终端工作效率的理想助手。",100752,"2026-04-10T01:20:03",[166,64,131,130],"插件",{"id":168,"name":169,"github_repo":170,"description_zh":171,"stars":172,"difficulty_score":127,"last_commit_at":173,"category_tags":174,"status":67},4487,"LLMs-from-scratch","rasbt\u002FLLMs-from-scratch","LLMs-from-scratch 是一个基于 PyTorch 的开源教育项目，旨在引导用户从零开始一步步构建一个类似 ChatGPT 的大型语言模型（LLM）。它不仅是同名技术著作的官方代码库，更提供了一套完整的实践方案，涵盖模型开发、预训练及微调的全过程。\n\n该项目主要解决了大模型领域“黑盒化”的学习痛点。许多开发者虽能调用现成模型，却难以深入理解其内部架构与训练机制。通过亲手编写每一行核心代码，用户能够透彻掌握 Transformer 架构、注意力机制等关键原理，从而真正理解大模型是如何“思考”的。此外，项目还包含了加载大型预训练权重进行微调的代码，帮助用户将理论知识延伸至实际应用。\n\nLLMs-from-scratch 特别适合希望深入底层原理的 AI 开发者、研究人员以及计算机专业的学生。对于不满足于仅使用 API，而是渴望探究模型构建细节的技术人员而言，这是极佳的学习资源。其独特的技术亮点在于“循序渐进”的教学设计：将复杂的系统工程拆解为清晰的步骤，配合详细的图表与示例，让构建一个虽小但功能完备的大模型变得触手可及。无论你是想夯实理论基础，还是为未来研发更大规模的模型做准备",90106,"2026-04-06T11:19:32",[149,131,64,130]]