[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"tool-MIV-XJTU--FSDrive":3,"similar-MIV-XJTU--FSDrive":96},{"id":4,"github_repo":5,"name":6,"description_en":7,"description_zh":8,"ai_summary_zh":8,"readme_en":9,"readme_zh":10,"quickstart_zh":11,"use_case_zh":12,"hero_image_url":13,"owner_login":14,"owner_name":14,"owner_avatar_url":15,"owner_bio":16,"owner_company":16,"owner_location":16,"owner_email":16,"owner_twitter":16,"owner_website":16,"owner_url":17,"languages":18,"stars":34,"forks":35,"last_commit_at":36,"license":16,"difficulty_score":37,"env_os":38,"env_gpu":39,"env_ram":38,"env_deps":40,"category_tags":52,"github_topics":55,"view_count":37,"oss_zip_url":16,"oss_zip_packed_at":16,"status":61,"created_at":62,"updated_at":63,"faqs":64,"releases":95},817,"MIV-XJTU\u002FFSDrive","FSDrive","[NeurIPS 2025 spotlight] Official implementation for \"FutureSightDrive: Thinking Visually with Spatio-Temporal CoT for Autonomous Driving\"","FSDrive 是一款面向自动驾驶领域的开源视觉语言动作（VLA）模型框架。它的核心目标是赋予自动驾驶系统“视觉思考”的能力，使其能更智能地处理轨迹规划任务。针对现有方案在复杂场景中缺乏深层空间时间理解的痛点，FSDrive 创新性地引入了时空思维链（Spatio-Temporal CoT）技术。\n\n该技术不仅实现了视觉生成与理解的统一，还能在较少数据量下完成训练，推动自动驾驶向真正的视觉推理阶段迈进。FSDrive 基于 LLaMA-Factory 构建，完整支持从环境配置、数据准备到模型训练与评估的全流程，并兼容 nuScenes 数据集。\n\nFSDrive 非常适合自动驾驶算法工程师、AI 研究人员以及希望探索大模型在垂直领域落地的开发者。通过复现 NeurIPS 2025 Spotlight 论文成果，用户可以直接体验端到端驾驶决策的新范式，为提升感知与决策的可解释性及准确性提供强有力的研究基准。","\u003Cdiv align=\"center\">\n\u003Ca id=\"readme-top\">\u003C\u002Fa>\n\u003Ch1> \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FMIV-XJTU_FSDrive_readme_9b45d864bf3b.png\" style=\"vertical-align: -10px;\" :height=\"50px\" width=\"50px\"> FutureSightDrive: Thinking Visually with Spatio-Temporal CoT for Autonomous Driving \u003C\u002Fh1>\n\u003Ch3 align=\"center\">\u003Cstrong>🎉🎉NeurIPS 2025 spotlight🎉🎉\u003C\u002Fstrong>\u003C\u002Fh3>\n\n\u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2505.17685\">\u003Cimg src='https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FarXiv-Paper-red?logo=arxiv&logoColor=white' alt='arXiv'>\u003C\u002Fa>\n\u003Ca href='https:\u002F\u002Fmiv-xjtu.github.io\u002FFSDrive.github.io'>\u003Cimg src='https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FProject_Page-Website-green?logo=googlechrome&logoColor=white' alt='Project Page'>\u003C\u002Fa>\n\nShuang Zeng\u003Csup>1,2\u003C\u002Fsup>,\n[Xinyuan Chang](https:\u002F\u002Fscholar.google.com.hk\u002Fcitations?user=5OnPBVYAAAAJ&hl=zh-CN)\u003Csup>1\u003C\u002Fsup>,\nMengwei Xie\u003Csup>1\u003C\u002Fsup>,\nXinran Liu\u003Csup>1\u003C\u002Fsup>,\nYifan Bai\u003Csup>2,3\u003C\u002Fsup>,\nZheng Pan\u003Csup>1\u003C\u002Fsup>,\nMu Xu\u003Csup>1\u003C\u002Fsup>,\n[Xing Wei](https:\u002F\u002Fscholar.google.com.hk\u002Fcitations?user=KNyC5EUAAAAJ&hl=zh-CN&oi=ao\u002F)\u003Csup>2\u003C\u002Fsup>,\n\n\u003Csup>1\u003C\u002Fsup>Amap, Alibaba Group,\n\u003Csup>2\u003C\u002Fsup>Xi’an Jiaotong University,\n\u003Csup>3\u003C\u002Fsup>DAMO Academy, Alibaba Group\n\n**FutureSightDrive (FSDrive)**: The proposed spatio-temporal CoT enables end-to-end autonomous driving **VLA** to **think visually** about trajectory planning and unify visual generation and understanding with minimal data, advancing autonomous driving towards **visual reasoning** for the first time.\n\n\nhttps:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002Fa99a14a3-a892-4cbe-ac1f-66b777d9081b\n\n\u003C\u002Fdiv>\n\n## Table of Contents\n- [🛠️ Installation](#-Installation)\n- [📦 Data Preparation](#-Data-Preparation)\n- [🚀 Training](#-Training)\n- [🎯 Infer](#-Infer)\n- [📈 Evaluation](#-Evaluation)\n- [👀 Visualization](#-Visualization)\n- [📜 Citing](#-Citing)\n- [🙏 Acknowledgement](#-Acknowledgement)\n\u003Cp align=\"right\">\u003Ca href=\"#readme-top\">\u003Cimg src=https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fback%20to%20top-red?style=flat\n>\u003C\u002Fa>\u003C\u002Fp>\n\n## 🛠️ Installation\n\nCreate the required environment through the following steps:\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FMIV-XJTU\u002FFSDrive.git && cd FSDrive\n\nconda create -n FSDrive python=3.10 -y && conda activate FSDrive\n\n# CUDA 12.4\npip install torch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1 --index-url https:\u002F\u002Fdownload.pytorch.org\u002Fwhl\u002Fcu124\n\ncd LLaMA-Factory && pip install -e \".[metrics,deepspeed,liger-kernel,bitsandbytes]\" --no-build-isolation\n\ncd .. && pip install -r requirements.txt\n```\n\u003Cp align=\"right\">\u003Ca href=\"#readme-top\">\u003Cimg src=https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fback%20to%20top-red?style=flat\n>\u003C\u002Fa>\u003C\u002Fp>\n\n## 📦 Data Preparation\n\n1、Download nuScenes\n\nDownload the complete dataset from [nuScenes](https:\u002F\u002Fwww.nuscenes.org\u002Fnuscenes#download) and extract it to `.\u002FLLaMA-Factory\u002Fdata\u002Fnuscenes`\n\nOr establish a soft connection：\n\n```bash\nln -s \u002Fpath\u002Fto\u002Fyour\u002Fnuscenes LLaMA-Factory\u002Fdata\n```\n\nWe used pre-cached data from the nuScenes dataset. The data can be downloaded at [Google Drive](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1Pc3vKtNHwZVY2mB9xBOOKiMIMr4hJFj7\u002Fview?usp=drive_link). The file `cached_nuscenes_info.pkl` is located in the directory `.\u002Fcreate_data`. The `metrics` folder is placed in the directory `.\u002Ftools\u002Fdata`.\n\n2、Extract visual tokens\n\nSeparately extract the visual tokens of the front view from both the pre-trained and fine-tuned data, to facilitate supervised MLLM:\n\n```bash\npython MoVQGAN\u002Fpretrain_data.py\npython MoVQGAN\u002Fsft_data.py\n```\n\n3、Construct data\n\nConstruct pre-training and fine-tuning data that conform to the LLaMA-Factory format respectively:\n\n```bash\npython create_data\u002Fpretrain_data.py\npython create_data\u002Fsft_data.py --split train # Change to \"val\" for constructing the validation set\n```\n\nFollow the [LLaMA-Factory tutorial](https:\u002F\u002Fgithub.com\u002Fhiyouga\u002FLLaMA-Factory\u002Fblob\u002Fmain\u002Fdata\u002FREADME.md) and add the dataset information in the file `.\u002FLLaMA-Factory\u002Fdata\u002Fdataset_info.json`.\n\u003Cp align=\"right\">\u003Ca href=\"#readme-top\">\u003Cimg src=https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fback%20to%20top-red?style=flat\n>\u003C\u002Fa>\u003C\u002Fp>\n\n## 🚀 Training\nEnter the working directory of LLaMA-Factory:\n```bash\ncd LLaMA-Factory\n```\n\n1、Pre-train\n\nFirst, pre-train the VLM to activate its visual generation capabilities:\n```bash\nllamafactory-cli train ..\u002Fconfigs\u002Fpretrain.yaml\n```\n\n2、SFT\n\nThen, based on the pre-trained parameters, fine-tune the VLM to think visually about trajectory planning:\n```bash\nllamafactory-cli train ..\u002Fconfigs\u002Fsft.yaml\n```\n\u003Cp align=\"right\">\u003Ca href=\"#readme-top\">\u003Cimg src=https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fback%20to%20top-red?style=flat\n>\u003C\u002Fa>\u003C\u002Fp>\n\n## 🎯 Infer\nRun the following command in the LLaMA-Factory directory to infer test dataset:\n```bash\npython scripts\u002Fvllm_infer.py \\ \n--model_name_or_path saves\u002Fqwen2_vl-2b\u002Fsft \\\n--dataset val_cot_motion \\\n--template qwen2_vl \\\n--cutoff_len 32768 \\\n--max_new_tokens 2048 \\\n--max_samples 100000 \\\n--image_resolution 524288 \\\n--save_name results.jsonl \\\n--temperature 0.1 \\\n--top_p 0.1 \\\n--top_k 10\n```\n\u003Cp align=\"right\">\u003Ca href=\"#readme-top\">\u003Cimg src=https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fback%20to%20top-red?style=flat\n>\u003C\u002Fa>\u003C\u002Fp>\n\n## 📈 Evaluation\nFirst, under the FSDrive directory, match the predicted results with the tokens to facilitate the evaluation:\n```bash\ncd ..\n\npython tools\u002Fmatch.py \\\n--pred_trajs_path .\u002FLLaMA-Factory\u002Fresults.jsonl \\\n--token_traj_path .\u002FLLaMA-Factory\u002Fdata\u002Fval_cot_motion.json\n```\n\nThen evaluate the L2 and collision rate indicators for the end-to-end trajectory planning:\n```bash\npython tools\u002Fevaluation\u002Fevaluation.py \\\n# Change to \"stp3\" and use the ST-P3 calculation method\n--metric uniad \\  \n--result_file .\u002FLLaMA-Factory\u002Feval_traj.json\n```\n\u003Cp align=\"right\">\u003Ca href=\"#readme-top\">\u003Cimg src=https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fback%20to%20top-red?style=flat\n>\u003C\u002Fa>\u003C\u002Fp>\n\n## 👀 Visualization\nUse the following command under the FSDrive directory to visualize the trajectory:\n```bash\npython tools\u002Fvisualization\u002Fvisualize_planning.py \\\n--pred-trajs-path .\u002FLLaMA-Factory\u002Fresults.jsonl \\\n--tokens-path .\u002FLLaMA-Factory\u002Feval_traj.json \\  \n--output-path .\u002Fvis_traj\n```\n\nUse the following command under the FSDrive directory to restore the visual tokens to the pixel space and visualize the CoT:\n```bash\npython .\u002FMoVQGAN\u002Fvis.py \\\n--input_json .\u002FLLaMA-Factory\u002Feval_traj.json \\\n--output_dir .\u002Fvis_cot\n```\n\u003Cp align=\"right\">\u003Ca href=\"#readme-top\">\u003Cimg src=https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fback%20to%20top-red?style=flat\n>\u003C\u002Fa>\u003C\u002Fp>\n\n\n## 📜 Citing\n\nIf you find FSDrive is useful in your research or applications, please consider giving us a star 🌟 and citing it by the following BibTeX entry:\n\n```\n@article{zeng2025futuresightdrive,\n  title={FutureSightDrive: Thinking Visually with Spatio-Temporal CoT for Autonomous Driving},\n  author={Zeng, Shuang and Chang, Xinyuan and Xie, Mengwei and Liu, Xinran and Bai, Yifan and Pan, Zheng and Xu, Mu and Wei, Xing},\n  journal={arXiv preprint arXiv:2505.17685},\n  year={2025}\n}\n```\n\u003Cp align=\"right\">\u003Ca href=\"#readme-top\">\u003Cimg src=https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fback%20to%20top-red?style=flat\n>\u003C\u002Fa>\u003C\u002Fp>\n\n## 🙏 Acknowledgement\nOur work is primarily based on the following codebases:[LLaMA-Factory](https:\u002F\u002Fgithub.com\u002Fhiyouga\u002FLLaMA-Factory), [MoVQGAN](https:\u002F\u002Fgithub.com\u002Fai-forever\u002FMoVQGAN), [GPT-Driver](https:\u002F\u002Fgithub.com\u002FPointsCoder\u002FGPT-Driver), [Agent-Driver](https:\u002F\u002Fgithub.com\u002FUSC-GVL\u002FAgent-Driver). We are sincerely grateful for their work.\n\n\u003Cp align=\"right\">\u003Ca href=\"#readme-top\">\u003Cimg src=https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fback%20to%20top-red?style=flat\n>\u003C\u002Fa>\u003C\u002Fp>\n","\u003Cdiv align=\"center\">\n\u003Ca id=\"readme-top\">\u003C\u002Fa>\n\u003Ch1> \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FMIV-XJTU_FSDrive_readme_9b45d864bf3b.png\" style=\"vertical-align: -10px;\" :height=\"50px\" width=\"50px\"> FutureSightDrive: 利用时空思维链（CoT）进行视觉思考的自动驾驶 \u003C\u002Fh1>\n\u003Ch3 align=\"center\">\u003Cstrong>🎉🎉NeurIPS 2025 焦点展示🎉🎉\u003C\u002Fstrong>\u003C\u002Fh3>\n\n\u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2505.17685\">\u003Cimg src='https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FarXiv-论文-red?logo=arxiv&logoColor=white' alt='arXiv'>\u003C\u002Fa>\n\u003Ca href='https:\u002F\u002Fmiv-xjtu.github.io\u002FFSDrive.github.io'>\u003Cimg src='https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F项目页面 - 网站-green?logo=googlechrome&logoColor=white' alt='Project Page'>\u003C\u002Fa>\n\nShuang Zeng\u003Csup>1,2\u003C\u002Fsup>,\n[Xinyuan Chang](https:\u002F\u002Fscholar.google.com.hk\u002Fcitations?user=5OnPBVYAAAAJ&hl=zh-CN)\u003Csup>1\u003C\u002Fsup>,\nMengwei Xie\u003Csup>1\u003C\u002Fsup>,\nXinran Liu\u003Csup>1\u003C\u002Fsup>,\nYifan Bai\u003Csup>2,3\u003C\u002Fsup>,\nZheng Pan\u003Csup>1\u003C\u002Fsup>,\nMu Xu\u003Csup>1\u003C\u002Fsup>,\n[Xing Wei](https:\u002F\u002Fscholar.google.com.hk\u002Fcitations?user=KNyC5EUAAAAJ&hl=zh-CN&oi=ao\u002F)\u003Csup>2\u003C\u002Fsup>,\n\n\u003Csup>1\u003C\u002Fsup>高德地图，阿里巴巴集团，\n\u003Csup>2\u003C\u002Fsup>西安交通大学，\n\u003Csup>3\u003C\u002Fsup>达摩院，阿里巴巴集团\n\n**FutureSightDrive (FSDrive)**：提出的时空思维链（Chain-of-Thought, CoT）使端到端自动驾驶**视觉语言动作模型（Vision-Language-Action, VLA）**能够**进行视觉思考**以规划轨迹，并以最小化数据统一视觉生成与理解，首次推动自动驾驶迈向**视觉推理**。\n\n\nhttps:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002Fa99a14a3-a892-4cbe-ac1f-66b777d9081b\n\n\u003C\u002Fdiv>\n\n## 目录\n- [🛠️ 安装](#-Installation)\n- [📦 数据准备](#-Data-Preparation)\n- [🚀 训练](#-Training)\n- [🎯 推理](#-Infer)\n- [📈 评估](#-Evaluation)\n- [👀 可视化](#-Visualization)\n- [📜 引用](#-Citing)\n- [🙏 致谢](#-Acknowledgement)\n\u003Cp align=\"right\">\u003Ca href=\"#readme-top\">\u003Cimg src=https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F返回顶部-red?style=flat\n>\u003C\u002Fa>\u003C\u002Fp>\n\n## 🛠️ 安装\n\n通过以下步骤创建所需环境：\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FMIV-XJTU\u002FFSDrive.git && cd FSDrive\n\nconda create -n FSDrive python=3.10 -y && conda activate FSDrive\n\n# CUDA 12.4\npip install torch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1 --index-url https:\u002F\u002Fdownload.pytorch.org\u002Fwhl\u002Fcu124\n\ncd LLaMA-Factory && pip install -e \".[metrics,deepspeed,liger-kernel,bitsandbytes]\" --no-build-isolation\n\ncd .. && pip install -r requirements.txt\n```\n\u003Cp align=\"right\">\u003Ca href=\"#readme-top\">\u003Cimg src=https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F返回顶部-red?style=flat\n>\u003C\u002Fa>\u003C\u002Fp>\n\n## 📦 数据准备\n\n1、下载 nuScenes\n\n从 [nuScenes](https:\u002F\u002Fwww.nuscenes.org\u002Fnuscenes#download) 下载完整数据集并解压到 `.\u002FLLaMA-Factory\u002Fdata\u002Fnuscenes`\n\n或者建立软连接：\n\n```bash\nln -s \u002Fpath\u002Fto\u002Fyour\u002Fnuscenes LLaMA-Factory\u002Fdata\n```\n\n我们使用了来自 nuScenes 数据集的预缓存数据。数据可在 [Google Drive](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1Pc3vKtNHwZVY2mB9xBOOKiMIMr4hJFj7\u002Fview?usp=drive_link) 下载。`cached_nuscenes_info.pkl` 文件位于 `.\u002Fcreate_data` 目录下。`metrics` 文件夹放置在 `.\u002Ftools\u002Fdata` 目录下。\n\n2、提取视觉 token\n\n分别从头数据和微调数据中提取前视图的视觉 token，以方便监督多模态大语言模型（Multimodal Large Language Model, MLLM）：\n\n```bash\npython MoVQGAN\u002Fpretrain_data.py\npython MoVQGAN\u002Fsft_data.py\n```\n\n3、构建数据\n\n分别构建符合 LLaMA-Factory 格式的预训练和微调数据：\n\n```bash\npython create_data\u002Fpretrain_data.py\npython create_data\u002Fsft_data.py --split train # 改为 \"val\" 以构建验证集\n```\n\n遵循 [LLaMA-Factory 教程](https:\u002F\u002Fgithub.com\u002Fhiyouga\u002FLLaMA-Factory\u002Fblob\u002Fmain\u002Fdata\u002FREADME.md)，并在 `.\u002FLLaMA-Factory\u002Fdata\u002Fdataset_info.json` 文件中添加数据集信息。\n\u003Cp align=\"right\">\u003Ca href=\"#readme-top\">\u003Cimg src=https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F返回顶部-red?style=flat\n>\u003C\u002Fa>\u003C\u002Fp>\n\n## 🚀 训练\n\n进入 LLaMA-Factory 的工作目录：\n```bash\ncd LLaMA-Factory\n```\n\n1、预训练\n\n首先，预训练视觉语言模型（Vision-Language Model, VLM）以激活其视觉生成能力：\n```bash\nllamafactory-cli train ..\u002Fconfigs\u002Fpretrain.yaml\n```\n\n2、监督微调（SFT）\n\n然后，基于预训练参数，微调 VLM 使其能够就轨迹规划进行视觉思考：\n```bash\nllamafactory-cli train ..\u002Fconfigs\u002Fsft.yaml\n```\n\u003Cp align=\"right\">\u003Ca href=\"#readme-top\">\u003Cimg src=https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F返回顶部-red?style=flat\n>\u003C\u002Fa>\u003C\u002Fp>\n\n## 🎯 推理\n\n在 LLaMA-Factory 目录下运行以下命令以推理测试数据集：\n```bash\npython scripts\u002Fvllm_infer.py \\ \n--model_name_or_path saves\u002Fqwen2_vl-2b\u002Fsft \\\n--dataset val_cot_motion \\\n--template qwen2_vl \\\n--cutoff_len 32768 \\\n--max_new_tokens 2048 \\\n--max_samples 100000 \\\n--image_resolution 524288 \\\n--save_name results.jsonl \\\n--temperature 0.1 \\\n--top_p 0.1 \\\n--top_k 10\n```\n\u003Cp align=\"right\">\u003Ca href=\"#readme-top\">\u003Cimg src=https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F返回顶部-red?style=flat\n>\u003C\u002Fa>\u003C\u002Fp>\n\n## 📈 评估\n\n首先，在 FSDrive 目录下，将预测结果与 token 匹配以便于评估：\n```bash\ncd ..\n\npython tools\u002Fmatch.py \\\n--pred_trajs_path .\u002FLLaMA-Factory\u002Fresults.jsonl \\\n--token_traj_path .\u002FLLaMA-Factory\u002Fdata\u002Fval_cot_motion.json\n```\n\n然后评估端到端轨迹规划的 L2 和碰撞率指标：\n```bash\npython tools\u002Fevaluation\u002Fevaluation.py \\\n# 改为 \"stp3\" 并使用 ST-P3 计算方法\n--metric uniad \\  \n--result_file .\u002FLLaMA-Factory\u002Feval_traj.json\n```\n\u003Cp align=\"right\">\u003Ca href=\"#readme-top\">\u003Cimg src=https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F返回顶部-red?style=flat\n>\u003C\u002Fa>\u003C\u002Fp>\n\n## 👀 可视化\n\n在 FSDrive 目录下使用以下命令可视化轨迹：\n```bash\npython tools\u002Fvisualization\u002Fvisualize_planning.py \\\n--pred-trajs-path .\u002FLLaMA-Factory\u002Fresults.jsonl \\\n--tokens-path .\u002FLLaMA-Factory\u002Feval_traj.json \\  \n--output-path .\u002Fvis_traj\n```\n\n在 FSDrive 目录下使用以下命令将视觉 token 还原到像素空间并可视化思维链（CoT）：\n```bash\npython .\u002FMoVQGAN\u002Fvis.py \\\n--input_json .\u002FLLaMA-Factory\u002Feval_traj.json \\\n--output_dir .\u002Fvis_cot\n```\n\u003Cp align=\"right\">\u003Ca href=\"#readme-top\">\u003Cimg src=https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F返回顶部-red?style=flat\n>\u003C\u002Fa>\u003C\u002Fp>\n\n\n## 📜 引用\n\n如果您认为 FSDrive 对您的研究或应用有用，请考虑给我们点个星 🌟 并通过以下 BibTeX 条目引用它：\n\n```\n@article{zeng2025futuresightdrive,\n  title={FutureSightDrive: Thinking Visually with Spatio-Temporal CoT for Autonomous Driving},\n  author={Zeng, Shuang and Chang, Xinyuan and Xie, Mengwei and Liu, Xinran and Bai, Yifan and Pan, Zheng and Xu, Mu and Wei, Xing},\n  journal={arXiv preprint arXiv:2505.17685},\n  year={2025}\n}\n```\n\u003Cp align=\"right\">\u003Ca href=\"#readme-top\">\u003Cimg src=https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F返回顶部-red?style=flat\n>\u003C\u002Fa>\u003C\u002Fp>\n\n## 🙏 致谢\n我们的工作主要基于以下代码库：[LLaMA-Factory](https:\u002F\u002Fgithub.com\u002Fhiyouga\u002FLLaMA-Factory), [MoVQGAN](https:\u002F\u002Fgithub.com\u002Fai-forever\u002FMoVQGAN), [GPT-Driver](https:\u002F\u002Fgithub.com\u002FPointsCoder\u002FGPT-Driver), [Agent-Driver](https:\u002F\u002Fgithub.com\u002FUSC-GVL\u002FAgent-Driver)。我们衷心感谢他们的工作。\n\n\u003Cp align=\"right\">\u003Ca href=\"#readme-top\">\u003Cimg src=https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fback%20to%20top-red?style=flat\n>\u003C\u002Fa>\u003C\u002Fp>","# FSDrive 快速上手指南\n\n**FSDrive (FutureSightDrive)** 是一个基于时空思维链（Spatio-Temporal CoT）的端到端自动驾驶视觉语言动作（VLA）模型。它使自动驾驶系统能够进行“视觉思考”，统一视觉生成与理解，实现轨迹规划。\n\n## 环境准备\n\n- **操作系统**: Linux (推荐)\n- **Python 版本**: 3.10\n- **GPU 环境**: CUDA 12.4\n- **依赖工具**: Conda, Git\n\n## 安装步骤\n\n1. **克隆代码仓库**\n   ```bash\n   git clone https:\u002F\u002Fgithub.com\u002FMIV-XJTU\u002FFSDrive.git && cd FSDrive\n   ```\n\n2. **创建并激活 Conda 环境**\n   ```bash\n   conda create -n FSDrive python=3.10 -y && conda activate FSDrive\n   ```\n\n3. **安装 PyTorch (CUDA 12.4)**\n   ```bash\n   pip install torch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1 --index-url https:\u002F\u002Fdownload.pytorch.org\u002Fwhl\u002Fcu124\n   ```\n\n4. **安装 LLaMA-Factory 依赖**\n   ```bash\n   cd LLaMA-Factory && pip install -e \".[metrics,deepspeed,liger-kernel,bitsandbytes]\" --no-build-isolation\n   ```\n\n5. **安装项目其他依赖**\n   ```bash\n   cd .. && pip install -r requirements.txt\n   ```\n\n## 基本使用\n\n### 1. 数据准备\n下载 nuScenes 数据集并提取视觉 Token，构建符合 LLaMA-Factory 格式的数据。\n\n```bash\n# 下载数据集到 .\u002FLLaMA-Factory\u002Fdata\u002Fnuscenes 或建立软连接\nln -s \u002Fpath\u002Fto\u002Fyour\u002Fnuscenes LLaMA-Factory\u002Fdata\n\n# 提取视觉 Token\npython MoVQGAN\u002Fpretrain_data.py\npython MoVQGAN\u002Fsft_data.py\n\n# 构建预训练和微调数据\npython create_data\u002Fpretrain_data.py\npython create_data\u002Fsft_data.py --split train\n```\n> 注意：需在 `.\u002FLLaMA-Factory\u002Fdata\u002Fdataset_info.json` 中添加数据集信息。\n\n### 2. 模型训练\n进入 `LLaMA-Factory` 目录执行训练。\n\n```bash\ncd LLaMA-Factory\n\n# 1. 预训练 (激活视觉生成能力)\nllamafactory-cli train ..\u002Fconfigs\u002Fpretrain.yaml\n\n# 2. 微调 (学习轨迹规划的视觉思考)\nllamafactory-cli train ..\u002Fconfigs\u002Fsft.yaml\n```\n\n### 3. 推理与评估\n在 `LLaMA-Factory` 目录下运行推理脚本，并在根目录下进行评估和可视化。\n\n```bash\n# 推理测试集\npython scripts\u002Fvllm_infer.py \\ \n--model_name_or_path saves\u002Fqwen2_vl-2b\u002Fsft \\\n--dataset val_cot_motion \\\n--template qwen2_vl \\\n--cutoff_len 32768 \\\n--max_new_tokens 2048 \\\n--max_samples 100000 \\\n--image_resolution 524288 \\\n--save_name results.jsonl \\\n--temperature 0.1 \\\n--top_p 0.1 \\\n--top_k 10\n\n# 返回根目录进行结果匹配与评估\ncd ..\npython tools\u002Fmatch.py \\\n--pred_trajs_path .\u002FLLaMA-Factory\u002Fresults.jsonl \\\n--token_traj_path .\u002FLLaMA-Factory\u002Fdata\u002Fval_cot_motion.json\n\npython tools\u002Fevaluation\u002Fevaluation.py \\\n--metric uniad \\  \n--result_file .\u002FLLaMA-Factory\u002Feval_traj.json\n\n# 可视化轨迹与 CoT\npython tools\u002Fvisualization\u002Fvisualize_planning.py \\\n--pred-trajs-path .\u002FLLaMA-Factory\u002Fresults.jsonl \\\n--tokens-path .\u002FLLaMA-Factory\u002Feval_traj.json \\  \n--output-path .\u002Fvis_traj\n\npython .\u002FMoVQGAN\u002Fvis.py \\\n--input_json .\u002FLLaMA-Factory\u002Feval_traj.json \\\n--output_dir .\u002Fvis_cot\n```","自动驾驶算法团队正在攻克城市无保护左转场景，试图提升端到端模型在动态交通流中的决策安全性与可解释性。\n\n### 没有 FSDrive 时\n- 传统模型仅凭感知结果直接输出控制指令，缺乏对未来的视觉推演，遇到鬼探头等突发状况反应滞后。\n- 训练依赖大规模精细标注数据，nuScenes 等数据集处理耗时，且长尾场景覆盖不足导致泛化能力弱。\n- 感知模块与规划模块独立优化，信息传递存在损耗，难以应对多车博弈等复杂交互。\n- 决策过程如同黑盒，一旦出错难以追溯原因，模型调试与安全验证周期被大幅拉长。\n\n### 使用 FSDrive 后\n- 借助时空思维链（CoT）技术，FSDrive 让 VLA 模型具备“视觉思考”能力，能提前生成未来帧并规划安全轨迹。\n- 统一视觉生成与理解任务，仅需少量数据即可微调，显著降低了数据准备与训练成本。\n- 端到端架构打通感知到规划的链路，在多车交互场景中表现出更强的协同性与流畅度。\n- 推理过程可视化，工程师可直接观察模型的视觉思考路径，快速定位异常并优化策略。\n\nFSDrive 通过引入视觉推理机制，从根本上提升了自动驾驶系统的智能水平与开发效率。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FMIV-XJTU_FSDrive_88288186.png","MIV-XJTU","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002FMIV-XJTU_6ed36b4d.jpg",null,"https:\u002F\u002Fgithub.com\u002FMIV-XJTU",[19,23,27,31],{"name":20,"color":21,"percentage":22},"Python","#3572A5",99.3,{"name":24,"color":25,"percentage":26},"Dockerfile","#384d54",0.6,{"name":28,"color":29,"percentage":30},"Shell","#89e051",0,{"name":32,"color":33,"percentage":30},"Makefile","#427819",704,55,"2026-04-10T07:02:20",4,"未说明","需要 NVIDIA GPU，CUDA 12.4，显存大小未说明",{"notes":41,"python":42,"dependencies":43},"1. 需下载 nuScenes 数据集，支持直接下载或建立软链接（ln -s 命令暗示类 Unix 环境）；2. 基于 LLaMA-Factory 框架进行训练与微调；3. 推理阶段使用 vllm 加速；4. 包含 MoVQGAN 相关视觉 token 提取脚本。","3.10",[44,45,46,47,48,49,50,51],"torch==2.5.1","torchvision==0.20.1","torchaudio==2.5.1","LLaMA-Factory","deepspeed","liger-kernel","bitsandbytes","vllm",[53,54],"Agent","语言模型",[56,57,58,59,60],"autonomous-driving","cot","mllm","vla","world-model","ready","2026-03-27T02:49:30.150509","2026-04-11T18:32:42.786536",[65,70,75,80,85,90],{"id":66,"question_zh":67,"answer_zh":68,"source_url":69},3526,"使用多卡（如 8x3090）训练时遇到 CUDA 显存不足（OOM）怎么办？","1. 修改训练配置：减小 `per_device_train_batch_size`（例如从 16 改为 2），并调整 `gradient_accumulation_steps`。\n2. 优化推理参数：若推理时显存不足，可设置 LLM 引擎参数 `max_num_seqs = 2`，或将 `--cutoff_len` 降至 8192，`--max_new_tokens` 降至 1024。\n3. 其他尝试：降低 `--image_resolution` 或升级 LLaMA-Factory 至最新版本。","https:\u002F\u002Fgithub.com\u002FMIV-XJTU\u002FFSDrive\u002Fissues\u002F22",{"id":71,"question_zh":72,"answer_zh":73,"source_url":74},3527,"训练需要什么样的硬件配置？如何解决显存不足问题？","1. 推荐安装 `flash-attn`：从官方 releases 页面下载对应的 whl 文件并使用 pip 安装。\n2. 显存管理：原始配置大约需要 30G 显存。如果使用 RTX4090 等显存较小的显卡，建议减小 `per_device_train_batch_size` 并增加 `gradient_accumulation_steps`。\n3. 检查依赖：确保 `liger-kernel` 和 `flash-attn` 已正确安装。","https:\u002F\u002Fgithub.com\u002FMIV-XJTU\u002FFSDrive\u002Fissues\u002F4",{"id":76,"question_zh":77,"answer_zh":78,"source_url":79},3528,"导入数据集进行推断时报错，如何修复配置？","检查 `dataset_info.json` 文件，确保在其中添加了字段 `\"images\": \"images\"`。同时确认数据集格式是否正确，并按照教程在配置文件中正确注册数据集。","https:\u002F\u002Fgithub.com\u002FMIV-XJTU\u002FFSDrive\u002Fissues\u002F24",{"id":81,"question_zh":82,"answer_zh":83,"source_url":84},3529,"如何准备车道线或 3D 目标检测数据进行训练？","若要独立生成 3D 边界框或车道线，首先需要在空白图像上可视化这些 3D 边界框或车道线，然后提取视觉 token（visual tokens）。这些 token 将用于监督 MLLM 训练以预测相应的视觉内容。不能直接在无标注数据上使用可视化方法。","https:\u002F\u002Fgithub.com\u002FMIV-XJTU\u002FFSDrive\u002Fissues\u002F10",{"id":86,"question_zh":87,"answer_zh":88,"source_url":89},3530,"安装依赖时出现版本冲突警告如何处理？","1. 简单处理：可以直接忽略该提示，或者删除产生警告的源代码部分。\n2. 版本协调：注意 `transformers` 库的版本要求（需大于 0.49.0），同时需满足 LLaMA-Factory 对 transformers 版本的限制（如 >=4.41.2, \u003C=4.48.2 等），需根据环境选择合适的版本以避免冲突。","https:\u002F\u002Fgithub.com\u002FMIV-XJTU\u002FFSDrive\u002Fissues\u002F2",{"id":91,"question_zh":92,"answer_zh":93,"source_url":94},3531,"如何使用旧版本的预训练 checkpoint 进行测试或可视化？","由于旧版本 checkpoint 的设置不同，使用时必须修改 Prompt 格式。例如，需要将输入调整为特定的 JSON 结构，包含正确的图片路径和对话内容（conversations）。具体指令请参考项目中关于 Legacy Checkpoint 的使用说明。","https:\u002F\u002Fgithub.com\u002FMIV-XJTU\u002FFSDrive\u002Fissues\u002F20",[],[97,109,117,126,134,143],{"id":98,"name":99,"github_repo":100,"description_zh":101,"stars":102,"difficulty_score":103,"last_commit_at":104,"category_tags":105,"status":61},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",[53,106,107,108],"开发框架","图像","数据工具",{"id":110,"name":111,"github_repo":112,"description_zh":113,"stars":114,"difficulty_score":103,"last_commit_at":115,"category_tags":116,"status":61},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",[106,107,53],{"id":118,"name":119,"github_repo":120,"description_zh":121,"stars":122,"difficulty_score":123,"last_commit_at":124,"category_tags":125,"status":61},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 真正成长为懂上",150037,2,"2026-04-10T23:33:47",[106,53,54],{"id":127,"name":128,"github_repo":129,"description_zh":130,"stars":131,"difficulty_score":123,"last_commit_at":132,"category_tags":133,"status":61},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",[106,107,53],{"id":135,"name":136,"github_repo":137,"description_zh":138,"stars":139,"difficulty_score":123,"last_commit_at":140,"category_tags":141,"status":61},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",[142,53,107,106],"插件",{"id":144,"name":145,"github_repo":146,"description_zh":147,"stars":148,"difficulty_score":103,"last_commit_at":149,"category_tags":150,"status":61},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",[54,107,53,106]]