[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-ikergarcia1996--Self-Driving-Car-in-Video-Games":3,"tool-ikergarcia1996--Self-Driving-Car-in-Video-Games":64},[4,17,27,35,44,52],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":16},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,3,"2026-04-05T11:01:52",[13,14,15],"开发框架","图像","Agent","ready",{"id":18,"name":19,"github_repo":20,"description_zh":21,"stars":22,"difficulty_score":23,"last_commit_at":24,"category_tags":25,"status":16},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 真正成长为懂上",140436,2,"2026-04-05T23:32:43",[13,15,26],"语言模型",{"id":28,"name":29,"github_repo":30,"description_zh":31,"stars":32,"difficulty_score":23,"last_commit_at":33,"category_tags":34,"status":16},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 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107662,"2026-04-03T11:11:01",[13,14,15],{"id":36,"name":37,"github_repo":38,"description_zh":39,"stars":40,"difficulty_score":10,"last_commit_at":41,"category_tags":42,"status":16},4292,"Deep-Live-Cam","hacksider\u002FDeep-Live-Cam","Deep-Live-Cam 是一款专注于实时换脸与视频生成的开源工具，用户仅需一张静态照片，即可通过“一键操作”实现摄像头画面的即时变脸或制作深度伪造视频。它有效解决了传统换脸技术流程繁琐、对硬件配置要求极高以及难以实时预览的痛点，让高质量的数字内容创作变得触手可及。\n\n这款工具不仅适合开发者和技术研究人员探索算法边界，更因其极简的操作逻辑（仅需三步：选脸、选摄像头、启动），广泛适用于普通用户、内容创作者、设计师及直播主播。无论是为了动画角色定制、服装展示模特替换，还是制作趣味短视频和直播互动，Deep-Live-Cam 都能提供流畅的支持。\n\n其核心技术亮点在于强大的实时处理能力，支持口型遮罩（Mouth Mask）以保留使用者原始的嘴部动作，确保表情自然精准；同时具备“人脸映射”功能，可同时对画面中的多个主体应用不同面孔。此外，项目内置了严格的内容安全过滤机制，自动拦截涉及裸露、暴力等不当素材，并倡导用户在获得授权及明确标注的前提下合规使用，体现了技术发展与伦理责任的平衡。",88924,"2026-04-06T03:28:53",[13,14,15,43],"视频",{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":23,"last_commit_at":50,"category_tags":51,"status":16},3704,"NextChat","ChatGPTNextWeb\u002FNextChat","NextChat 是一款轻量且极速的 AI 助手，旨在为用户提供流畅、跨平台的大模型交互体验。它完美解决了用户在多设备间切换时难以保持对话连续性，以及面对众多 AI 模型不知如何统一管理的痛点。无论是日常办公、学习辅助还是创意激发，NextChat 都能让用户随时随地通过网页、iOS、Android、Windows、MacOS 或 Linux 端无缝接入智能服务。\n\n这款工具非常适合普通用户、学生、职场人士以及需要私有化部署的企业团队使用。对于开发者而言，它也提供了便捷的自托管方案，支持一键部署到 Vercel 或 Zeabur 等平台。\n\nNextChat 的核心亮点在于其广泛的模型兼容性，原生支持 Claude、DeepSeek、GPT-4 及 Gemini Pro 等主流大模型，让用户在一个界面即可自由切换不同 AI 能力。此外，它还率先支持 MCP（Model Context Protocol）协议，增强了上下文处理能力。针对企业用户，NextChat 提供专业版解决方案，具备品牌定制、细粒度权限控制、内部知识库整合及安全审计等功能，满足公司对数据隐私和个性化管理的高标准要求。",87618,"2026-04-05T07:20:52",[13,26],{"id":53,"name":54,"github_repo":55,"description_zh":56,"stars":57,"difficulty_score":23,"last_commit_at":58,"category_tags":59,"status":16},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",84991,"2026-04-05T10:45:23",[14,60,43,61,15,62,26,13,63],"数据工具","插件","其他","音频",{"id":65,"github_repo":66,"name":67,"description_en":68,"description_zh":69,"ai_summary_zh":69,"readme_en":70,"readme_zh":71,"quickstart_zh":72,"use_case_zh":73,"hero_image_url":74,"owner_login":75,"owner_name":76,"owner_avatar_url":77,"owner_bio":78,"owner_company":79,"owner_location":80,"owner_email":81,"owner_twitter":82,"owner_website":83,"owner_url":84,"languages":85,"stars":94,"forks":95,"last_commit_at":96,"license":97,"difficulty_score":98,"env_os":99,"env_gpu":100,"env_ram":101,"env_deps":102,"category_tags":116,"github_topics":117,"view_count":23,"oss_zip_url":131,"oss_zip_packed_at":131,"status":16,"created_at":132,"updated_at":133,"faqs":134,"releases":174},4133,"ikergarcia1996\u002FSelf-Driving-Car-in-Video-Games","Self-Driving-Car-in-Video-Games","A deep neural network that learns to drive in video games","Self-Driving-Car-in-Video-Games 是一个基于深度神经网络的开源项目，旨在让 AI 学会在电子游戏中自动驾驶。该项目核心目标是训练模型在《侠盗猎车手 V》（GTA V）中根据导航点快速抵达目的地，同时灵活避开其他车辆、行人及障碍物。\n\n它主要解决了传统自动驾驶算法在复杂动态环境中难以低成本获取大量训练数据的问题。通过“模仿学习”技术，项目记录了人类玩家的操作视频与按键数据，利用这些标注数据监督训练神经网络，使 AI 能够像人类一样驾驶。虽然以 GTA V 为主要场景，但其架构具备高度通用性，理论上可适配各类电子游戏。\n\n该项目特别适合对计算机视觉、强化学习感兴趣的研究人员，以及希望探索游戏 AI 或自动驾驶模拟的开发者使用。其技术亮点在于提供了名为\"T.E.D.D. 1104\"的预训练模型系列（参数量高达 1.38 亿），这些模型基于 130GB 的人类驾驶数据训练而成，支持晴天、雨天、昼夜等多种天气路况下的实时推理，并能在城市与高速场景中驾驭多种车型，为相关领域的实验与研究提供了宝贵的基准资源。","\u003Cp align=\"center\">\r\n    \u003Cbr>\r\n    \u003Cimg src=\"github_images\u002FTEDD1104.svg\" width=\"900\"\u002F>\r\n    \u003Cbr>\r\n    \u003Ca href=\"https:\u002F\u002Ftwitter.com\u002Fintent\u002Ftweet?text=Wow:&url=https%3A%2F%2Fgithub.com%2Fikergarcia1996%2FSelf-Driving-Car-in-Video-Games\">\u003Cimg alt=\"Twitter\" src=\"https:\u002F\u002Fimg.shields.io\u002Ftwitter\u002Furl?style=social&url=https%3A%2F%2Fgithub.com%2Fikergarcia1996%2FSelf-Driving-Car-in-Video-Games\">\u003C\u002Fa>\r\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fikergarcia1996\u002FSelf-Driving-Car-in-Video-Games\u002Fblob\u002Fmaster\u002FLICENSE\">\u003Cimg alt=\"GitHub license\" src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002Fikergarcia1996\u002FSelf-Driving-Car-in-Video-Games\">\u003C\u002Fa>\r\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fikergarcia1996\u002FSelf-Driving-Car-in-Video-Games\u002Fstargazers\">\u003Cimg alt=\"GitHub stars\" src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fikergarcia1996\u002FSelf-Driving-Car-in-Video-Games?color=yellow\">\u003C\u002Fa>\r\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fikergarcia1996\u002FSelf-Driving-Car-in-Video-Games\u002Fnetwork\">\u003Cimg alt=\"GitHub forks\" src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fforks\u002Fikergarcia1996\u002FSelf-Driving-Car-in-Video-Games\">\u003C\u002Fa>\r\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fikergarcia1996\u002FSelf-Driving-Car-in-Video-Games\u002Freleases\">\u003Cimg alt=\"GitHub release\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FRelease-5.1.0-green\">\u003C\u002Fa>\r\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fikergarcia1996\u002FSelf-Driving-Car-in-Video-Games\u002Freleases\">\u003Cimg alt=\"Pretrained Models\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPretrained Models-Available-green\">\u003C\u002Fa>\r\n    \u003Ca href=\"https:\u002F\u002Fikergarcia1996.github.io\u002FIker-Garcia-Ferrero\u002F\">\u003Cimg alt=\"Author\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FAuthor-Iker García Ferrero-ff69b4\">\u003C\u002Fa>\r\n    \u003Cbr>\r\n    \u003Cbr>\r\n\u003C\u002Fp>\r\n\r\nA supervised deep neural network that learns how to drive in video games. The main objective of this project is to \r\nachieve a model that can drive in Grand Theft Auto V. Given a waypoint, the model is expected to reach the destination as\r\nfast as possible avoiding other cars, humans and obstacles. \r\n\r\nThe model is trained using human labelled data. We record the game and key inputs of humans while they play the game, this data\r\nis used to train the model. \r\n\r\nWhile we focus on self-driving cars and the video game Grand Theft Auto V this model can be adapted to play any existing\r\nvideo game. \r\n\r\n\u003Ctable>\r\n\u003Ctr>\r\n\u003Ctd> \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fikergarcia1996_Self-Driving-Car-in-Video-Games_readme_2a09215dcd2a.gif\" alt=\"gotta go fast!\"\u002F> \u003C\u002Ftd>\r\n\u003Ctd> \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fikergarcia1996_Self-Driving-Car-in-Video-Games_readme_151b20b9f0c3.gif\" alt=\"gotta go fast2!\"\u002F> \u003C\u002Ftd>\r\n\u003C\u002Ftr>\r\n\u003C\u002Ftable>\r\n\r\n# Pretrained T.E.D.D. 1104 models\r\nWe provide pretrained T.E.D.D. 1104 models that you can use for real-time inference :)  \r\nThe models are trained using 130 GB of human labelled data.  \r\nThe model has been trained in first-person-view with a route to follow in the minimap.  \r\nThe model has learned to drive a large variety of vehicles in different weather conditions (Sun, night, sunny, rain...).  \r\nFor each model we provide the best and the last epoch.  \r\nSee [Software and HOW-TO Section](https:\u002F\u002Fgithub.com\u002Fikergarcia1996\u002FSelf-Driving-Car-in-Video-Games#software-and-how-to) for instructions on how run the models.\r\n\r\n### T.E.D.D. 1104 XXL: 138M Parameters. \r\nDownload link: [See the Releases Tab](https:\u002F\u002Fgithub.com\u002Fikergarcia1996\u002FSelf-Driving-Car-in-Video-Games\u002Freleases)  \r\nAccuracy in the test datasets:\r\n\r\n|         |              Time              |   Weather  | Micro-Acc K@1 | Micro-Acc k@3 | Macro-Acc K@1 |\r\n|---------|:------------------------------:|:----------:|:-------------:|:-------------:|:-------------:|\r\n| City    |         :sun_with_face:        |   :sunny:  |     53.2      |     84.4      |     46.2      |\r\n| City    |         :sun_with_face:        | :umbrella: |     51.4      |     83.4      |     46.3      |\r\n| City    | :first_quarter_moon_with_face: |   :sunny:  |     54.3      |     85.6      |     46.3      |\r\n| City    | :first_quarter_moon_with_face: | :umbrella: |     47.3      |     82.3      |     49.9      |\r\n| Highway |         :sun_with_face:        |   :sunny:  |     72.7      |     97.7      |     40.6      |\r\n| Highway |         :sun_with_face:        | :umbrella: |     70.6      |     99.3      |     39.6      |\r\n| Highway | :first_quarter_moon_with_face: |   :sunny:  |     77.9      |     99.3      |     45.7      |\r\n| Highway | :first_quarter_moon_with_face: | :umbrella: |     70.9      |     97.6      |     30.8      |\r\n\r\n### T.E.D.D. 1104 M: 68M Parameters.\r\nDownload link: [See the Releases Tab](https:\u002F\u002Fgithub.com\u002Fikergarcia1996\u002FSelf-Driving-Car-in-Video-Games\u002Freleases)  \r\nAccuracy in the test datasets:\r\n\r\n|         |              Time              |   Weather  | Micro-Acc K@1 | Micro-Acc k@3 | Macro-Acc K@1 |\r\n|---------|:------------------------------:|:----------:|:-------------:|:-------------:|:-------------:|\r\n| City    |         :sun_with_face:        |   :sunny:  |     52.9      |     84.1      |     43.1      |\r\n| City    |         :sun_with_face:        | :umbrella: |     49.9      |     81.3      |     42.2      |\r\n| City    | :first_quarter_moon_with_face: |   :sunny:  |     54.7      |     85.1      |     48.4      |\r\n| City    | :first_quarter_moon_with_face: | :umbrella: |     49.5      |     81.1      |     41.1      |\r\n| Highway |         :sun_with_face:        |   :sunny:  |     62.5      |     99.2      |     43.1      |\r\n| Highway |         :sun_with_face:        | :umbrella: |     71.9      |     99.3      |     39.2      |\r\n| Highway | :first_quarter_moon_with_face: |   :sunny:  |     79.4      |     99.3      |     45.3      |\r\n| Highway | :first_quarter_moon_with_face: | :umbrella: |     63.0      |     97.2      |     47.2      |\r\n###  T.E.D.D. 1104 S: 26M Parameters.\r\nDownload link: [See the Releases Tab](https:\u002F\u002Fgithub.com\u002Fikergarcia1996\u002FSelf-Driving-Car-in-Video-Games\u002Freleases)  \r\nAccuracy in the test datasets:\r\n\r\n|         |              Time              |   Weather  | Micro-Acc K@1 | Micro-Acc k@3 | Macro-Acc K@1 |\r\n|---------|:------------------------------:|:----------:|:-------------:|:-------------:|:-------------:|\r\n| City    |         :sun_with_face:        |   :sunny:  |     51.0      |     83.0      |     46.3      |\r\n| City    |         :sun_with_face:        | :umbrella: |     49.0      |     82.5      |     45.2      |\r\n| City    | :first_quarter_moon_with_face: |   :sunny:  |     56.3      |     86.6      |     49.0      |\r\n| City    | :first_quarter_moon_with_face: | :umbrella: |     49.4      |     81.4      |     42.5      |\r\n| Highway |         :sun_with_face:        |   :sunny:  |     70.3      |      100      |     68.5      |\r\n| Highway |         :sun_with_face:        | :umbrella: |     71.2      |      100      |     37.6      |\r\n| Highway | :first_quarter_moon_with_face: |   :sunny:  |     80.9      |      100      |     49.1      |\r\n| Highway | :first_quarter_moon_with_face: | :umbrella: |     69.3      |      100      |     61.1      |\r\n\r\n# Datasets\r\nWe provide train\u002Fdev\u002Ftest datasets for training and evaluating T.E.D.D 1107 models:\r\n- Train Dataset (~130Gb): Coming soon... \r\n- Dev Dataset (~495Mb): [Download Dev+Test datasets](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1SutVGsQKg0mDUkfGML1nBboLWi5e5_4E\u002Fview?usp=sharing).\r\n- Test Dataset (~539Mb): [Download Dev+Test datasets](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1SutVGsQKg0mDUkfGML1nBboLWi5e5_4E\u002Fview?usp=sharing).\r\n\r\n\r\n##  Architecture\r\n\r\nT.E.D.D. 1104 is an End-To-End model. We approach the task as a classification task. \r\nThe input of the model is a sequence of 5 images, each image has been recorded with a 0.1s interval. \r\nThe outputs are the correct keys on the keyboard to press. Alternatively T.E.D.D. 1104 can also be trained with a regression objective using Xbox controller inputs. \r\n\r\n\u003Cp align=\"center\">\r\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fikergarcia1996_Self-Driving-Car-in-Video-Games_readme_b1ade1e10dc4.png\" alt=\"The brain!\"\u002F>\r\n\u003C\u002Fp>\r\n\r\nThe model consists of three modules:\r\nFirst, a **Convolutional Neural Network** that encodes each input image in a feature \r\nvector. We use EfficientNetV2 [arXiv:2104.00298](https:\u002F\u002Farxiv.org\u002Fabs\u002F2104.00298).\r\nWe use a **transformer encoder** (https:\u002F\u002Farxiv.org\u002Fabs\u002F1706.03762) to generate bidirectional joint distributions over the feature vector\r\nsequence. Finally, we use the [CLS] token to predict the key combination. \r\n\r\nThe model has been implemented using Pytorch: https:\u002F\u002Fpytorch.org\u002F and PyTorch Lightning: https:\u002F\u002Fwww.pytorchlightning.ai\u002F\r\n\r\n# Software and HOW-TO\r\nThis repository contains all the files need for generating the training data, training the model and using the model to \r\ndrive in the video game (Real-Time Inference). The software has been written in Python 3. You can train a model in any OS. \r\nData generation and inference only work in Windows 10\u002F11 which are the only OS supported by most video games. \r\n\r\n## Requirements\r\nYou can train and evaluate models on any Operating System (We use Linux for training).  \r\nRunning real time inference (Let TEDD1104 drive in GTAV) requires Windows 10\u002F11.\r\n```\r\nPython 3.7 or newer (3.9.7 tested)\r\nPytorch (1.12.0 or newer)\r\nTorchvision (>=0.13.0 and \u003C 0.15.0. Compatibility with torchvision >=0.15.0 will be added in a future release)\r\nPyTorch Lightning (1.6.0 or newer)\r\ntorchmetrics\r\nscikit-image\r\nnumpy\r\nPIL\u002FPillow\r\ncv2 (opencv-python)\r\ntkinter\r\ntabulate\r\nfairseq (If you want to train a model using AdaFactor)\r\nwandb or tensorboard for training (Set \"--report_to\" accordingly)\r\nwin32api (PythonWin) - Only required for running real time inference (Let TEDD play the game)\r\n                       Should be installed by default in newest Python versions for Windows. \r\n\r\n\r\npygame - Only required if you wish to generate data using a Xbox Controller\r\nPYXInput - Only required if you wish to use a Vitual Xbox Controller as game controller instead of the keyboard. \r\n           See controller\\README.md for installation instructions. \r\n```\r\n\r\n## Run Inference \r\nHow to use a pretrained T.E.E.D. 1104 model to drive in GTAV\r\n\r\n### Configure the game\r\nYou can run the game in \"windowed mode\" or \"full screen\" mode. \r\nIf you want to run the game in \"windowed mode\":\r\n- Run GTAV and set your game to windowed mode.\r\n- Set the desired game resolution (i.e 1600x900 resolution).\r\n- Move the game window to the top left corner.\r\n- Run the script with the \"--width 1600\" and \"--height 900\" parameters.\r\n\r\n\u003Cp align=\"center\">\r\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fikergarcia1996_Self-Driving-Car-in-Video-Games_readme_e2d1884b61f0.png\" alt=\"Setup Example\"\u002F>\r\n\u003C\u002Fp>\r\n  \r\n\r\nIf you want to run the game in \"full screen\" mode:\r\n- Run GTAV **in your main screen** (The one labelled as screen nº1) and set your game to full-screen mode.\r\n- Configure the game resolution with the resolution of your screen (i.e 2560x1440 resolution).\r\n- Run the script with the \"--width 2560\", \"--height 1440\" and \"--full_screen\" parameters.\r\n\r\n\u003Cp align=\"center\">\r\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fikergarcia1996_Self-Driving-Car-in-Video-Games_readme_cb2020d2fea9.png\" alt=\"Setup Example Full Screen\"\u002F>\r\n\u003C\u002Fp>\r\n\r\nIn addition, if you want to run the pretrained models that we provide you must:\r\n- Set the Settings>Camera>First person Vehicle Hood to \"On\"\r\n- Change the camera to first-person-view (Push \"V\")\r\n- Set a waypoint in the minimap\r\n\r\n\u003Cp align=\"center\">\r\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fikergarcia1996_Self-Driving-Car-in-Video-Games_readme_a8bbd2fbab36.jpg\" alt=\"Setup Example\"\u002F>\r\n\u003C\u002Fp>\r\n\r\n\r\n### Run a Model\r\n\r\nUse the *run_TEDD1104.py* script to run a model for real-time inference. See \"run_TEDD1104.py -h\" to get a description of all the available parameters. \r\n\r\n```\r\npython run_TEDD1104.py \\\r\n--checkpoint_path \"models\\TEDD1107_model.ckpt\" \\\r\n--width 1920 \\\r\n--height 1080 \\\r\n--num_parallel_sequences 5 \\\r\n--control_mode keyboard\r\n```\r\nnum_parallel_sequences: number of parallel sequences to record, if the number is higher the model will do more \r\niterations per second (will push keys more often) provided your GPU is fast enough. This improves the performance of the \r\nmodel but increases the CPU and RAM usage. \r\n\r\ncontrol_mode: Choose between keyboard and controller (Xbox Controller). It doesn't matter how the model has been trained, \r\nthe output of the model will be converted to the desired control_mode. \r\n\r\nIf the model does not perform as expected (It doesn't seem to do anything or always chooses the same action) you can \r\npush \"L\" while the script is running to verify the input images. \r\n\r\n## Train your own model\r\n### Self Driving Model\r\n\r\nUse the *train.py* script to train a new model from scratch or continue training a model. \r\nSee \"train.py -h\" to get a description of all the available parameters. \r\nSee the [training_scripts](\u002Ftraining_scripts) folder to see the training commands that we used\r\nto train the released models. \r\n\r\n\r\nExample command:\r\n```sh\r\npython3 train.py --train_new \\\r\n  --train_dir dataset\u002Ftrain \\\r\n  --val_dir  dataset\u002Fdev \\\r\n  --output_dir runs\u002FTEDD1104-base \\\r\n  --encoder_type transformer \\\r\n  --batch_size 16 \\\r\n  --accumulation_steps 4 \\\r\n  --max_epochs 12 \\\r\n  --cnn_model_name efficientnet_b4 \\\r\n  --num_layers_encoder 4 \\\r\n  --mask_prob 0.2 \\\r\n  --dropout_cnn_out 0.3 \\\r\n  --dropout_encoder 0.1 \\\r\n  --dropout_encoder_features 0.3 \\\r\n  --control_mode keyboard \\\r\n  --dataloader_num_workers 32 \\\r\n  --val_check_interval 0.5 \r\n```\r\n\r\nYou can continue training a model using the \"--continue_training\" flag \r\n```sh\r\npython3 train.py --continue_training \\\r\n  --checkpoint_path runs\u002FTEDD1104-base\u002Fmodel.ckpt \\\r\n  --train_dir dataset\u002Ftrain \\\r\n  --val_dir  dataset\u002Fdev \\\r\n  --output_dir runs\u002FTEDD1104-base \\\r\n  --batch_size 16 \\\r\n  --accumulation_steps 4 \\\r\n  --max_epochs 24 \\\r\n  --cnn_model_name efficientnet_b4 \\\r\n  --dataloader_num_workers 32 \\\r\n  --val_check_interval 0.5 \r\n```\r\n\r\n#### Evaluate model:\r\nUse the eval.py script to evaluate a model in the test dataset.\r\n```sh\r\npython3 eval.py \\\r\n  --checkpoint_path models\u002Ftedd_1104_S\u002Fepoch=4-step=198544.ckpt \\\r\n  --batch_size 32 \\\r\n  --test_dirs \\\r\n   \u002Fdata\u002Fgtaai_datasets\u002Fdev \\\r\n   \u002Fdata\u002Fgtaai_datasets\u002Ftest\u002Fcar_city_day_clear \\\r\n   \u002Fdata\u002Fgtaai_datasets\u002Ftest\u002Fcar_city_day_rain \\\r\n   \u002Fdata\u002Fgtaai_datasets\u002Ftest\u002Fcar_city_night_clear \\\r\n   \u002Fdata\u002Fgtaai_datasets\u002Ftest\u002Fcar_city_night_rain \\\r\n   \u002Fdata\u002Fgtaai_datasets\u002Ftest\u002Fcar_highway_day_clear \\\r\n   \u002Fdata\u002Fgtaai_datasets\u002Ftest\u002Fcar_highway_day_rain \\\r\n   \u002Fdata\u002Fgtaai_datasets\u002Ftest\u002Fcar_highway_night_clear \\\r\n   \u002Fdata\u002Fgtaai_datasets\u002Ftest\u002Fcar_highway_night_rain \\\r\n  --output_path results\u002Ftedd_1104_S.tsv\r\n```\r\n\r\n### Image Reordering Model\r\nAn experimental unsupervised pretraining objective. We shuffle the order of the input sequence and the model must \r\npredict the correct order of the input images. See \"train_reorder.py -h\" to get a description of all the available parameters.\r\nThis script is almost identical to the self-driving script, except it only supports transformer encoder models and doesn't\r\nhave a 'control_mode' parameter. Refer to the [previous section](#self-driving-model) for training\u002Feval details. \r\nAfter training with the image reordering objective you can finetune the model in the Self-Driving objective. \r\n\r\n```sh\r\npython3 train.py \\\r\n--new_model \\\r\n--checkpoint_path models\u002Fimage_reordering.ckpt \\\r\n...\r\n```\r\n\r\nUse the eval_reorder.py script to evaluate an image reordering model in the test dataset.\r\n\r\n\r\n## Generate Data\r\n\r\nUse the *generate_data.py* script to generate new data for training or evaluation. See Use \"run_TEDD1104.py -h\" to get a description of all the available parameters.\r\nConfigure the game following [The Configure the game section](#configure-the-game). \r\n```\r\npython generate_data.py \\\r\n--save_dir \"dataset\u002Ftrain\" \\\r\n--width 1920 \\\r\n--height 1080 \\\r\n--control_mode keyboard\r\n```\r\n\r\nIf control_mode is set to \"keyboard\" we will record the state of the \"WASD\" keys. If control_mode is set to \"controller\"\r\nwe will record the state of the first Xbox Controller that Pygame can detect. \r\nTo avoid generating a huge unbalanced dataset the script will try to balance the data while recording. The more examples\r\nof a given class recorded the lower the probability of recording a new example of that class. If you want \r\nto disable this behaviour use the \"--save_everything\" flag. \r\n\r\n\r\n## Citation:\r\n```\r\n@misc{TEDD1104,\r\n  author = {\"Garc{\\'\\i}a-Ferrero, Iker},\r\n  title = {TEDD1104: Self Driving Car in Video Games},\r\n  year = {2022},\r\n  publisher = {GitHub},\r\n  journal = {GitHub repository},\r\n  howpublished = {\\url{https:\u002F\u002Fgithub.com\u002Fikergarcia1996\u002FSelf-Driving-Car-in-Video-Games}},\r\n}\r\n```\r\n\r\nAuthor: **Iker García-Ferrero**:  \r\n- [My Webpage](https:\u002F\u002Fikergarcia1996.github.io\u002FIker-Garcia-Ferrero\u002F)  \r\n- [Twitter](https:\u002F\u002Ftwitter.com\u002Fiker_garciaf)\r\n\r\n","\u003Cp align=\"center\">\n    \u003Cbr>\n    \u003Cimg src=\"github_images\u002FTEDD1104.svg\" width=\"900\"\u002F>\n    \u003Cbr>\n    \u003Ca href=\"https:\u002F\u002Ftwitter.com\u002Fintent\u002Ftweet?text=Wow:&url=https%3A%2F%2Fgithub.com%2Fikergarcia1996%2FSelf-Driving-Car-in-Video-Games\">\u003Cimg alt=\"Twitter\" src=\"https:\u002F\u002Fimg.shields.io\u002Ftwitter\u002Furl?style=social&url=https%3A%2F%2Fgithub.com%2Fikergarcia1996%2FSelf-Driving-Car-in-Video-Games\">\u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fikergarcia1996\u002FSelf-Driving-Car-in-Video-Games\u002Fblob\u002Fmaster\u002FLICENSE\">\u003Cimg alt=\"GitHub license\" src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002Fikergarcia1996\u002FSelf-Driving-Car-in-Video-Games\">\u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fikergarcia1996\u002FSelf-Driving-Car-in-Video-Games\u002Fstargazers\">\u003Cimg alt=\"GitHub stars\" src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fikergarcia1996\u002FSelf-Driving-Car-in-Video-Games?color=yellow\">\u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fikergarcia1996\u002FSelf-Driving-Car-in-Video-Games\u002Fnetwork\">\u003Cimg alt=\"GitHub forks\" src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fforks\u002Fikergarcia1996\u002FSelf-Driving-Car-in-Video-Games\">\u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fikergarcia1996\u002FSelf-Driving-Car-in-Video-Games\u002Freleases\">\u003Cimg alt=\"GitHub release\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FRelease-5.1.0-green\">\u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fikergarcia1996\u002FSelf-Driving-Car-in-Video-Games\u002Freleases\">\u003Cimg alt=\"Pretrained Models\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPretrained Models-Available-green\">\u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fikergarcia1996.github.io\u002FIker-Garcia-Ferrero\u002F\">\u003Cimg alt=\"Author\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FAuthor-Iker García Ferrero-ff69b4\">\u003C\u002Fa>\n    \u003Cbr>\n    \u003Cbr>\n\u003C\u002Fp>\n\n这是一座通过监督学习训练的深度神经网络，旨在学会在视频游戏中驾驶。该项目的主要目标是开发出一款能够在《侠盗猎车手V》中自主驾驶的模型。给定一个航点，该模型应尽可能快速地到达目的地，同时避开其他车辆、行人及障碍物。\n\n该模型使用人工标注的数据进行训练。我们在玩家游玩游戏时记录下游戏画面和按键输入，并利用这些数据来训练模型。\n\n尽管我们的重点是自动驾驶汽车以及《侠盗猎车手V》这款游戏，但该模型同样可以被调整以适用于任何现有的视频游戏。\n\n\u003Ctable>\n\u003Ctr>\n\u003Ctd> \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fikergarcia1996_Self-Driving-Car-in-Video-Games_readme_2a09215dcd2a.gif\" alt=\"gotta go fast!\"\u002F> \u003C\u002Ftd>\n\u003Ctd> \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fikergarcia1996_Self-Driving-Car-in-Video-Games_readme_151b20b9f0c3.gif\" alt=\"gotta go fast2!\"\u002F> \u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftable>\n\n# 预训练的T.E.D.D. 1104模型\n我们提供了可用于实时推理的预训练T.E.D.D. 1104模型 :)  \n这些模型基于130 GB的人工标注数据进行训练。  \n模型以第一人称视角进行训练，并配备了小地图上的行驶路线。  \n它已经学会了在各种天气条件下（晴天、夜晚、多云、雨天等）驾驶多种类型的车辆。  \n对于每个模型，我们都提供了最佳和最后的训练轮次。  \n有关如何运行这些模型的说明，请参阅[软件与操作指南部分](https:\u002F\u002Fgithub.com\u002Fikergarcia1996\u002FSelf-Driving-Car-in-Video-Games#software-and-how-to)。\n\n### T.E.D.D. 1104 XXL：1.38亿参数。\n下载链接：[请查看发布页面](https:\u002F\u002Fgithub.com\u002Fikergarcia1996\u002FSelf-Driving-Car-in-Video-Games\u002Freleases)  \n测试数据集中的准确率：\n\n|         |              时间              |   天气  | 微观准确率K@1 | 微观准确率k@3 | 宏观准确率K@1 |\n|---------|:------------------------------:|:----------:|:-------------:|:-------------:|:-------------:|\n| 城市    |         :sun_with_face:        |   :sunny:  |     53.2      |     84.4      |     46.2      |\n| 城市    |         :sun_with_face:        | :umbrella: |     51.4      |     83.4      |     46.3      |\n| 城市    | :first_quarter_moon_with_face: |   :sunny:  |     54.3      |     85.6      |     46.3      |\n| 城市    | :first_quarter_moon_with_face: | :umbrella: |     47.3      |     82.3      |     49.9      |\n| 高速公路 |         :sun_with_face:        |   :sunny:  |     72.7      |     97.7      |     40.6      |\n| 高速公路 |         :sun_with_face:        | :umbrella: |     70.6      |     99.3      |     39.6      |\n| 高速公路 | :first_quarter_moon_with_face: |   :sunny:  |     77.9      |     99.3      |     45.7      |\n| 高速公路 | :first_quarter_moon_with_face: | :umbrella: |     70.9      |     97.6      |     30.8      |\n\n### T.E.D.D. 1104 M：6800万参数。\n下载链接：[请查看发布页面](https:\u002F\u002Fgithub.com\u002Fikergarcia1996\u002FSelf-Driving-Car-in-Video-Games\u002Freleases)  \n测试数据集中的准确率：\n\n|         |              时间              |   天气  | 微观准确率K@1 | 微观准确率k@3 | 宏观准确率K@1 |\n|---------|:------------------------------:|:----------:|:-------------:|:-------------:|:-------------:|\n| 城市    |         :sun_with_face:        |   :sunny:  |     52.9      |     84.1      |     43.1      |\n| 城市    |         :sun_with_face:        | :umbrella: |     49.9      |     81.3      |     42.2      |\n| 城市    | :first_quarter_moon_with_face: |   :sunny:  |     54.7      |     85.1      |     48.4      |\n| 城市    | :first_quarter_moon_with_face: | :umbrella: |     49.5      |     81.1      |     41.1      |\n| 高速公路 |         :sun_with_face:        |   :sunny:  |     62.5      |     99.2      |     43.1      |\n| 高速公路 |         :sun_with_face:        | :umbrella: |     71.9      |     99.3      |     39.2      |\n| 高速公路 | :first_quarter_moon_with_face: |   :sunny:  |     79.4      |     99.3      |     45.3      |\n| 高速公路 | :first_quarter_moon_with_face: | :umbrella: |     63.0      |     97.2      |     47.2      |\n\n### T.E.D.D. 1104 S：2600万参数。\n下载链接：[请查看发布页面](https:\u002F\u002Fgithub.com\u002Fikergarcia1996\u002FSelf-Driving-Car-in-Video-Games\u002Freleases)  \n测试数据集中的准确率：\n\n|         |              时间              |   天气  | 微观准确率K@1 | 微观准确率k@3 | 宏观准确率K@1 |\n|---------|:------------------------------:|:----------:|:-------------:|:-------------:|:-------------:|\n| 城市    |         :sun_with_face:        |   :sunny:  |     51.0      |     83.0      |     46.3      |\n| 城市    |         :sun_with_face:        | :umbrella: |     49.0      |     82.5      |     45.2      |\n| 城市    | :first_quarter_moon_with_face: |   :sunny:  |     56.3      |     86.6      |     49.0      |\n| 城市    | :first_quarter_moon_with_face: | :umbrella: |     49.4      |     81.4      |     42.5      |\n| 高速公路 |         :sun_with_face:        |   :sunny:  |     70.3      |      100      |     68.5      |\n| 高速公路 |         :sun_with_face:        | :umbrella: |     71.2      |      100      |     37.6      |\n| 高速公路 | :first_quarter_moon_with_face: |   :sunny:  |     80.9      |      100      |     49.1      |\n| 高速公路 | :first_quarter_moon_with_face: | :umbrella: |     69.3      |      100      |     61.1      |\n\n# 数据集\n我们提供了用于训练和评估 T.E.D.D 1107 模型的训练\u002F验证\u002F测试数据集：\n- 训练数据集（约 130GB）：即将发布...\n- 验证数据集（约 495MB）：[下载验证+测试数据集](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1SutVGsQKg0mDUkfGML1nBboLWi5e5_4E\u002Fview?usp=sharing)。\n- 测试数据集（约 539MB）：[下载验证+测试数据集](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1SutVGsQKg0mDUkfGML1nBboLWi5e5_4E\u002Fview?usp=sharing)。\n\n\n## 架构\n\nT.E.D.D. 1104 是一个端到端模型。我们将任务视为分类问题。  \n模型的输入是一序列 5 张图像，每张图像以 0.1 秒的间隔拍摄。  \n输出是需要在键盘上按下的正确按键。此外，T.E.D.D. 1104 也可以使用 Xbox 手柄输入作为回归目标进行训练。\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fikergarcia1996_Self-Driving-Car-in-Video-Games_readme_b1ade1e10dc4.png\" alt=\"大脑！\"\u002F>\n\u003C\u002Fp>\n\n该模型由三个模块组成：\n首先，一个**卷积神经网络**将每张输入图像编码为特征向量。我们使用 EfficientNetV2 [arXiv:2104.00298](https:\u002F\u002Farxiv.org\u002Fabs\u002F2104.00298)。\n然后，我们使用 **Transformer 编码器**（https:\u002F\u002Farxiv.org\u002Fabs\u002F1706.03762）生成特征向量序列上的双向联合分布。最后，我们利用 [CLS] 标记来预测按键组合。\n\n该模型使用 PyTorch：https:\u002F\u002Fpytorch.org\u002F 和 PyTorch Lightning：https:\u002F\u002Fwww.pytorchlightning.ai\u002F 实现。\n\n# 软件与操作指南\n本仓库包含生成训练数据、训练模型以及使用模型在视频游戏中驾驶（实时推理）所需的所有文件。软件采用 Python 3 编写。您可以在任何操作系统上训练模型。然而，数据生成和推理仅支持 Windows 10\u002F11，因为大多数视频游戏仅支持这些操作系统。\n\n## 环境要求\n您可以在任何操作系统上训练和评估模型（我们使用 Linux 进行训练）。  \n但要运行实时推理（让 TEDD1104 在 GTAV 中驾驶），则必须使用 Windows 10\u002F11。\n```\nPython 3.7 或更高版本（已测试 3.9.7）\nPyTorch（1.12.0 或更高版本）\nTorchvision（>=0.13.0 且 \u003C 0.15.0。未来版本将支持 torchvision >=0.15.0）\nPyTorch Lightning（1.6.0 或更高版本）\ntorchmetrics\nscikit-image\nnumpy\nPIL\u002FPillow\ncv2（opencv-python）\ntkinter\ntabulate\nfairseq（若使用 AdaFactor 训练模型）\nwandb 或 tensorboard 用于训练（请相应设置 \"--report_to\" 参数）\nwin32api（PythonWin）——仅在运行实时推理时需要（让 TEDD 玩游戏）。\n                       最新版本的 Windows Python 安装包中通常已包含此库。\n\n\npygame ——仅在使用 Xbox 手柄生成数据时需要\nPYXInput ——仅在使用虚拟 Xbox 手柄代替键盘作为游戏控制器时需要。\n           请参阅 controller\\README.md 获取安装说明。\n``` \n\n## 运行推理\n如何使用预训练的 T.E.E.D. 1104 模型在 GTAV 中驾驶\n\n### 游戏配置\n您可以选择“窗口模式”或“全屏模式”运行游戏。  \n如果想使用“窗口模式”：\n- 启动 GTAV 并将其设置为窗口模式。\n- 设置所需的游戏分辨率（如 1600x900）。\n- 将游戏窗口移动到屏幕左上角。\n- 使用 `--width 1600` 和 `--height 900` 参数运行脚本。\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fikergarcia1996_Self-Driving-Car-in-Video-Games_readme_e2d1884b61f0.png\" alt=\"配置示例\"\u002F>\n\u003C\u002Fp>\n  \n\n如果想使用“全屏模式”：\n- 在您的主显示器（标记为屏幕 nº1 的显示器）上启动 GTAV，并将其设置为全屏模式。\n- 将游戏分辨率调整为与您的屏幕分辨率一致（如 2560x1440）。\n- 使用 `--width 2560`、`--height 1440` 和 `--full_screen` 参数运行脚本。\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fikergarcia1996_Self-Driving-Car-in-Video-Games_readme_cb2020d2fea9.png\" alt=\"全屏配置示例\"\u002F>\n\u003C\u002Fp>\n\n此外，如果您想运行我们提供的预训练模型，还需：\n- 将设置 > 摄像头 > 第一人称车辆引擎盖设置为“开启”。\n- 切换到第一人称视角（按下 “V” 键）。\n- 在小地图上设置一个航点。\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fikergarcia1996_Self-Driving-Car-in-Video-Games_readme_a8bbd2fbab36.jpg\" alt=\"附加配置示例\"\u002F>\n\u003C\u002Fp>\n\n\n### 运行模型\n\n使用 `run_TEDD1104.py` 脚本运行模型进行实时推理。可执行 `run_TEDD1104.py -h` 查看所有可用参数的说明。\n\n```bash\npython run_TEDD1104.py \\\n--checkpoint_path \"models\\TEDD1107_model.ckpt\" \\\n--width 1920 \\\n--height 1080 \\\n--num_parallel_sequences 5 \\\n--control_mode keyboard\n```\n\n`num_parallel_sequences`：记录的并行序列数量。数值越高，模型每秒执行的迭代次数越多（按键频率更高），前提是您的 GPU 性能足够。这会提升模型表现，但也会增加 CPU 和内存的占用。\n\n`control_mode`：选择键盘或手柄（Xbox 手柄）控制方式。无论模型是如何训练的，其输出都会转换为所选的控制模式。\n\n如果模型表现异常（似乎没有反应或总是选择同一动作），您可以在脚本运行时按下 “L” 键来检查输入图像。\n\n## 训练您自己的模型\n\n### 自动驾驶模型\n\n使用 `train.py` 脚本可以从头开始训练新模型，或继续训练现有模型。运行 `train.py -h` 可查看所有可用参数的说明。请参阅 [training_scripts](\u002Ftraining_scripts) 文件夹，了解我们用于训练已发布模型的训练命令。\n\n示例命令：\n```sh\npython3 train.py --train_new \\\n  --train_dir dataset\u002Ftrain \\\n  --val_dir  dataset\u002Fdev \\\n  --output_dir runs\u002FTEDD1104-base \\\n  --encoder_type transformer \\\n  --batch_size 16 \\\n  --accumulation_steps 4 \\\n  --max_epochs 12 \\\n  --cnn_model_name efficientnet_b4 \\\n  --num_layers_encoder 4 \\\n  --mask_prob 0.2 \\\n  --dropout_cnn_out 0.3 \\\n  --dropout_encoder 0.1 \\\n  --dropout_encoder_features 0.3 \\\n  --control_mode keyboard \\\n  --dataloader_num_workers 32 \\\n  --val_check_interval 0.5 \n```\n\n您可以通过 `--continue_training` 标志继续训练模型：\n```sh\npython3 train.py --continue_training \\\n  --checkpoint_path runs\u002FTEDD1104-base\u002Fmodel.ckpt \\\n  --train_dir dataset\u002Ftrain \\\n  --val_dir  dataset\u002Fdev \\\n  --output_dir runs\u002FTEDD1104-base \\\n  --batch_size 16 \\\n  --accumulation_steps 4 \\\n  --max_epochs 24 \\\n  --cnn_model_name efficientnet_b4 \\\n  --dataloader_num_workers 32 \\\n  --val_check_interval 0.5 \n```\n\n#### 模型评估：\n使用 `eval.py` 脚本可以在测试数据集上评估模型。\n```sh\npython3 eval.py \\\n  --checkpoint_path models\u002Ftedd_1104_S\u002Fepoch=4-step=198544.ckpt \\\n  --batch_size 32 \\\n  --test_dirs \\\n   \u002Fdata\u002Fgtaai_datasets\u002Fdev \\\n   \u002Fdata\u002Fgtaai_datasets\u002Ftest\u002Fcar_city_day_clear \\\n   \u002Fdata\u002Fgtaai_datasets\u002Ftest\u002Fcar_city_day_rain \\\n   \u002Fdata\u002Fgtaai_datasets\u002Ftest\u002Fcar_city_night_clear \\\n   \u002Fdata\u002Fgtaai_datasets\u002Ftest\u002Fcar_city_night_rain \\\n   \u002Fdata\u002Fgtaai_datasets\u002Ftest\u002Fcar_highway_day_clear \\\n   \u002Fdata\u002Fgtaai_datasets\u002Ftest\u002Fcar_highway_day_rain \\\n   \u002Fdata\u002Fgtaai_datasets\u002Ftest\u002Fcar_highway_night_clear \\\n   \u002Fdata\u002Fgtaai_datasets\u002Ftest\u002Fcar_highway_night_rain \\\n  --output_path results\u002Ftedd_1104_S.tsv\n```\n\n### 图像重排模型\n这是一种实验性的无监督预训练目标。我们会打乱输入序列的顺序，模型需要预测出正确的图像顺序。运行 `train_reorder.py -h` 可查看所有可用参数的说明。该脚本与自动驾驶脚本几乎相同，只是它仅支持 Transformer 编码器模型，并且没有 `control_mode` 参数。有关训练和评估的详细信息，请参阅[前一节](#self-driving-model)。在使用图像重排目标进行训练后，您可以将模型微调到自动驾驶任务中。\n\n```sh\npython3 train.py \\\n--new_model \\\n--checkpoint_path models\u002Fimage_reordering.ckpt \\\n...\n```\n\n使用 `eval_reorder.py` 脚本可以在测试数据集上评估图像重排模型。\n\n## 数据生成\n\n使用 `generate_data.py` 脚本可以生成用于训练或评估的新数据。运行 `run_TEDD1104.py -h` 可查看所有可用参数的说明。请按照[配置游戏部分](#configure-the-game)中的说明配置游戏。\n```sh\npython generate_data.py \\\n--save_dir \"dataset\u002Ftrain\" \\\n--width 1920 \\\n--height 1080 \\\n--control_mode keyboard\n```\n\n如果 `control_mode` 设置为 “keyboard”，我们将记录 WASD 键的状态。如果设置为 “controller”，则会记录 Pygame 首先检测到的第一台 Xbox 控制器的状态。为了避免生成一个巨大的不平衡数据集，脚本会在录制过程中尝试对数据进行平衡。对于某一类别的样本，已经录制的数量越多，再次录制该类别样本的概率就越低。如果您希望禁用此行为，可以使用 `--save_everything` 标志。\n\n## 引用：\n```bibtex\n@misc{TEDD1104,\n  author = {García-Ferrero, Iker},\n  title = {TEDD1104: 视频游戏中自动驾驶汽车},\n  year = {2022},\n  publisher = {GitHub},\n  journal = {GitHub 仓库},\n  howpublished = {\\url{https:\u002F\u002Fgithub.com\u002Fikergarcia1996\u002FSelf-Driving-Car-in-Video-Games}},\n}\n```\n\n作者：**Iker García-Ferrero**：\n- [个人主页](https:\u002F\u002Fikergarcia1996.github.io\u002FIker-Garcia-Ferrero\u002F)\n- [Twitter](https:\u002F\u002Ftwitter.com\u002Fiker_garciaf)","# Self-Driving-Car-in-Video-Games 快速上手指南\n\n本项目是一个监督学习的深度神经网络，旨在让 AI 学会在电子游戏（主要是《侠盗猎车手 V》，即 GTA V）中自动驾驶。模型基于人类操作数据训练，能够根据小地图航点规划路线，避开障碍物并快速到达目的地。\n\n## 1. 环境准备\n\n### 系统要求\n*   **训练与评估**：支持任意操作系统（推荐 Linux）。\n*   **实时推理（让 AI 玩游戏）**：**仅限 Windows 10\u002F11**。这是运行大多数游戏及模拟键盘\u002F手柄输入的硬性要求。\n*   **游戏版本**：Grand Theft Auto V (GTA V)。\n\n### 前置依赖\n确保已安装 **Python 3.7** 或更高版本（推荐 3.9.7）。\n\n主要 Python 依赖库：\n*   Pytorch (>= 1.12.0)\n*   Torchvision (>= 0.13.0, \u003C 0.15.0)\n*   PyTorch Lightning (>= 1.6.0)\n*   opencv-python, numpy, Pillow, scikit-image\n*   **Windows 特有依赖**：`win32api` (通常新版 Python 自带), `pygame` (若使用手柄), `PYXInput` (若使用虚拟手柄)。\n\n> **国内加速建议**：建议使用清华或阿里镜像源安装 PyTorch 及相关依赖，以提升下载速度。\n> 例如：`pip install torch torchvision -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple`\n\n## 2. 安装步骤\n\n1.  **克隆项目代码**\n    ```bash\n    git clone https:\u002F\u002Fgithub.com\u002Fikergarcia1996\u002FSelf-Driving-Car-in-Video-Games.git\n    cd Self-Driving-Car-in-Video-Games\n    ```\n\n2.  **安装依赖包**\n    创建虚拟环境（推荐）并安装所需库：\n    ```bash\n    pip install -r requirements.txt\n    ```\n    *注：若 `requirements.txt` 未包含所有特定版本约束，可手动执行以下核心安装命令（使用国内镜像）：*\n    ```bash\n    pip install torch torchvision torchaudio --index-url https:\u002F\u002Fdownload.pytorch.org\u002Fwhl\u002Fcu118\n    pip install pytorch-lightning==1.6.0 torchmetrics scikit-image opencv-python pillow tabulate\n    # Windows 用户额外需要\n    pip install pywin32\n    ```\n\n3.  **下载预训练模型**\n    前往项目的 [Releases 页面](https:\u002F\u002Fgithub.com\u002Fikergarcia1996\u002FSelf-Driving-Car-in-Video-Games\u002Freleases) 下载预训练的 `.ckpt` 模型文件（推荐下载 `TEDD1104_XXL` 以获得最佳效果），并将其放置在项目目录下的 `models` 文件夹中（或记住其路径）。\n\n## 3. 基本使用\n\n### 第一步：配置 GTA V 游戏\n在运行脚本前，必须按以下方式设置游戏，否则模型无法识别画面或控制车辆：\n\n1.  **显示模式**：\n    *   **窗口模式**：将游戏设为窗口化，分辨率设为目标值（如 1600x900），并将游戏窗口拖动到屏幕**左上角**。\n    *   **全屏模式**：在主显示器（屏幕编号 1）上运行全屏，分辨率需与显示器一致。\n2.  **视角设置**（关键）：\n    *   进入 `设置` > `相机`，将 `第一人称车辆引擎盖` (First person Vehicle Hood) 设为 **开启 (On)**。\n    *   游戏中按 `V` 键切换至 **第一人称视角**。\n3.  **导航**：\n    *   在小地图上设置一个 **航点 (Waypoint)**，模型将跟随该路线行驶。\n\n### 第二步：运行推理\n使用提供的脚本启动自动驾驶。以下是最基础的运行示例（假设使用窗口模式，分辨率 1920x1080）：\n\n```bash\npython run_TEDD1104.py \\\n--checkpoint_path \"models\\TEDD1104_XXL_model.ckpt\" \\\n--width 1920 \\\n--height 1080 \\\n--num_parallel_sequences 5 \\\n--control_mode keyboard\n```\n\n**参数说明：**\n*   `--checkpoint_path`: 预训练模型文件的路径。\n*   `--width` \u002F `--height`: 必须与游戏当前的分辨率完全一致。\n*   `--num_parallel_sequences`: 并行序列数。数值越大，模型每秒决策次数越多（反应更快），但会增加 CPU 和内存占用。请根据显卡性能调整。\n*   `--control_mode`: 控制模式，可选 `keyboard` (键盘) 或 `controller` (Xbox 手柄)。\n\n**全屏模式运行示例：**\n若游戏设置为全屏，需添加 `--full_screen` 参数：\n```bash\npython run_TEDD1104.py \\\n--checkpoint_path \"models\\TEDD1104_XXL_model.ckpt\" \\\n--width 2560 \\\n--height 1440 \\\n--full_screen \\\n--num_parallel_sequences 5 \\\n--control_mode keyboard\n```\n\n启动后，AI 将接管车辆，尝试沿着小地图航点驾驶。如果车辆无反应或行为异常，请检查游戏分辨率设置是否与脚本参数匹配，以及视角是否为第一人称。","某游戏开发团队正在为一款开放世界赛车游戏构建高智能的 NPC 驾驶系统，旨在让虚拟车辆能像真人一样应对复杂的路况与天气变化。\n\n### 没有 Self-Driving-Car-in-Video-Games 时\n- **人工脚本僵化**：开发者需手动编写大量状态机代码来定义驾驶行为，导致 NPC 在面对突发障碍或复杂弯道时反应生硬，极易穿模或卡死。\n- **环境适应性差**：难以覆盖雨天、夜间等所有光照和气象组合，每次新增天气效果都需要重新调整大量的参数阈值。\n- **数据采集低效**：为了训练行为模型，团队需组织专人长时间录制游戏操作并人工标注关键帧，耗时数周且数据规模有限。\n- **泛化能力薄弱**：针对特定车型训练的逻辑无法迁移到其他车辆上，更换车辆模型往往意味着推倒重来。\n\n### 使用 Self-Driving-Car-in-Video-Games 后\n- **端到端智能决策**：利用其预训练的 T.E.D.D. 1104 深度神经网络，NPC 能直接根据第一人称视角画面实时输出操控指令，流畅完成超车、避障等高难度动作。\n- **全场景鲁棒运行**：模型已在包含晴天、暴雨、昼夜交替的 130GB 人类标注数据上完成训练，无需额外调参即可在各类极端天气下稳定驾驶。\n- **自动化数据闭环**：团队可直接复用工具记录的玩家操作流与按键数据自动迭代模型，将原本数周的数据准备周期缩短至几天。\n- **跨车型快速迁移**：得益于强大的特征学习能力，同一套模型稍作微调即可适配游戏中轿车、卡车等多种载具，大幅降低开发边际成本。\n\nSelf-Driving-Car-in-Video-Games 通过将人类驾驶直觉转化为可泛化的深度模型，彻底解决了传统游戏 AI 行为呆板且开发成本高昂的核心痛点。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fikergarcia1996_Self-Driving-Car-in-Video-Games_12ae4009.png","ikergarcia1996","Iker García-Ferrero","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fikergarcia1996_ec063663.jpg","LLM Researcher","Multiverse Computing","Donostia - San Sebastián ","igarciaf896@gmail.com","iker_garciaf","ikergarcia1996.github.io","https:\u002F\u002Fgithub.com\u002Fikergarcia1996",[86,90],{"name":87,"color":88,"percentage":89},"Python","#3572A5",95.3,{"name":91,"color":92,"percentage":93},"Shell","#89e051",4.7,776,113,"2026-03-17T07:18:14","GPL-3.0",4,"Linux, Windows","必需（用于实时推理和训练），具体型号和显存未说明，但提到增加并行序列数需要更快的 GPU","未说明（但提到增加并行序列数会增加 RAM 使用）",{"notes":103,"python":104,"dependencies":105},"训练和评估模型可在任何操作系统（如 Linux）上进行；但数据生成和实时推理（让 AI 在 GTA V 中驾驶）仅支持 Windows 10\u002F11。实时推理需要安装 win32api（Windows 新版 Python 通常自带）。若需使用 Xbox 手柄生成数据或控制，需额外安装 pygame 和 PYXInput。模型输入为 5 帧连续图像，输出为键盘按键或手柄信号。预训练模型需配合 GTA V 的第一人称视角和小地图航点设置使用。","3.7+",[106,107,108,109,110,111,112,113,114,115],"torch>=1.12.0","torchvision>=0.13.0,\u003C0.15.0","pytorch-lightning>=1.6.0","torchmetrics","scikit-image","numpy","Pillow","opencv-python","fairseq","win32api",[43,13,15],[118,119,120,121,122,123,124,125,126,127,128,129,130],"python","pytorch","self-driving-car","videogame","videogame-bot","neural-network","deep-learning","supervised-learning","machine-learning","autonomous-driving","deep-neural-network","video-games","pretrained-models",null,"2026-03-27T02:49:30.150509","2026-04-06T12:20:04.012712",[135,140,145,150,155,160,165,170],{"id":136,"question_zh":137,"answer_zh":138,"source_url":139},18823,"为什么预测结果总是显示 'key predicted none'，但车辆仍在行驶？","这是一个仅影响终端打印显示的 Bug，实际上模型仍在正常驱动车辆。维护者已更新代码修复了此问题。请拉取最新代码（git pull）或重新下载仓库即可解决。如果问题依旧，请确保游戏分辨率设置为 1600x900。","https:\u002F\u002Fgithub.com\u002Fikergarcia1996\u002FSelf-Driving-Car-in-Video-Games\u002Fissues\u002F5",{"id":141,"question_zh":142,"answer_zh":143,"source_url":144},18824,"如何在不同屏幕分辨率下运行模型？需要调整游戏分辨率吗？","是的，当前版本需要特定设置。请按以下步骤操作：\n1. 将游戏设置为窗口模式（在设置中或按 Alt+Enter）。\n2. 将游戏分辨率设置为 1600x900。\n3. 将游戏窗口移动到屏幕左上角，确保屏幕左边缘有一条 1 像素的蓝线，且窗口标题栏紧贴屏幕顶部边缘。\n注：未来的 V4\u002FV5 版本将支持任意分辨率。","https:\u002F\u002Fgithub.com\u002Fikergarcia1996\u002FSelf-Driving-Car-in-Video-Games\u002Fissues\u002F7",{"id":146,"question_zh":147,"answer_zh":148,"source_url":149},18825,"训练时遇到 'TypeError: __new__() missing 1 required positional argument: task' 错误怎么办？","这是因为 torchmetrics 库在 0.10.0 版本后更新了 API，Accuracy 函数现在需要 'task' 参数。维护者已更新代码以兼容新版本。请执行 'git pull' 拉取最新代码或重新下载仓库，错误即可解决。","https:\u002F\u002Fgithub.com\u002Fikergarcia1996\u002FSelf-Driving-Car-in-Video-Games\u002Fissues\u002F14",{"id":151,"question_zh":152,"answer_zh":153,"source_url":154},18826,"模型输入的五张图像序列是预测一个按键值还是五个按键值？","模型针对每五张图像的序列预测一个按键值（如果使用手柄则是两个浮点数）。这是因为在创建训练数据集时，只保存了每个序列最后一张图像对应的按键值。虽然当前的数据采集脚本和开发\u002F测试集包含了每张图像的按键值，但主训练集是基于旧版本脚本创建的。","https:\u002F\u002Fgithub.com\u002Fikergarcia1996\u002FSelf-Driving-Car-in-Video-Games\u002Fissues\u002F11",{"id":156,"question_zh":157,"answer_zh":158,"source_url":159},18827,"使用预训练模型时出现 'unrecognized arguments: --fp16' 错误如何解决？","这是文档中的错误。请在运行命令中移除 '--fp16' 参数即可正常运行。例如，不要使用 '--fp16' 标志。","https:\u002F\u002Fgithub.com\u002Fikergarcia1996\u002FSelf-Driving-Car-in-Video-Games\u002Fissues\u002F8",{"id":161,"question_zh":162,"answer_zh":163,"source_url":164},18828,"运行时遇到 'RuntimeError: cuDNN error: CUDNN_STATUS_BAD_PARAM' 错误怎么办？","该错误通常与环境配置有关。有用户反馈重新安装 apex 库后问题解决。请尝试卸载并重新安装 apex，确保其与当前的 PyTorch 和 CUDA 版本兼容。","https:\u002F\u002Fgithub.com\u002Fikergarcia1996\u002FSelf-Driving-Car-in-Video-Games\u002Fissues\u002F4",{"id":166,"question_zh":167,"answer_zh":168,"source_url":169},18829,"启动程序时出现 'ImportError: cannot import name load_model' 错误是什么原因？","这通常是因为 Python 无法找到 model.py 文件。请确保 model.py 和运行脚本（如 run_TEDD1104.py）位于同一目录下，并且你是从该目录执行命令的。","https:\u002F\u002Fgithub.com\u002Fikergarcia1996\u002FSelf-Driving-Car-in-Video-Games\u002Fissues\u002F3",{"id":171,"question_zh":172,"answer_zh":173,"source_url":144},18830,"如何验证模型输入的图像是否正确？","在运行模型时按下 'L' 键，屏幕上会弹出五个小窗口。这些窗口会显示发送给模型的输入图像。通过观察这些窗口，你可以确认模型接收到的图像内容是否符合预期（例如分辨率、画面内容等）。",[175,180,185,190],{"id":176,"version":177,"summary_zh":178,"released_at":179},109360,"5.1.0.XXL","T.E.D.D. 1104 S：1.38亿参数。1.6GB\n\n## 超参数\n```Yaml\ncontrol_mode: 键盘\ncnn_model_name: efficientnet_v2_l\npretrained_cnn: true\nencoder_type: 变压器\nembedded_size: 896\nnhead: 8\nnum_layers_encoder: 4\nlearning_rate: 1e-05\noptimizer_name: adafactor\nscheduler_name: 余弦\nwarmup_factor: 0.05\nmax_epochs: 20\nbatch_size: 32\nmask_prob: 0.2\ndropout_cnn_out: 0.3\ndropout_encoder: 0.1\ndropout_encoder_features: 0.3\npositional_embeddings_dropout: 0.1\nweight_decay: 1e-3\n```\n\n测试数据集上的准确率：\n\n|         |              时间              |   天气  | 微平均准确率 K@1 | 微平均准确率 k@3 | 宏平均准确率 K@1 |\n|---------|:------------------------------:|:----------:|:-------------:|:-------------:|:-------------:|\n| 城市    |         :sun_with_face:        |   :sunny:  |     53.2      |     84.4      |     46.2      |\n| 城市    |         :sun_with_face:        | :umbrella: |     51.4      |     83.4      |     46.3      |\n| 城市    | :first_quarter_moon_with_face: |   :sunny:  |     54.3      |     85.6      |     46.3      |\n| 城市    | :first_quarter_moon_with_face: | :umbrella: |     47.3      |     82.3      |     49.9      |\n| 高速公路 |         :sun_with_face:        |   :sunny:  |     72.7      |     97.7      |     40.6      |\n| 高速公路 |         :sun_with_face:        | :umbrella: |     70.6      |     99.3      |     39.6      |\n| 高速公路 | :first_quarter_moon_with_face: |   :sunny:  |     77.9      |     99.3      |     45.7      |\n| 高速公路 | :first_quarter_moon_with_face: | :umbrella: |     70.9      |     97.6      |     30.8      |\n\n本次发布包含了开发集上表现最好的一个 epoch 以及最后一个 epoch。","2022-11-28T22:06:00",{"id":181,"version":182,"summary_zh":183,"released_at":184},109361,"5.1.0.M","T.E.D.D. 1104 S：6800万参数。685MB\n\n## 超参数\n```Yaml\ncontrol_mode: 键盘\ncnn_model_name: efficientnet_v2_m\npretrained_cnn: true\nencoder_type: 变压器\nembedded_size: 512\nnhead: 8\nnum_layers_encoder: 4\nlearning_rate: 1e-05\noptimizer_name: adafactor\nscheduler_name: 余弦退火\nwarmup_factor: 0.05\nmax_epochs: 20\nbatch_size: 32\nmask_prob: 0.2\ndropout_cnn_out: 0.3\ndropout_encoder: 0.1\ndropout_encoder_features: 0.3\npositional_embeddings_dropout: 0.1\nweight_decay: 1e-3\n``` \n\n测试数据集上的准确率：\n\n\n|         |              时间              |   天气  | 微平均准确率 K@1 | 微平均准确率 k@3 | 宏平均准确率 K@1 |\n|---------|:------------------------------:|:----------:|:-------------:|:-------------:|:-------------:|\n| 城市    |         :sun_with_face:        |   :sunny:  |     52.9      |     84.1      |     43.1      |\n| 城市    |         :sun_with_face:        | :umbrella: |     49.9      |     81.3      |     42.2      |\n| 城市    | :first_quarter_moon_with_face: |   :sunny:  |     54.7      |     85.1      |     48.4      |\n| 城市    | :first_quarter_moon_with_face: | :umbrella: |     49.5      |     81.1      |     41.1      |\n| 高速公路 |         :sun_with_face:        |   :sunny:  |     62.5      |     99.2      |     43.1      |\n| 高速公路 |         :sun_with_face:        | :umbrella: |     71.9      |     99.3      |     39.2      |\n| 高速公路 | :first_quarter_moon_with_face: |   :sunny:  |     79.4      |     99.3      |     45.3      |\n| 高速公路 | :first_quarter_moon_with_face: | :umbrella: |     63.0      |     97.2      |     47.2      |\n\n\n本次发布包含了开发集上表现最好的一个 epoch 以及最后一个 epoch。","2022-11-28T21:53:32",{"id":186,"version":187,"summary_zh":188,"released_at":189},109362,"5.1.0.S","T.E.D.D. 1104 S：2600万参数。260MB\n\n## 超参数\n```Yaml\ncontrol_mode: 键盘\ncnn_model_name: efficientnet_v2_s\npretrained_cnn: true\nencoder_type: transformer\nembedded_size: 384\nnhead: 8\nnum_layers_encoder: 2\nlearning_rate: 1e-05\noptimizer_name: adafactor\nscheduler_name: cosine\nwarmup_factor: 0.05\nmax_epochs: 20\nbatch_size: 32\nmask_prob: 0.2\ndropout_cnn_out: 0.3\ndropout_encoder: 0.1\ndropout_encoder_features: 0.3\npositional_embeddings_dropout: 0.1\nweight_decay: 1e-3\n```\n\n测试数据集上的准确率：\n\n|         |              时间              |   天气  | 微平均准确率 K@1 | 微平均准确率 k@3 | 宏平均准确率 K@1 |\n|---------|:------------------------------:|:----------:|:-------------:|:-------------:|:-------------:|\n| 城市    |         :sun_with_face:        |   :sunny:  |     51.0      |     83.0      |     46.3      |\n| 城市    |         :sun_with_face:        | :umbrella: |     49.0      |     82.5      |     45.2      |\n| 城市    | :first_quarter_moon_with_face: |   :sunny:  |     56.3      |     86.6      |     49.0      |\n| 城市    | :first_quarter_moon_with_face: | :umbrella: |     49.4      |     81.4      |     42.5      |\n| 高速公路 |         :sun_with_face:        |   :sunny:  |     70.3      |      100      |     68.5      |\n| 高速公路 |         :sun_with_face:        | :umbrella: |     71.2      |      100      |     37.6      |\n| 高速公路 | :first_quarter_moon_with_face: |   :sunny:  |     80.9      |      100      |     49.1      |\n| 高速公路 | :first_quarter_moon_with_face: | :umbrella: |     69.3      |      100      |     61.1      |\n\n\n本次发布包含了开发集上表现最好的一个 epoch 以及最后一个 epoch。","2022-11-28T21:47:55",{"id":191,"version":192,"summary_zh":193,"released_at":194},109363,"5.0.0","> 此模型无法与当前版本的 TEDD1104 配合使用\n\nT.E.D.D. 1104 基础模型：3460 万参数。415.9MB\n\n## 超参数\n```Yaml\ncnn_model_name: efficientnet_b4\ncontrol_mode: keyboard\ndropout_cnn_out: 0.3\ndropout_encoder: 0.1\ndropout_encoder_features: 0.3\nembedded_size: 512\nencoder_type: transformer\nlearning_rate: 1.0e-05\nlstm_hidden_size: 512\nmask_prob: 0.2\nnhead: 8\nnum_layers_encoder: 4\npositional_embeddings_dropout: 0.1\npretrained_cnn: true\nsequence_size: 5\nweight_decay: 0.001\nweights: null\nnum_epochs: 12\nbatch_size: 64\n```\n\n## 性能\n\n|         |              时间              |   天气  | 微平均准确率 K@1 | 微平均准确率 k@3 | 宏平均准确率 K@1 |\n|---------|:------------------------------:|:----------:|:-------------:|:-------------:|:-------------:|\n| 城市    |         :sun_with_face:        |   :sunny:  |      49.8     |     83.8      |     44.1      |\n| 城市    |         :sun_with_face:        | :umbrella: |      52.1     |     84.7      |     46.1      |\n| 城市    | :first_quarter_moon_with_face: |   :sunny:  |      54.5     |     86.9      |     48.0      |\n| 城市    | :first_quarter_moon_with_face: | :umbrella: |      48.8     |     82.5      |     43.2      |\n| 高速公路 |         :sun_with_face:        |   :sunny:  |      65.6     |     100.0     |     53.2      |\n| 高速公路 |         :sun_with_face:        | :umbrella: |      70.6     |     98.0      |     54.2      |\n| 高速公路 | :first_quarter_moon_with_face: |   :sunny:  |      71.3     |     100.0     |     52.3      |\n| 高速公路 | :first_quarter_moon_with_face: | :umbrella: |      67.7     |     100.0     |     50.9      |\n\n","2022-02-11T13:17:48"]