[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-opendilab--InterFuser":3,"tool-opendilab--InterFuser":61},[4,18,26,36,44,53],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},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",[13,14,15,16],"Agent","开发框架","图像","数据工具","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":10,"last_commit_at":24,"category_tags":25,"status":17},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",[14,15,13],{"id":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":32,"last_commit_at":33,"category_tags":34,"status":17},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 真正成长为懂上",150720,2,"2026-04-11T11:33:10",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":32,"last_commit_at":42,"category_tags":43,"status":17},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",[14,15,13],{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":32,"last_commit_at":50,"category_tags":51,"status":17},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",[52,13,15,14],"插件",{"id":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":10,"last_commit_at":59,"category_tags":60,"status":17},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",[35,15,13,14],{"id":62,"github_repo":63,"name":64,"description_en":65,"description_zh":66,"ai_summary_zh":66,"readme_en":67,"readme_zh":68,"quickstart_zh":69,"use_case_zh":70,"hero_image_url":71,"owner_login":72,"owner_name":73,"owner_avatar_url":74,"owner_bio":75,"owner_company":76,"owner_location":76,"owner_email":77,"owner_twitter":73,"owner_website":76,"owner_url":78,"languages":79,"stars":113,"forks":114,"last_commit_at":115,"license":116,"difficulty_score":117,"env_os":118,"env_gpu":119,"env_ram":120,"env_deps":121,"category_tags":129,"github_topics":130,"view_count":32,"oss_zip_url":76,"oss_zip_packed_at":76,"status":17,"created_at":134,"updated_at":135,"faqs":136,"releases":173},6685,"opendilab\u002FInterFuser","InterFuser","[CoRL 2022] InterFuser: Safety-Enhanced Autonomous Driving Using Interpretable Sensor Fusion Transformer","InterFuser 是一款专为提升自动驾驶安全性而设计的开源算法框架，曾荣获 CoRL 2022 会议认可并在 CARLA 自动驾驶排行榜上取得领先成绩。它主要解决自动驾驶系统在复杂路况下感知不全、决策不够安全可靠的难题。通过深度融合摄像头、激光雷达等多模态传感器的多视角数据，InterFuser 能够构建对周围环境的全面理解。\n\n其核心亮点在于引入了“可解释的传感器融合 Transformer\"架构。与传统黑盒模型不同，InterFuser 在内部生成具有明确语义的中间特征，这些特征不仅增强了场景理解的深度，还能作为安全约束，确保车辆的驾驶动作始终处于安全范围内，从而显著降低事故风险。\n\n该项目非常适合自动驾驶领域的研究人员、算法工程师及相关专业的学生使用。用户可以在 CARLA 仿真环境中利用 InterFuser 进行模型训练、评估及二次开发，探索更安全、更透明的端到端自动驾驶方案。虽然项目包含详细的环境搭建与数据生成指南，但由于涉及深度学习与仿真器配置，建议使用者具备一定的编程基础与人工智能背景。","# InterFuser: Safety-Enhanced Autonomous Driving Using Interpretable Sensor Fusion Transformer\n![pipeline](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fopendilab_InterFuser_readme_e00eb32c41ba.png)\n> [Hao Shao](http:\u002F\u002Fhao-shao.com\u002F), [Letian Wang](https:\u002F\u002Fletianwang0.wixsite.com\u002Fmyhome), RuoBing Chen, [Hongsheng Li](http:\u002F\u002Fwww.ee.cuhk.edu.hk\u002F~hsli\u002F), [Yu Liu](https:\u002F\u002Fliuyu.us\u002F)\n> \n> [CoRL 2022](https:\u002F\u002Farxiv.org\u002Fabs\u002F2207.14024)\n\n[![PWC](https:\u002F\u002Fimg.shields.io\u002Fendpoint.svg?url=https:\u002F\u002Fpaperswithcode.com\u002Fbadge\u002Fsafety-enhanced-autonomous-driving-using-1\u002Fautonomous-driving-on-carla-leaderboard)](https:\u002F\u002Fpaperswithcode.com\u002Fsota\u002Fautonomous-driving-on-carla-leaderboard?p=safety-enhanced-autonomous-driving-using-1)\n\nThis repository contains code for the paper [Safety-Enhanced Autonomous Driving Using Interpretable Sensor Fusion Transformer](https:\u002F\u002Fgithub.com\u002Fopendilab\u002FInterFuser). This work fully processes and fuses information from multi-modal multi-view sensors for achieving comprehensive scene understanding. Besides, intermediate interpretable features are generated from our framework, which provides more semantics and is exploited to better constrain actions to be within the safe sets.\nOur method achieved new state-of-the-art on [CARLA AD Leaderboard](https:\u002F\u002Fleaderboard.carla.org\u002Fleaderboard\u002F) by June 11 2022.\n\n## News\n\n[12\u002F21] Now, a similar dataset can be found in [here, hugging face](https:\u002F\u002Fgithub.com\u002Fopendilab\u002FLMDrive) or [openxlab](https:\u002F\u002Fopenxlab.org.cn\u002Fdatasets\u002Fdeepcs233\u002FLMDrive). The only difference is the sample rate is 10Hz in that repo, instead of 2Hz of InterFuser.\n\n## Demo Video\n\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fopendilab_InterFuser_readme_00e16ed5d1d9.gif\" height=\"400\">\n\n\n## Contents\n1. [Setup](#setup)\n2. [Dataset](#dataset)\n3. [Data Generation](#data-generation)\n4. [Training](#training)\n5. [Evaluation](#evaluation)\n6. [Acknowledgements](#acknowledgements)\n\n## Setup\nInstall anaconda\n```Shell\nwget https:\u002F\u002Frepo.anaconda.com\u002Farchive\u002FAnaconda3-2020.11-Linux-x86_64.sh\nbash Anaconda3-2020.11-Linux-x86_64.sh\nsource ~\u002F.profile\n```\n\nClone the repo and build the environment\n\n```Shell\ngit clone https:\u002F\u002Fgithub.com\u002Fopendilab\u002FInterFuser.git\ncd InterFuser\nconda create -n interfuser python=3.7\nconda activate interfuser\npip3 install -r requirements.txt\ncd interfuser\npython setup.py develop\n```\n\nDownload and setup CARLA 0.9.10.1\n```Shell\nchmod +x setup_carla.sh\n.\u002Fsetup_carla.sh\neasy_install carla\u002FPythonAPI\u002Fcarla\u002Fdist\u002Fcarla-0.9.10-py3.7-linux-x86_64.egg\n```\n\n**Note:** we choose the setuptools==41 to install because this version has the feature `easy_install`. After installing the carla.egg you can install the lastest setuptools to avoid *No module named distutils_hack*.\n\n**Note:** FAQ: https:\u002F\u002Fgithub.com\u002Fopendilab\u002FInterFuser\u002Fissues\u002F107\n\n## Dataset\nThe data is generated with ```leaderboard\u002Fteam_code\u002Fauto_pilot.py``` in 8 CARLA towns using the routes and scenarios files provided at ```leaderboard\u002Fdata``` on CARLA 0.9.10.1\n\nThe collected dataset is structured as follows:\n```\n- TownX_{tiny,short,long}: corresponding to different towns and routes files\n    - routes_X: contains data for an individual route\n        - rgb_{front, left, right, rear}: multi-view camera images at 400x300 resolution\n        - seg_{front, left, right}: corresponding segmentation images\n        - depth_{front, left, right}: corresponding depth images\n        - lidar: 3d point cloud in .npy format\n        - birdview: topdown segmentation images required for training LBC\n        - 2d_bbs_{front, left, right, rear}: 2d bounding boxes for different agents in the corresponding camera view\n        - 3d_bbs: 3d bounding boxes for different agents\n        - affordances: different types of affordances\n        - measurements: contains ego-agent's position, velocity and other metadata\n        - other_actors: contains the positions, velocities and other metadatas of surrounding vehicles and the traffic lights\n```\n\n## Data Generation\n### Data Generation with multiple CARLA Servers\nIn addition to the dataset, we have also provided all the scripts used for generating data and these can be modified as required for different CARLA versions. The dataset is collected by a rule-based expert agent in differnet weathers and towns.\n\n#### Running CARLA Servers\n```bash\n# start 14 carla servers: ip [localhost], port [20000 - 20026]\ncd carla\nCUDA_VISIBLE_DEVICES=0 .\u002FCarlaUE4.sh --world-port=20000 -opengl &\nCUDA_VISIBLE_DEVICES=1 .\u002FCarlaUE4.sh --world-port=20002 -opengl &\n...\nCUDA_VISIBLE_DEVICES=7 .\u002FCarlaUE4.sh --world-port=20026 -opengl &\n```\n\nInstructions for setting up docker are available [here](https:\u002F\u002Fdocs.nvidia.com\u002Fdatacenter\u002Fcloud-native\u002Fcontainer-toolkit\u002Finstall-guide.html#docker). Pull the docker image of CARLA 0.9.10.1 ```docker pull carlasim\u002Fcarla:0.9.10.1```.\n\nDocker 18:\n```\ndocker run -it --rm -p 2000-2002:2000-2002 --runtime=nvidia -e NVIDIA_VISIBLE_DEVICES=0 carlasim\u002Fcarla:0.9.10.1 .\u002FCarlaUE4.sh --world-port=2000 -opengl\n```\n\nDocker 19:\n```Shell\ndocker run -it --rm --net=host --gpus '\"device=0\"' carlasim\u002Fcarla:0.9.10.1 .\u002FCarlaUE4.sh --world-port=2000 -opengl\n```\n\nIf the docker container doesn't start properly then add another environment variable ```-e SDL_AUDIODRIVER=dsp```.\n\n#### Run the Autopilot\nGenerate scripts for collecting data in batches.\n```bash\ncd dataset\npython init_dir.py\ncd ..\ncd data_collection\npython generate_yamls.py # You can modify fps, waypoints distribution strength ...\n\n# If you don't need all weather, you can modify the following script\npython generate_bashs.py\npython generate_batch_collect.py \ncd ..\n```\n\nRun batch-run scripts of the town and route type that you need to collect.\n```bash\nbash data_collection\u002Fbatch_run\u002Frun_route_routes_town01_long.sh\nbash data_collection\u002Fbatch_run\u002Frun_route_routes_town01_short.sh\n...\nbash data_collection\u002Fbatch_run\u002Frun_route_routes_town07_tiny.sh\n```\n\n**Note1:** If you don't need all 14 kinds of weather in your dataset, you can modify the above code and scripts.\n\n**Note2:** We also provide 7 kinds of night weather conditions in `leaderboard\u002Fteam_code\u002Fauto_pilot.py`, you can modify the above code and scripts to collect the night dataset.\n\n### Data Generation with a single CARLA Server\nWith a single CARLA server, rollout the autopilot to start data generation.\n```Shell\ncarla\u002FCarlaUE4.sh --world-port=2000 -opengl\n.\u002Fleaderboard\u002Fscripts\u002Frun_evaluation.sh\n```\nThe expert agent used for data generation is defined in ```leaderboard\u002Fteam_code\u002Fauto_pilot.py```. Different variables which need to be set are specified in ```leaderboard\u002Fscripts\u002Frun_evaluation.sh```. \n\n### Some Useful tools\nWe provide some useful python scripts in  `tools\u002Fdata`, for example:\n- `batch_merge_data.py`: merge several fragmented data items into one item, and then `interfuser\u002Ftimm\u002Fdata\u002Fcarla_dataset.py` can be modified to reduce IO time.\n- `batch_stat_data.py`: get statistical results of collected data\n- `batch_preload.py`: compute the waypoints of all frames in one route and save to one file\n- `batch_stat_blocked_data.py` and `batch_recollect_blocked_data.py`: find and delete the frames that the ego-vehicle is blocked for a long time\n\n## Training\n\n```bash\ncd interfuser\nbash scripts\u002Ftrain.sh\n```\n\n```bash\nGPU_NUM=8\nDATASET_ROOT='dataset\u002F'\n\n.\u002Fdistributed_train.sh $GPU_NUM $DATASET_ROOT  --dataset carla --train-towns 1 2 3 4 6 7 10  --val-towns 5 \\\n    --train-weathers 0 1 2 3 4 5 6 7 8 9  --val-weathers 10 11 12 13 \\\n    --model interfuser_baseline --sched cosine --epochs 25 --warmup-epochs 5 --lr 0.0005 --batch-size 16  -j 16 --no-prefetcher --eval-metric l1_error \\\n    --opt adamw --opt-eps 1e-8 --weight-decay 0.05  \\\n    --scale 0.9 1.1 --saver-decreasing --clip-grad 10 --freeze-num -1 \\\n    --with-backbone-lr --backbone-lr 0.0002 \\\n    --multi-view --with-lidar --multi-view-input-size 3 128 128 \\\n    --experiment interfuser_baseline \\\n    --pretrained\n    \n\n```\n\nThe `DATASET_ROOT` needs a file dataset_index.txt to list the traing\u002Fevaluation data. The format should be like the follow:\n\n> route_path_dir data_frames_in_this_dir\n\n> route_path_dir needs to be a relative path to `DATASET_ROOT`, the training code will concat the `DATASET_ROOT` and route_path_dir as the full path to load the data\n\nfor example:\n\n> weather-7\u002Fdata\u002Froutes_town06_long_w7_11_28_18_28_35\u002F 1062\n> \n> weather-2\u002Fdata\u002Froutes_town01_short_w2_11_16_08_27_10\u002F 1785\n> \n> weather-2\u002Fdata\u002Froutes_town01_short_w2_11_16_09_55_05\u002F 918\n> \n> weather-2\u002Fdata\u002Froutes_town02_short_w2_11_16_22_55_25\u002F 134\n> \n> weather-2\u002Fdata\u002Froutes_town01_short_w2_11_16_11_44_08\u002F 569\n> ...\n\n1062 is the number of the frames in weather-7\u002Fdata\u002Froutes_town06_long_w7_11_28_18_28_35\u002Frgb or weather-7\u002Fdata\u002Froutes_town06_long_w7_11_28_18_28_35\u002Frgb_front etc.\n\n## Evaluation\nSpin up a CARLA server (described above) and run the required agent. The adequate routes and scenarios files are provided in ```leaderboard\u002Fdata``` and the required variables need to be set in ```leaderboard\u002Fscripts\u002Frun_evaluation.sh```.\nUpdate ```leaderboard\u002Fscripts\u002Frun_evaluation.sh``` to include the following code for evaluating the model on Town05 Long Benchmark.\n```shell\nexport CARLA_ROOT=\u002Fpath\u002Fto\u002Fcarla\u002Froot\nexport ROUTES=leaderboard\u002Fdata\u002Fevaluation_routes\u002Froutes_town05_long.xml\nexport TEAM_AGENT=leaderboard\u002Fteam_code\u002Finterfuser_agent.py\nexport TEAM_CONFIG=leaderboard\u002Fteam_code\u002Finterfuser_config.py\nexport CHECKPOINT_ENDPOINT=results\u002Finterfuser_result.json\nexport SCENARIOS=leaderboard\u002Fdata\u002Fscenarios\u002Ftown05_all_scenarios.json\n```\nCUDA_VISIBLE_DEVICES=0 .\u002Fleaderboard\u002Fscripts\u002Frun_evaluation.sh\n\nUse `ROUTES=leaderboard\u002Fdata\u002F42routes\u002F42routes.xml` and `SCENARIOS=leaderboard\u002Fdata\u002F42routes\u002F42scenarios.json` to run CARLA 42 routes Benchmark.\n\n### Pretrain weights\nWe also provide examplery model weights for direct evaluation which can be downloaded at [here](http:\u002F\u002F43.163.208.95\u002Fs\u002FjRfM). The model needs to be moved to `leaderboard\u002Fteam_code\u002F`.\n\n**Note:** The model is trained on the part of the full dataset with several towns and weathers.\n\n\n## Acknowledgements\nThis implementation is based on code from several repositories.\n- [Transfuser](https:\u002F\u002Fgithub.com\u002Fautonomousvision\u002Ftransfuser)\n- [2020_CARLA_challenge](https:\u002F\u002Fgithub.com\u002Fbradyz\u002F2020_CARLA_challenge)\n- [CARLA Leaderboard](https:\u002F\u002Fgithub.com\u002Fcarla-simulator\u002Fleaderboard)\n- [Scenario Runner](https:\u002F\u002Fgithub.com\u002Fcarla-simulator\u002Fscenario_runner)\n\n\n## Citation\nIf you find our repo, dataset or paper useful, please cite us as\n```bibtex\n@article{shao2022interfuser,\n title={Safety-Enhanced Autonomous Driving Using Interpretable Sensor Fusion Transformer},\n author={Hao Shao and Letian Wang and RuoBing Chen and Hongsheng Li and Yu Liu},\n journal={arXiv preprint arXiv:2207.14024},\n year={2022},\n}\n```\n\n## License\nAll code within this repository is under [Apache License 2.0](https:\u002F\u002Fwww.apache.org\u002Flicenses\u002FLICENSE-2.0).\n","# InterFuser: 基于可解释传感器融合Transformer的安全增强自动驾驶\n![pipeline](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fopendilab_InterFuser_readme_e00eb32c41ba.png)\n> [Hao Shao](http:\u002F\u002Fhao-shao.com\u002F)、[Letian Wang](https:\u002F\u002Fletianwang0.wixsite.com\u002Fmyhome)、RuoBing Chen、[Hongsheng Li](http:\u002F\u002Fwww.ee.cuhk.edu.hk\u002F~hsli\u002F)、[Yu Liu](https:\u002F\u002Fliuyu.us\u002F)\n> \n> [CoRL 2022](https:\u002F\u002Farxiv.org\u002Fabs\u002F2207.14024)\n\n[![PWC](https:\u002F\u002Fimg.shields.io\u002Fendpoint.svg?url=https:\u002F\u002Fpaperswithcode.com\u002Fbadge\u002Fsafety-enhanced-autonomous-driving-using-1\u002Fautonomous-driving-on-carla-leaderboard)](https:\u002F\u002Fpaperswithcode.com\u002Fsota\u002Fautonomous-driving-on-carla-leaderboard?p=safety-enhanced-autonomous-driving-using-1)\n\n本仓库包含论文《基于可解释传感器融合Transformer的安全增强自动驾驶》的代码实现。该工作对多模态、多视角传感器信息进行充分处理与融合，以实现全面的场景理解。此外，我们的框架还能生成中间可解释特征，这些特征具有更丰富的语义信息，并被用于更好地将行为约束在安全集合内。\n\n截至2022年6月11日，我们的方法在[CARLA AD Leaderboard](https:\u002F\u002Fleaderboard.carla.org\u002Fleaderboard\u002F)上取得了新的最先进水平。\n\n## 最新消息\n\n[12\u002F21] 现在，类似的数据集可以在[Hugging Face](https:\u002F\u002Fgithub.com\u002Fopendilab\u002FLMDrive)或[OpenXLab](https:\u002F\u002Fopenxlab.org.cn\u002Fdatasets\u002Fdeepcs233\u002FLMDrive)上找到。唯一的区别在于，该数据集的采样率为10Hz，而InterFuser的数据集为2Hz。\n\n## 演示视频\n\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fopendilab_InterFuser_readme_00e16ed5d1d9.gif\" height=\"400\">\n\n\n## 目录\n1. [设置](#setup)\n2. [数据集](#dataset)\n3. [数据生成](#data-generation)\n4. [训练](#training)\n5. [评估](#evaluation)\n6. [致谢](#acknowledgements)\n\n## 设置\n安装Anaconda\n```Shell\nwget https:\u002F\u002Frepo.anaconda.com\u002Farchive\u002FAnaconda3-2020.11-Linux-x86_64.sh\nbash Anaconda3-2020.11-Linux-x86_64.sh\nsource ~\u002F.profile\n```\n\n克隆仓库并构建环境\n\n```Shell\ngit clone https:\u002F\u002Fgithub.com\u002Fopendilab\u002FInterFuser.git\ncd InterFuser\nconda create -n interfuser python=3.7\nconda activate interfuser\npip3 install -r requirements.txt\ncd interfuser\npython setup.py develop\n```\n\n下载并设置CARLA 0.9.10.1\n```Shell\nchmod +x setup_carla.sh\n.\u002Fsetup_carla.sh\neasy_install carla\u002FPythonAPI\u002Fcarla\u002Fdist\u002Fcarla-0.9.10-py3.7-linux-x86_64.egg\n```\n\n**注意：** 我们选择使用setuptools==41版本进行安装，因为该版本支持`easy_install`功能。安装完carla.egg后，可以再安装最新版的setuptools，以避免出现*No module named distutils_hack*的错误。\n\n**注意：** 常见问题解答：https:\u002F\u002Fgithub.com\u002Fopendilab\u002FInterFuser\u002Fissues\u002F107\n\n## 数据集\n数据是通过CARLA 0.9.10.1中的```leaderboard\u002Fteam_code\u002Fauto_pilot.py```脚本，在8个CARLA城镇中，利用```leaderboard\u002Fdata```目录下提供的路线和场景文件生成的。\n\n收集到的数据集结构如下：\n```\n- TownX_{tiny,short,long}：对应不同的城镇和路线文件\n    - routes_X：包含单条路线的数据\n        - rgb_{front, left, right, rear}：分辨率为400x300的多视角相机图像\n        - seg_{front, left, right}：对应的分割图像\n        - depth_{front, left, right}：对应的深度图像\n        - lidar：.npy格式的三维点云\n        - birdview：用于训练LBC所需的俯视分割图像\n        - 2d_bbs_{front, left, right, rear}：对应相机视角下的不同目标的二维边界框\n        - 3d_bbs：不同目标的三维边界框\n        - affordances：不同类型的操作可能性\n        - measurements：包含自车的位置、速度等元数据\n        - other_actors：包含周围车辆及交通信号灯的位置、速度等元数据\n```\n\n## 数据生成\n### 使用多个CARLA服务器生成数据\n除了数据集之外，我们还提供了所有用于生成数据的脚本，并且可以根据不同CARLA版本的需求进行修改。数据集是由一个基于规则的专家智能体在不同天气和城镇条件下收集的。\n\n#### 启动CARLA服务器\n```bash\n# 启动14个CARLA服务器：IP [localhost], 端口 [20000 - 20026]\ncd carla\nCUDA_VISIBLE_DEVICES=0 .\u002FCarlaUE4.sh --world-port=20000 -opengl &\nCUDA_VISIBLE_DEVICES=1 .\u002FCarlaUE4.sh --world-port=20002 -opengl &\n...\nCUDA_VISIBLE_DEVICES=7 .\u002FCarlaUE4.sh --world-port=20026 -opengl &\n```\n\n关于Docker的设置说明请参见[这里](https:\u002F\u002Fdocs.nvidia.com\u002Fdatacenter\u002Fcloud-native\u002Fcontainer-toolkit\u002Finstall-guide.html#docker)。拉取CARLA 0.9.10.1的Docker镜像```docker pull carlasim\u002Fcarla:0.9.10.1```\n\nDocker 18：\n```Shell\ndocker run -it --rm -p 2000-2002:2000-2002 --runtime=nvidia -e NVIDIA_VISIBLE_DEVICES=0 carlasim\u002Fcarla:0.9.10.1 .\u002FCarlaUE4.sh --world-port=2000 -opengl\n```\n\nDocker 19：\n```Shell\ndocker run -it --rm --net=host --gpus '\"device=0\"' carlasim\u002Fcarla:0.9.10.1 .\u002FCarlaUE4.sh --world-port=2000 -opengl\n```\n\n如果Docker容器无法正常启动，请添加环境变量```-e SDL_AUDIODRIVER=dsp```\n\n#### 运行自动驾驶程序\n生成批量采集数据的脚本。\n```bash\ncd dataset\npython init_dir.py\ncd ..\ncd data_collection\npython generate_yamls.py # 可以调整帧率、路点分布强度等...\n\n# 如果不需要所有天气条件，可以修改以下脚本\npython generate_bashs.py\npython generate_batch_collect.py \ncd ..\n```\n\n运行所需城镇和路线类型的批量执行脚本。\n```bash\nbash data_collection\u002Fbatch_run\u002Frun_route_routes_town01_long.sh\nbash data_collection\u002Fbatch_run\u002Frun_route_routes_town01_short.sh\n...\nbash data_collection\u002Fbatch_run\u002Frun_route_routes_town07_tiny.sh\n```\n\n**注1：** 如果您的数据集不需要全部14种天气条件，可以修改上述代码和脚本。\n\n**注2：** 我们还在```leaderboard\u002Fteam_code\u002Fauto_pilot.py```中提供了7种夜间天气条件，您可以修改上述代码和脚本以收集夜间数据集。\n\n### 使用单个CARLA服务器生成数据\n使用单个CARLA服务器，运行自动驾驶程序开始数据生成。\n```Shell\ncarla\u002FCarlaUE4.sh --world-port=2000 -opengl\n.\u002Fleaderboard\u002Fscripts\u002Frun_evaluation.sh\n```\n\n用于数据生成的专家智能体定义在```leaderboard\u002Fteam_code\u002Fauto_pilot.py```中。需要设置的不同参数则在```leaderboard\u002Fscripts\u002Frun_evaluation.sh```中指定。\n\n### 一些实用工具\n我们在 `tools\u002Fdata` 中提供了一些有用的 Python 脚本，例如：\n- `batch_merge_data.py`：将多个碎片化的数据合并为一个文件，随后可以修改 `interfuser\u002Ftimm\u002Fdata\u002Fcarla_dataset.py` 以减少 IO 时间。\n- `batch_stat_data.py`：获取已收集数据的统计结果。\n- `batch_preload.py`：计算一条路线中所有帧的航点，并保存到一个文件中。\n- `batch_stat_blocked_data.py` 和 `batch_recollect_blocked_data.py`：查找并删除自动驾驶车辆长时间被堵住的帧。\n\n## 训练\n\n```bash\ncd interfuser\nbash scripts\u002Ftrain.sh\n```\n\n```bash\nGPU_NUM=8\nDATASET_ROOT='dataset\u002F'\n\n.\u002Fdistributed_train.sh $GPU_NUM $DATASET_ROOT  --dataset carla --train-towns 1 2 3 4 6 7 10  --val-towns 5 \\\n    --train-weathers 0 1 2 3 4 5 6 7 8 9  --val-weathers 10 11 12 13 \\\n    --model interfuser_baseline --sched cosine --epochs 25 --warmup-epochs 5 --lr 0.0005 --batch-size 16  -j 16 --no-prefetcher --eval-metric l1_error \\\n    --opt adamw --opt-eps 1e-8 --weight-decay 0.05  \\\n    --scale 0.9 1.1 --saver-decreasing --clip-grad 10 --freeze-num -1 \\\n    --with-backbone-lr --backbone-lr 0.0002 \\\n    --multi-view --with-lidar --multi-view-input-size 3 128 128 \\\n    --experiment interfuser_baseline \\\n    --pretrained\n    \n\n```\n\n`DATASET_ROOT` 需要一个名为 `dataset_index.txt` 的文件来列出训练和评估数据。格式应如下所示：\n\n> route_path_dir data_frames_in_this_dir\n\n`route_path_dir` 应该是相对于 `DATASET_ROOT` 的相对路径，训练代码会将 `DATASET_ROOT` 和 `route_path_dir` 拼接成完整的路径来加载数据。\n\n例如：\n\n> weather-7\u002Fdata\u002Froutes_town06_long_w7_11_28_18_28_35\u002F 1062\n> \n> weather-2\u002Fdata\u002Froutes_town01_short_w2_11_16_08_27_10\u002F 1785\n> \n> weather-2\u002Fdata\u002Froutes_town01_short_w2_11_16_09_55_05\u002F 918\n> \n> weather-2\u002Fdata\u002Froutes_town02_short_w2_11_16_22_55_25\u002F 134\n> \n> weather-2\u002Fdata\u002Froutes_town01_short_w2_11_16_11_44_08\u002F 569\n> ...\n\n其中，1062 表示 `weather-7\u002Fdata\u002Froutes_town06_long_w7_11_28_18_28_35\u002Frgb` 或 `weather-7\u002Fdata\u002Froutes_town06_long_w7_11_28_18_28_35\u002Frgb_front` 等目录下的帧数。\n\n## 评估\n启动一个 CARLA 服务器（如上所述），并运行所需的智能体。充分的路线和场景文件已在 `leaderboard\u002Fdata` 中提供，所需变量需要在 `leaderboard\u002Fscripts\u002Frun_evaluation.sh` 中设置。\n\n更新 `leaderboard\u002Fscripts\u002Frun_evaluation.sh`，加入以下代码以在 Town05 Long Benchmark 上评估模型：\n```shell\nexport CARLA_ROOT=\u002Fpath\u002Fto\u002Fcarla\u002Froot\nexport ROUTES=leaderboard\u002Fdata\u002Fevaluation_routes\u002Froutes_town05_long.xml\nexport TEAM_AGENT=leaderboard\u002Fteam_code\u002Finterfuser_agent.py\nexport TEAM_CONFIG=leaderboard\u002Fteam_code\u002Finterfuser_config.py\nexport CHECKPOINT_ENDPOINT=results\u002Finterfuser_result.json\nexport SCENARIOS=leaderboard\u002Fdata\u002Fscenarios\u002Ftown05_all_scenarios.json\n```\nCUDA_VISIBLE_DEVICES=0 .\u002Fleaderboard\u002Fscripts\u002Frun_evaluation.sh\n\n使用 `ROUTES=leaderboard\u002Fdata\u002F42routes\u002F42routes.xml` 和 `SCENARIOS=leaderboard\u002Fdata\u002F42routes\u002F42scenarios.json` 来运行 CARLA 42 路线基准测试。\n\n### 预训练权重\n我们还提供了可供直接评估的示例模型权重，可从 [这里](http:\u002F\u002F43.163.208.95\u002Fs\u002FjRfM) 下载。该模型需要移动到 `leaderboard\u002Fteam_code\u002F` 目录下。\n\n**注意：** 该模型是在包含若干城镇和天气条件的部分完整数据集上训练的。\n\n## 致谢\n本实现基于多个仓库中的代码。\n- [Transfuser](https:\u002F\u002Fgithub.com\u002Fautonomousvision\u002Ftransfuser)\n- [2020_CARLA_challenge](https:\u002F\u002Fgithub.com\u002Fbradyz\u002F2020_CARLA_challenge)\n- [CARLA Leaderboard](https:\u002F\u002Fgithub.com\u002Fcarla-simulator\u002Fleaderboard)\n- [Scenario Runner](https:\u002F\u002Fgithub.com\u002Fcarla-simulator\u002Fscenario_runner)\n\n## 引用\n如果您认为我们的仓库、数据集或论文有用，请按以下方式引用我们：\n```bibtex\n@article{shao2022interfuser,\n title={Safety-Enhanced Autonomous Driving Using Interpretable Sensor Fusion Transformer},\n author={Hao Shao and Letian Wang and RuoBing Chen and Hongsheng Li and Yu Liu},\n journal={arXiv preprint arXiv:2207.14024},\n year={2022},\n}\n```\n\n## 许可证\n本仓库中的所有代码均采用 [Apache License 2.0](https:\u002F\u002Fwww.apache.org\u002Flicenses\u002FLICENSE-2.0) 许可证。","# InterFuser 快速上手指南\n\nInterFuser 是一个基于可解释传感器融合 Transformer 的自动驾驶框架，旨在通过多模态多视角传感器信息融合提升驾驶安全性。该项目在 CARLA AD Leaderboard 上取得了 SOTA 成绩。\n\n## 环境准备\n\n*   **操作系统**: Linux (推荐 Ubuntu 18.04\u002F20.04)\n*   **Python 版本**: 3.7\n*   **深度学习框架**: PyTorch (通过 requirements.txt 安装)\n*   **仿真器**: CARLA 0.9.10.1\n*   **硬件要求**: 支持 CUDA 的 NVIDIA GPU (训练建议多卡，推理需至少单卡)\n*   **前置依赖**: Anaconda, Git, Docker (可选，用于运行 CARLA)\n\n## 安装步骤\n\n### 1. 安装 Anaconda 并创建环境\n```Shell\nwget https:\u002F\u002Frepo.anaconda.com\u002Farchive\u002FAnaconda3-2020.11-Linux-x86_64.sh\nbash Anaconda3-2020.11-Linux-x86_64.sh\nsource ~\u002F.profile\n\ngit clone https:\u002F\u002Fgithub.com\u002Fopendilab\u002FInterFuser.git\ncd InterFuser\nconda create -n interfuser python=3.7\nconda activate interfuser\npip3 install -r requirements.txt\ncd interfuser\npython setup.py develop\n```\n\n### 2. 下载并配置 CARLA 0.9.10.1\n项目依赖特定版本的 CARLA。你可以选择直接下载或使用 Docker。\n\n**方式 A：直接下载脚本安装**\n```Shell\nchmod +x setup_carla.sh\n.\u002Fsetup_carla.sh\n# 注意：需要先安装 setuptools==41 以支持 easy_install\npip install setuptools==41\neasy_install carla\u002FPythonAPI\u002Fcarla\u002Fdist\u002Fcarla-0.9.10-py3.7-linux-x86_64.egg\n# 安装完 egg 后，建议升级 setuptools 以避免 distutils_hack 错误\npip install --upgrade setuptools\n```\n\n**方式 B：使用 Docker (推荐)**\n确保已安装 NVIDIA Container Toolkit。\n```Shell\ndocker pull carlasim\u002Fcarla:0.9.10.1\n\n# Docker 18+ 运行示例 (映射端口 2000)\ndocker run -it --rm -p 2000:2000 --runtime=nvidia -e NVIDIA_VISIBLE_DEVICES=0 carlasim\u002Fcarla:0.9.10.1 .\u002FCarlaUE4.sh --world-port=2000 -opengl\n```\n\n## 基本使用\n\n### 1. 数据准备\n你可以使用官方提供的数据集，或自行生成。\n*   **数据结构**: 包含多视角 RGB、分割图、深度图、LiDAR 点云及标注信息。\n*   **索引文件**: 训练前需在 `DATASET_ROOT` 目录下创建 `dataset_index.txt`，格式如下：\n    ```text\n    route_path_dir data_frames_in_this_dir\n    weather-7\u002Fdata\u002Froutes_town06_long_w7_11_28_18_28_35\u002F 1062\n    weather-2\u002Fdata\u002Froutes_town01_short_w2_11_16_08_27_10\u002F 1785\n    ```\n    *(注：`route_path_dir` 为相对于 `DATASET_ROOT` 的路径)*\n\n### 2. 模型训练\n修改 `scripts\u002Ftrain.sh` 中的 `DATASET_ROOT` 路径后运行：\n\n```bash\ncd interfuser\nbash scripts\u002Ftrain.sh\n```\n\n或者使用分布式训练命令示例（8 卡）：\n```bash\nGPU_NUM=8\nDATASET_ROOT='dataset\u002F'\n\n.\u002Fdistributed_train.sh $GPU_NUM $DATASET_ROOT  --dataset carla --train-towns 1 2 3 4 6 7 10  --val-towns 5 \\\n    --train-weathers 0 1 2 3 4 5 6 7 8 9  --val-weathers 10 11 12 13 \\\n    --model interfuser_baseline --sched cosine --epochs 25 --warmup-epochs 5 --lr 0.0005 --batch-size 16  -j 16 --no-prefetcher --eval-metric l1_error \\\n    --opt adamw --opt-eps 1e-8 --weight-decay 0.05  \\\n    --scale 0.9 1.1 --saver-decreasing --clip-grad 10 --freeze-num -1 \\\n    --with-backbone-lr --backbone-lr 0.0002 \\\n    --multi-view --with-lidar --multi-view-input-size 3 128 128 \\\n    --experiment interfuser_baseline \\\n    --pretrained\n```\n\n### 3. 模型评估\n首先启动 CARLA 服务器，然后配置评估脚本 `leaderboard\u002Fscripts\u002Frun_evaluation.sh`。\n\n**配置环境变量：**\n```shell\nexport CARLA_ROOT=\u002Fpath\u002Fto\u002Fcarla\u002Froot\nexport ROUTES=leaderboard\u002Fdata\u002Fevaluation_routes\u002Froutes_town05_long.xml\nexport TEAM_AGENT=leaderboard\u002Fteam_code\u002Finterfuser_agent.py\nexport TEAM_CONFIG=leaderboard\u002Fteam_code\u002Finterfuser_config.py\nexport CHECKPOINT_ENDPOINT=results\u002Finterfuser_result.json\nexport SCENARIOS=leaderboard\u002Fdata\u002Fscenarios\u002Ftown05_all_scenarios.json\n```\n\n**运行评估：**\n```Shell\nCUDA_VISIBLE_DEVICES=0 .\u002Fleaderboard\u002Fscripts\u002Frun_evaluation.sh\n```\n\n*提示：如需运行 42 条路线基准测试，请将 `ROUTES` 和 `SCENARIOS` 分别替换为 `leaderboard\u002Fdata\u002F42routes\u002F42routes.xml` 和 `leaderboard\u002Fdata\u002F42routes\u002F42scenarios.json`。*\n\n**预训练权重**:\n可从 [此处](http:\u002F\u002F43.163.208.95\u002Fs\u002FjRfM) 下载示例权重，并将其放入 `leaderboard\u002Fteam_code\u002F` 目录即可直接进行评估。","某自动驾驶研发团队正在 CARLA 仿真环境中测试其城市道路导航算法，试图解决复杂路口多传感器数据融合难、突发状况应对不安全的问题。\n\n### 没有 InterFuser 时\n- **感知盲区频发**：单一视角摄像头或独立处理的雷达数据无法有效互补，导致车辆在湿滑清晨等恶劣天气下难以识别侧方突然切入的车辆。\n- **决策缺乏可解释性**：黑盒模型输出的驾驶指令（如急转弯或急刹）缺乏中间语义特征支撑，工程师难以定位是传感器故障还是逻辑错误导致了危险操作。\n- **安全约束薄弱**：传统融合方法仅输出最终动作，未在特征层面构建“安全集”约束，使得车辆在面对行人鬼探头时容易做出超出物理极限的规避动作。\n- **长尾场景泛化差**：在未见过的复杂交通流（如无保护左转配合拥堵车流）中，模型因缺乏对场景的全面理解而频繁接管或碰撞。\n\n### 使用 InterFuser 后\n- **全模态深度融合**：InterFuser 利用 Transformer 架构同时处理多视角摄像头图像与激光雷达点云，显著提升了雨天及遮挡环境下的目标检测准确率，消除了感知盲区。\n- **中间特征可视化**：系统生成具有语义信息的中间可解释特征，让开发人员能清晰看到模型如何理解“前方有车”或“红灯亮起”，极大缩短了调试周期。\n- **动作安全集约束**：通过解析中间特征，InterFuser 将驾驶动作严格限制在理论安全范围内，确保即使在极端突发状况下，车辆的转向和制动也符合物理安全边界。\n- **SOTA 级场景理解**：凭借对多模态信息的全面建模，该方案在 CARLA 排行榜上达到当时最先进水平，能够流畅处理高难度的无保护左转和密集车流博弈。\n\nInterFuser 通过可解释的多传感器融合机制，不仅让自动驾驶汽车“看得更全”，更让其决策过程“想得明白且行得安全”。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fopendilab_InterFuser_61549315.png","opendilab","OpenDILab","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fopendilab_83f31d72.png","Open-source Decision Intelligence (DI) Platform",null,"opendilab@pjlab.org.cn","https:\u002F\u002Fgithub.com\u002Fopendilab",[80,84,88,92,96,100,103,107,110],{"name":81,"color":82,"percentage":83},"Python","#3572A5",95.1,{"name":85,"color":86,"percentage":87},"XSLT","#EB8CEB",3.7,{"name":89,"color":90,"percentage":91},"HTML","#e34c26",0.7,{"name":93,"color":94,"percentage":95},"Shell","#89e051",0.3,{"name":97,"color":98,"percentage":99},"Dockerfile","#384d54",0.1,{"name":101,"color":102,"percentage":99},"CSS","#663399",{"name":104,"color":105,"percentage":106},"JavaScript","#f1e05a",0,{"name":108,"color":109,"percentage":106},"Ruby","#701516",{"name":111,"color":112,"percentage":106},"SCSS","#c6538c",640,60,"2026-04-09T03:42:19","Apache-2.0",4,"Linux","需要 NVIDIA GPU（用于运行多实例 CARLA 服务器和训练），具体型号未说明，但示例脚本显示支持多卡并行（CUDA_VISIBLE_DEVICES=0-7），需安装 NVIDIA Container Toolkit 以支持 Docker 运行 CARLA。","未说明",{"notes":122,"python":123,"dependencies":124},"1. 必须使用 CARLA 模拟器版本 0.9.10.1，过高或过低版本可能不兼容。\n2. 安装 CARLA Python API 时需临时使用 setuptools==41 以支持 easy_install，安装完成后可升级 setuptools。\n3. 支持通过 Docker 运行 CARLA 服务器，需提供 NVIDIA GPU 支持。\n4. 数据生成阶段可启动多达 14 个并行的 CARLA 服务器实例以加速数据采集。\n5. 训练脚本默认配置为 8 卡分布式训练环境。","3.7",[125,126,127,128],"carla==0.9.10.1","setuptools==41 (临时需求)","torch (通过 requirements.txt 安装)","timm (通过 requirements.txt 安装)",[13,35,15],[131,132,133],"autonomous-driving","bird-view-image","transformer","2026-03-27T02:49:30.150509","2026-04-12T02:15:30.618315",[137,142,147,151,155,160,164,168],{"id":138,"question_zh":139,"answer_zh":140,"source_url":141},30191,"为什么在单 GPU 上运行训练脚本时会报错 'Default process group has not been initialized'？","这是因为代码默认使用了分布式训练设置。如果你只有一张显卡，需要修改启动脚本（如 train.sh），将 GPU_NUM 设置为 1。此外，可能需要将代码中的 SyncBN（同步批归一化）替换为普通的 BN（批归一化），或者确保在没有初始化分布式进程组的情况下正确回退到单卡模式。","https:\u002F\u002Fgithub.com\u002Fopendilab\u002FInterFuser\u002Fissues\u002F26",{"id":143,"question_zh":144,"answer_zh":145,"source_url":146},30192,"运行数据合并脚本 batch_merge_data.py 时出现 'IsADirectoryError' 错误，应该如何解决？","该错误通常是因为输入路径指向了一个目录而不是文件列表。请检查命令参数，确保传递给脚本的是包含数据文件列表的具体文件路径，而不是数据集的根目录。例如，不要直接传入 '\u002Fpath\u002Fto\u002Fdataset\u002F'，而应传入包含具体路线或数据索引的文件。","https:\u002F\u002Fgithub.com\u002Fopendilab\u002FInterFuser\u002Fissues\u002F8",{"id":148,"question_zh":149,"answer_zh":150,"source_url":146},30193,"运行训练脚本时遇到 'ImportError: attempted relative import with no known parent package' 错误怎么办？","这通常是因为模块导入路径问题。请确保你已经运行了 `python setup.py develop` 来正确安装项目依赖和配置导入路径。如果问题依旧，尝试以模块方式运行脚本（例如使用 `python -m timm.data.carla_dataset`）而不是直接运行文件。",{"id":152,"question_zh":153,"answer_zh":154,"source_url":146},30194,"评估脚本运行后没有报错但直接终止，且提示已加载结果文件，这是怎么回事？","这不是 Bug。默认情况下，参数 \"RESUME\" 设置为 True，如果代码检测到结果文件（如 results\u002Finterfuser_result.json）已存在且评估已完成，就会直接终止。解决方法包括：删除或移动该结果文件、更改保存路径，或者在运行脚本时将 \"RESUME\" 参数设置为 False。",{"id":156,"question_zh":157,"answer_zh":158,"source_url":159},30195,"控制器代码中的 desired_speed 计算公式与论文中提到的线性规划有什么关系？","代码中的公式是求解线性规划问题的一种简化安全策略。它直接计算满足所有约束条件的最大速度。例如，项 `4 * d_05 - speed - max(0, speed - 2.5)` 源于不等式：`(期望速度 + 当前速度 + 安全余量) \u002F 2 * 驾驶时间 \u003C= 安全距离`。其中 `d_05` 代表 0.5 秒内的最大安全距离。这种写法是为了确保在 0.5 秒内的平均速度乘以时间不超过安全距离。","https:\u002F\u002Fgithub.com\u002Fopendilab\u002FInterFuser\u002Fissues\u002F25",{"id":161,"question_zh":162,"answer_zh":163,"source_url":159},30196,"模型有时会误检不存在的红灯导致车辆永久停止，该如何处理？","这是一个已知问题，模型偶尔会误判红灯，导致智能体长时间停车直至超时。为了解决这个问题，代码中引入了特定的变量和逻辑来避免智能体因误检的红灯而过长停滞。具体来说，通过结合交通灯状态变量（traffic_light_state）和路口变量（junction）的概率判断，以及设置超时机制，来强制车辆在特定条件下恢复行驶。",{"id":165,"question_zh":166,"answer_zh":167,"source_url":141},30197,"运行数据生成脚本时提示找不到 routes_town01_tiny.xml 文件，但文件实际存在，原因是什么？","这通常是因为你运行了评估脚本而不是数据收集脚本。请确认你使用的是正确的数据生成命令。对于多 CARLA 服务器或单 CARLA 服务器的数据生成，请参考 README 中对应的章节（Data Generation with multiple\u002Fsingle CARLA servers），确保执行的是数据采集流程而非评估流程。",{"id":169,"question_zh":170,"answer_zh":171,"source_url":172},30198,"如何在 Docker 环境中解决运行评估脚本时出现的 'ModuleNotFoundError: No module named cv2' 错误？","这是因为 Docker 镜像中缺少 OpenCV 库。你需要在构建或使用 Docker 容器时安装 opencv-python。可以在 Dockerfile 中添加 `pip install opencv-python` 或在容器运行时手动安装。确保你的 Docker 环境配置（如 Dockerfile.master）包含了所有必要的 Python 依赖包。","https:\u002F\u002Fgithub.com\u002Fopendilab\u002FInterFuser\u002Fissues\u002F23",[]]