[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-HRNet--HRFormer":3,"tool-HRNet--HRFormer":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":75,"owner_avatar_url":76,"owner_bio":77,"owner_company":78,"owner_location":78,"owner_email":79,"owner_twitter":78,"owner_website":80,"owner_url":81,"languages":82,"stars":116,"forks":117,"last_commit_at":118,"license":119,"difficulty_score":10,"env_os":120,"env_gpu":120,"env_ram":120,"env_deps":121,"category_tags":124,"github_topics":125,"view_count":10,"oss_zip_url":78,"oss_zip_packed_at":78,"status":16,"created_at":132,"updated_at":133,"faqs":134,"releases":165},852,"HRNet\u002FHRFormer","HRFormer","[ NeurIPS2021] This is an official implementation of our paper \"HRFormer: High-Resolution Transformer for Dense Prediction\".","HRFormer 是一款专为密集预测任务设计的高分辨率 Transformer 模型，主要应用于人体姿态估计和语义分割等计算机视觉领域。针对传统 Vision Transformer 生成的特征分辨率较低、且内存与计算开销过大的痛点，HRFormer 通过创新架构实现了高效的高分辨率表示学习。\n\n其核心技术亮点在于融合了高分辨率卷积网络（HRNet）的多分辨率并行设计，并采用局部窗口自注意力机制，仅在小型非重叠图像窗口内执行注意力计算，显著提升了效率。此外，HRFormer 还在前馈网络中引入卷积操作，促进了不同图像窗口间的信息交换。实验表明，HRFormer 在 COCO 姿态估计和 Cityscapes 分割任务上均取得了优异性能。\n\nHRFormer 非常适合计算机视觉方向的研究人员及开发者使用，尤其是那些需要在保证精度的同时优化计算资源的团队。无论是探索前沿算法还是构建实际应用场景，它都是一个值得尝试的强大基线模型。","# HRFormer: High-Resolution Transformer for Dense Prediction, NeurIPS 2021\n\n\n\u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FHRNet_HRFormer_readme_17a91703b7a3.gif' align=\"center\" width=1024>\n\n\n\n## Introduction\nThis is the official implementation of [High-Resolution Transformer (HRFormer)](https:\u002F\u002Farxiv.org\u002Fpdf\u002F2110.09408.pdf). We present a High-Resolution Transformer (HRFormer) that learns high-resolution representations for dense prediction tasks, in contrast to the original Vision Transformer that produces low-resolution representations and has high memory and computational cost. We take advantage of the multi-resolution parallel design introduced in high-resolution convolutional networks (HRNet), along with local-window self-attention that performs self-attention over small non-overlapping image windows, for improving the memory and computation efficiency. In addition, we introduce a convolution into the FFN to exchange information across the disconnected image windows. We demonstrate the effectiveness of the High-Resolution Transformer on human pose estimation and semantic segmentation tasks.\n\n- The HRFormer architecture:\n\n![teaser](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FHRNet_HRFormer_readme_cf29b47d6fd4.png)\n\n- The HRFormer Unit (trans. unit):\n\n![teaser](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FHRNet_HRFormer_readme_28133b3f29d1.png)\n\n\n## Pose estimation\n\n### 2d Human Pose Estimation\n\n#### Results on COCO `val2017` with detector having human AP of 56.4 on COCO `val2017` dataset\n\n| Backbone  | Input Size | AP | AP\u003Csup>50\u003C\u002Fsup> | AP\u003Csup>75\u003C\u002Fsup> | AR\u003Csup>M\u003C\u002Fsup> | AR\u003Csup>L\u003C\u002Fsup> | AR | ckpt | log | script |\n| :----------------- | :-----------: | :------: | :------: | :------: | :------:| :------: | :------: |:------: |:------: | :------: |\n| HRFormer-S  | 256x192 | 74.0% | 90.2% | 81.2% | 70.4% | 80.7% | 79.4% | [ckpt](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj2PC53KZd-7v3X0H?e=hUZ0fE) | [log](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj2Bytw64p9XJuYMt?e=Fj8brM) | [script](.\u002Fpose\u002Fconfigs\u002Ftop_down\u002Fhrt\u002Fcoco\u002Fhrt_small_coco_256x192.py) |\n| HRFormer-S  | 384x288 | 75.6% | 90.3% | 82.2% | 71.6% | 82.5% | 80.7% | [ckpt](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj2TxlkzWYuh9CkvU?e=H50XSl) | [log](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj2FjbD4E7EQi-2n5?e=8xJqCD) | [script](.\u002Fpose\u002Fconfigs\u002Ftop_down\u002Fhrt\u002Fcoco\u002Fhrt_small_coco_384x288.py) |\n| HRFormer-B  | 256x192 | 75.6% | 90.8% | 82.8% | 71.7% | 82.6% | 80.8% | [ckpt](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj2V-4bLd_7RkjTFW?e=L20Wit) | [log](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj2KhySyLQ-QHUQ4l?e=FEKmfr) | [script](.\u002Fpose\u002Fconfigs\u002Ftop_down\u002Fhrt\u002Fcoco\u002Fhrt_base_coco_256x192.py) |\n| HRFormer-B  | 384x288 | 77.2% | 91.0% | 83.6% | 73.2% | 84.2% | 82.0% | [ckpt](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj2ZKrF6rWWzoRJUM?e=RCRb0p) | [log](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj100SWSwSYeZvXvL?e=Tu6Gtm) | [script](.\u002Fpose\u002Fconfigs\u002Ftop_down\u002Fhrt\u002Fcoco\u002Fhrt_base_coco_384x288.py) |\n\n\n#### Results on COCO `test-dev` with detector having human AP of 56.4 on COCO `val2017` dataset\n\n| Backbone  | Input Size | AP | AP\u003Csup>50\u003C\u002Fsup> | AP\u003Csup>75\u003C\u002Fsup> | AR\u003Csup>M\u003C\u002Fsup> | AR\u003Csup>L\u003C\u002Fsup> | AR | ckpt | log | script |\n| :----------------- | :-----------: | :------: | :------: | :------: | :------:| :------: | :------: |:------: |:------: | :------: |\n| HRFormer-S  | 384x288 | 74.5% | 92.3% | 82.1% | 70.7% | 80.6% | 79.8% | [ckpt](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj2TxlkzWYuh9CkvU?e=H50XSl) | [log](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj2FjbD4E7EQi-2n5?e=8xJqCD) |  [script](.\u002Fpose\u002Fconfigs\u002Ftop_down\u002Fhrt\u002Fcoco\u002Fhrt_small_coco_384x288.py) |\n| HRFormer-B  | 384x288 | 76.2% | 92.7% | 83.8% | 72.5% | 82.3% | 81.2% | [ckpt](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj2ZKrF6rWWzoRJUM?e=RCRb0p) | [log](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj100SWSwSYeZvXvL?e=Tu6Gtm) |  [script](.\u002Fpose\u002Fconfigs\u002Ftop_down\u002Fhrt\u002Fcoco\u002Fhrt_base_coco_384x288.py)  |\n\nThe models are first pre-trained on ImageNet-1K dataset, and then fine-tuned on COCO `val2017` dataset.\n\n\n## Semantic segmentation\n\n\n#### Cityscapes\nPerformance on the Cityscapes dataset. The models are trained and tested with input size of 512x1024 and 1024x2048 respectively. \n\nMethods | Backbone | Window Size | Train Set | Test Set | Iterations | Batch Size | OHEM | mIoU | mIoU (Multi-Scale) | Log | ckpt | script |\n| :---- | :------- | :---: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: |:--: |\nOCRNet | HRFormer-S | 7x7 | Train | Val | 80000 | 8 | Yes | 80.0 | 81.0 | [log](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj3K-rPMQ6sHNV-Fe?e=D3IbNn) | [ckpt](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj3Wsg-_ApKUAEUft?e=BnhLal) | [script](.\u002Fseg\u002Fscripts\u002Fcityscapes\u002Fhrt\u002Frun_hrt_small_ocr_v2_ohem.sh) |\nOCRNet | HRFormer-B | 7x7 | Train | Val | 80000 | 8 | Yes | 81.4 | 82.0 | [log](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj3NtH1LBB0w6yCO3?e=p4v29Z) | [ckpt](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj3zEMdYLM8nZ5gXN?e=v7ehnB) |[script](.\u002Fseg\u002Fscripts\u002Fcityscapes\u002Fhrt\u002Frun_hrt_base_ocr_v2_ohem.sh) |\nOCRNet | HRFormer-B | 15x15 | Train | Val | 80000 | 8 | Yes | 81.9 | 82.6 | [log](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwkAlyBb4tGcxSjF_A?e=diIDCV) | [ckpt](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwkAp3LjwI-7Csmh0K?e=K1zXrn)|[script](.\u002Fseg\u002Fscripts\u002Fcityscapes\u002Fhrt\u002Frun_hrt_base_ocr_v2_ohem_w15.sh) | \n\n#### PASCAL-Context\n\nThe models are trained with the input size of 520x520, and tested with original size.\n\nMethods | Backbone | Window Size | Train Set | Test Set | Iterations | Batch Size | OHEM | mIoU | mIoU (Multi-Scale) | Log | ckpt | script |\n| :---- | :------- | :---: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: |:--: |\nOCRNet | HRFormer-S | 7x7 | Train | Val | 60000 | 16 | Yes | 53.8 | 54.6 | [log](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj306lzvnI4s5U43l?e=J9mCfg) | [ckpt](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwkADkevlhIuUrPC1T?e=hcDx5S) | [script](.\u002Fseg\u002Fscripts\u002Fpascal_context\u002Fhrt\u002Frun_hrt_small_ocr_v2_ohem.sh) |\nOCRNet | HRFormer-B | 7x7 | Train | Val | 60000 | 16 | Yes | 56.3 | 57.1 | [log](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj3_0tiJZqL7HWPv1?e=6ilX0Z) | [ckpt](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwkAMUzRnCGmAxEehJ?e=HrCQ9c) |[script](.\u002Fseg\u002Fscripts\u002Fpascal_context\u002Fhrt\u002Frun_hrt_base_ocr_v2_ohem.sh) |\nOCRNet | HRFormer-B | 15x15 | Train | Val | 60000 | 16 | Yes | 57.6 | 58.5 | [log](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj3kphBj2FusLylDg?e=qZSrpp) | [ckpt](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwkAIBAkrOlPp_T1YT?e=DeHMdo)|[script](.\u002Fseg\u002Fscripts\u002Fpascal_context\u002Fhrt\u002Frun_hrt_base_ocr_v2_ohem_w15.sh) | \n\n#### COCO-Stuff\n\nThe models are trained with input size of 520x520, and tested with original size.\n\nMethods | Backbone | Window Size | Train Set | Test Set | Iterations | Batch Size | OHEM | mIoU | mIoU (Multi-Scale) | Log | ckpt | script |\n| :---- | :------- | :---: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: |:--: |\nOCRNet | HRFormer-S | 7x7 | Train | Val | 60000 | 16 | Yes | 37.9 | 38.9 | [log](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj3ayL8oHrwsjRP1U?e=uOa0NC) | [ckpt](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj3tbt5BhdCrsu6lK?e=up2HUI) | [script](.\u002Fseg\u002Fscripts\u002Fcoco_stuff\u002Fhrt\u002Frun_hrt_small_ocr_v2_ohem.sh) |\nOCRNet | HRFormer-B | 7x7 | Train | Val | 60000 | 16 | Yes | 41.6 | 42.5 | [log](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj3iKM2xyDk-6jnJd?e=HL5s7d) | [ckpt](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwkAFAYKZm2wL9C6KL?e=AZiXLK) |[script](.\u002Fseg\u002Fscripts\u002Fcoco_stuff\u002Fhrt\u002Frun_hrt_base_ocr_v2_ohem.sh) |\nOCRNet | HRFormer-B | 15x15 | Train | Val | 60000 | 16 | Yes | 42.4 | 43.3 | [log](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj3RtsUasPSb4nhL_?e=WUBe74) | [ckpt](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj37Np48Gpb-Pjowu?e=iwL5UA)|[script](.\u002Fseg\u002Fscripts\u002Fcoco_stuff\u002Fhrt\u002Frun_hrt_base_ocr_v2_ohem_w15.sh) |  \n\n#### ADE20K\n\nThe models are trained with input size of 520x520, and tested with original size. The results with window size 15x15 will be updated latter.\n\nMethods | Backbone | Window Size | Train Set | Test Set | Iterations | Batch Size | OHEM | mIoU | mIoU (Multi-Scale) | Log | ckpt | script |\n| :---- | :------- | :---: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: |:--: |\nOCRNet | HRFormer-S | 7x7 | Train | Val | 150000 | 8 | Yes | 44.0 | 45.1 | [log](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj3EehoEZZUDMX0NU?e=F8HAQi) | [ckpt](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj28i74aN6_Zk4clX?e=CWGOcd) | [script](.\u002Fseg\u002Fscripts\u002Fade20k\u002Fhrt\u002Frun_hrt_small_ocr_v2_ohem.sh) |\nOCRNet | HRFormer-B | 7x7 | Train | Val | 150000 | 8 | Yes | 46.3 | 47.6 | [log](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj265qyyZ74PKjfqm?e=Cj7TGl) | [ckpt](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj3epNJ-QFF33tZtr?e=df3fQk) |[script](.\u002Fseg\u002Fscripts\u002Fade20k\u002Fhrt\u002Frun_hrt_base_ocr_v2_ohem.sh) |\nOCRNet | HRFormer-B | 13x13 | Train | Val | 150000 | 8 | Yes | 48.7 | 50.0 | [log](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwkAjmpl5jj0sXz2v-?e=sfhyI4) | [ckpt](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj3oTs_gVPzFDjdyU?e=yjGRKz)|[script](.\u002Fseg\u002Fscripts\u002Fade20k\u002Fhrt\u002Frun_hrt_base_ocr_v2_ohem_w13.sh) | \nOCRNet | HRFormer-B | 15x15 | Train | Val | 150000 | 8 | Yes | - | - | - | - | - | \n\n\n## Classification\n\n\n#### Results on ImageNet-1K\n\n| Backbone | acc@1 | acc@5 | #params | FLOPs | ckpt | log | script |\n| :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: |\n| HRFormer-T | 78.6% | 94.2% | 8.0M | 1.83G |[ckpt](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj1UXGB63dBVVOuLO?e=ZLOY7r) | [log](https:\u002F\u002F1drv.ms\u002Ft\u002Fs!Ai-PFrdirDvwj1S0MH9FzWCwzzxE?e=6p1Q3X) | [script](.\u002Fcls\u002Fconfigs\u002Fhrt\u002Fhrt_tiny.yaml)\n| HRFormer-S | 81.2% | 95.6% | 13.5M | 3.56G |[ckpt](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj1cc3tSp4kIKI_JH?e=bHW7xj) | [log](https:\u002F\u002F1drv.ms\u002Ft\u002Fs!Ai-PFrdirDvwj1l2RxNkcb6lmGF3?e=hZ9A1K) | [script](.\u002Fcls\u002Fconfigs\u002Fhrt\u002Fhrt_small.yaml)\n| HRFormer-B | 82.8% | 96.3% | 50.3M | 13.71G |[ckpt](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj1iNZngTF7PEyik9?e=fv8CG6) | [log](https:\u002F\u002F1drv.ms\u002Ft\u002Fs!Ai-PFrdirDvwj1aBKjc1mKQCkwen?e=spYZOe) | [script](.\u002Fcls\u002Fconfigs\u002Fhrt\u002Fhrt_base.yaml) |\n\n\n## Citation\n\nIf you find this project useful in your research, please consider cite:\n\n```\n@article{YuanFHLZCW21,\n  title={HRFormer: High-Resolution Transformer for Dense Prediction},\n  author={Yuhui Yuan and Rao Fu and Lang Huang and Weihong Lin and Chao Zhang and Xilin Chen and Jingdong Wang},\n  booktitle={NeurIPS},\n  year={2021}\n}\n```\n\n\n## Acknowledgment\nThis project is developed based on the [Swin-Transformer](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FSwin-Transformer), [openseg.pytorch](https:\u002F\u002Fgithub.com\u002Fopenseg-group\u002Fopenseg.pytorch), and [mmpose](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmpose).\n\n\n```\ngit diff-index HEAD\ngit subtree add -P pose \u003Curl to sub-repo> \u003Csub-repo branch>\n```\n","# HRFormer：用于密集预测的高分辨率 Transformer，NeurIPS 2021\n\n\n\u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FHRNet_HRFormer_readme_17a91703b7a3.gif' align=\"center\" width=1024>\n\n\n\n## 简介\n这是 [高分辨率 Transformer (HRFormer)](https:\u002F\u002Farxiv.org\u002Fpdf\u002F2110.09408.pdf) 的官方实现。我们提出了一种高分辨率 Transformer（HRFormer），它能够为密集预测任务学习高分辨率表示，这与原始的 Vision Transformer（视觉 Transformer）形成对比，后者产生低分辨率表示且具有较高的内存和计算成本。我们利用了高分辨率卷积网络（HRNet）中引入的多分辨率并行设计，以及局部窗口自注意力（local-window self-attention），后者在小的不重叠图像窗口上执行自注意力操作，以提高内存和计算效率。此外，我们在前馈网络（FFN）中引入了卷积，以在不连接的图像窗口之间交换信息。我们展示了高分辨率 Transformer 在人姿态估计和语义分割任务上的有效性。\n\n- HRFormer 架构：\n\n![teaser](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FHRNet_HRFormer_readme_cf29b47d6fd4.png)\n\n- HRFormer 单元（trans. unit）：\n\n![teaser](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FHRNet_HRFormer_readme_28133b3f29d1.png)\n\n\n## 姿态估计\n\n### 2D 人体姿态估计\n\n#### 基于 COCO `val2017` 数据集的结果，检测器在 COCO `val2017` 数据集上的人体 AP 为 56.4\n\n| 骨干网络 | 输入尺寸 | AP | AP\u003Csup>50\u003C\u002Fsup> | AP\u003Csup>75\u003C\u002Fsup> | AR\u003Csup>M\u003C\u002Fsup> | AR\u003Csup>L\u003C\u002Fsup> | AR | 权重文件 | 日志 | 配置文件 |\n| :----------------- | :-----------: | :------: | :------: | :------: | :------:| :------: | :------: |:------: |:------: | :------: |\n| HRFormer-S  | 256x192 | 74.0% | 90.2% | 81.2% | 70.4% | 80.7% | 79.4% | [权重文件](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj2PC53KZd-7v3X0H?e=hUZ0fE) | [日志](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj2Bytw64p9XJuYMt?e=Fj8brM) | [配置文件](.\u002Fpose\u002Fconfigs\u002Ftop_down\u002Fhrt\u002Fcoco\u002Fhrt_small_coco_256x192.py) |\n| HRFormer-S  | 384x288 | 75.6% | 90.3% | 82.2% | 71.6% | 82.5% | 80.7% | [权重文件](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj2TxlkzWYuh9CkvU?e=H50XSl) | [日志](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj2FjbD4E7EQi-2n5?e=8xJqCD) | [配置文件](.\u002Fpose\u002Fconfigs\u002Ftop_down\u002Fhrt\u002Fcoco\u002Fhrt_small_coco_384x288.py) |\n| HRFormer-B  | 256x192 | 75.6% | 90.8% | 82.8% | 71.7% | 82.6% | 80.8% | [权重文件](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj2V-4bLd_7RkjTFW?e=L20Wit) | [日志](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj2KhySyLQ-QHUQ4l?e=FEKmfr) | [配置文件](.\u002Fpose\u002Fconfigs\u002Ftop_down\u002Fhrt\u002Fcoco\u002Fhrt_base_coco_256x192.py) |\n| HRFormer-B  | 384x288 | 77.2% | 91.0% | 83.6% | 73.2% | 84.2% | 82.0% | [权重文件](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj2ZKrF6rWWzoRJUM?e=RCRb0p) | [日志](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj100SWSwSYeZvXvL?e=Tu6Gtm) | [配置文件](.\u002Fpose\u002Fconfigs\u002Ftop_down\u002Fhrt\u002Fcoco\u002Fhrt_base_coco_384x288.py) |\n\n\n#### 基于 COCO `test-dev` 数据集的结果，检测器在 COCO `val2017` 数据集上的人体 AP 为 56.4\n\n| 骨干网络 | 输入尺寸 | AP | AP\u003Csup>50\u003C\u002Fsup> | AP\u003Csup>75\u003C\u002Fsup> | AR\u003Csup>M\u003C\u002Fsup> | AR\u003Csup>L\u003C\u002Fsup> | AR | 权重文件 | 日志 | 配置文件 |\n| :----------------- | :-----------: | :------: | :------: | :------: | :------:| :------: | :------: |:------: |:------: | :------: |\n| HRFormer-S  | 384x288 | 74.5% | 92.3% | 82.1% | 70.7% | 80.6% | 79.8% | [权重文件](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj2TxlkzWYuh9CkvU?e=H50XSl) | [日志](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj2FjbD4E7EQi-2n5?e=8xJqCD) |  [配置文件](.\u002Fpose\u002Fconfigs\u002Ftop_down\u002Fhrt\u002Fcoco\u002Fhrt_small_coco_384x288.py) |\n| HRFormer-B  | 384x288 | 76.2% | 92.7% | 83.8% | 72.5% | 82.3% | 81.2% | [权重文件](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj2ZKrF6rWWzoRJUM?e=RCRb0p) | [日志](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj100SWSwSYeZvXvL?e=Tu6Gtm) |  [配置文件](.\u002Fpose\u002Fconfigs\u002Ftop_down\u002Fhrt\u002Fcoco\u002Fhrt_base_coco_384x288.py)  |\n\n模型首先在 ImageNet-1K 数据集上进行预训练，然后在 COCO `val2017` 数据集上进行微调。\n\n## 语义分割\n\n#### Cityscapes\n在 Cityscapes 数据集上的性能表现。模型分别在 512x1024 和 1024x2048 的输入尺寸下进行训练和测试。\n\n方法 | Backbone (骨干网络) | 窗口大小 | 训练集 | 验证集 | 迭代次数 | 批次大小 | OHEM (在线难例挖掘) | mIoU (平均交并比) | mIoU (多尺度) | 日志 | ckpt (检查点) | 脚本 |\n| :---- | :------- | :---: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: |:--: |\nOCRNet | HRFormer-S | 7x7 | 训练集 | 验证集 | 80000 | 8 | 是 | 80.0 | 81.0 | [log](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj3K-rPMQ6sHNV-Fe?e=D3IbNn) | [ckpt](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj3Wsg-_ApKUAEUft?e=BnhLal) | [script](.\u002Fseg\u002Fscripts\u002Fcityscapes\u002Fhrt\u002Frun_hrt_small_ocr_v2_ohem.sh) |\nOCRNet | HRFormer-B | 7x7 | 训练集 | 验证集 | 80000 | 8 | 是 | 81.4 | 82.0 | [log](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj3NtH1LBB0w6yCO3?e=p4v29Z) | [ckpt](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj3zEMdYLM8nZ5gXN?e=v7ehnB) |[script](.\u002Fseg\u002Fscripts\u002Fcityscapes\u002Fhrt\u002Frun_hrt_base_ocr_v2_ohem.sh) |\nOCRNet | HRFormer-B | 15x15 | 训练集 | 验证集 | 80000 | 8 | 是 | 81.9 | 82.6 | [log](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwkAlyBb4tGcxSjF_A?e=diIDCV) | [ckpt](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwkAp3LjwI-7Csmh0K?e=K1zXrn)|[script](.\u002Fseg\u002Fscripts\u002Fcityscapes\u002Fhrt\u002Frun_hrt_base_ocr_v2_ohem_w15.sh) | \n\n#### PASCAL-Context\n\n模型使用 520x520 的输入尺寸进行训练，并在原始尺寸下进行测试。\n\n方法 | Backbone | 窗口大小 | 训练集 | 验证集 | 迭代次数 | 批次大小 | OHEM | mIoU | mIoU (Multi-Scale) | Log | ckpt | script |\n| :---- | :------- | :---: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: |:--: |\nOCRNet | HRFormer-S | 7x7 | 训练集 | 验证集 | 60000 | 16 | 是 | 53.8 | 54.6 | [log](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj306lzvnI4s5U43l?e=J9mCfg) | [ckpt](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwkADkevlhIuUrPC1T?e=hcDx5S) | [script](.\u002Fseg\u002Fscripts\u002Fpascal_context\u002Fhrt\u002Frun_hrt_small_ocr_v2_ohem.sh) |\nOCRNet | HRFormer-B | 7x7 | 训练集 | 验证集 | 60000 | 16 | 是 | 56.3 | 57.1 | [log](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj3_0tiJZqL7HWPv1?e=6ilX0Z) | [ckpt](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwkAMUzRnCGmAxEehJ?e=HrCQ9c) |[script](.\u002Fseg\u002Fscripts\u002Fpascal_context\u002Fhrt\u002Frun_hrt_base_ocr_v2_ohem.sh) |\nOCRNet | HRFormer-B | 15x15 | 训练集 | 验证集 | 60000 | 16 | 是 | 57.6 | 58.5 | [log](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj3kphBj2FusLylDg?e=qZSrpp) | [ckpt](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwkAIBAkrOlPp_T1YT?e=DeHMdo)|[script](.\u002Fseg\u002Fscripts\u002Fpascal_context\u002Fhrt\u002Frun_hrt_base_ocr_v2_ohem_w15.sh) | \n\n#### COCO-Stuff\n\n模型使用 520x520 的输入尺寸进行训练，并在原始尺寸下进行测试。\n\n方法 | Backbone | 窗口大小 | 训练集 | 验证集 | 迭代次数 | 批次大小 | OHEM | mIoU | mIoU (Multi-Scale) | Log | ckpt | script |\n| :---- | :------- | :---: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: |:--: |\nOCRNet | HRFormer-S | 7x7 | 训练集 | 验证集 | 60000 | 16 | 是 | 37.9 | 38.9 | [log](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj3ayL8oHrwsjRP1U?e=uOa0NC) | [ckpt](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj3tbt5BhdCrsu6lK?e=up2HUI) | [script](.\u002Fseg\u002Fscripts\u002Fcoco_stuff\u002Fhrt\u002Frun_hrt_small_ocr_v2_ohem.sh) |\nOCRNet | HRFormer-B | 7x7 | 训练集 | 验证集 | 60000 | 16 | 是 | 41.6 | 42.5 | [log](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj3iKM2xyDk-6jnJd?e=HL5s7d) | [ckpt](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwkAFAYKZm2wL9C6KL?e=AZiXLK) |[script](.\u002Fseg\u002Fscripts\u002Fcoco_stuff\u002Fhrt\u002Frun_hrt_base_ocr_v2_ohem.sh) |\nOCRNet | HRFormer-B | 15x15 | 训练集 | 验证集 | 60000 | 16 | 是 | 42.4 | 43.3 | [log](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj3RtsUasPSb4nhL_?e=WUBe74) | [ckpt](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj37Np48Gpb-Pjowu?e=iwL5UA)|[script](.\u002Fseg\u002Fscripts\u002Fcoco_stuff\u002Fhrt\u002Frun_hrt_base_ocr_v2_ohem_w15.sh) |  \n\n#### ADE20K\n\n模型使用 520x520 的输入尺寸进行训练，并在原始尺寸下进行测试。窗口大小为 15x15 的结果稍后将更新。\n\n方法 | Backbone | 窗口大小 | 训练集 | 验证集 | 迭代次数 | 批次大小 | OHEM | mIoU | mIoU (Multi-Scale) | Log | ckpt | script |\n| :---- | :------- | :---: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: |:--: |\nOCRNet | HRFormer-S | 7x7 | 训练集 | 验证集 | 150000 | 8 | 是 | 44.0 | 45.1 | [log](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj3EehoEZZUDMX0NU?e=F8HAQi) | [ckpt](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj28i74aN6_Zk4clX?e=CWGOcd) | [script](.\u002Fseg\u002Fscripts\u002Fade20k\u002Fhrt\u002Frun_hrt_small_ocr_v2_ohem.sh) |\nOCRNet | HRFormer-B | 7x7 | 训练集 | 验证集 | 150000 | 8 | 是 | 46.3 | 47.6 | [log](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj265qyyZ74PKjfqm?e=Cj7TGl) | [ckpt](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj3epNJ-QFF33tZtr?e=df3fQk) |[script](.\u002Fseg\u002Fscripts\u002Fade20k\u002Fhrt\u002Frun_hrt_base_ocr_v2_ohem.sh) |\nOCRNet | HRFormer-B | 13x13 | 训练集 | 验证集 | 150000 | 8 | 是 | 48.7 | 50.0 | [log](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwkAjmpl5jj0sXz2v-?e=sfhyI4) | [ckpt](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj3oTs_gVPzFDjdyU?e=yjGRKz)|[script](.\u002Fseg\u002Fscripts\u002Fade20k\u002Fhrt\u002Frun_hrt_base_ocr_v2_ohem_w13.sh) | \nOCRNet | HRFormer-B | 15x15 | 训练集 | 验证集 | 150000 | 8 | 是 | - | - | - | - | - | \n\n\n## 分类\n\n\n#### ImageNet-1K 上的结果\n\n| Backbone | Top-1 准确率 (acc@1) | Top-5 准确率 (acc@5) | 参数量 | FLOPs (浮点运算次数) | ckpt | log | script |\n| :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: |\n| HRFormer-T | 78.6% | 94.2% | 8.0M | 1.83G |[ckpt](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj1UXGB63dBVVOuLO?e=ZLOY7r) | [log](https:\u002F\u002F1drv.ms\u002Ft\u002Fs!Ai-PFrdirDvwj1S0MH9FzWCwzzxE?e=6p1Q3X) | [script](.\u002Fcls\u002Fconfigs\u002Fhrt\u002Fhrt_tiny.yaml)\n| HRFormer-S | 81.2% | 95.6% | 13.5M | 3.56G |[ckpt](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj1cc3tSp4kIKI_JH?e=bHW7xj) | [log](https:\u002F\u002F1drv.ms\u002Ft\u002Fs!Ai-PFrdirDvwj1l2RxNkcb6lmGF3?e=hZ9A1K) | [script](.\u002Fcls\u002Fconfigs\u002Fhrt\u002Fhrt_small.yaml)\n| HRFormer-B | 82.8% | 96.3% | 50.3M | 13.71G |[ckpt](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!Ai-PFrdirDvwj1iNZngTF7PEyik9?e=fv8CG6) | [log](https:\u002F\u002F1drv.ms\u002Ft\u002Fs!Ai-PFrdirDvwj1aBKjc1mKQCkwen?e=spYZOe) | [script](.\u002Fcls\u002Fconfigs\u002Fhrt\u002Fhrt_base.yaml) |\n\n\n## 引用\n\n如果您在研究中发现本项目有用，请考虑引用：\n\n```\n@article{YuanFHLZCW21,\n  title={HRFormer: High-Resolution Transformer for Dense Prediction},\n  author={Yuhui Yuan and Rao Fu and Lang Huang and Weihong Lin and Chao Zhang and Xilin Chen and Jingdong Wang},\n  booktitle={NeurIPS},\n  year={2021}\n}\n```\n\n\n## 致谢\n本项目基于 [Swin-Transformer](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FSwin-Transformer)、[openseg.pytorch](https:\u002F\u002Fgithub.com\u002Fopenseg-group\u002Fopenseg.pytorch) 和 [mmpose](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmpose) 开发。\n\n\n```\ngit diff-index HEAD\ngit subtree add -P pose \u003Curl to sub-repo> \u003Csub-repo branch>\n```","# HRFormer 快速上手指南\n\n## 简介\nHRFormer (High-Resolution Transformer) 是一种用于密集预测任务的高分辨率 Transformer。相比传统的 Vision Transformer，它在保持高分辨率表示的同时，通过多分辨率并行设计和局部窗口自注意力机制降低了内存和计算成本。该工具支持人体姿态估计、语义分割和图像分类任务。\n\n## 环境准备\n建议配置如下开发环境：\n- **操作系统**：Linux (推荐) \u002F Windows\n- **编程语言**：Python 3.7+\n- **深度学习框架**：PyTorch (根据项目需求选择版本)\n- **硬件加速**：NVIDIA GPU (CUDA)\n- **依赖基础**：本项目基于 [Swin-Transformer](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FSwin-Transformer)、[openseg.pytorch](https:\u002F\u002Fgithub.com\u002Fopenseg-group\u002Fopenseg.pytorch) 和 [mmpose](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmpose) 开发。\n\n建议使用国内镜像源加速依赖下载（如清华源）：\n```bash\npip install -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple \u003Cpackage_name>\n```\n\n## 安装步骤\n\n### 1. 克隆代码库\n```bash\ngit clone \u003Crepository_url>\ncd \u003Crepository_directory>\n```\n\n### 2. 初始化子模块\n根据 README 底部的说明，该项目可能使用了 git subtree 管理部分代码（如 pose 目录），请执行以下命令初始化：\n```bash\ngit diff-index HEAD\ngit subtree add -P pose \u003Curl to sub-repo> \u003Csub-repo branch>\n```\n*(注：具体 URL 和分支请参考原仓库文档或配置文件)*\n\n### 3. 安装依赖\n由于依赖多个 OpenMMLab 生态项目，请确保安装对应的核心库。通常需安装以下包（具体版本请参照各基础项目要求）：\n```bash\npip install torch torchvision torchaudio --index-url https:\u002F\u002Fdownload.pytorch.org\u002Fwhl\u002Fcu118\npip install mmcv-full\npip install mmdet\npip install mmsegmentation\npip install mmpose\n```\n\n## 基本使用\n\n本工具主要包含三个任务模块，具体配置文件和脚本路径已在 README 中列出。\n\n### 1. 2D 人体姿态估计 (Pose Estimation)\n- **配置文件位置**：`.\u002Fpose\u002Fconfigs\u002Ftop_down\u002Fhrt\u002Fcoco\u002F`\n- **示例脚本**：参考表格中的 `script` 列链接，例如运行小模型配置：\n  ```bash\n  python .\u002Fpose\u002Fconfigs\u002Ftop_down\u002Fhrt\u002Fcoco\u002Fhrt_small_coco_256x192.py\n  ```\n- **预训练模型**：可从 README 提供的 OneDrive 链接下载 ckpt 文件并放置于相应目录。\n\n### 2. 语义分割 (Semantic Segmentation)\n- **数据集**：支持 Cityscapes, PASCAL-Context, COCO-Stuff, ADE20K。\n- **运行脚本**：位于 `.\u002Fseg\u002Fscripts\u002F` 目录下。\n- **示例命令**：以 Cityscapes 为例：\n  ```bash\n  bash .\u002Fseg\u002Fscripts\u002Fcityscapes\u002Fhrt\u002Frun_hrt_small_ocr_v2_ohem.sh\n  ```\n\n### 3. 图像分类 (Classification)\n- **配置文件位置**：`.\u002Fcls\u002Fconfigs\u002Fhrt\u002F`\n- **示例脚本**：\n  ```bash\n  python .\u002Fcls\u002Fconfigs\u002Fhrt\u002Fhrt_tiny.yaml\n  ```\n- **数据集**：ImageNet-1K。\n\n### 注意事项\n- 所有模型均在 ImageNet-1K 上预训练后，在特定数据集上进行微调。\n- 推理时请确保输入尺寸与配置文件一致（如 256x192, 512x1024 等）。\n- 详细参数调整请参考各任务下的配置文件。","某智能工厂安全团队正在开发基于视频流的工人姿态监控系统，旨在实时检测高空作业等违规操作行为。\n\n### 没有 HRFormer 时\n- 传统 Vision Transformer 架构在处理高清监控画面时显存占用过高，导致边缘服务器难以承载大规模并发。\n- 低分辨率特征提取导致人体关节点模糊，关键动作识别准确率不足 60%，安全隐患难以被捕捉。\n- 模型对遮挡和复杂背景敏感，多人交互场景下容易出现身份混淆，影响统计数据的准确性。\n- 推理速度慢，无法满足每秒 30 帧的实时安全预警需求，系统响应存在明显滞后。\n\n### 使用 HRFormer 后\n- HRFormer 利用局部窗口自注意力机制，大幅降低计算量，使得模型能够流畅适配边缘端硬件部署。\n- 高分辨率并行设计保留图像细节，在 COCO 数据集测试中 AP 值突破 75%，关节定位精准度显著提升。\n- 前馈网络中的卷积层促进跨窗口信息交流，有效解决遮挡导致的检测丢失问题，鲁棒性更强。\n- 推理速度优化至 20fps 以上，满足实时视频流分析的低延迟要求，确保预警信息及时送达。\n\nHRFormer 通过兼顾高分辨率特征与计算效率，成功解决了工业场景下高精度实时检测的难题。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FHRNet_HRFormer_17a91703.gif","HRNet","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002FHRNet_a2efc848.png","Code for pose estimation is available at https:\u002F\u002Fgithub.com\u002Fleoxiaobin\u002Fdeep-high-resolution-net.pytorch",null,"welleast@outlook.com","https:\u002F\u002Fjingdongwang2017.github.io\u002F","https:\u002F\u002Fgithub.com\u002FHRNet",[83,87,91,95,99,103,107,110,113],{"name":84,"color":85,"percentage":86},"Python","#3572A5",84.9,{"name":88,"color":89,"percentage":90},"Shell","#89e051",11.1,{"name":92,"color":93,"percentage":94},"Cuda","#3A4E3A",2.1,{"name":96,"color":97,"percentage":98},"C","#555555",1.1,{"name":100,"color":101,"percentage":102},"C++","#f34b7d",0.7,{"name":104,"color":105,"percentage":106},"Cython","#fedf5b",0,{"name":108,"color":109,"percentage":106},"Dockerfile","#384d54",{"name":111,"color":112,"percentage":106},"Batchfile","#C1F12E",{"name":114,"color":115,"percentage":106},"Makefile","#427819",521,67,"2026-03-08T12:44:04","MIT","未说明",{"notes":122,"python":120,"dependencies":123},"项目基于 Swin-Transformer、openseg.pytorch 和 mmpose 开发。模型需先在 ImageNet-1K 预训练，再在 COCO\u002FCityscapes 等数据集微调。支持 2D 人体姿态估计、语义分割及图像分类任务。具体依赖库及版本未在 README 中明确列出，建议参考其引用的基础项目文档。",[120],[14,26],[126,127,128,129,130,131],"vision","transformer","segmentation","pose-estimation","classification","hrnet","2026-03-27T02:49:30.150509","2026-04-06T06:44:18.803846",[135,140,145,150,155,160],{"id":136,"question_zh":137,"answer_zh":138,"source_url":139},3673,"哪里可以下载 ImageNet-1K 的预训练模型？","请前往项目的 Release 页面查找并下载相关模型文件。\n链接：https:\u002F\u002Fgithub.com\u002FHRNet\u002FHRFormer\u002Freleases","https:\u002F\u002Fgithub.com\u002FHRNet\u002FHRFormer\u002Fissues\u002F20",{"id":141,"question_zh":142,"answer_zh":143,"source_url":144},3669,"在局部自注意力机制中，如何处理非固定输入尺寸下的 key_padding_mask？","默认情况下 Local Self-Attention 中的 `key_padding_mask` 为 None，即不屏蔽填充的零。如果出于特定需求需要使用该参数，建议先根据窗口大小对 mask 进行划分，然后再将其作为 `key_padding_mask` 参数传入。","https:\u002F\u002Fgithub.com\u002FHRNet\u002FHRFormer\u002Fissues\u002F6",{"id":146,"question_zh":147,"answer_zh":148,"source_url":149},3670,"HRFormer 的训练速度为何比 HRNet 慢？有加速方法吗？","这是正常现象。虽然 HRF-s 256 的计算量（约 2.8G flops）低于 HRNet（约 7.9 Gflops），但由于 Transformer 结构和深度可分离卷积（dwconv）的影响，训练时间确实更长。目前没有找到简单的加速方法。","https:\u002F\u002Fgithub.com\u002FHRNet\u002FHRFormer\u002Fissues\u002F4",{"id":151,"question_zh":152,"answer_zh":153,"source_url":154},3671,"PadBlock 中的维度置换操作是否存在逻辑错误？","实现是正确的。MHA 类的 forward 函数实际接收的输入形状为 `[tgt_len, bsz, embed_dim]`，因此当前的维度置换逻辑符合该输入要求，无需修改。","https:\u002F\u002Fgithub.com\u002FHRNet\u002FHRFormer\u002Fissues\u002F17",{"id":156,"question_zh":157,"answer_zh":158,"source_url":159},3672,"恢复训练（Resume）时出现 CUDA Out Of Memory 错误如何解决？","可以在加载 checkpoint 时指定将模型先加载到 CPU 来解决。具体代码修改如下：\n`resume_dict = torch.load(self.configer.get('network', 'resume'), map_location='cpu')`","https:\u002F\u002Fgithub.com\u002FHRNet\u002FHRFormer\u002Fissues\u002F1",{"id":161,"question_zh":162,"answer_zh":163,"source_url":164},3674,"哪里可以下载 Cityscapes 分割任务的预训练模型？","请参考项目 README 文档中的分类（Classification）部分获取相关信息和模型链接。\n链接：https:\u002F\u002Fgithub.com\u002FHRNet\u002FHRFormer#classification","https:\u002F\u002Fgithub.com\u002FHRNet\u002FHRFormer\u002Fissues\u002F26",[166],{"id":167,"version":168,"summary_zh":78,"released_at":169},103259,"v1.0.0","2021-11-29T11:59:18"]