[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-microsoft--CvT":3,"tool-microsoft--CvT":64},[4,17,27,35,43,56],{"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 真正成长为懂上",138956,2,"2026-04-05T11:33:21",[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":23,"last_commit_at":41,"category_tags":42,"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":44,"name":45,"github_repo":46,"description_zh":47,"stars":48,"difficulty_score":23,"last_commit_at":49,"category_tags":50,"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,51,52,53,15,54,26,13,55],"数据工具","视频","插件","其他","音频",{"id":57,"name":58,"github_repo":59,"description_zh":60,"stars":61,"difficulty_score":10,"last_commit_at":62,"category_tags":63,"status":16},3128,"ragflow","infiniflow\u002Fragflow","RAGFlow 是一款领先的开源检索增强生成（RAG）引擎，旨在为大语言模型构建更精准、可靠的上下文层。它巧妙地将前沿的 RAG 技术与智能体（Agent）能力相结合，不仅支持从各类文档中高效提取知识，还能让模型基于这些知识进行逻辑推理和任务执行。\n\n在大模型应用中，幻觉问题和知识滞后是常见痛点。RAGFlow 通过深度解析复杂文档结构（如表格、图表及混合排版），显著提升了信息检索的准确度，从而有效减少模型“胡编乱造”的现象，确保回答既有据可依又具备时效性。其内置的智能体机制更进一步，使系统不仅能回答问题，还能自主规划步骤解决复杂问题。\n\n这款工具特别适合开发者、企业技术团队以及 AI 研究人员使用。无论是希望快速搭建私有知识库问答系统，还是致力于探索大模型在垂直领域落地的创新者，都能从中受益。RAGFlow 提供了可视化的工作流编排界面和灵活的 API 接口，既降低了非算法背景用户的上手门槛，也满足了专业开发者对系统深度定制的需求。作为基于 Apache 2.0 协议开源的项目，它正成为连接通用大模型与行业专有知识之间的重要桥梁。",77062,"2026-04-04T04:44:48",[15,14,13,26,54],{"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":79,"owner_email":80,"owner_twitter":81,"owner_website":82,"owner_url":83,"languages":84,"stars":93,"forks":94,"last_commit_at":95,"license":96,"difficulty_score":10,"env_os":97,"env_gpu":98,"env_ram":99,"env_deps":100,"category_tags":114,"github_topics":115,"view_count":10,"oss_zip_url":79,"oss_zip_packed_at":79,"status":16,"created_at":121,"updated_at":122,"faqs":123,"releases":152},1163,"microsoft\u002FCvT","CvT","This is an official implementation of CvT: Introducing Convolutions to Vision Transformers.","CvT 是一种结合了卷积和视觉 Transformer 的新型图像识别模型，旨在提升传统 Vision Transformer（ViT）的性能与效率。通过引入卷积操作，CvT 在保持 Transformer 动态注意力和全局上下文理解优势的同时，增强了对平移、缩放和形变的鲁棒性。CvT 在 ImageNet-1k 和 ImageNet-22k 数据集上均取得了领先的准确率，且参数量和计算量更少。适合研究人员和开发者用于图像分类任务，尤其在需要高精度和高效模型的场景中表现优异。其独特的卷积嵌入和 Transformer 结构设计，使得模型在高分辨率任务中更具优势。","# Introduction\nThis is an official implementation of [CvT: Introducing Convolutions to Vision Transformers](https:\u002F\u002Farxiv.org\u002Fabs\u002F2103.15808). We present a new architecture, named Convolutional vision Transformers (CvT), that improves Vision Transformers (ViT) in performance and efficienty by introducing convolutions into ViT to yield the best of both designs. This is accomplished through two primary modifications: a hierarchy of Transformers containing a new convolutional token embedding, and a convolutional Transformer block leveraging a convolutional projection. These changes introduce desirable properties of convolutional neural networks (CNNs) to the ViT architecture (e.g. shift, scale, and distortion invariance) while maintaining the merits of Transformers (e.g. dynamic attention, global context, and better generalization). We validate CvT by conducting extensive experiments, showing that this approach achieves state-of-the-art performance over other Vision Transformers and ResNets on ImageNet-1k, with fewer parameters and lower FLOPs. In addition, performance gains are maintained when pretrained on larger dataset (e.g. ImageNet-22k) and fine-tuned to downstream tasks. Pre-trained on ImageNet-22k, our CvT-W24 obtains a top-1 accuracy of 87.7% on the ImageNet-1k val set. Finally, our results show that the positional encoding, a crucial component in existing Vision Transformers, can be safely removed in our model, simplifying the design for higher resolution vision tasks. \n\n![](figures\u002Fpipeline.svg)\n\n# Main results\n## Models pre-trained on ImageNet-1k\n| Model  | Resolution | Param | GFLOPs | Top-1 |\n|--------|------------|-------|--------|-------|\n| CvT-13 | 224x224    | 20M   | 4.5    | 81.6  |\n| CvT-21 | 224x224    | 32M   | 7.1    | 82.5  |\n| CvT-13 | 384x384    | 20M   | 16.3   | 83.0  |\n| CvT-21 | 384x384    | 32M   | 24.9   | 83.3  |\n\n## Models pre-trained on ImageNet-22k\n| Model   | Resolution | Param | GFLOPs | Top-1 |\n|---------|------------|-------|--------|-------|\n| CvT-13  | 384x384    | 20M   | 16.3   | 83.3  |\n| CvT-21  | 384x384    | 32M   | 24.9   | 84.9  |\n| CvT-W24 | 384x384    | 277M  | 193.2  | 87.6  |\n\nYou can download all the models from our [model zoo](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!AhIXJn_J-blW9RzF3rMW7SsLHa8h?e=blQ0Al).\n\n\n# Quick start\n## Installation\nAssuming that you have installed PyTorch and TorchVision, if not, please follow the [officiall instruction](https:\u002F\u002Fpytorch.org\u002F) to install them firstly. \nIntall the dependencies using cmd:\n\n``` sh\npython -m pip install -r requirements.txt --user -q\n```\n\nThe code is developed and tested using pytorch 1.7.1. Other versions of pytorch are not fully tested.\n\n## Data preparation\nPlease prepare the data as following:\n\n``` sh\n|-DATASET\n  |-imagenet\n    |-train\n    | |-class1\n    | | |-img1.jpg\n    | | |-img2.jpg\n    | | |-...\n    | |-class2\n    | | |-img3.jpg\n    | | |-...\n    | |-class3\n    | | |-img4.jpg\n    | | |-...\n    | |-...\n    |-val\n      |-class1\n      | |-img5.jpg\n      | |-...\n      |-class2\n      | |-img6.jpg\n      | |-...\n      |-class3\n      | |-img7.jpg\n      | |-...\n      |-...\n```\n\n\n## Run\nEach experiment is defined by a yaml config file, which is saved under the directory of `experiments`. The directory of `experiments` has a tree structure like this:\n\n``` sh\nexperiments\n|-{DATASET_A}\n| |-{ARCH_A}\n| |-{ARCH_B}\n|-{DATASET_B}\n| |-{ARCH_A}\n| |-{ARCH_B}\n|-{DATASET_C}\n| |-{ARCH_A}\n| |-{ARCH_B}\n|-...\n```\n\nWe provide a `run.sh` script for running jobs in local machine.\n\n``` sh\nUsage: run.sh [run_options]\nOptions:\n  -g|--gpus \u003C1> - number of gpus to be used\n  -t|--job-type \u003Caml> - job type (train|test)\n  -p|--port \u003C9000> - master port\n  -i|--install-deps - If install dependencies (default: False)\n```\n\n### Training on local machine\n\n``` sh\nbash run.sh -g 8 -t train --cfg experiments\u002Fimagenet\u002Fcvt\u002Fcvt-13-224x224.yaml\n```\n\nYou can also modify the config parameters from the command line. For example, if you want to change the lr rate to 0.1, you can run the command:\n``` sh\nbash run.sh -g 8 -t train --cfg experiments\u002Fimagenet\u002Fcvt\u002Fcvt-13-224x224.yaml TRAIN.LR 0.1\n```\n\nNotes:\n- The checkpoint, model, and log files will be saved in OUTPUT\u002F{dataset}\u002F{training config} by default.\n\n### Testing pre-trained models\n\n``` sh\nbash run.sh -t test --cfg experiments\u002Fimagenet\u002Fcvt\u002Fcvt-13-224x224.yaml TEST.MODEL_FILE ${PRETRAINED_MODLE_FILE}\n```\n\n# Citation\nIf you find this work or code is helpful in your research, please cite:\n\n```\n@article{wu2021cvt,\n  title={Cvt: Introducing convolutions to vision transformers},\n  author={Wu, Haiping and Xiao, Bin and Codella, Noel and Liu, Mengchen and Dai, Xiyang and Yuan, Lu and Zhang, Lei},\n  journal={arXiv preprint arXiv:2103.15808},\n  year={2021}\n}\n```\n## Contributing\n\nThis project welcomes contributions and suggestions.  Most contributions require you to agree to a\nContributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us\nthe rights to use your contribution. For details, visit https:\u002F\u002Fcla.opensource.microsoft.com.\n\nWhen you submit a pull request, a CLA bot will automatically determine whether you need to provide\na CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions\nprovided by the bot. You will only need to do this once across all repos using our CLA.\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https:\u002F\u002Fopensource.microsoft.com\u002Fcodeofconduct\u002F).\nFor more information see the [Code of Conduct FAQ](https:\u002F\u002Fopensource.microsoft.com\u002Fcodeofconduct\u002Ffaq\u002F) or\ncontact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\n\n## Trademarks\n\nThis project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft \ntrademarks or logos is subject to and must follow \n[Microsoft's Trademark & Brand Guidelines](https:\u002F\u002Fwww.microsoft.com\u002Fen-us\u002Flegal\u002Fintellectualproperty\u002Ftrademarks\u002Fusage\u002Fgeneral).\nUse of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.\nAny use of third-party trademarks or logos are subject to those third-party's policies.\n","# 简介\n这是对论文《CvT：将卷积引入视觉Transformer》（https:\u002F\u002Farxiv.org\u002Fabs\u002F2103.15808）的官方实现。我们提出了一种名为卷积视觉Transformer（CvT）的新架构，通过在Vision Transformer中引入卷积操作，结合了卷积神经网络和Transformer的优点，从而在性能和效率上均优于传统的Vision Transformer。这一改进主要体现在两个方面：一是设计了一种包含新型卷积标记嵌入的Transformer层级结构；二是提出了利用卷积投影的卷积Transformer模块。这些改动不仅为Vision Transformer架构引入了卷积神经网络的优良特性（如平移、尺度和形变不变性），同时保留了Transformer的优势（如动态注意力机制、全局上下文建模能力以及更强的泛化能力）。我们通过大量实验验证了CvT的有效性，结果表明，在ImageNet-1k数据集上，该方法以更少的参数量和更低的浮点运算次数，取得了超越其他Vision Transformer和ResNet的最先进性能。此外，当模型在更大规模的数据集（如ImageNet-22k）上进行预训练，并进一步微调到下游任务时，性能提升依然显著。在ImageNet-22k上预训练的CvT-W24模型，在ImageNet-1k验证集上的Top-1准确率达到了87.7%。最后，我们的实验还表明，现有Vision Transformer中的位置编码这一关键组件可以在我们的模型中被安全地移除，从而简化了高分辨率视觉任务的设计。\n\n![](figures\u002Fpipeline.svg)\n\n# 主要结果\n## 在ImageNet-1k上预训练的模型\n| 模型  | 分辨率 | 参数量 | GFLOPs | Top-1 |\n|--------|------------|-------|--------|-------|\n| CvT-13 | 224x224    | 20M   | 4.5    | 81.6  |\n| CvT-21 | 224x224    | 32M   | 7.1    | 82.5  |\n| CvT-13 | 384x384    | 20M   | 16.3   | 83.0  |\n| CvT-21 | 384x384    | 32M   | 24.9   | 83.3  |\n\n## 在ImageNet-22k上预训练的模型\n| 模型   | 分辨率 | 参数量 | GFLOPs | Top-1 |\n|---------|------------|-------|--------|-------|\n| CvT-13  | 384x384    | 20M   | 16.3   | 83.3  |\n| CvT-21  | 384x384    | 32M   | 24.9   | 84.9  |\n| CvT-W24 | 384x384    | 277M  | 193.2  | 87.6  |\n\n您可以通过我们的[模型库](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!AhIXJn_J-blW9RzF3rMW7SsLHa8h?e=blQ0Al)下载所有模型。\n\n# 快速入门\n## 安装\n假设您已经安装了PyTorch和TorchVision，如果没有，请先按照[官方指南](https:\u002F\u002Fpytorch.org\u002F)进行安装。然后使用以下命令安装依赖：\n\n``` sh\npython -m pip install -r requirements.txt --user -q\n```\n\n代码是在PyTorch 1.7.1版本下开发并测试的，其他版本的PyTorch尚未经过全面测试。\n\n## 数据准备\n请按照以下目录结构准备数据：\n\n``` sh\n|-DATASET\n  |-imagenet\n    |-train\n    | |-class1\n    | | |-img1.jpg\n    | | |-img2.jpg\n    | | |-...\n    | |-class2\n    | | |-img3.jpg\n    | | |-...\n    | |-class3\n    | | |-img4.jpg\n    | | |-...\n    | |-...\n    |-val\n      |-class1\n      | |-img5.jpg\n      | |-...\n      |-class2\n      | |-img6.jpg\n      | |-...\n      |-class3\n      | |-img7.jpg\n      | |-...\n      |-...\n```\n\n\n## 运行\n每个实验由一个yaml配置文件定义，这些配置文件保存在`experiments`目录下。`experiments`目录的结构如下所示：\n\n``` sh\nexperiments\n|-{DATASET_A}\n| |-{ARCH_A}\n| |-{ARCH_B}\n|-{DATASET_B}\n| |-{ARCH_A}\n| |-{ARCH_B}\n|-{DATASET_C}\n| |-{ARCH_A}\n| |-{ARCH_B}\n|-...\n```\n\n我们提供了一个`run.sh`脚本用于在本地机器上运行任务。\n\n``` sh\n用法: run.sh [运行选项]\n选项:\n  -g|--gpus \u003C1> - 使用的GPU数量\n  -t|--job-type \u003Caml> - 任务类型（train|test）\n  -p|--port \u003C9000> - 主节点端口\n  -i|--install-deps - 是否安装依赖（默认：否）\n```\n\n### 在本地机器上训练\n\n``` sh\nbash run.sh -g 8 -t train --cfg experiments\u002Fimagenet\u002Fcvt\u002Fcvt-13-224x224.yaml\n```\n\n您还可以通过命令行修改配置参数。例如，如果想将学习率调整为0.1，可以运行以下命令：\n``` sh\nbash run.sh -g 8 -t train --cfg experiments\u002Fimagenet\u002Fcvt\u002Fcvt-13-224x224.yaml TRAIN.LR 0.1\n```\n\n注意：\n- 检查点、模型和日志文件默认会保存在OUTPUT\u002F{dataset}\u002F{training config}目录下。\n\n### 测试预训练模型\n\n``` sh\nbash run.sh -t test --cfg experiments\u002Fimagenet\u002Fcvt\u002Fcvt-13-224x224.yaml TEST.MODEL_FILE ${PRETRAINED_MODLE_FILE}\n```\n\n# 引用\n如果您在研究中使用了本工作或代码，请引用以下文献：\n\n```\n@article{wu2021cvt,\n  title={Cvt: Introducing convolutions to vision transformers},\n  author={Wu, Haiping and Xiao, Bin and Codella, Noel and Liu, Mengchen and Dai, Xiyang and Yuan, Lu and Zhang, Lei},\n  journal={arXiv preprint arXiv:2103.15808},\n  year={2021}\n}\n```\n## 贡献\n本项目欢迎各位的贡献与建议。大多数贡献都需要您同意一份贡献者许可协议（CLA），声明您有权并将您的贡献权利授予我们。有关详细信息，请访问https:\u002F\u002Fcla.opensource.microsoft.com。\n\n当您提交拉取请求时，CLA机器人会自动判断您是否需要签署CLA，并相应地标记PR（例如状态检查、评论）。只需按照机器人提供的指示操作即可。对于使用我们CLA的所有仓库，您只需完成一次此流程。\n\n本项目已采纳[微软开源行为准则](https:\u002F\u002Fopensource.microsoft.com\u002Fcodeofconduct\u002F)。更多信息请参阅[行为准则常见问题解答](https:\u002F\u002Fopensource.microsoft.com\u002Fcodeofconduct\u002Ffaq\u002F)或联系[opencode@microsoft.com](mailto:opencode@microsoft.com)以获取更多问题或意见。\n\n## 商标\n本项目可能包含项目、产品或服务的商标或徽标。未经授权使用微软商标或徽标需遵守并遵循[微软商标与品牌指南](https:\u002F\u002Fwww.microsoft.com\u002Fen-us\u002Flegal\u002Fintellectualproperty\u002Ftrademarks\u002Fusage\u002Fgeneral)。在本项目的修改版本中使用微软商标或徽标时，不得造成混淆或暗示微软的赞助关系。任何第三方商标或徽标的使用均应遵守其各自的政策。","# CvT 快速上手指南\n\n## 环境准备\n\n### 系统要求\n- 操作系统：Linux 或 macOS（Windows 也可使用，但建议使用 Linux 环境）\n- Python 版本：3.6 或以上\n- PyTorch 版本：1.7.1（其他版本可能不兼容）\n\n### 前置依赖\n- PyTorch 和 TorchVision（可通过官方渠道安装）\n- 其他依赖项通过 `requirements.txt` 安装\n\n## 安装步骤\n\n确保已安装 PyTorch 和 TorchVision，若未安装，请参考 [PyTorch 官方安装指南](https:\u002F\u002Fpytorch.org\u002F)。\n\n安装依赖项：\n\n```sh\npython -m pip install -r requirements.txt --user -q\n```\n\n> 推荐使用国内镜像源加速安装，例如：\n\n```sh\npython -m pip install -r requirements.txt --user -q -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n```\n\n## 基本使用\n\n### 训练模型\n\n在本地机器上训练模型的示例命令如下：\n\n```sh\nbash run.sh -g 8 -t train --cfg experiments\u002Fimagenet\u002Fcvt\u002Fcvt-13-224x224.yaml\n```\n\n你可以通过命令行修改配置参数，例如调整学习率：\n\n```sh\nbash run.sh -g 8 -t train --cfg experiments\u002Fimagenet\u002Fcvt\u002Fcvt-13-224x224.yaml TRAIN.LR 0.1\n```\n\n### 测试预训练模型\n\n测试预训练模型的示例命令如下：\n\n```sh\nbash run.sh -t test --cfg experiments\u002Fimagenet\u002Fcvt\u002Fcvt-13-224x224.yaml TEST.MODEL_FILE ${PRETRAINED_MODLE_FILE}\n```\n\n请将 `${PRETRAINED_MODLE_FILE}` 替换为实际的预训练模型文件路径。","某图像识别团队正在开发一个用于工业质检的视觉系统，需要在有限的计算资源下实现高精度的缺陷检测。他们尝试使用传统的卷积神经网络（如ResNet）和Vision Transformer（ViT），但都面临性能与效率之间的权衡。\n\n### 没有 CvT 时  \n- 使用ResNet时，模型参数量大，难以部署到边缘设备，且对小样本的泛化能力不足  \n- 使用ViT时，虽然在大规模数据上表现优异，但在小数据集上容易过拟合，训练时间长  \n- 模型在不同分辨率下的适应性差，需重新调整结构，增加开发成本  \n- 位置编码的存在增加了模型复杂度，影响推理速度  \n\n### 使用 CvT 后  \n- CvT在保持高精度的同时，参数量和计算量显著降低，适合部署在边缘设备  \n- 通过引入卷积机制，CvT在小数据集上表现出更强的泛化能力，减少过拟合风险  \n- 模型支持多分辨率输入，无需频繁修改结构，提升开发效率  \n- 移除了位置编码，简化了模型设计，加快了推理速度  \n\nCvT通过融合卷积与Transformer的优势，在工业质检场景中实现了性能与效率的双重提升。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmicrosoft_CvT_bcc4a0ae.png","microsoft","Microsoft","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fmicrosoft_4900709c.png","Open source projects and samples from Microsoft",null,"opensource@microsoft.com","OpenAtMicrosoft","https:\u002F\u002Fopensource.microsoft.com","https:\u002F\u002Fgithub.com\u002Fmicrosoft",[85,89],{"name":86,"color":87,"percentage":88},"Python","#3572A5",97.8,{"name":90,"color":91,"percentage":92},"Shell","#89e051",2.2,604,127,"2026-04-05T04:49:59","MIT","Linux, macOS","需要 NVIDIA GPU，显存 8GB+，CUDA 11.7+","未说明",{"notes":101,"python":102,"dependencies":103},"建议使用 conda 管理环境，首次运行需下载约 5GB 模型文件","3.8+",[104,105,106,107,108,109,110,111,112,113],"pytorch>=1.7.1","torchvision","yaml","numpy","opencv-python","Pillow","scipy","tqdm","requests","packaging",[13,14],[116,117,118,119,120],"cvt","deep-learning","classification","imagenet","computer-vision","2026-03-27T02:49:30.150509","2026-04-06T06:44:48.430152",[124,129,134,139,144,148],{"id":125,"question_zh":126,"answer_zh":127,"source_url":128},5269,"使用预训练模型测试 ImageNet 时结果很差，为什么？","问题已解决，将 ImageNet 路径改为 'imagenet\u002Fval' 即可正确推理。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FCvT\u002Fissues\u002F14",{"id":130,"question_zh":131,"answer_zh":132,"source_url":133},5270,"训练 CvT-13-224 模型时出现 NaN loss，如何解决？","可能是学习率设置过大。如果设置 BATCH_SIZE_PER_GPU 为 128，则应将 LR 设置为 0.000125，避免使用过大的学习率。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FCvT\u002Fissues\u002F4",{"id":135,"question_zh":136,"answer_zh":137,"source_url":138},5271,"FLOPs 计算结果与论文中不一致，为什么？","我们使用 ptflops 工具计算 FLOPs，您可以尝试在配置中设置 MODEL_SUMMARY 为 True 来获取更准确的数值。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FCvT\u002Fissues\u002F1",{"id":140,"question_zh":141,"answer_zh":142,"source_url":143},5272,"ImageNet 实验的配置文件是否与论文中的一致？","配置文件是正确的，如果您在实验中遇到问题，请检查您的配置是否与论文描述一致。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FCvT\u002Fissues\u002F2",{"id":145,"question_zh":146,"answer_zh":147,"source_url":128},5273,"ImageNet 数据集目录结构与代码要求不同，如何处理？","请确保 ImageNet 目录结构符合代码要求，特别是类别文件夹的顺序。如果结构不同，可能需要调整路径或数据加载方式。",{"id":149,"question_zh":150,"answer_zh":151,"source_url":128},5274,"如何正确配置 ImageNet 数据路径？","请将 ImageNet 路径设置为 'imagenet\u002Fval'，以确保模型能够正确加载验证集数据。",[]]