[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-LibCity--Bigscity-LibCity":3,"tool-LibCity--Bigscity-LibCity":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 真正成长为懂上",141543,2,"2026-04-06T11:32:54",[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 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107888,"2026-04-06T11:32:50",[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},4721,"markitdown","microsoft\u002Fmarkitdown","MarkItDown 是一款由微软 AutoGen 团队打造的轻量级 Python 工具，专为将各类文件高效转换为 Markdown 格式而设计。它支持 PDF、Word、Excel、PPT、图片（含 OCR）、音频（含语音转录）、HTML 乃至 YouTube 链接等多种格式的解析，能够精准提取文档中的标题、列表、表格和链接等关键结构信息。\n\n在人工智能应用日益普及的今天，大语言模型（LLM）虽擅长处理文本，却难以直接读取复杂的二进制办公文档。MarkItDown 恰好解决了这一痛点，它将非结构化或半结构化的文件转化为模型“原生理解”且 Token 效率极高的 Markdown 格式，成为连接本地文件与 AI 分析 pipeline 的理想桥梁。此外，它还提供了 MCP（模型上下文协议）服务器，可无缝集成到 Claude Desktop 等 LLM 应用中。\n\n这款工具特别适合开发者、数据科学家及 AI 研究人员使用，尤其是那些需要构建文档检索增强生成（RAG）系统、进行批量文本分析或希望让 AI 助手直接“阅读”本地文件的用户。虽然生成的内容也具备一定可读性，但其核心优势在于为机器",93400,"2026-04-06T19:52:38",[52,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":72,"owner_avatar_url":73,"owner_bio":65,"owner_company":74,"owner_location":74,"owner_email":74,"owner_twitter":74,"owner_website":75,"owner_url":76,"languages":77,"stars":82,"forks":83,"last_commit_at":84,"license":85,"difficulty_score":86,"env_os":87,"env_gpu":88,"env_ram":87,"env_deps":89,"category_tags":95,"github_topics":96,"view_count":32,"oss_zip_url":74,"oss_zip_packed_at":74,"status":17,"created_at":117,"updated_at":118,"faqs":119,"releases":155},4600,"LibCity\u002FBigscity-LibCity","Bigscity-LibCity","LibCity: An Open Library for Urban Spatial-temporal Data Mining","LibCity（阡陌）是一个专为城市时空数据挖掘打造的开源库，旨在为交通预测领域提供统一、全面且可扩展的研究框架。它基于 PyTorch 构建，将数据加载、模型训练到评估的完整流程标准化，有效解决了该领域长期存在的实验环境不统一、代码复现困难以及结果难以横向对比等痛点。\n\nLibCity 非常适合科研人员、算法工程师及高校学生使用。无论是需要快速验证新想法的研究者，还是希望深入理解经典模型的开发人员，都能从中获益。工具内置了涵盖交通流预测、轨迹下一位置预测、到达时间估计等 9 大类任务的 74 种复现模型，并整理了 52 个常用数据集，让用户无需从零搭建基础设施即可开展高效实验。\n\n其核心亮点在于高度模块化的设计：通过统一的数据存储接口和标准化的评估体系，用户可以像搭积木一样灵活替换或自定义组件，轻松开发新模型。此外，LibCity 不仅支持主流的 GPU 加速，近期还发布了基于昇腾（MindSpore）架构的 M-LibCity 版本，支持多卡并行计算，进一步拓宽了适用场景。作为一个致力于推动领域标准化与可复现性的工具，LibCity 是探索智慧交通算法的理想起点。","![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLibCity_Bigscity-LibCity_readme_85756e383b04.png)\n\n------\n\n[![ACM SIGSpatial](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FACM%20SIGSPATIAL'21-LibCity-orange)](https:\u002F\u002Fdl.acm.org\u002Fdoi\u002F10.1145\u002F3474717.3483923) [![Python](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPython-3.7%2B-blue)](https:\u002F\u002Fwww.python.org\u002F) [![Pytorch](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPytorch-1.7.1%2B-blue)](https:\u002F\u002Fpytorch.org\u002F) [![License](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-Apache%202.0-blue)](.\u002FLICENSE.txt) [![star](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002FLibCity\u002FBigscity-LibCity?style=social)](https:\u002F\u002Fgithub.com\u002FLibCity\u002FBigscity-LibCity\u002Fstargazers) [![fork](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fforks\u002FLibCity\u002FBigscity-LibCity?style=social)](https:\u002F\u002Fgithub.com\u002FLibCity\u002FBigscity-LibCity\u002Fnetwork\u002Fmembers) \n\n# LibCity（阡陌）\n\n[HomePage](https:\u002F\u002Flibcity.ai\u002F) | [Docs](https:\u002F\u002Fbigscity-libcity-docs.readthedocs.io\u002Fen\u002Flatest\u002Findex.html) | [Datasets](https:\u002F\u002Fgithub.com\u002FLibCity\u002FBigscity-LibCity-Datasets) | [Conference Paper](https:\u002F\u002Fdl.acm.org\u002Fdoi\u002F10.1145\u002F3474717.3483923) | [Full Paper](https:\u002F\u002Farxiv.org\u002Fabs\u002F2304.14343) | [Paper List](https:\u002F\u002Fgithub.com\u002FLibCity\u002FBigscity-LibCity-Paper) | [Experiment Tool](https:\u002F\u002Fgithub.com\u002FLibCity\u002FBigscity-LibCity-WebTool) | [EA&B Track Paper](https:\u002F\u002Farxiv.org\u002Fabs\u002F2308.12899) | [中文版](https:\u002F\u002Fgithub.com\u002FLibCity\u002FBigscity-LibCity\u002Fblob\u002Fmaster\u002Freadme_zh.md) \n\nLibCity is a unified, comprehensive, and extensible library, which provides researchers with a credible experimental tool and a convenient development framework in the traffic prediction field. Our library is implemented based on PyTorch and includes all the necessary steps or components related to traffic prediction into a systematic pipeline, allowing researchers to conduct comprehensive experiments. Our library will contribute to the standardization and reproducibility in the field of traffic prediction.\n\nLibCity currently supports the following tasks:\n\n* Traffic State Prediction\n  * Traffic Flow Prediction\n  * Traffic Speed Prediction\n  * On-Demand Service Prediction\n  * Origin-destination Matrix Prediction\n  * Traffic Accidents Prediction\n* Trajectory Next-Location Prediction\n* Estimated Time of Arrival\n* Map Matching\n* Road Network Representation Learning\n\n## Features\n\n* **Unified**: LibCity builds a systematic pipeline to implement, use and evaluate traffic prediction models in a unified platform. We design basic spatial-temporal data storage, unified model instantiation interfaces, and standardized evaluation procedure.\n\n* **Comprehensive**: 74 models covering 9 traffic prediction tasks have been reproduced to form a comprehensive model warehouse. Meanwhile, LibCity collects 52 commonly used datasets of different sources and implements a series of commonly used evaluation metrics and strategies for performance evaluation. \n\n* **Extensible**: LibCity enables a modular design of different components, allowing users to flexibly insert customized components into the library. Therefore, new researchers can easily develop new models with the support of LibCity.\n\n## LibCity News\n\n[![new](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLibCity_Bigscity-LibCity_readme_7e80f61b0eeb.gif)](https:\u002F\u002Fgithub.com\u002FRUCAIBox\u002FRecBole\u002Fblob\u002Fmaster\u002Fasset\u002Fnew.gif) **04\u002F12\u002F2024**: We release M-LibCity v0.1, the MindSpore version of LibCity. This initial version supports nine traffic prediction tasks, including traffic state forecasting, trajectory next-hop prediction, and estimated time of arrival. Furthermore, M-LibCity also supports multi-cards parallel acceleration on various backends including GPU and NPU. For more detailed information and additional resources, please visit this [link](https:\u002F\u002Fgithub.com\u002FLibCity\u002FM-LibCity).\n\n[![new](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLibCity_Bigscity-LibCity_readme_7e80f61b0eeb.gif)](https:\u002F\u002Fgithub.com\u002FRUCAIBox\u002FRecBole\u002Fblob\u002Fmaster\u002Fasset\u002Fnew.gif) **11\u002F04\u002F2023**: Our creative design *ZongHeng* based on LibCity won the first prize in the 9th China Graduate Contest on Smart-city Technology and Creative Design! [Weixin](https:\u002F\u002Fmp.weixin.qq.com\u002Fs\u002FrAiTaVtnG9Kub_BBW502qw)\n\n[![new](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLibCity_Bigscity-LibCity_readme_7e80f61b0eeb.gif)](https:\u002F\u002Fgithub.com\u002FRUCAIBox\u002FRecBole\u002Fblob\u002Fmaster\u002Fasset\u002Fnew.gif)**08\u002F24\u002F2023:** We published a paper titled *Unified Data Management and Comprehensive Performance Evaluation for Urban Spatial-Temporal Prediction [Experiment, Analysis & Benchmark]*, including (1) a Unified Storage Format for urban spatial-temporal data, (2) a Technical Development Roadmap for urban spatial-temporal prediction models, (3) Extensive Experiments and Performance Evaluation using 18 models and 20 datasets. [[Paper]](https:\u002F\u002Farxiv.org\u002Fabs\u002F2308.12899).\n\n[![new](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLibCity_Bigscity-LibCity_readme_7e80f61b0eeb.gif)](https:\u002F\u002Fgithub.com\u002FRUCAIBox\u002FRecBole\u002Fblob\u002Fmaster\u002Fasset\u002Fnew.gif)**06\u002F20\u002F2023:** We released the Beijing trajectory dataset collected in November 2015, including 1018312 trajectories. We obtained the corresponding road network data from OpenStreetMap and preprocessed the trajectory data to get the Beijing trajectory dataset matched to the road network, and we believed that this dataset could promote the development of urban trajectory mining tasks. Please refer to this [link](https:\u002F\u002Fgithub.com\u002Faptx1231\u002FSTART) to obtain it and ensure that this data is **used for research purposes only**. \n\n[![new](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLibCity_Bigscity-LibCity_readme_7e80f61b0eeb.gif)](https:\u002F\u002Fgithub.com\u002FRUCAIBox\u002FRecBole\u002Fblob\u002Fmaster\u002Fasset\u002Fnew.gif) **06\u002F04\u002F2023**: LibCity won the second prize in the 3rd China Science Open Source Software Creativity Competition! [Weixin](https:\u002F\u002Fmp.weixin.qq.com\u002Fs?__biz=MzA3NzM4OTc4Mw==&mid=2454775999&idx=1&sn=881a31468c5cd472ed72967b487837cf&chksm=88f68207bf810b1157ac622ae0beba0a1f2ca8ece38fa5c743c4e082c30d9e27d23b92b61530&scene=126&sessionid=1687198811#rd)\n\n[![new](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLibCity_Bigscity-LibCity_readme_7e80f61b0eeb.gif)](https:\u002F\u002Fgithub.com\u002FRUCAIBox\u002FRecBole\u002Fblob\u002Fmaster\u002Fasset\u002Fnew.gif) **04\u002F27\u002F2023:** We published a [full paper](https:\u002F\u002Farxiv.org\u002Fabs\u002F2304.14343) titled *LibCity: A Unified Library Towards Efficient and Comprehensive Urban Spatial-Temporal Prediction*, which provides more details of LibCity. [[Paper\\]](https:\u002F\u002Farxiv.org\u002Fabs\u002F2304.14343).\n\n[![new](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLibCity_Bigscity-LibCity_readme_7e80f61b0eeb.gif)](https:\u002F\u002Fgithub.com\u002FRUCAIBox\u002FRecBole\u002Fblob\u002Fmaster\u002Fasset\u002Fnew.gif) **11\u002F19\u002F2022**: Our self-attention-based traffic flow prediction model **PDFormer** developed on LibCity was accepted by **AAAI2023**, please check this [link](https:\u002F\u002Fgithub.com\u002FBUAABIGSCity\u002FPDFormer) for more details.\n\n[![new](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLibCity_Bigscity-LibCity_readme_7e80f61b0eeb.gif)](https:\u002F\u002Fgithub.com\u002FRUCAIBox\u002FRecBole\u002Fblob\u002Fmaster\u002Fasset\u002Fnew.gif) **08\u002F05\u002F2022**: We develop an **experiment management tool** for the LibCity, which allows users to complete the experiments in a visual interface. The link to the code repository is [here](https:\u002F\u002Fgithub.com\u002FLibCity\u002FBigscity-LibCity-WebTool). Some introduction (in Chinese): [Weixin](https:\u002F\u002Fmp.weixin.qq.com\u002Fs?__biz=MzA3NzM4OTc4Mw==&mid=2454773897&idx=1&sn=e09cc3fc7dd772a579dd10730f8fadd8&chksm=88f68a31bf810327849442c6af4bf59d5042dfb9871247239a49f070dbeb9f321b41706da157&scene=126&&sessionid=1669002707#rd), [Zhihu](https:\u002F\u002Fzhuanlan.zhihu.com\u002Fp\u002F550605104)\n\n**04\u002F27\u002F2022**: We release the first version of LibCity **v0.3**, the latest version, supporting 9 types of spatio-temporal prediction tasks, covering more than 60 prediction models and nearly 40 urban spatio-temporal datasets.\n\n**11\u002F24\u002F2021**: We provide some introductory tutorials (in Chinese) on Zhihu, [link1](https:\u002F\u002Fzhuanlan.zhihu.com\u002Fp\u002F401186930), [link2](https:\u002F\u002Fzhuanlan.zhihu.com\u002Fp\u002F400814990), [link3](https:\u002F\u002Fzhuanlan.zhihu.com\u002Fp\u002F400819354), [link4](https:\u002F\u002Fzhuanlan.zhihu.com\u002Fp\u002F400821482), [link5](https:\u002F\u002Fzhuanlan.zhihu.com\u002Fp\u002F401190615), [link6](https:\u002F\u002Fzhuanlan.zhihu.com\u002Fp\u002F436191860)....\n\n**11\u002F10\u002F2021**: We provide a document that describes in detail the format of the [atomic files](https:\u002F\u002Fbigscity-libcity-docs.readthedocs.io\u002Fen\u002Flatest\u002Fuser_guide\u002Fdata\u002Fatomic_files.html) defined by LibCity. You can download [English Version](https:\u002F\u002Flibcity.ai\u002FA-Unified-Storage-Format-of-Traffic-Data-Atomic-Files-in-LibCity.pdf) and [Chinese Version](https:\u002F\u002Flibcity.ai\u002FLibCity%E4%B8%AD%E4%BA%A4%E9%80%9A%E6%95%B0%E6%8D%AE%E7%BB%9F%E4%B8%80%E5%AD%98%E5%82%A8%E6%A0%BC%E5%BC%8F-%E5%8E%9F%E5%AD%90%E6%96%87%E4%BB%B6.pdf) here for details.\n\n**11\u002F07\u002F2021**: We have a presentation on ACM SIGSPATIAL 2021 Local Track to introduce LibCity. You can download [LibCity Presentation Slide(Chinese)](https:\u002F\u002Flibcity.ai\u002FLibCity-城市时空预测深度学习开源平台.pdf) and [LibCity Chinese Tutorial](https:\u002F\u002Flibcity.ai\u002FLibCity-中文Tutorial.pptx) here.\n\n**11\u002F07\u002F2021**: We have a presentation on ACM SIGSPATIAL 2021 Main Track to introduce LibCity. Here are the [Presentation Video(English)](https:\u002F\u002Fwww.bilibili.com\u002Fvideo\u002FBV19q4y1g7Rh\u002F) and the [Presentation Slide(English)](https:\u002F\u002Flibcity.ai\u002FLibCity-Presentation.pdf).\n\n## Overall Framework\n\n![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLibCity_Bigscity-LibCity_readme_fcd419add3df.png)\n\n* **Configuration Module**: Responsible for managing all the parameters involved in the framework.\n* **Data Module**: Responsible for loading datasets and data preprocessing operations.\n* **Model Module**: Responsible for initializing the reproduced baseline model or custom model.\n* **Evaluation Module**: Responsible for evaluating model prediction results through multiple indicators.\n* **Execution Module**: Responsible for model training and prediction.\n\n## Installation\n\nLibCity can only be installed from source code.\n\nPlease execute the following command to get the source code.\n\n```shell\ngit clone https:\u002F\u002Fgithub.com\u002FLibCity\u002FBigscity-LibCity\ncd Bigscity-LibCity\n```\n\nMore details about environment configuration is represented in [Docs](https:\u002F\u002Fbigscity-libcity-docs.readthedocs.io\u002Fen\u002Flatest\u002Fget_started\u002Finstall.html).\n\n## Quick-Start\n\nBefore run models in LibCity, please make sure you download at least one dataset and put it in directory `.\u002Fraw_data\u002F`. The dataset link is [BaiduDisk with code 1231](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1qEfcXBO-QwZfiT0G3IYMpQ) or [Google Drive](https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F1g5v2Gq1tkOq8XO0HDCZ9nOTtRpB6-gPe?usp=sharing). All dataset used in LibCity needs to be processed into the [atomic files](https:\u002F\u002Fbigscity-libcity-docs.readthedocs.io\u002Fen\u002Flatest\u002Fuser_guide\u002Fdata\u002Fatomic_files.html) format.\n\nThe script `run_model.py` is used for training and evaluating a single model in LibCity. When run the `run_model.py`, you must specify the following three parameters, namely **task**, **dataset** and **model**.  \n\nFor example:\n\n```sh\npython run_model.py --task traffic_state_pred --model GRU --dataset METR_LA\n```\n\nThis script will run the GRU model on the METR_LA dataset for traffic state prediction task under the default configuration.  **We have released the correspondence between datasets, models, and tasks at [here](https:\u002F\u002Fbigscity-libcity-docs.readthedocs.io\u002Fen\u002Flatest\u002Fuser_guide\u002Fdata\u002Fdataset_for_task.html).** More details is represented in [Docs](https:\u002F\u002Fbigscity-libcity-docs.readthedocs.io\u002Fen\u002Flatest\u002Fget_started\u002Fquick_start.html).\n\n## TensorBoard Visualization\n\nDuring the model training process, LibCity will record the loss of each epoch, and support tensorboard visualization.\n\nAfter running the model once, you can use the following command to visualize:\n\n```shell\ntensorboard --logdir 'libcity\u002Fcache'\n```\n\n```\nTensorFlow installation not found - running with reduced feature set.\nServing TensorBoard on localhost; to expose to the network, use a proxy or pass --bind_all\nTensorBoard 2.4.1 at http:\u002F\u002Flocalhost:6006\u002F (Press CTRL+C to quit)\n```\n\nVisit this address([http:\u002F\u002Flocalhost:6006\u002F](http:\u002F\u002Flocalhost:6006\u002F)) in the browser to see the visualized result.\n\n![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLibCity_Bigscity-LibCity_readme_9646508cd1e8.png)\n\n## Reproduced Model List\n\nFor a list of all models reproduced in LibCity, see [Docs](https:\u002F\u002Fbigscity-libcity-docs.readthedocs.io\u002Fen\u002Flatest\u002Fuser_guide\u002Fmodel.html), where you can see the abbreviation of the model and the corresponding papers and citations.\n\n## Tutorial\n\nIn order to facilitate users to use LibCity, we provide users with some tutorials:\n\n- We gave lectures on both ACM SIGSPATIAL 2021 Main Track and Local Track. For related lecture videos and Slides, please see our [HomePage](https:\u002F\u002Flibcity.ai\u002F#\u002Ftutorial) (in Chinese and English).\n- We provide entry-level tutorials (in Chinese and English) in the documentation.\n  - [Install and quick start](https:\u002F\u002Fbigscity-libcity-docs.readthedocs.io\u002Fen\u002Flatest\u002Ftutorial\u002Finstall_quick_start.html)  & [安装和快速上手](https:\u002F\u002Fbigscity-libcity-docs.readthedocs.io\u002Fzh_CN\u002Flatest\u002Ftutorial\u002Finstall_quick_start.html)\n  - [Run an existing model in LibCity](https:\u002F\u002Fbigscity-libcity-docs.readthedocs.io\u002Fen\u002Flatest\u002Ftutorial\u002Frun_model.html) & [运行LibCity中已复现的模型](https:\u002F\u002Fbigscity-libcity-docs.readthedocs.io\u002Fzh_CN\u002Flatest\u002Ftutorial\u002Frun_model.html)\n  - [Add a new model to LibCity](https:\u002F\u002Fbigscity-libcity-docs.readthedocs.io\u002Fen\u002Flatest\u002Ftutorial\u002Fadd_model.html)  & [在LibCity中添加新模型](https:\u002F\u002Fbigscity-libcity-docs.readthedocs.io\u002Fzh_CN\u002Flatest\u002Ftutorial\u002Fadd_model.html)\n  - [Tuning the model with automatic tool](https:\u002F\u002Fbigscity-libcity-docs.readthedocs.io\u002Fen\u002Flatest\u002Ftutorial\u002Fhyper_tune.html) & [使用自动化工具调参](https:\u002F\u002Fbigscity-libcity-docs.readthedocs.io\u002Fzh_CN\u002Flatest\u002Ftutorial\u002Fhyper_tune.html)\n  - [Visualize Atomic Files](https:\u002F\u002Fbigscity-libcity-docs.readthedocs.io\u002Fen\u002Flatest\u002Ftutorial\u002Fdata_visualization.html) & [原子文件可视化](https:\u002F\u002Fbigscity-libcity-docs.readthedocs.io\u002Fzh_CN\u002Flatest\u002Ftutorial\u002Fdata_visualization.html)\n- In order to facilitate the use of domestic users in China, we provide an introductory tutorial (in Chinese) on Zhihu.\n  - [LibCity：一个统一、全面、可扩展的交通预测算法库](https:\u002F\u002Fzhuanlan.zhihu.com\u002Fp\u002F401186930)\n  - [LibCity入门教程（1）——安装与快速上手](https:\u002F\u002Fzhuanlan.zhihu.com\u002Fp\u002F400814990)\n  - [LibCity入门教程（2）——运行LibCity中已复现的模型](https:\u002F\u002Fzhuanlan.zhihu.com\u002Fp\u002F400819354)\n  - [LibCity入门教程（3）——在LibCity中添加新模型](https:\u002F\u002Fzhuanlan.zhihu.com\u002Fp\u002F400821482)\n  - [LibCity入门教程（4）—— 自动化调参工具](https:\u002F\u002Fzhuanlan.zhihu.com\u002Fp\u002F401190615)\n  - [北航BIGSCity课题组提出LibCity工具库：城市时空预测深度学习开源平台](https:\u002F\u002Fzhuanlan.zhihu.com\u002Fp\u002F436191860)\n\n## Contribution\n\nThe LibCity is mainly developed and maintained by Beihang Interest Group on SmartCity ([BIGSCITY](https:\u002F\u002Fwww.bigcity.ai\u002F)). The core developers of this library are [@aptx1231](https:\u002F\u002Fgithub.com\u002Faptx1231) and [@WenMellors](https:\u002F\u002Fgithub.com\u002FWenMellors). \n\nSeveral co-developers have also participated in the reproduction of  the model, the list of contributions of which is presented in the [reproduction contribution list](.\u002Fcontribution_list.md).\n\nIf you encounter a bug or have any suggestion, please contact us by [raising an issue](https:\u002F\u002Fgithub.com\u002FLibCity\u002FBigscity-LibCity\u002Fissues). You can also contact us by sending an email to bigscity@126.com.\n\n## Cite\n\nOur paper is accepted by ACM SIGSPATIAL 2021. If you find LibCity useful for your research or development, please cite our [paper](https:\u002F\u002Fdl.acm.org\u002Fdoi\u002F10.1145\u002F3474717.3483923).\n\n```\n@inproceedings{libcity,\n  author = {Wang, Jingyuan and Jiang, Jiawei and Jiang, Wenjun and Li, Chao and Zhao, Wayne Xin},\n  title = {LibCity: An Open Library for Traffic Prediction},\n  year = {2021},\n  isbn = {9781450386647},\n  publisher = {Association for Computing Machinery},\n  address = {New York, NY, USA},\n  url = {https:\u002F\u002Fdoi.org\u002F10.1145\u002F3474717.3483923},\n  doi = {10.1145\u002F3474717.3483923},\n  booktitle = {Proceedings of the 29th International Conference on Advances in Geographic Information Systems},\n  pages = {145–148},\n  numpages = {4},\n  keywords = {Spatial-temporal System, Reproducibility, Traffic Prediction},\n  location = {Beijing, China},\n  series = {SIGSPATIAL '21}\n}\n```\n\nFor the long paper, please cite it as follows:\n\n```\n@article{libcitylong,\n  title={LibCity: A Unified Library Towards Efficient and Comprehensive Urban Spatial-Temporal Prediction}, \n  author={Jiang, Jiawei and Han, Chengkai and Jiang, Wenjun and Zhao, Wayne Xin and Wang, Jingyuan},\n  journal={arXiv preprint arXiv:2304.14343},\n  year={2023}\n}\n```\n\n## License\n\nLibCity uses [Apache License 2.0](https:\u002F\u002Fgithub.com\u002FLibCity\u002FBigscity-LibCity\u002Fblob\u002Fmaster\u002FLICENSE.txt).\n\n## Stargazers\n\n[![Stargazers repo roster for @LibCity\u002FBigscity-LibCity](https:\u002F\u002Freporoster.com\u002Fstars\u002FLibCity\u002FBigscity-LibCity)](https:\u002F\u002Fgithub.com\u002FLibCity\u002FBigscity-LibCity\u002Fstargazers)\n\n## Forkers\n\n[![Forkers repo roster for @LibCity\u002FBigscity-LibCity](https:\u002F\u002Freporoster.com\u002Fforks\u002FLibCity\u002FBigscity-LibCity)](https:\u002F\u002Fgithub.com\u002FLibCity\u002FBigscity-LibCity\u002Fnetwork\u002Fmembers)","![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLibCity_Bigscity-LibCity_readme_85756e383b04.png)\n\n------\n\n[![ACM SIGSpatial](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FACM%20SIGSPATIAL'21-LibCity-orange)](https:\u002F\u002Fdl.acm.org\u002Fdoi\u002F10.1145\u002F3474717.3483923) [![Python](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPython-3.7%2B-blue)](https:\u002F\u002Fwww.python.org\u002F) [![Pytorch](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPytorch-1.7.1%2B-blue)](https:\u002F\u002Fpytorch.org\u002F) [![License](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-Apache%202.0-blue)](.\u002FLICENSE.txt) [![star](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002FLibCity\u002FBigscity-LibCity?style=social)](https:\u002F\u002Fgithub.com\u002FLibCity\u002FBigscity-LibCity\u002Fstargazers) [![fork](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fforks\u002FLibCity\u002FBigscity-LibCity?style=social)](https:\u002F\u002Fgithub.com\u002FLibCity\u002FBigscity-LibCity\u002Fnetwork\u002Fmembers) \n\n# LibCity（阡陌）\n\n[主页](https:\u002F\u002Flibcity.ai\u002F) | [文档](https:\u002F\u002Fbigscity-libcity-docs.readthedocs.io\u002Fen\u002Flatest\u002Findex.html) | [数据集](https:\u002F\u002Fgithub.com\u002FLibCity\u002FBigscity-LibCity-Datasets) | [会议论文](https:\u002F\u002Fdl.acm.org\u002Fdoi\u002F10.1145\u002F3474717.3483923) | [完整论文](https:\u002F\u002Farxiv.org\u002Fabs\u002F2304.14343) | [论文列表](https:\u002F\u002Fgithub.com\u002FLibCity\u002FBigscity-LibCity-Paper) | [实验工具](https:\u002F\u002Fgithub.com\u002FLibCity\u002FBigscity-LibCity-WebTool) | [EA&B赛道论文](https:\u002F\u002Farxiv.org\u002Fabs\u002F2308.12899) | [中文版](https:\u002F\u002Fgithub.com\u002FLibCity\u002FBigscity-LibCity\u002Fblob\u002Fmaster\u002Freadme_zh.md) \n\nLibCity是一个统一、全面且可扩展的库，为交通预测领域的研究人员提供可靠的实验工具和便捷的开发框架。我们的库基于PyTorch实现，将与交通预测相关的所有必要步骤或组件整合进一个系统化的流程中，使研究人员能够开展全面的实验。LibCity将有助于推动交通预测领域的标准化和可重复性研究。\n\nLibCity目前支持以下任务：\n\n* 交通状态预测\n  * 交通流量预测\n  * 交通速度预测\n  * 按需服务预测\n  * 起讫点矩阵预测\n  * 交通事故预测\n* 轨迹下一位置预测\n* 预计到达时间\n* 地图匹配\n* 道路网络表示学习\n\n## 特性\n\n* **统一**：LibCity构建了一个系统化的流程，用于在统一的平台上实现、使用和评估交通预测模型。我们设计了基础的时空数据存储方式、统一的模型实例化接口以及标准化的评估流程。\n\n* **全面**：我们复现了涵盖9项交通预测任务的74种模型，形成了一个全面的模型库。同时，LibCity收集了来自不同来源的52个常用数据集，并实现了多种常用的评估指标和策略，用于性能评估。\n\n* **可扩展**：LibCity采用模块化设计，允许用户灵活地将自定义组件插入到库中。因此，新研究人员可以在LibCity的支持下轻松开发新的模型。\n\n## LibCity 新闻\n\n[![new](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLibCity_Bigscity-LibCity_readme_7e80f61b0eeb.gif)](https:\u002F\u002Fgithub.com\u002FRUCAIBox\u002FRecBole\u002Fblob\u002Fmaster\u002Fasset\u002Fnew.gif) **2024年4月12日**：我们发布了 M-LibCity v0.1，即 LibCity 的 MindSpore 版本。该初始版本支持九项交通预测任务，包括交通状态预测、轨迹下一跳预测以及预计到达时间等。此外，M-LibCity 还支持在 GPU 和 NPU 等多种后端上的多卡并行加速。更多详细信息及附加资源，请访问此 [链接](https:\u002F\u002Fgithub.com\u002FLibCity\u002FM-LibCity)。\n\n[![new](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLibCity_Bigscity-LibCity_readme_7e80f61b0eeb.gif)](https:\u002F\u002Fgithub.com\u002FRUCAIBox\u002FRecBole\u002Fblob\u002Fmaster\u002Fasset\u002Fnew.gif) **2023年4月11日**：基于 LibCity 的创意设计 *ZongHeng* 在第九届中国研究生智慧城市技术与创意设计大赛中荣获一等奖！[微信](https:\u002F\u002Fmp.weixin.qq.com\u002Fs\u002FrAiTaVtnG9Kub_BBW502qw)\n\n[![new](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLibCity_Bigscity-LibCity_readme_7e80f61b0eeb.gif)](https:\u002F\u002Fgithub.com\u002FRUCAIBox\u002FRecBole\u002Fblob\u002Fmaster\u002Fasset\u002Fnew.gif)**2023年8月24日：** 我们发表了一篇题为《面向城市时空预测的统一数据管理与综合性能评估【实验、分析与基准测试】》的论文，内容包括：(1) 城市时空数据的统一存储格式；(2) 城市时空预测模型的技术发展路线图；(3) 使用 18 种模型和 20 个数据集进行的大规模实验与性能评估。[[论文]](https:\u002F\u002Farxiv.org\u002Fabs\u002F2308.12899)。\n\n[![new](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLibCity_Bigscity-LibCity_readme_7e80f61b0eeb.gif)](https:\u002F\u002Fgithub.com\u002FRUCAIBox\u002FRecBole\u002Fblob\u002Fmaster\u002Fasset\u002Fnew.gif)**2023年6月20日：** 我们发布了 2015 年 11 月采集的北京轨迹数据集，包含 1018312 条轨迹。我们从 OpenStreetMap 获取了相应的路网数据，并对轨迹数据进行了预处理，得到了与路网匹配的北京轨迹数据集。我们认为该数据集将有助于推动城市轨迹挖掘相关研究的发展。请通过此 [链接](https:\u002F\u002Fgithub.com\u002Faptx1231\u002FSTART) 获取，并请务必确保该数据仅用于 **科研目的**。\n\n[![new](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLibCity_Bigscity-LibCity_readme_7e80f61b0eeb.gif)](https:\u002F\u002Fgithub.com\u002FRUCAIBox\u002FRecBole\u002Fblob\u002Fmaster\u002Fasset\u002Fnew.gif) **2023年6月4日**：LibCity 在第三届中国科学开源软件创意大赛中荣获二等奖！[微信](https:\u002F\u002Fmp.weixin.qq.com\u002Fs?__biz=MzA3NzM4OTc4Mw==&mid=2454775999&idx=1&sn=881a31468c5cd472ed72967b487837cf&chksm=88f68207bf810b1157ac622ae0beba0a1f2ca8ece38fa5c743c4e082c30d9e27d23b92b61530&scene=126&sessionid=1687198811#rd)\n\n[![new](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLibCity_Bigscity-LibCity_readme_7e80f61b0eeb.gif)](https:\u002F\u002Fgithub.com\u002FRUCAIBox\u002FRecBole\u002Fblob\u002Fmaster\u002Fasset\u002Fnew.gif) **2023年4月27日：** 我们发表了一篇题为《LibCity：迈向高效全面的城市时空预测的统一库》的完整论文（[arXiv 链接](https:\u002F\u002Farxiv.org\u002Fabs\u002F2304.14343)），其中提供了关于 LibCity 的更多细节。[[论文\\]](https:\u002F\u002Farxiv.org\u002Fabs\u002F2304.14343)。\n\n[![new](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLibCity_Bigscity-LibCity_readme_7e80f61b0eeb.gif)](https:\u002F\u002Fgithub.com\u002FRUCAIBox\u002FRecBole\u002Fblob\u002Fmaster\u002Fasset\u002Fnew.gif) **2022年11月19日**：我们在 LibCity 上开发的基于自注意力机制的交通流量预测模型 **PDFormer** 被 **AAAI2023** 接收，更多详情请参阅此 [链接](https:\u002F\u002Fgithub.com\u002FBUAABIGSCity\u002FPDFormer)。\n\n[![new](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLibCity_Bigscity-LibCity_readme_7e80f61b0eeb.gif)](https:\u002F\u002Fgithub.com\u002FRUCAIBox\u002FRecBole\u002Fblob\u002Fmaster\u002Fasset\u002Fnew.gif) **2022年8月5日**：我们为 LibCity 开发了一个 **实验管理工具**，允许用户通过可视化界面完成实验。代码仓库链接在此：[这里](https:\u002F\u002Fgithub.com\u002FLibCity\u002FBigscity-LibCity-WebTool)。部分介绍（中文）：[微信](https:\u002F\u002Fmp.weixin.qq.com\u002Fs?__biz=MzA3NzM4OTc4Mw==&mid=2454773897&idx=1&sn=e09cc3fc7dd772a579dd10730f8fadd8&chksm=88f68a31bf810327849442c6af4bf59d5042dfb9871247239a49f070dbeb9f321b41706da157&scene=126&&sessionid=1669002707#rd)，[知乎](https:\u002F\u002Fzhuanlan.zhihu.com\u002Fp\u002F550605104)。\n\n**2022年4月27日**：我们发布了 LibCity 的首个版本 **v0.3**，这是最新版本，支持 9 类时空预测任务，涵盖 60 多种预测模型和近 40 个城市时空数据集。\n\n**2021年11月24日**：我们在知乎上发布了一些入门教程（中文），[链接1](https:\u002F\u002Fzhuanlan.zhihu.com\u002Fp\u002F401186930)，[链接2](https:\u002F\u002Fzhuanlan.zhihu.com\u002Fp\u002F400814990)，[链接3](https:\u002F\u002Fzhuanlan.zhihu.com\u002Fp\u002F400819354)，[链接4](https:\u002F\u002Fzhuanlan.zhihu.com\u002Fp\u002F400821482)，[链接5](https:\u002F\u002Fzhuanlan.zhihu.com\u002Fp\u002F401190615)，[链接6](https:\u002F\u002Fzhuanlan.zhihu.com\u002Fp\u002F436191860)……\n\n**2021年11月10日**：我们提供了一份文档，详细介绍了 LibCity 定义的 [原子文件](https:\u002F\u002Fbigscity-libcity-docs.readthedocs.io\u002Fen\u002Flatest\u002Fuser_guide\u002Fdata\u002Fatomic_files.html) 格式。您可以在此下载 [英文版](https:\u002F\u002Flibcity.ai\u002FA-Unified-Storage-Format-of-Traffic-Data-Atomic-Files-in-LibCity.pdf) 和 [中文版](https:\u002F\u002Flibcity.ai\u002FLibCity%E4%B8%AD%E4%BA%A4%E9%80%9A%E6%95%B0%E6%8D%AE%E7%BB%9F%E4%B8%80%E5%AD%98%E5%82%A8%E6%A0%BC%E5%BC%8F-%E5%8E%9F%E5%AD%90%E6%96%87%E4%BB%B6.pdf) 以获取更多详情。\n\n**2021年11月7日**：我们在 ACM SIGSPATIAL 2021 本地赛道上做了一场关于 LibCity 的演示。您可以在此下载 [LibCity 演示文稿（中文）](https:\u002F\u002Flibcity.ai\u002FLibCity-城市时空预测深度学习开源平台.pdf) 和 [LibCity 中文教程](https:\u002F\u002Flibcity.ai\u002FLibCity-中文Tutorial.pptx)。\n\n**2021年11月7日**：我们在 ACM SIGSPATIAL 2021 主赛道上也做了一场关于 LibCity 的演示。以下是 [演示视频（英文）](https:\u002F\u002Fwww.bilibili.com\u002Fvideo\u002FBV19q4y1g7Rh\u002F) 和 [演示文稿（英文）](https:\u002F\u002Flibcity.ai\u002FLibCity-Presentation.pdf)。\n\n## 整体框架\n\n![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLibCity_Bigscity-LibCity_readme_fcd419add3df.png)\n\n* **配置模块**：负责管理框架中涉及的所有参数。\n* **数据模块**：负责加载数据集及进行数据预处理操作。\n* **模型模块**：负责初始化复现的基线模型或自定义模型。\n* **评估模块**：负责通过多个指标评估模型的预测结果。\n* **执行模块**：负责模型的训练和预测。\n\n## 安装\n\nLibCity 只能通过源代码安装。\n\n请执行以下命令以获取源代码：\n\n```shell\ngit clone https:\u002F\u002Fgithub.com\u002FLibCity\u002FBigscity-LibCity\ncd Bigscity-LibCity\n```\n\n有关环境配置的更多详细信息，请参阅 [文档](https:\u002F\u002Fbigscity-libcity-docs.readthedocs.io\u002Fen\u002Flatest\u002Fget_started\u002Finstall.html)。\n\n## 快速入门\n\n在 LibCity 中运行模型之前，请确保您已下载至少一个数据集，并将其放置在 `.\u002Fraw_data\u002F` 目录下。数据集的下载链接为：[百度网盘，提取码 1231](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1qEfcXBO-QwZfiT0G3IYMpQ) 或 [Google Drive](https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F1g5v2Gq1tkOq8XO0HDCZ9nOTtRpB6-gPe?usp=sharing)。LibCity 中使用的所有数据集都需要被处理成 [原子文件](https:\u002F\u002Fbigscity-libcity-docs.readthedocs.io\u002Fen\u002Flatest\u002Fuser_guide\u002Fdata\u002Fatomic_files.html) 格式。\n\n脚本 `run_model.py` 用于在 LibCity 中训练和评估单个模型。运行 `run_model.py` 时，必须指定以下三个参数：**task**、**dataset** 和 **model**。\n\n例如：\n\n```sh\npython run_model.py --task traffic_state_pred --model GRU --dataset METR_LA\n```\n\n该脚本将以默认配置在 METR_LA 数据集上运行 GRU 模型，进行交通状态预测任务。**我们已在 [这里](https:\u002F\u002Fbigscity-libcity-docs.readthedocs.io\u002Fen\u002Flatest\u002Fuser_guide\u002Fdata\u002Fdataset_for_task.html) 发布了数据集、模型与任务之间的对应关系。** 更多详细信息请参阅 [文档](https:\u002F\u002Fbigscity-libcity-docs.readthedocs.io\u002Fen\u002Flatest\u002Fget_started\u002Fquick_start.html)。\n\n## TensorBoard 可视化\n\n在模型训练过程中，LibCity 会记录每个 epoch 的损失，并支持 TensorBoard 可视化。\n\n模型运行一次后，您可以使用以下命令进行可视化：\n\n```shell\ntensorboard --logdir 'libcity\u002Fcache'\n```\n\n```\nTensorFlow 安装未找到 - 正在以功能受限模式运行。\nTensorBoard 正在 localhost 上提供服务；如需对外公开，请使用代理或传递 --bind_all 参数。\nTensorBoard 2.4.1 已启动，地址为 http:\u002F\u002Flocalhost:6006\u002F（按 CTRL+C 即可退出）。\n```\n\n请在浏览器中访问此地址 ([http:\u002F\u002Flocalhost:6006\u002F](http:\u002F\u002Flocalhost:6006\u002F)) 查看可视化结果。\n\n![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLibCity_Bigscity-LibCity_readme_9646508cd1e8.png)\n\n## 复现模型列表\n\n有关 LibCity 中所有复现模型的列表，请参阅 [文档](https:\u002F\u002Fbigscity-libcity-docs.readthedocs.io\u002Fen\u002Flatest\u002Fuser_guide\u002Fmodel.html)，您可以在其中查看模型的缩写及其对应的论文和引用信息。\n\n## 教程\n\n为了方便用户使用 LibCity，我们提供了一些教程：\n\n- 我们曾在 ACM SIGSPATIAL 2021 主会场和本地分会场发表讲座。相关讲座视频和幻灯片请参见我们的 [主页](https:\u002F\u002Flibcity.ai\u002F#\u002Ftutorial)（中文和英文版本）。\n- 我们在文档中提供了入门级教程（中文和英文版本）：\n  - [安装与快速入门](https:\u002F\u002Fbigscity-libcity-docs.readthedocs.io\u002Fen\u002Flatest\u002Ftutorial\u002Finstall_quick_start.html) & [安装和快速上手](https:\u002F\u002Fbigscity-libcity-docs.readthedocs.io\u002Fzh_CN\u002Flatest\u002Ftutorial\u002Finstall_quick_start.html)\n  - [在 LibCity 中运行现有模型](https:\u002F\u002Fbigscity-libcity-docs.readthedocs.io\u002Fen\u002Flatest\u002Ftutorial\u002Frun_model.html) & [运行LibCity中已复现的模型](https:\u002F\u002Fbigscity-libcity-docs.readthedocs.io\u002Fzh_CN\u002Flatest\u002Ftutorial\u002Frun_model.html)\n  - [向 LibCity 添加新模型](https:\u002F\u002Fbigscity-libcity-docs.readthedocs.io\u002Fen\u002Flatest\u002Ftutorial\u002Fadd_model.html) & [在LibCity中添加新模型](https:\u002F\u002Fbigscity-libcity-docs.readthedocs.io\u002Fzh_CN\u002Flatest\u002Ftutorial\u002Fadd_model.html)\n  - [使用自动化工具调参](https:\u002F\u002Fbigscity-libcity-docs.readthedocs.io\u002Fen\u002Flatest\u002Ftutorial\u002Fhyper_tune.html) & [使用自动化工具调参](https:\u002F\u002Fbigscity-libcity-docs.readthedocs.io\u002Fzh_CN\u002Flatest\u002Ftutorial\u002Fhyper_tune.html)\n  - [原子文件可视化](https:\u002F\u002Fbigscity-libcity-docs.readthedocs.io\u002Fen\u002Flatest\u002Ftutorial\u002Fdata_visualization.html) & [原子文件可视化](https:\u002F\u002Fbigscity-libcity-docs.readthedocs.io\u002Fzh_CN\u002Flatest\u002Ftutorial\u002Fdata_visualization.html)\n- 为了方便中国国内用户使用，我们在知乎上提供了入门教程（中文版本）：\n  - [LibCity：一个统一、全面、可扩展的交通预测算法库](https:\u002F\u002Fzhuanlan.zhihu.com\u002Fp\u002F401186930)\n  - [LibCity入门教程（1）——安装与快速上手](https:\u002F\u002Fzhuanlan.zhihu.com\u002Fp\u002F400814990)\n  - [LibCity入门教程（2）——运行LibCity中已复现的模型](https:\u002F\u002Fzhuanlan.zhihu.com\u002Fp\u002F400819354)\n  - [LibCity入门教程（3）——在LibCity中添加新模型](https:\u002F\u002Fzhuanlan.zhihu.com\u002Fp\u002F400821482)\n  - [LibCity入门教程（4）—— 自动化调参工具](https:\u002F\u002Fzhuanlan.zhihu.com\u002Fp\u002F401190615)\n  - [北航BIGSCity课题组提出LibCity工具库：城市时空预测深度学习开源平台](https:\u002F\u002Fzhuanlan.zhihu.com\u002Fp\u002F436191860)\n\n## 贡献\n\nLibCity 主要由北京航空航天大学智慧城市兴趣小组（[BIGSCITY](https:\u002F\u002Fwww.bigcity.ai\u002F)）开发和维护。该库的核心开发者是 [@aptx1231](https:\u002F\u002Fgithub.com\u002Faptx1231) 和 [@WenMellors](https:\u002F\u002Fgithub.com\u002FWenMellors)。\n\n此外，还有多位共同开发者参与了模型的复现工作，其贡献名单详见 [复现贡献列表](.\u002Fcontribution_list.md)。\n\n如果您遇到任何 bug 或有任何建议，请通过 [提交 issue](https:\u002F\u002Fgithub.com\u002FLibCity\u002FBigscity-LibCity\u002Fissues) 与我们联系。您也可以发送邮件至 bigscity@126.com 与我们取得联系。\n\n## 引用\n\n我们的论文已被 ACM SIGSPATIAL 2021 接受。如果您发现 LibCity 对您的研究或开发有所帮助，请引用我们的 [论文](https:\u002F\u002Fdl.acm.org\u002Fdoi\u002F10.1145\u002F3474717.3483923)。\n\n```\n@inproceedings{libcity,\n  author = {Wang, Jingyuan and Jiang, Jiawei and Jiang, Wenjun and Li, Chao and Zhao, Wayne Xin},\n  title = {LibCity: An Open Library for Traffic Prediction},\n  year = {2021},\n  isbn = {9781450386647},\n  publisher = {Association for Computing Machinery},\n  address = {New York, NY, USA},\n  url = {https:\u002F\u002Fdoi.org\u002F10.1145\u002F3474717.3483923},\n  doi = {10.1145\u002F3474717.3483923},\n  booktitle = {Proceedings of the 29th International Conference on Advances in Geographic Information Systems},\n  pages = {145–148},\n  numpages = {4},\n  keywords = {时空系统, 可复现性, 交通预测},\n  location = {北京, 中国},\n  series = {SIGSPATIAL '21}\n}\n```\n\n对于长文，请按如下方式引用：\n\n```\n@article{libcitylong,\n  title={LibCity: A Unified Library Towards Efficient and Comprehensive Urban Spatial-Temporal Prediction}, \n  author={Jiang, Jiawei and Han, Chengkai and Jiang, Wenjun and Zhao, Wayne Xin and Wang, Jingyuan},\n  journal={arXiv preprint arXiv:2304.14343},\n  year={2023}\n}\n```\n\n## 许可证\n\nLibCity 采用 [Apache License 2.0](https:\u002F\u002Fgithub.com\u002FLibCity\u002FBigscity-LibCity\u002Fblob\u002Fmaster\u002FLICENSE.txt) 许可协议。\n\n## 星标用户\n\n[![@LibCity\u002FBigscity-LibCity 的星标用户列表](https:\u002F\u002Freporoster.com\u002Fstars\u002FLibCity\u002FBigscity-LibCity)](https:\u002F\u002Fgithub.com\u002FLibCity\u002FBigscity-LibCity\u002Fstargazers)\n\n## 分叉用户\n\n[![@LibCity\u002FBigscity-LibCity 的分叉用户列表](https:\u002F\u002Freporoster.com\u002Fforks\u002FLibCity\u002FBigscity-LibCity)](https:\u002F\u002Fgithub.com\u002FLibCity\u002FBigscity-LibCity\u002Fnetwork\u002Fmembers)","# Bigscity-LibCity 快速上手指南\n\nLibCity（阡陌）是一个统一、综合且可扩展的交通预测开源库，基于 PyTorch 构建。它涵盖了从数据处理、模型构建到评估的完整流程，支持交通状态预测、轨迹预测、到达时间估计等 9 大类任务，复现了 70+ 种经典模型。\n\n## 环境准备\n\n在开始之前，请确保您的开发环境满足以下要求：\n\n*   **操作系统**: Linux 或 macOS (Windows 需配置相应环境)\n*   **Python**: 3.7 或更高版本\n*   **深度学习框架**: PyTorch 1.7.1 或更高版本\n*   **其他依赖**: Git, TensorBoard (用于可视化)\n\n建议创建独立的虚拟环境以避免依赖冲突：\n```bash\npython -m venv libcity_env\nsource libcity_env\u002Fbin\u002Factivate  # Windows 用户使用: libcity_env\\Scripts\\activate\n```\n\n## 安装步骤\n\nLibCity 目前仅支持源码安装。请执行以下命令克隆仓库并进入目录：\n\n```shell\ngit clone https:\u002F\u002Fgithub.com\u002FLibCity\u002FBigscity-LibCity\ncd Bigscity-LibCity\n```\n\n> **注意**：具体的 Python 依赖包安装请参考官方文档中的 `requirements.txt` 或通过 pip 安装相关依赖。如需详细的环境配置说明，请访问 [安装文档](https:\u002F\u002Fbigscity-libcity-docs.readthedocs.io\u002Fen\u002Flatest\u002Fget_started\u002Finstall.html)。\n\n## 基本使用\n\n### 1. 准备数据\n运行模型前，必须至少下载一个数据集并将其放置在 `.\u002Fraw_data\u002F` 目录下。LibCity 要求所有数据必须处理为标准的 **Atomic Files** 格式。\n\n*   **下载地址**:\n    *   百度网盘 (提取码: 1231): [点击跳转](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1qEfcXBO-QwZfiT0G3IYMpQ)\n    *   Google Drive: [点击跳转](https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F1g5v2Gq1tkOq8XO0HDCZ9nOTtRpB6-gPe?usp=sharing)\n*   **数据格式详情**: [Atomic Files 规范](https:\u002F\u002Fbigscity-libcity-docs.readthedocs.io\u002Fen\u002Flatest\u002Fuser_guide\u002Fdata\u002Fatomic_files.html)\n*   **任务 - 模型 - 数据集对应表**: [查看对应关系](https:\u002F\u002Fbigscity-libcity-docs.readthedocs.io\u002Fen\u002Flatest\u002Fuser_guide\u002Fdata\u002Fdataset_for_task.html)\n\n### 2. 运行模型\n使用 `run_model.py` 脚本即可启动训练和评估。运行时必须指定三个核心参数：**任务类型 (`--task`)**、**模型名称 (`--model`)** 和 **数据集名称 (`--dataset`)**。\n\n**示例命令**：\n以下命令将在 `METR_LA` 数据集上，使用 `GRU` 模型进行交通状态预测任务（使用默认配置）：\n\n```sh\npython run_model.py --task traffic_state_pred --model GRU --dataset METR_LA\n```\n\n### 3. 结果可视化\nLibCity 在训练过程中会自动记录每个 epoch 的 loss，并支持通过 TensorBoard 进行可视化。\n\n训练完成后，执行以下命令启动可视化服务：\n\n```shell\ntensorboard --logdir 'libcity\u002Fcache'\n```\n\n终端输出类似如下信息：\n```text\nTensorFlow installation not found - running with reduced feature set.\nServing TensorBoard on localhost; to expose to the network, use a proxy or pass --bind_all\nTensorBoard 2.4.1 at http:\u002F\u002Flocalhost:6006\u002F (Press CTRL+C to quit)\n```\n\n在浏览器中访问 `http:\u002F\u002Flocalhost:6006\u002F` 即可查看训练曲线和评估结果。\n\n---\n更多详细信息、完整模型列表及高级定制开发指南，请参阅 [LibCity 官方文档](https:\u002F\u002Fbigscity-libcity-docs.readthedocs.io\u002Fen\u002Flatest\u002Findex.html)。","某智慧城市交通研究院的研究团队正致力于开发一套高精度的城市短时交通流预测系统，以优化早晚高峰的信号灯配时策略。\n\n### 没有 Bigscity-LibCity 时\n- **重复造轮子效率低**：研究人员需手动编写数据加载、预处理及模型构建代码，每尝试一种新算法（如从 LSTM 切换到 Graph WaveNet）都需重构大量底层逻辑，耗时数周。\n- **实验结果难复现**：由于缺乏统一的数据存储标准和评估流程，不同成员编写的实验脚本接口不一，导致对比实验时指标口径混乱，难以验证论文结论。\n- **模型对比成本高**：想要公平比较 70 多种主流时空预测模型，需分别寻找各自的开源实现并适配不同数据集，环境配置冲突频发，极易出错。\n- **自定义扩展困难**：当需要融入特定的路网拓扑结构或新增事故预测任务时，现有零散代码库耦合度高，修改一处往往引发多处报错。\n\n### 使用 Bigscity-LibCity 后\n- **流水线式快速开发**：利用其统一的系统管道，团队只需配置参数即可调用内置的 74 种模型，将新模型的验证周期从数周缩短至数小时。\n- **标准化确保可信度**：通过内置的标准数据集接口和评估策略，所有实验自动采用一致的指标（如 MAE、RMSE），确保了实验结果的严格可复现性。\n- **一站式模型仓库**：直接在平台上调取已复现的交通流、速度及 OD 矩阵预测等 9 类任务模型，无需关心底层框架差异，轻松完成大规模横向对比。\n- **模块化灵活创新**：借助其模块化设计，研究人员像搭积木一样插入自定义的路网表示学习组件，快速实现了针对本地复杂路网的定制化预测模型。\n\nBigscity-LibCity 通过提供统一、全面且可扩展的实验框架，彻底解决了交通预测领域研发碎片化的难题，让研究者能专注于算法创新而非工程琐事。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLibCity_Bigscity-LibCity_2187bf6c.png","LibCity","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002FLibCity_76505da9.png",null,"https:\u002F\u002Flibcity.ai\u002F","https:\u002F\u002Fgithub.com\u002FLibCity",[78],{"name":79,"color":80,"percentage":81},"Python","#3572A5",100,1113,188,"2026-04-06T02:02:21","Apache-2.0",4,"未说明","基于 PyTorch，通常建议配备 NVIDIA GPU 以加速训练，具体型号、显存大小及 CUDA 版本未在 README 中明确说明（文档提到 M-LibCity 分支支持 GPU 和 NPU）",{"notes":90,"python":91,"dependencies":92},"该工具仅支持从源代码安装。运行前需手动下载数据集并放置于 .\u002Fraw_data\u002F 目录，且数据必须预处理为 LibCity 定义的原子文件（atomic files）格式。另有基于 MindSpore 的版本 M-LibCity 可用。","3.7+",[93,94],"Pytorch>=1.7.1","TensorBoard",[14],[97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116],"traffic","traffic-prediction","traffic-flow-prediction","traffic-speed-prediction","on-demand-service","trajectory-prediction","toolkit","deep-learning","spatio-temporal-prediction","spatio-temporal","pytorch-implementation","traffic-forecasting","map-matching","representation-learning","estimated-time-of-arrival","traffic-accident-prediction","od-matrix","time-series-prediction","eta","libcity","2026-03-27T02:49:30.150509","2026-04-07T04:10:03.130219",[120,125,130,135,140,145,150],{"id":121,"question_zh":122,"answer_zh":123,"source_url":124},20931,"如何使用已训练好的模型对新样本进行预测？","可以使用 `run_model.py` 脚本，设置参数 `--train false` 并指定 `--exp_id ID`（ID 为训练时生成的实验标识），以加载预训练模型并对新数据进行预测。如果需要预测未来时间段的数据（例如出租车需求），需修改对应的数据集文件（如 .grid 文件），添加新时间段的数据并将待预测的流量字段（如 departing_volume 和 arriving_volume）设为 0，最后通过调整 `test_rate` 参数来获取多步预测结果。","https:\u002F\u002Fgithub.com\u002FLibCity\u002FBigscity-LibCity\u002Fissues\u002F316",{"id":126,"question_zh":127,"answer_zh":128,"source_url":129},20932,"运行自动化调参（hyper_tune.py）时遇到 Redis 认证错误（AuthenticationError）怎么办？","该错误通常由 Ray 与 Redis 的密码配置冲突引起。如果确实需要进行自动调参且无法解决 Ray 的环境问题，建议使用替代方案：运行 `run_hyper.py` 脚本。该脚本基于 `hyperopt` 库实现，配置更简单，不依赖复杂的 Redis 服务，能有效避开此类环境报错。","https:\u002F\u002Fgithub.com\u002FLibCity\u002FBigscity-LibCity\u002Fissues\u002F276",{"id":131,"question_zh":132,"answer_zh":133,"source_url":134},20933,"运行模型时报错 'AttributeError: module ... has no attribute ...Dataset' 或类似导入错误如何解决？","此类错误通常是由于依赖包版本不兼容导致的。根据社区反馈，检查并调整 `gensim` 等关键依赖库的版本往往能解决问题。请确保您的虚拟环境中安装的库版本与项目要求一致，必要时尝试重新安装或降级\u002F升级特定包（如 gensim）。","https:\u002F\u002Fgithub.com\u002FLibCity\u002FBigscity-LibCity\u002Fissues\u002F342",{"id":136,"question_zh":137,"answer_zh":138,"source_url":139},20934,"为什么运行 DeepTTE 等轨迹估计模型时会显示“已杀死”（Killed）且内存充足？","这通常是因为使用的数据集不完整或格式不符合模型严格要求，导致程序异常终止。DeepTTE 等模型可能需要论文作者提供的完整数据集（如完整的成都或北京出租车数据），而不仅仅是仓库中的样本数据（Sample1）。建议联系原作者获取完整数据集链接（注意原链接可能已失效），或使用更全的数据进行尝试。","https:\u002F\u002Fgithub.com\u002FLibCity\u002FBigscity-LibCity\u002Fissues\u002F340",{"id":141,"question_zh":142,"answer_zh":143,"source_url":144},20935,"如何自定义或更换模型的损失函数（Loss Function）？","LibCity 允许用户自定义损失函数。您需要进入对应模型的文件（位于 `libcity\u002Fmodel\u002Ftraffic_prediction\u002F模型名.py` 中），找到损失函数的定义部分。默认可能使用 MSE 且未设置 masked 值为 0，您可以参考其他模型的实现，直接修改代码以更换损失函数或调整 mask 处理方式。","https:\u002F\u002Fgithub.com\u002FLibCity\u002FBigscity-LibCity\u002Fissues\u002F351",{"id":146,"question_zh":147,"answer_zh":148,"source_url":149},20936,"训练过程中的验证集（Validation Set）和测试集（Test Set）分别有什么作用？","验证集的作用是在训练过程中评估不同 epoch 的表现，用于辅助优化器（scheduler）调整学习率，并挑选出在验证集上表现最优的那个 epoch 作为最终模型保存的依据。测试集则仅在训练完全结束后使用一次，用于评估这个“最优 epoch”模型在未见数据上的最终性能，不参与训练过程中的参数选择。","https:\u002F\u002Fgithub.com\u002FLibCity\u002FBigscity-LibCity\u002Fissues\u002F350",{"id":151,"question_zh":152,"answer_zh":153,"source_url":154},20937,"使用 POI 数据集（如 Foursquare）进行轨迹预测时，准确率异常高或为 0 是什么原因？","这可能是由于对 POI 数据的经纬度处理方式理解有误。对于 POI 数据集，LibCity 假设签到（check-in）的 GPS 坐标位于 POI 附近，并利用这些 GPS 信息推算出了 POI 的具体经纬度坐标。数据处理逻辑位于独立的 `Bigscity-LibCity-Datasets` 仓库中（如 foursquare.py）。请确认您使用的数据预处理流程是否与官方一致，以确保评估指标的可比性。","https:\u002F\u002Fgithub.com\u002FLibCity\u002FBigscity-LibCity\u002Fissues\u002F330",[156,161,166],{"id":157,"version":158,"summary_zh":159,"released_at":160},126953,"v0.3","最新版本支持9类时空预测任务，涵盖60余种预测模型和近40个城市时空数据集。","2022-04-27T02:59:57",{"id":162,"version":163,"summary_zh":164,"released_at":165},126954,"v0.2","60款！","2021-11-23T15:53:54",{"id":167,"version":168,"summary_zh":74,"released_at":169},126955,"v0.1","2021-08-01T03:08:19"]