[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-roboflow--rf-detr":3,"tool-roboflow--rf-detr":61},[4,18,26,36,44,53],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[13,14,15,16],"Agent","开发框架","图像","数据工具","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":10,"last_commit_at":24,"category_tags":25,"status":17},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,"2026-04-05T11:01:52",[14,15,13],{"id":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":32,"last_commit_at":33,"category_tags":34,"status":17},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",151918,2,"2026-04-12T11:33:05",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":32,"last_commit_at":42,"category_tags":43,"status":17},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",108322,"2026-04-10T11:39:34",[14,15,13],{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":32,"last_commit_at":50,"category_tags":51,"status":17},6121,"gemini-cli","google-gemini\u002Fgemini-cli","gemini-cli 是一款由谷歌推出的开源 AI 命令行工具，它将强大的 Gemini 大模型能力直接集成到用户的终端环境中。对于习惯在命令行工作的开发者而言，它提供了一条从输入提示词到获取模型响应的最短路径，无需切换窗口即可享受智能辅助。\n\n这款工具主要解决了开发过程中频繁上下文切换的痛点，让用户能在熟悉的终端界面内直接完成代码理解、生成、调试以及自动化运维任务。无论是查询大型代码库、根据草图生成应用，还是执行复杂的 Git 操作，gemini-cli 都能通过自然语言指令高效处理。\n\n它特别适合广大软件工程师、DevOps 人员及技术研究人员使用。其核心亮点包括支持高达 100 万 token 的超长上下文窗口，具备出色的逻辑推理能力；内置 Google 搜索、文件操作及 Shell 命令执行等实用工具；更独特的是，它支持 MCP（模型上下文协议），允许用户灵活扩展自定义集成，连接如图像生成等外部能力。此外，个人谷歌账号即可享受免费的额度支持，且项目基于 Apache 2.0 协议完全开源，是提升终端工作效率的理想助手。",100752,"2026-04-10T01:20:03",[52,13,15,14],"插件",{"id":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":32,"last_commit_at":59,"category_tags":60,"status":17},4721,"markitdown","microsoft\u002Fmarkitdown","MarkItDown 是一款由微软 AutoGen 团队打造的轻量级 Python 工具，专为将各类文件高效转换为 Markdown 格式而设计。它支持 PDF、Word、Excel、PPT、图片（含 OCR）、音频（含语音转录）、HTML 乃至 YouTube 链接等多种格式的解析，能够精准提取文档中的标题、列表、表格和链接等关键结构信息。\n\n在人工智能应用日益普及的今天，大语言模型（LLM）虽擅长处理文本，却难以直接读取复杂的二进制办公文档。MarkItDown 恰好解决了这一痛点，它将非结构化或半结构化的文件转化为模型“原生理解”且 Token 效率极高的 Markdown 格式，成为连接本地文件与 AI 分析 pipeline 的理想桥梁。此外，它还提供了 MCP（模型上下文协议）服务器，可无缝集成到 Claude Desktop 等 LLM 应用中。\n\n这款工具特别适合开发者、数据科学家及 AI 研究人员使用，尤其是那些需要构建文档检索增强生成（RAG）系统、进行批量文本分析或希望让 AI 助手直接“阅读”本地文件的用户。虽然生成的内容也具备一定可读性，但其核心优势在于为机器",93400,"2026-04-06T19:52:38",[52,14],{"id":62,"github_repo":63,"name":64,"description_en":65,"description_zh":66,"ai_summary_zh":67,"readme_en":68,"readme_zh":69,"quickstart_zh":70,"use_case_zh":71,"hero_image_url":72,"owner_login":73,"owner_name":74,"owner_avatar_url":75,"owner_bio":76,"owner_company":77,"owner_location":77,"owner_email":78,"owner_twitter":73,"owner_website":79,"owner_url":80,"languages":81,"stars":90,"forks":91,"last_commit_at":92,"license":93,"difficulty_score":32,"env_os":94,"env_gpu":95,"env_ram":94,"env_deps":96,"category_tags":102,"github_topics":103,"view_count":32,"oss_zip_url":77,"oss_zip_packed_at":77,"status":17,"created_at":110,"updated_at":111,"faqs":112,"releases":141},6939,"roboflow\u002Frf-detr","rf-detr","[ICLR 2026] RF-DETR is a real-time object detection and segmentation model architecture developed by Roboflow, SOTA on COCO, designed for fine-tuning.","RF-DETR 是由 Roboflow 开发的一款实时目标检测与实例分割模型架构，旨在为开发者提供兼具高精度与低延迟的视觉解决方案。它有效解决了传统模型在追求极致速度时往往牺牲准确率，或在保证精度时难以满足实时性要求的痛点，在权威的 COCO 数据集上实现了当前最先进的性能表现。\n\n这款工具特别适合计算机视觉领域的研究人员、算法工程师以及需要部署高效视觉应用的开发者使用。无论是进行自定义模型的微调训练，还是构建对响应速度敏感的工业检测、安防监控或自动驾驶系统，RF-DETR 都能提供强大的支持。\n\n其核心技术亮点在于采用了 DINOv2 视觉 Transformer 作为骨干网络，通过统一的 API 接口同时支持目标检测和实例分割任务，简化了开发流程。在 NVIDIA T4 等常见硬件上，借助 TensorRT 加速，它能以极低的毫秒级延迟完成复杂场景的分析。此外，项目遵循开源精神，基础版本采用宽松的 Apache 2.0 协议，方便社区自由使用与二次开发，同时也提供了更高规格的 Plus 版本以满足极端性能需求。配合完善的文档、Colab 教程及 Hugging Face 演示空间，","RF-DETR 是由 Roboflow 开发的一款实时目标检测与实例分割模型架构，旨在为开发者提供兼具高精度与低延迟的视觉解决方案。它有效解决了传统模型在追求极致速度时往往牺牲准确率，或在保证精度时难以满足实时性要求的痛点，在权威的 COCO 数据集上实现了当前最先进的性能表现。\n\n这款工具特别适合计算机视觉领域的研究人员、算法工程师以及需要部署高效视觉应用的开发者使用。无论是进行自定义模型的微调训练，还是构建对响应速度敏感的工业检测、安防监控或自动驾驶系统，RF-DETR 都能提供强大的支持。\n\n其核心技术亮点在于采用了 DINOv2 视觉 Transformer 作为骨干网络，通过统一的 API 接口同时支持目标检测和实例分割任务，简化了开发流程。在 NVIDIA T4 等常见硬件上，借助 TensorRT 加速，它能以极低的毫秒级延迟完成复杂场景的分析。此外，项目遵循开源精神，基础版本采用宽松的 Apache 2.0 协议，方便社区自由使用与二次开发，同时也提供了更高规格的 Plus 版本以满足极端性能需求。配合完善的文档、Colab 教程及 Hugging Face 演示空间，用户可以快速上手并验证效果。","# RF-DETR: Real-Time SOTA Detection and Segmentation\n\n[![version](https:\u002F\u002Fbadge.fury.io\u002Fpy\u002Frfdetr.svg)](https:\u002F\u002Fbadge.fury.io\u002Fpy\u002Frfdetr)\n[![downloads](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fdm\u002Frfdetr)](https:\u002F\u002Fpypistats.org\u002Fpackages\u002Frfdetr)\n[![codecov](https:\u002F\u002Fcodecov.io\u002Fgh\u002Froboflow\u002Frf-detr\u002Fgraph\u002Fbadge.svg?token=K8V4ARR3XV)](https:\u002F\u002Fcodecov.io\u002Fgh\u002Froboflow\u002Frf-detr)\n[![python-version](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fpyversions\u002Frfdetr)](https:\u002F\u002Fbadge.fury.io\u002Fpy\u002Frfdetr)\n[![license](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-Apache%202.0-blue)](https:\u002F\u002Fgithub.com\u002Froboflow\u002Frfdetr\u002Fblob\u002Fmain\u002FLICENSE)\n\n[![arXiv](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FarXiv-2511.09554-b31b1b.svg)](https:\u002F\u002Farxiv.org\u002Fabs\u002F2511.09554)\n[![hf space](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https:\u002F\u002Fhuggingface.co\u002Fspaces\u002FSkalskiP\u002FRF-DETR)\n[![colab](https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg)](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Froboflow-ai\u002Fnotebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002Fhow-to-finetune-rf-detr-on-detection-dataset.ipynb)\n[![roboflow](https:\u002F\u002Fraw.githubusercontent.com\u002Froboflow-ai\u002Fnotebooks\u002Fmain\u002Fassets\u002Fbadges\u002Froboflow-blogpost.svg)](https:\u002F\u002Fblog.roboflow.com\u002Frf-detr)\n[![discord](https:\u002F\u002Fimg.shields.io\u002Fdiscord\u002F1159501506232451173?logo=discord&label=discord&labelColor=fff&color=5865f2&link=https%3A%2F%2Fdiscord.gg%2FGbfgXGJ8Bk)](https:\u002F\u002Fdiscord.gg\u002FGbfgXGJ8Bk)\n\nRF-DETR is a real-time transformer architecture for object detection and instance segmentation developed by Roboflow. Built on a DINOv2 vision transformer backbone, RF-DETR delivers state-of-the-art accuracy and latency trade-offs on [Microsoft COCO](https:\u002F\u002Fcocodataset.org\u002F#home) and [RF100-VL](https:\u002F\u002Fgithub.com\u002Froboflow\u002Frf100-vl).\n\nRF-DETR uses a DINOv2 vision transformer backbone and supports both detection and instance segmentation in a single, consistent API. The open-source `rfdetr` package and Apache-designated models are released under Apache 2.0, while Plus components (`rfdetr_plus`, including RF-DETR-XL\u002F2XL detection models) are licensed under PML 1.0.\n\nhttps:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002Fadd23fd1-266f-4538-8809-d7dd5767e8e6\n\n## Install\n\nTo install RF-DETR, install the `rfdetr` package in a [**Python>=3.10**](https:\u002F\u002Fwww.python.org\u002F) environment with `pip`.\n\n```bash\npip install rfdetr\n```\n\n\u003Cdetails>\n\u003Csummary>Install from source\u003C\u002Fsummary>\n\n\u003Cbr>\n\nBy installing RF-DETR from source, you can explore the most recent features and enhancements that have not yet been officially released. **Please note that these updates are still in development and may not be as stable as the latest published release.**\n\n```bash\npip install https:\u002F\u002Fgithub.com\u002Froboflow\u002Frf-detr\u002Farchive\u002Frefs\u002Fheads\u002Fdevelop.zip\n```\n\n\u003C\u002Fdetails>\n\n## Benchmarks\n\nRF-DETR achieves state-of-the-art results in both object detection and instance segmentation, with benchmarks reported on Microsoft COCO and RF100-VL. The charts and tables below compare RF-DETR against other top real-time models across accuracy and latency for detection and segmentation. All latency numbers were measured on an NVIDIA T4 using TensorRT, FP16, and batch size 1. For full benchmarking methodology and reproducibility details, see [roboflow\u002Fsab](https:\u002F\u002Fgithub.com\u002Froboflow\u002Fsingle_artifact_benchmarking).\n\n### Detection\n\n\u003Cimg alt=\"rf_detr_1-4_latency_accuracy_object_detection\" src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Froboflow_rf-detr_readme_7c81eb653a69.png\" \u002F>\n\n\u003Cdetails>\n\u003Csummary>See object detection benchmark numbers\u003C\u002Fsummary>\n\n\u003Cbr>\n\n| Architecture  | COCO AP\u003Csub>50\u003C\u002Fsub> | COCO AP\u003Csub>50:95\u003C\u002Fsub> | RF100VL AP\u003Csub>50\u003C\u002Fsub> | RF100VL AP\u003Csub>50:95\u003C\u002Fsub> | Latency (ms) | Params (M) | Resolution |  License   |\n| :-----------: | :------------------: | :---------------------: | :---------------------: | :------------------------: | :----------: | :--------: | :--------: | :--------: |\n|   RF-DETR-N   |         67.6         |          48.4           |          85.0           |            57.7            |     2.3      |    30.5    |  384x384   | Apache 2.0 |\n|   RF-DETR-S   |         72.1         |          53.0           |          86.7           |            60.2            |     3.5      |    32.1    |  512x512   | Apache 2.0 |\n|   RF-DETR-M   |         73.6         |          54.7           |          87.4           |            61.2            |     4.4      |    33.7    |  576x576   | Apache 2.0 |\n|   RF-DETR-L   |         75.1         |          56.5           |          88.2           |            62.2            |     6.8      |    33.9    |  704x704   | Apache 2.0 |\n| RF-DETR-XL △  |         77.4         |          58.6           |          88.5           |            62.9            |     11.5     |   126.4    |  700x700   |  PML 1.0   |\n| RF-DETR-2XL △ |         78.5         |          60.1           |          89.0           |            63.2            |     17.2     |   126.9    |  880x880   |  PML 1.0   |\n|   YOLO11-N    |         52.0         |          37.4           |          81.4           |            55.3            |     2.5      |    2.6     |  640x640   |  AGPL-3.0  |\n|   YOLO11-S    |         59.7         |          44.4           |          82.3           |            56.2            |     3.2      |    9.4     |  640x640   |  AGPL-3.0  |\n|   YOLO11-M    |         64.1         |          48.6           |          82.5           |            56.5            |     5.1      |    20.1    |  640x640   |  AGPL-3.0  |\n|   YOLO11-L    |         64.9         |          49.9           |          82.2           |            56.5            |     6.5      |    25.3    |  640x640   |  AGPL-3.0  |\n|   YOLO11-X    |         66.1         |          50.9           |          81.7           |            56.2            |     10.5     |    56.9    |  640x640   |  AGPL-3.0  |\n|   YOLO26-N    |         55.8         |          40.3           |          76.7           |            52.0            |     1.7      |    2.6     |  640x640   |  AGPL-3.0  |\n|   YOLO26-S    |         64.3         |          47.7           |          82.7           |            57.0            |     2.6      |    9.4     |  640x640   |  AGPL-3.0  |\n|   YOLO26-M    |         69.7         |          52.5           |          84.4           |            58.7            |     4.4      |    20.1    |  640x640   |  AGPL-3.0  |\n|   YOLO26-L    |         71.1         |          54.1           |          85.0           |            59.3            |     5.7      |    25.3    |  640x640   |  AGPL-3.0  |\n|   YOLO26-X    |         74.0         |          56.9           |          85.6           |            60.0            |     9.6      |    56.9    |  640x640   |  AGPL-3.0  |\n|   LW-DETR-T   |         60.7         |          42.9           |          84.7           |            57.1            |     1.9      |    12.1    |  640x640   | Apache 2.0 |\n|   LW-DETR-S   |         66.8         |          48.0           |          85.0           |            57.4            |     2.6      |    14.6    |  640x640   | Apache 2.0 |\n|   LW-DETR-M   |         72.0         |          52.6           |          86.8           |            59.8            |     4.4      |    28.2    |  640x640   | Apache 2.0 |\n|   LW-DETR-L   |         74.6         |          56.1           |          87.4           |            61.5            |     6.9      |    46.8    |  640x640   | Apache 2.0 |\n|   LW-DETR-X   |         76.9         |          58.3           |          87.9           |            62.1            |     13.0     |   118.0    |  640x640   | Apache 2.0 |\n|   D-FINE-N    |         60.2         |          42.7           |          84.4           |            58.2            |     2.1      |    3.8     |  640x640   | Apache 2.0 |\n|   D-FINE-S    |         67.6         |          50.6           |          85.3           |            60.3            |     3.5      |    10.2    |  640x640   | Apache 2.0 |\n|   D-FINE-M    |         72.6         |          55.0           |          85.5           |            60.6            |     5.4      |    19.2    |  640x640   | Apache 2.0 |\n|   D-FINE-L    |         74.9         |          57.2           |          86.4           |            61.6            |     7.5      |    31.0    |  640x640   | Apache 2.0 |\n|   D-FINE-X    |         76.8         |          59.3           |          86.9           |            62.2            |     11.5     |    62.0    |  640x640   | Apache 2.0 |\n\n\u003C\u002Fdetails>\n\n### Segmentation\n\n\u003Cimg alt=\"rf_detr_1-4_latency_accuracy_instance_segmentation\" src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Froboflow_rf-detr_readme_09231a1e3f1d.png\" \u002F>\n\n\u003Cdetails>\n\u003Csummary>See instance segmentation benchmark numbers\u003C\u002Fsummary>\n\n\u003Cbr>\n\n|  Architecture   | COCO AP\u003Csub>50\u003C\u002Fsub> | COCO AP\u003Csub>50:95\u003C\u002Fsub> | Latency (ms) | Params (M) | Resolution |  License   |\n| :-------------: | :------------------: | :---------------------: | :----------: | :--------: | :--------: | :--------: |\n|  RF-DETR-Seg-N  |         63.0         |          40.3           |     3.4      |    33.6    |  312x312   | Apache 2.0 |\n|  RF-DETR-Seg-S  |         66.2         |          43.1           |     4.4      |    33.7    |  384x384   | Apache 2.0 |\n|  RF-DETR-Seg-M  |         68.4         |          45.3           |     5.9      |    35.7    |  432x432   | Apache 2.0 |\n|  RF-DETR-Seg-L  |         70.5         |          47.1           |     8.8      |    36.2    |  504x504   | Apache 2.0 |\n| RF-DETR-Seg-XL  |         72.2         |          48.8           |     13.5     |    38.1    |  624x624   | Apache 2.0 |\n| RF-DETR-Seg-2XL |         73.1         |          49.9           |     21.8     |    38.6    |  768x768   | Apache 2.0 |\n|  YOLOv8-N-Seg   |         45.6         |          28.3           |     3.5      |    3.4     |  640x640   |  AGPL-3.0  |\n|  YOLOv8-S-Seg   |         53.8         |          34.0           |     4.2      |    11.8    |  640x640   |  AGPL-3.0  |\n|  YOLOv8-M-Seg   |         58.2         |          37.3           |     7.0      |    27.3    |  640x640   |  AGPL-3.0  |\n|  YOLOv8-L-Seg   |         60.5         |          39.0           |     9.7      |    46.0    |  640x640   |  AGPL-3.0  |\n|  YOLOv8-XL-Seg  |         61.3         |          39.5           |     14.0     |    71.8    |  640x640   |  AGPL-3.0  |\n|  YOLOv11-N-Seg  |         47.8         |          30.0           |     3.6      |    2.9     |  640x640   |  AGPL-3.0  |\n|  YOLOv11-S-Seg  |         55.4         |          35.0           |     4.6      |    10.1    |  640x640   |  AGPL-3.0  |\n|  YOLOv11-M-Seg  |         60.0         |          38.5           |     6.9      |    22.4    |  640x640   |  AGPL-3.0  |\n|  YOLOv11-L-Seg  |         61.5         |          39.5           |     8.3      |    27.6    |  640x640   |  AGPL-3.0  |\n| YOLOv11-XL-Seg  |         62.4         |          40.1           |     13.7     |    62.1    |  640x640   |  AGPL-3.0  |\n|  YOLO26-N-Seg   |         54.3         |          34.7           |     2.31     |    2.7     |  640x640   |  AGPL-3.0  |\n|  YOLO26-S-Seg   |         62.4         |          40.2           |     3.47     |    10.4    |  640x640   |  AGPL-3.0  |\n|  YOLO26-M-Seg   |         67.8         |          44.0           |     6.32     |    23.6    |  640x640   |  AGPL-3.0  |\n|  YOLO26-L-Seg   |         69.8         |          45.5           |     7.58     |    28.0    |  640x640   |  AGPL-3.0  |\n|  YOLO26-X-Seg   |         71.6         |          46.8           |    12.92     |    62.8    |  640x640   |  AGPL-3.0  |\n\n\u003C\u002Fdetails>\n\n## Run Models\n\n### Detection\n\nRF-DETR provides multiple model sizes, ranging from Nano to 2XLarge. To use a different model size, replace the class name in the code snippet below with another class from the table.\n\n```python\nimport supervision as sv\nfrom rfdetr import RFDETRMedium\nfrom rfdetr.assets.coco_classes import COCO_CLASSES\n\nmodel = RFDETRMedium()\n\ndetections = model.predict(\"https:\u002F\u002Fmedia.roboflow.com\u002Fdog.jpg\", threshold=0.5)\n\nlabels = [f\"{COCO_CLASSES[class_id]}\" for class_id in detections.class_id]\n\nannotated_image = sv.BoxAnnotator().annotate(detections.data[\"source_image\"], detections)\nannotated_image = sv.LabelAnnotator().annotate(annotated_image, detections, labels)\n```\n\n\u003Cdetails>\n\u003Csummary>Run RF-DETR with Inference\u003C\u002Fsummary>\n\n\u003Cbr>\n\nYou can also run RF-DETR models using the Inference library. To switch model size, select the appropriate inference package alias from the table below.\n\n```python\nimport requests\nimport supervision as sv\nfrom PIL import Image\nfrom inference import get_model\n\nmodel = get_model(\"rfdetr-medium\")\n\nimage = Image.open(requests.get(\"https:\u002F\u002Fmedia.roboflow.com\u002Fdog.jpg\", stream=True).raw)\npredictions = model.infer(image, confidence=0.5)[0]\ndetections = sv.Detections.from_inference(predictions)\n\nannotated_image = sv.BoxAnnotator().annotate(image, detections)\nannotated_image = sv.LabelAnnotator().annotate(annotated_image, detections)\n```\n\n\u003C\u002Fdetails>\n\n| Size | RF-DETR package class | Inference package alias | COCO AP\u003Csub>50\u003C\u002Fsub> | COCO AP\u003Csub>50:95\u003C\u002Fsub> | Latency (ms) | Params (M) | Resolution |  License   |\n| :--: | :-------------------: | :---------------------- | :------------------: | :---------------------: | :----------: | :--------: | :--------: | :--------: |\n|  N   |     `RFDETRNano`      | `rfdetr-nano`           |         67.6         |          48.4           |     2.3      |    30.5    |  384x384   | Apache 2.0 |\n|  S   |     `RFDETRSmall`     | `rfdetr-small`          |         72.1         |          53.0           |     3.5      |    32.1    |  512x512   | Apache 2.0 |\n|  M   |    `RFDETRMedium`     | `rfdetr-medium`         |         73.6         |          54.7           |     4.4      |    33.7    |  576x576   | Apache 2.0 |\n|  L   |     `RFDETRLarge`     | `rfdetr-large`          |         75.1         |          56.5           |     6.8      |    33.9    |  704x704   | Apache 2.0 |\n|  XL  |   `RFDETRXLarge` △    | `rfdetr-xlarge`         |         77.4         |          58.6           |     11.5     |   126.4    |  700x700   |  PML 1.0   |\n| 2XL  |   `RFDETR2XLarge` △   | `rfdetr-2xlarge`        |         78.5         |          60.1           |     17.2     |   126.9    |  880x880   |  PML 1.0   |\n\n> △ Requires the `rfdetr_plus` extension: `pip install rfdetr[plus]`. See [License](#license) for details.\n\n### Segmentation\n\nRF-DETR supports instance segmentation with model sizes from Nano to 2XLarge. To use a different model size, replace the class name in the code snippet below with another class from the table.\n\n```python\nimport supervision as sv\nfrom rfdetr import RFDETRSegMedium\nfrom rfdetr.assets.coco_classes import COCO_CLASSES\n\nmodel = RFDETRSegMedium()\n\ndetections = model.predict(\"https:\u002F\u002Fmedia.roboflow.com\u002Fdog.jpg\", threshold=0.5)\n\nlabels = [f\"{COCO_CLASSES[class_id]}\" for class_id in detections.class_id]\n\nannotated_image = sv.MaskAnnotator().annotate(detections.data[\"source_image\"], detections)\nannotated_image = sv.LabelAnnotator().annotate(annotated_image, detections, labels)\n```\n\n\u003Cdetails>\n\u003Csummary>Run RF-DETR-Seg with Inference\u003C\u002Fsummary>\n\n\u003Cbr>\n\nYou can also run RF-DETR-Seg models using the Inference library. To switch model size, select the appropriate inference package alias from the table below.\n\n```python\nimport requests\nimport supervision as sv\nfrom PIL import Image\nfrom inference import get_model\n\nmodel = get_model(\"rfdetr-seg-medium\")\n\nimage = Image.open(requests.get(\"https:\u002F\u002Fmedia.roboflow.com\u002Fdog.jpg\", stream=True).raw)\npredictions = model.infer(image, confidence=0.5)[0]\ndetections = sv.Detections.from_inference(predictions)\n\nannotated_image = sv.MaskAnnotator().annotate(image, detections)\nannotated_image = sv.LabelAnnotator().annotate(annotated_image, detections)\n```\n\n\u003C\u002Fdetails>\n\n| Size | RF-DETR package class | Inference package alias | COCO AP\u003Csub>50\u003C\u002Fsub> | COCO AP\u003Csub>50:95\u003C\u002Fsub> | Latency (ms) | Params (M) | Resolution |  License   |\n| :--: | :-------------------: | :---------------------- | :------------------: | :---------------------: | :----------: | :--------: | :--------: | :--------: |\n|  N   |    `RFDETRSegNano`    | `rfdetr-seg-nano`       |         63.0         |          40.3           |     3.4      |    33.6    |  312x312   | Apache 2.0 |\n|  S   |   `RFDETRSegSmall`    | `rfdetr-seg-small`      |         66.2         |          43.1           |     4.4      |    33.7    |  384x384   | Apache 2.0 |\n|  M   |   `RFDETRSegMedium`   | `rfdetr-seg-medium`     |         68.4         |          45.3           |     5.9      |    35.7    |  432x432   | Apache 2.0 |\n|  L   |   `RFDETRSegLarge`    | `rfdetr-seg-large`      |         70.5         |          47.1           |     8.8      |    36.2    |  504x504   | Apache 2.0 |\n|  XL  |   `RFDETRSegXLarge`   | `rfdetr-seg-xlarge`     |         72.2         |          48.8           |     13.5     |    38.1    |  624x624   | Apache 2.0 |\n| 2XL  |  `RFDETRSeg2XLarge`   | `rfdetr-seg-2xlarge`    |         73.1         |          49.9           |     21.8     |    38.6    |  768x768   | Apache 2.0 |\n\n### Train Models\n\nRF-DETR supports training for both object detection and instance segmentation. You can train models in [Google Colab](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Froboflow-ai\u002Fnotebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002Fhow-to-finetune-rf-detr-on-detection-dataset.ipynb) or directly on the Roboflow platform. Below you will find a step-by-step video fine-tuning tutorial.\n\n[![rf-detr-tutorial-banner](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Froboflow_rf-detr_readme_49b5345ec6a9.png)](https:\u002F\u002Fyoutu.be\u002F-OvpdLAElFA)\n\n## Documentation\n\nVisit our [documentation website](https:\u002F\u002Frfdetr.roboflow.com) to learn more about how to use RF-DETR.\n\n## License\n\nLicensing is split by component:\n\n- The open-source `rfdetr` package and Apache-designated model weights are licensed under Apache License 2.0. See [`LICENSE`](LICENSE).\n- Plus components, including the `rfdetr_plus` extension and RF-DETR-XL \u002F RF-DETR-2XL detection models, are licensed under PML 1.0.\n\n## Acknowledgements\n\nOur work is built upon [LW-DETR](https:\u002F\u002Farxiv.org\u002Fpdf\u002F2406.03459), [DINOv2](https:\u002F\u002Farxiv.org\u002Fpdf\u002F2304.07193), and [Deformable DETR](https:\u002F\u002Farxiv.org\u002Fpdf\u002F2010.04159). Thanks to their authors for their excellent work!\n\n## Citation\n\nIf you find our work helpful for your research, please consider citing the following BibTeX entry.\n\n```bibtex\n@misc{rf-detr,\n    title={RF-DETR: Neural Architecture Search for Real-Time Detection Transformers},\n    author={Isaac Robinson and Peter Robicheaux and Matvei Popov and Deva Ramanan and Neehar Peri},\n    year={2025},\n    eprint={2511.09554},\n    archivePrefix={arXiv},\n    primaryClass={cs.CV},\n    url={https:\u002F\u002Farxiv.org\u002Fabs\u002F2511.09554},\n}\n```\n\n## Contribute\n\nWe welcome and appreciate all contributions! If you notice any issues or bugs, have questions, or would like to suggest new features, please [open an issue](https:\u002F\u002Fgithub.com\u002Froboflow\u002Frf-detr\u002Fissues\u002Fnew) or pull request. By sharing your ideas and improvements, you help make RF-DETR better for everyone.\n\n\u003Cp align=\"center\">\n    \u003Ca href=\"https:\u002F\u002Fyoutube.com\u002Froboflow\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Froboflow_rf-detr_readme_4a6072846419.png\" width=\"3%\"\u002F>\u003C\u002Fa>\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Froboflow_rf-detr_readme_896994f79d98.png\" width=\"3%\"\u002F>\n    \u003Ca href=\"https:\u002F\u002Froboflow.com\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Froboflow_rf-detr_readme_4609eef41cf4.png\" width=\"3%\"\u002F>\u003C\u002Fa>\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Froboflow_rf-detr_readme_896994f79d98.png\" width=\"3%\"\u002F>\n    \u003Ca href=\"https:\u002F\u002Fwww.linkedin.com\u002Fcompany\u002Froboflow-ai\u002F\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Froboflow_rf-detr_readme_c2b5b316fb59.png\" width=\"3%\"\u002F>\u003C\u002Fa>\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Froboflow_rf-detr_readme_896994f79d98.png\" width=\"3%\"\u002F>\n    \u003Ca href=\"https:\u002F\u002Fdocs.roboflow.com\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Froboflow_rf-detr_readme_b11ef9eeaca7.png\" width=\"3%\"\u002F>\u003C\u002Fa>\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Froboflow_rf-detr_readme_896994f79d98.png\" width=\"3%\"\u002F>\n    \u003Ca href=\"https:\u002F\u002Fdiscuss.roboflow.com\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Froboflow_rf-detr_readme_171d8d7d7d7b.png\" width=\"3%\"\u002F>\u003C\u002Fa>\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Froboflow_rf-detr_readme_896994f79d98.png\" width=\"3%\"\u002F>\n    \u003Ca href=\"https:\u002F\u002Fblog.roboflow.com\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Froboflow_rf-detr_readme_aace967bbd3c.png\" width=\"3%\"\u002F>\u003C\u002Fa>\n\u003C\u002Fp>\n","# RF-DETR：实时 SOTA 检测与分割\n\n[![版本](https:\u002F\u002Fbadge.fury.io\u002Fpy\u002Frfdetr.svg)](https:\u002F\u002Fbadge.fury.io\u002Fpy\u002Frfdetr)\n[![下载量](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fdm\u002Frfdetr)](https:\u002F\u002Fpypistats.org\u002Fpackages\u002Frfdetr)\n[![codecov](https:\u002F\u002Fcodecov.io\u002Fgh\u002Froboflow\u002Frf-detr\u002Fgraph\u002Fbadge.svg?token=K8V4ARR3XV)](https:\u002F\u002Fcodecov.io\u002Fgh\u002Froboflow\u002Frf-detr)\n[![Python 版本](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fpyversions\u002Frfdetr)](https:\u002F\u002Fbadge.fury.io\u002Fpy\u002Frfdetr)\n[![许可证](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-Apache%202.0-blue)](https:\u002F\u002Fgithub.com\u002Froboflow\u002Frfdetr\u002Fblob\u002Fmain\u002FLICENSE)\n\n[![arXiv](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FarXiv-2511.09554-b31b1b.svg)](https:\u002F\u002Farxiv.org\u002Fabs\u002F2511.09554)\n[![Hugging Face Spaces](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https:\u002F\u002Fhuggingface.co\u002Fspaces\u002FSkalskiP\u002FRF-DETR)\n[![Colab](https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg)](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Froboflow-ai\u002Fnotebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002Fhow-to-finetune-rf-detr-on-detection-dataset.ipynb)\n[![Roboflow](https:\u002F\u002Fraw.githubusercontent.com\u002Froboflow-ai\u002Fnotebooks\u002Fmain\u002Fassets\u002Fbadges\u002Froboflow-blogpost.svg)](https:\u002F\u002Fblog.roboflow.com\u002Frf-detr)\n[![Discord](https:\u002F\u002Fimg.shields.io\u002Fdiscord\u002F1159501506232451173?logo=discord&label=discord&labelColor=fff&color=5865f2&link=https%3A%2F%2Fdiscord.gg%2FGbfgXGJ8Bk)](https:\u002F\u002Fdiscord.gg\u002FGbfgXGJ8Bk)\n\nRF-DETR 是由 Roboflow 开发的用于目标检测和实例分割的实时 Transformer 架构。它基于 DINOv2 视觉 Transformer 主干网络，在 [Microsoft COCO](https:\u002F\u002Fcocodataset.org\u002F#home) 和 [RF100-VL](https:\u002F\u002Fgithub.com\u002Froboflow\u002Frf100-vl) 数据集上实现了最先进的精度与延迟权衡。\n\nRF-DETR 使用 DINOv2 视觉 Transformer 作为主干，并通过单一、一致的 API 同时支持目标检测和实例分割。开源的 `rfdetr` 包以及 Apache 许可的模型均采用 Apache 2.0 许可证发布，而 Plus 组件（`rfdetr_plus`，包括 RF-DETR-XL\u002F2XL 检测模型）则采用 PML 1.0 许可证。\n\nhttps:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002Fadd23fd1-266f-4538-8809-d7dd5767e8e6\n\n## 安装\n\n要安装 RF-DETR，请在 [**Python>=3.10**](https:\u002F\u002Fwww.python.org\u002F) 环境中使用 `pip` 安装 `rfdetr` 包。\n\n```bash\npip install rfdetr\n```\n\n\u003Cdetails>\n\u003Csummary>从源码安装\u003C\u002Fsummary>\n\n\u003Cbr>\n\n通过从源码安装 RF-DETR，您可以体验尚未正式发布的最新功能和改进。**请注意，这些更新仍在开发中，可能不如最新发布的稳定版本那样稳定。**\n\n```bash\npip install https:\u002F\u002Fgithub.com\u002Froboflow\u002Frf-detr\u002Farchive\u002Frefs\u002Fheads\u002Fdevelop.zip\n```\n\n\u003C\u002Fdetails>\n\n## 基准测试\n\nRF-DETR 在目标检测和实例分割任务中均取得了当前最佳性能，并在 Microsoft COCO 和 RF100-VL 数据集上进行了基准测试。以下图表和表格将 RF-DETR 与其他顶级实时模型在检测和分割任务中的精度与延迟方面进行了对比。所有延迟数据均是在 NVIDIA T4 上使用 TensorRT、FP16 和批大小 1 测得的。有关完整的基准测试方法和可复现性细节，请参阅 [roboflow\u002Fsab](https:\u002F\u002Fgithub.com\u002Froboflow\u002Fsingle_artifact_benchmarking)。\n\n### 检测\n\n\u003Cimg alt=\"rf_detr_1-4_latency_accuracy_object_detection\" src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Froboflow_rf-detr_readme_7c81eb653a69.png\" \u002F>\n\n\u003Cdetails>\n\u003Csummary>查看目标检测基准数据\u003C\u002Fsummary>\n\n\u003Cbr>\n\n| 架构  | COCO AP\u003Csub>50\u003C\u002Fsub> | COCO AP\u003Csub>50:95\u003C\u002Fsub> | RF100VL AP\u003Csub>50\u003C\u002Fsub> | RF100VL AP\u003Csub>50:95\u003C\u002Fsub> | 延迟 (ms) | 参数量 (M) | 分辨率 | 许可证   |\n| :-----------: | :------------------: | :---------------------: | :---------------------: | :------------------------: | :----------: | :--------: | :--------: | :--------: |\n|   RF-DETR-N   |         67.6         |          48.4           |          85.0           |            57.7            |     2.3      |    30.5    |  384x384   | Apache 2.0 |\n|   RF-DETR-S   |         72.1         |          53.0           |          86.7           |            60.2            |     3.5      |    32.1    |  512x512   | Apache 2.0 |\n|   RF-DETR-M   |         73.6         |          54.7           |          87.4           |            61.2            |     4.4      |    33.7    |  576x576   | Apache 2.0 |\n|   RF-DETR-L   |         75.1         |          56.5           |          88.2           |            62.2            |     6.8      |    33.9    |  704x704   | Apache 2.0 |\n| RF-DETR-XL △  |         77.4         |          58.6           |          88.5           |            62.9            |     11.5     |   126.4    |  700x700   |  PML 1.0   |\n| RF-DETR-2XL △ |         78.5         |          60.1           |          89.0           |            63.2            |     17.2     |   126.9    |  880x880   |  PML 1.0   |\n|   YOLO11-N    |         52.0         |          37.4           |          81.4           |            55.3            |     2.5      |    2.6     |  640x640   |  AGPL-3.0  |\n|   YOLO11-S    |         59.7         |          44.4           |          82.3           |            56.2            |     3.2      |    9.4     |  640x640   |  AGPL-3.0  |\n|   YOLO11-M    |         64.1         |          48.6           |          82.5           |            56.5            |     5.1      |    20.1    |  640x640   |  AGPL-3.0  |\n|   YOLO11-L    |         64.9         |          49.9           |          82.2           |            56.5            |     6.5      |    25.3    |  640x640   |  AGPL-3.0  |\n|   YOLO11-X    |         66.1         |          50.9           |          81.7           |            56.2            |     10.5     |    56.9    |  640x640   |  AGPL-3.0  |\n|   YOLO26-N    |         55.8         |          40.3           |          76.7           |            52.0            |     1.7      |    2.6     |  640x640   |  AGPL-3.0  |\n|   YOLO26-S    |         64.3         |          47.7           |          82.7           |            57.0            |     2.6      |    9.4     |  640x640   |  AGPL-3.0  |\n|   YOLO26-M    |         69.7         |          52.5           |          84.4           |            58.7            |     4.4      |    20.1    |  640x640   |  AGPL-3.0  |\n|   YOLO26-L    |         71.1         |          54.1           |          85.0           |            59.3            |     5.7      |    25.3    |  640x640   |  AGPL-3.0  |\n|   YOLO26-X    |         74.0         |          56.9           |          85.6           |            60.0            |     9.6      |    56.9    |  640x640   |  AGPL-3.0  |\n|   LW-DETR-T   |         60.7         |          42.9           |          84.7           |            57.1            |     1.9      |    12.1    |  640x640   | Apache 2.0 |\n|   LW-DETR-S   |         66.8         |          48.0           |          85.0           |            57.4            |     2.6      |    14.6    |  640x640   | Apache 2.0 |\n|   LW-DETR-M   |         72.0         |          52.6           |          86.8           |            59.8            |     4.4      |    28.2    |  640x640   | Apache 2.0 |\n|   LW-DETR-L   |         74.6         |          56.1           |          87.4           |            61.5            |     6.9      |    46.8    |  640x640   | Apache 2.0 |\n|   LW-DETR-X   |         76.9         |          58.3           |          87.9           |            62.1            |     13.0     |   118.0    |  640x640   | Apache 2.0 |\n|   D-FINE-N    |         60.2         |          42.7           |          84.4           |            58.2            |     2.1      |    3.8     |  640x640   | Apache 2.0 |\n|   D-FINE-S    |         67.6         |          50.6           |          85.3           |            60.3            |     3.5      |    10.2    |  640x640   | Apache 2.0 |\n|   D-FINE-M    |         72.6         |          55.0           |          85.5           |            60.6            |     5.4      |    19.2    |  640x640   | Apache 2.0 |\n|   D-FINE-L    |         74.9         |          57.2           |          86.4           |            61.6            |     7.5      |    31.0    |  640x640   | Apache 2.0 |\n|   D-FINE-X    |         76.8         |          59.3           |          86.9           |            62.2            |     11.5     |    62.0    |  640x640   | Apache 2.0 |\n\n\u003C\u002Fdetails>\n\n### 分割\n\n\u003Cimg alt=\"rf_detr_1-4_latency_accuracy_instance_segmentation\" src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Froboflow_rf-detr_readme_09231a1e3f1d.png\" \u002F>\n\n\u003Cdetails>\n\u003Csummary>查看实例分割基准测试数据\u003C\u002Fsummary>\n\n\u003Cbr>\n\n|  架构   | COCO AP\u003Csub>50\u003C\u002Fsub> | COCO AP\u003Csub>50:95\u003C\u002Fsub> | 延迟 (ms) | 参数 (M) | 分辨率 |  许可证   |\n| :-------------: | :------------------: | :---------------------: | :----------: | :--------: | :--------: | :--------: |\n|  RF-DETR-Seg-N  |         63.0         |          40.3           |     3.4      |    33.6    |  312x312   | Apache 2.0 |\n|  RF-DETR-Seg-S  |         66.2         |          43.1           |     4.4      |    33.7    |  384x384   | Apache 2.0 |\n|  RF-DETR-Seg-M  |         68.4         |          45.3           |     5.9      |    35.7    |  432x432   | Apache 2.0 |\n|  RF-DETR-Seg-L  |         70.5         |          47.1           |     8.8      |    36.2    |  504x504   | Apache 2.0 |\n| RF-DETR-Seg-XL  |         72.2         |          48.8           |     13.5     |    38.1    |  624x624   | Apache 2.0 |\n| RF-DETR-Seg-2XL |         73.1         |          49.9           |     21.8     |    38.6    |  768x768   | Apache 2.0 |\n|  YOLOv8-N-Seg   |         45.6         |          28.3           |     3.5      |    3.4     |  640x640   |  AGPL-3.0  |\n|  YOLOv8-S-Seg   |         53.8         |          34.0           |     4.2      |    11.8    |  640x640   |  AGPL-3.0  |\n|  YOLOv8-M-Seg   |         58.2         |          37.3           |     7.0      |    27.3    |  640x640   |  AGPL-3.0  |\n|  YOLOv8-L-Seg   |         60.5         |          39.0           |     9.7      |    46.0    |  640x640   |  AGPL-3.0  |\n|  YOLOv8-XL-Seg  |         61.3         |          39.5           |     14.0     |    71.8    |  640x640   |  AGPL-3.0  |\n|  YOLOv11-N-Seg  |         47.8         |          30.0           |     3.6      |    2.9     |  640x640   |  AGPL-3.0  |\n|  YOLOv11-S-Seg  |         55.4         |          35.0           |     4.6      |    10.1    |  640x640   |  AGPL-3.0  |\n|  YOLOv11-M-Seg  |         60.0         |          38.5           |     6.9      |    22.4    |  640x640   |  AGPL-3.0  |\n|  YOLOv11-L-Seg  |         61.5         |          39.5           |     8.3      |    27.6    |  640x640   |  AGPL-3.0  |\n| YOLOv11-XL-Seg  |         62.4         |          40.1           |     13.7     |    62.1    |  640x640   |  AGPL-3.0  |\n|  YOLO26-N-Seg   |         54.3         |          34.7           |     2.31     |    2.7     |  640x640   |  AGPL-3.0  |\n|  YOLO26-S-Seg   |         62.4         |          40.2           |     3.47     |    10.4    |  640x640   |  AGPL-3.0  |\n|  YOLO26-M-Seg   |         67.8         |          44.0           |     6.32     |    23.6    |  640x640   |  AGPL-3.0  |\n|  YOLO26-L-Seg   |         69.8         |          45.5           |     7.58     |    28.0    |  640x640   |  AGPL-3.0  |\n|  YOLO26-X-Seg   |         71.6         |          46.8           |    12.92     |    62.8    |  640x640   |  AGPL-3.0  |\n\n\u003C\u002Fdetails>\n\n## 运行模型\n\n### 检测\n\nRF-DETR 提供了多种模型尺寸，从 Nano 到 2XLarge。要使用不同尺寸的模型，请将下面代码片段中的类名替换为表格中的其他类。\n\n```python\nimport supervision as sv\nfrom rfdetr import RFDETRMedium\nfrom rfdetr.assets.coco_classes import COCO_CLASSES\n\nmodel = RFDETRMedium()\n\ndetections = model.predict(\"https:\u002F\u002Fmedia.roboflow.com\u002Fdog.jpg\", threshold=0.5)\n\nlabels = [f\"{COCO_CLASSES[class_id]}\" for class_id in detections.class_id]\n\nannotated_image = sv.BoxAnnotator().annotate(detections.data[\"source_image\"], detections)\nannotated_image = sv.LabelAnnotator().annotate(annotated_image, detections, labels)\n```\n\n\u003Cdetails>\n\u003Csummary>使用 Inference 库运行 RF-DETR\u003C\u002Fsummary>\n\n\u003Cbr>\n\n您也可以使用 Inference 库来运行 RF-DETR 模型。要切换模型尺寸，请从下表中选择相应的推理包别名。\n\n```python\nimport requests\nimport supervision as sv\nfrom PIL import Image\nfrom inference import get_model\n\nmodel = get_model(\"rfdetr-medium\")\n\nimage = Image.open(requests.get(\"https:\u002F\u002Fmedia.roboflow.com\u002Fdog.jpg\", stream=True).raw)\npredictions = model.infer(image, confidence=0.5)[0]\ndetections = sv.Detections.from_inference(predictions)\n\nannotated_image = sv.BoxAnnotator().annotate(image, detections)\nannotated_image = sv.LabelAnnotator().annotate(annotated_image, detections)\n```\n\n\u003C\u002Fdetails>\n\n| 尺寸 | RF-DETR 包类 | Inference 包别名 | COCO AP\u003Csub>50\u003C\u002Fsub> | COCO AP\u003Csub>50:95\u003C\u002Fsub> | 延迟 (ms) | 参数 (M) | 分辨率 |  许可证   |\n| :--: | :-------------------: | :---------------------- | :------------------: | :---------------------: | :----------: | :--------: | :--------: | :--------: |\n|  N   |     `RFDETRNano`      | `rfdetr-nano`           |         67.6         |          48.4           |     2.3      |    30.5    |  384x384   | Apache 2.0 |\n|  S   |     `RFDETRSmall`     | `rfdetr-small`          |         72.1         |          53.0           |     3.5      |    32.1    |  512x512   | Apache 2.0 |\n|  M   |    `RFDETRMedium`     | `rfdetr-medium`         |         73.6         |          54.7           |     4.4      |    33.7    |  576x576   | Apache 2.0 |\n|  L   |     `RFDETRLarge`     | `rfdetr-large`          |         75.1         |          56.5           |     6.8      |    33.9    |  704x704   | Apache 2.0 |\n|  XL  |   `RFDETRXLarge` △    | `rfdetr-xlarge`         |         77.4         |          58.6           |     11.5     |   126.4    |  700x700   |  PML 1.0   |\n| 2XL  |   `RFDETR2XLarge` △   | `rfdetr-2xlarge`        |         78.5         |          60.1           |     17.2     |   126.9    |  880x880   |  PML 1.0   |\n\n> △ 需要 `rfdetr_plus` 扩展：`pip install rfdetr[plus]`。详情请参阅 [许可证](#license)。\n\n### 分割\n\nRF-DETR 支持从 Nano 到 2XLarge 不同模型尺寸的实例分割。要使用其他模型尺寸，只需将下面代码片段中的类名替换为表格中的另一个类即可。\n\n```python\nimport supervision as sv\nfrom rfdetr import RFDETRSegMedium\nfrom rfdetr.assets.coco_classes import COCO_CLASSES\n\nmodel = RFDETRSegMedium()\n\ndetections = model.predict(\"https:\u002F\u002Fmedia.roboflow.com\u002Fdog.jpg\", threshold=0.5)\n\nlabels = [f\"{COCO_CLASSES[class_id]}\" for class_id in detections.class_id]\n\nannotated_image = sv.MaskAnnotator().annotate(detections.data[\"source_image\"], detections)\nannotated_image = sv.LabelAnnotator().annotate(annotated_image, detections, labels)\n```\n\n\u003Cdetails>\n\u003Csummary>使用 Inference 运行 RF-DETR-Seg\u003C\u002Fsummary>\n\n\u003Cbr>\n\n您也可以使用 Inference 库运行 RF-DETR-Seg 模型。要切换模型尺寸，请从下表中选择相应的 inference 包别名。\n\n```python\nimport requests\nimport supervision as sv\nfrom PIL import Image\nfrom inference import get_model\n\nmodel = get_model(\"rfdetr-seg-medium\")\n\nimage = Image.open(requests.get(\"https:\u002F\u002Fmedia.roboflow.com\u002Fdog.jpg\", stream=True).raw)\npredictions = model.infer(image, confidence=0.5)[0]\ndetections = sv.Detections.from_inference(predictions)\n\nannotated_image = sv.MaskAnnotator().annotate(image, detections)\nannotated_image = sv.LabelAnnotator().annotate(annotated_image, detections)\n```\n\n\u003C\u002Fdetails>\n\n| 尺寸 | RF-DETR 包类 | Inference 包别名 | COCO AP\u003Csub>50\u003C\u002Fsub> | COCO AP\u003Csub>50:95\u003C\u002Fsub> | 延迟 (ms) | 参数量 (M) | 分辨率 | 许可证   |\n| :--: | :-------------------: | :---------------------- | :------------------: | :---------------------: | :----------: | :--------: | :--------: | :--------: |\n|  N   |    `RFDETRSegNano`    | `rfdetr-seg-nano`       |         63.0         |          40.3           |     3.4      |    33.6    |  312x312   | Apache 2.0 |\n|  S   |   `RFDETRSegSmall`    | `rfdetr-seg-small`      |         66.2         |          43.1           |     4.4      |    33.7    |  384x384   | Apache 2.0 |\n|  M   |   `RFDETRSegMedium`   | `rfdetr-seg-medium`     |         68.4         |          45.3           |     5.9      |    35.7    |  432x432   | Apache 2.0 |\n|  L   |   `RFDETRSegLarge`    | `rfdetr-seg-large`      |         70.5         |          47.1           |     8.8      |    36.2    |  504x504   | Apache 2.0 |\n|  XL  |   `RFDETRSegXLarge`   | `rfdetr-seg-xlarge`     |         72.2         |          48.8           |     13.5     |    38.1    |  624x624   | Apache 2.0 |\n| 2XL  |  `RFDETRSeg2XLarge`   | `rfdetr-seg-2xlarge`    |         73.1         |          49.9           |     21.8     |    38.6    |  768x768   | Apache 2.0 |\n\n### 训练模型\n\nRF-DETR 同时支持目标检测和实例分割的训练。您可以在 [Google Colab](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Froboflow-ai\u002Fnotebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002Fhow-to-finetune-rf-detr-on-detection-dataset.ipynb) 或直接在 Roboflow 平台上进行训练。下方提供了一个分步视频微调教程。\n\n[![rf-detr-tutorial-banner](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Froboflow_rf-detr_readme_49b5345ec6a9.png)](https:\u002F\u002Fyoutu.be\u002F-OvpdLAElFA)\n\n## 文档\n\n访问我们的 [文档网站](https:\u002F\u002Frfdetr.roboflow.com)，了解更多关于如何使用 RF-DETR 的信息。\n\n## 许可证\n\n许可证按组件划分：\n\n- 开源的 `rfdetr` 包以及采用 Apache 许可证的模型权重，均受 Apache License 2.0 许可证保护。详情请参阅 [`LICENSE`](LICENSE)。\n- 此外，包括 `rfdetr_plus` 扩展以及 RF-DETR-XL \u002F RF-DETR-2XL 目标检测模型在内的组件，则采用 PML 1.0 许可证。\n\n## 致谢\n\n我们的工作建立在 [LW-DETR](https:\u002F\u002Farxiv.org\u002Fpdf\u002F2406.03459)、[DINOv2](https:\u002F\u002Farxiv.org\u002Fpdf\u002F2304.07193) 和 [Deformable DETR](https:\u002F\u002Farxiv.org\u002Fpdf\u002F2010.04159) 的基础上。感谢这些论文的作者们所做出的杰出贡献！\n\n## 引用\n\n如果您认为我们的工作对您的研究有所帮助，请考虑引用以下 BibTeX 条目。\n\n```bibtex\n@misc{rf-detr,\n    title={RF-DETR: 实时检测 Transformer 的神经架构搜索},\n    author={Isaac Robinson、Peter Robicheaux、Matvei Popov、Deva Ramanan 和 Neehar Peri},\n    year={2025},\n    eprint={2511.09554},\n    archivePrefix={arXiv},\n    primaryClass={cs.CV},\n    url={https:\u002F\u002Farxiv.org\u002Fabs\u002F2511.09554},\n}\n```\n\n## 贡献\n\n我们欢迎并感激所有贡献！如果您发现任何问题或错误、有任何疑问，或者希望提出新功能建议，请 [提交 issue](https:\u002F\u002Fgithub.com\u002Froboflow\u002Frf-detr\u002Fissues\u002Fnew) 或 pull request。通过分享您的想法和改进，您将帮助使 RF-DETR 更加完善，惠及所有人。\n\n\u003Cp align=\"center\">\n    \u003Ca href=\"https:\u002F\u002Fyoutube.com\u002Froboflow\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Froboflow_rf-detr_readme_4a6072846419.png\" width=\"3%\"\u002F>\u003C\u002Fa>\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Froboflow_rf-detr_readme_896994f79d98.png\" width=\"3%\"\u002F>\n    \u003Ca href=\"https:\u002F\u002Froboflow.com\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Froboflow_rf-detr_readme_4609eef41cf4.png\" width=\"3%\"\u002F>\u003C\u002Fa>\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Froboflow_rf-detr_readme_896994f79d98.png\" width=\"3%\"\u002F>\n    \u003Ca href=\"https:\u002F\u002Fwww.linkedin.com\u002Fcompany\u002Froboflow-ai\u002F\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Froboflow_rf-detr_readme_c2b5b316fb59.png\" width=\"3%\"\u002F>\u003C\u002Fa>\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Froboflow_rf-detr_readme_896994f79d98.png\" width=\"3%\"\u002F>\n    \u003Ca href=\"https:\u002F\u002Fdocs.roboflow.com\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Froboflow_rf-detr_readme_b11ef9eeaca7.png\" width=\"3%\"\u002F>\u003C\u002Fa>\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Froboflow_rf-detr_readme_896994f79d98.png\" width=\"3%\"\u002F>\n    \u003Ca href=\"https:\u002F\u002Fdiscuss.roboflow.com\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Froboflow_rf-detr_readme_171d8d7d7d7b.png\" width=\"3%\"\u002F>\u003C\u002Fa>\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Froboflow_rf-detr_readme_896994f79d98.png\" width=\"3%\"\u002F>\n    \u003Ca href=\"https:\u002F\u002Fblog.roboflow.com\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Froboflow_rf-detr_readme_aace967bbd3c.png\" width=\"3%\"\u002F>\u003C\u002Fa>\n\u003C\u002Fp>","# RF-DETR 快速上手指南\n\nRF-DETR 是由 Roboflow 开发的实时 Transformer 架构模型，专为**目标检测**和**实例分割**任务设计。它基于 DINOv2 视觉骨干网络，在 Microsoft COCO 和 RF100-VL 数据集上实现了业界领先的精度与延迟平衡。\n\n## 环境准备\n\n在开始之前，请确保您的开发环境满足以下要求：\n\n*   **操作系统**: Linux, macOS 或 Windows\n*   **Python 版本**: >= 3.10 (必须)\n*   **硬件建议**: 推荐使用 NVIDIA GPU 以获得最佳推理速度（支持 TensorRT 加速），但 CPU 也可运行。\n*   **前置依赖**: 建议先更新 `pip` 并安装基础深度学习依赖（如 `torch`），`rfdetr` 包会自动处理大部分依赖关系。\n\n> **国内开发者提示**：如果遇到下载速度慢的问题，建议使用国内镜像源安装依赖。\n> ```bash\n> pip install -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple rfdetr\n> ```\n\n## 安装步骤\n\n### 方式一：通过 PyPI 安装（推荐）\n\n这是最稳定且简单的安装方式，适用于大多数生产环境。\n\n```bash\npip install rfdetr\n```\n\n### 方式二：从源码安装（开发版）\n\n如果您需要体验尚未发布的最新功能或修复，可以从 GitHub 源码安装。**注意：此版本可能不如正式版稳定。**\n\n```bash\npip install https:\u002F\u002Fgithub.com\u002Froboflow\u002Frf-detr\u002Farchive\u002Frefs\u002Fheads\u002Fdevelop.zip\n```\n\n## 基本使用\n\nRF-DETR 提供了统一的 API 接口，支持多种模型尺寸（从 Nano 到 2XLarge）。以下是最简单的**目标检测**使用示例。\n\n### 1. 运行目标检测\n\n此示例加载预训练的 `RFDETRMedium` 模型并对图片进行推理。\n\n```python\nimport supervision as sv\nfrom rfdetr import RFDETRMedium\nfrom rfdetr.assets.coco_classes import COCO_CLASSES\n\n# 初始化模型 (可选参数: device=\"cuda\" 或 \"cpu\")\nmodel = RFDETRMedium()\n\n# 执行预测 (支持本地路径或 URL)\ndetections = model.predict(\"https:\u002F\u002Fmedia.roboflow.com\u002Fdog.jpg\")\n\n# 打印检测结果\nprint(detections)\n\n# (可选) 使用 supervision 库可视化结果\n# 需先安装: pip install supervision\nimage = sv.Image.from_path(\"https:\u002F\u002Fmedia.roboflow.com\u002Fdog.jpg\")\nannotated_image = sv.BoxAnnotator().annotate(scene=image.copy(), detections=detections)\nsv.plot_image(annotated_image)\n```\n\n### 2. 切换模型尺寸\n\n您可以根据对速度和精度的需求，轻松切换不同的模型版本。只需更改导入的类名即可：\n\n| 模型类型 | 代码类名 | 特点 |\n| :--- | :--- | :--- |\n| Nano | `RFDETRNano` | 速度最快，适合边缘设备 |\n| Small | `RFDETRSmall` | 速度与精度的良好平衡 |\n| Medium | `RFDETRMedium` | 默认推荐，通用性强 |\n| Large | `RFDETRLarge` | 更高精度 |\n| XL \u002F 2XL | `RFDETRXL` \u002F `RFDETR2XL` | 最高精度 (需 PML 1.0 许可证) |\n\n**示例：使用轻量级 Nano 模型**\n```python\nfrom rfdetr import RFDETRNano\n\nmodel = RFDETRNano()\ndetections = model.predict(\"image.jpg\")\n```\n\n### 3. 实例分割\n\nRF-DETR 同样支持实例分割任务，使用方式与检测类似，只需调用对应的 Seg 模型类（如 `RFDETRSegSmall`）。\n\n```python\nfrom rfdetr import RFDETRSegSmall\n\nmodel = RFDETRSegSmall()\n# predict 方法返回包含掩码 (mask) 信息的检测结果\ndetections = model.predict(\"image.jpg\")\n```","某智慧物流园区的技术团队正致力于升级其包裹分拣系统，需要在高速传送带上实时识别并分割各种形状不规则的快递包裹，以引导机械臂精准抓取。\n\n### 没有 rf-detr 时\n- **精度与速度难以兼得**：传统轻量级模型在高速视频流中漏检率高，而高精度模型延迟过大，导致机械臂抓取节奏跟不上传送带速度。\n- **小目标识别困难**：对于远距离或堆叠在一起的小型包裹，现有模型经常发生误判或完全忽略，造成分拣错误。\n- **微调成本高昂**：针对园区特有的包装箱类型进行模型适配时，需要复杂的架构修改和漫长的训练周期，迭代效率极低。\n- **分割能力缺失**：仅能提供矩形检测框，无法获取包裹的精确轮廓，导致机械臂在抓取不规则物体时容易滑落或碰撞。\n\n### 使用 rf-detr 后\n- **实现实时高精检测**：rf-detr 凭借 DINOv2 骨干网络，在 NVIDIA T4 上仅需 2.3ms 即可完成推理，同时保持 SOTA 级别的准确率，完美匹配高速分拣需求。\n- **显著提升小目标性能**：得益于先进的 Transformer 架构，rf-detr 对密集堆叠及微小包裹的识别能力大幅增强，几乎消除了漏检现象。\n- **极简微调流程**：通过统一的 API 接口，团队可快速利用园区自有数据对 rf-detr 进行微调，短时间内即可部署适配特定场景的专用模型。\n- **原生实例分割支持**：rf-detr 直接输出像素级掩码，为机械臂提供了精准的物体轮廓信息，使得抓取动作更加平稳可靠，大幅降低破损率。\n\nrf-detr 通过打破实时性与准确性的博弈，让物流分拣系统在保持极速响应的同时，拥有了工业级的感知精度与灵活性。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Froboflow_rf-detr_49b5345e.png","roboflow","Roboflow","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Froboflow_1234eb3b.png","",null,"hello@roboflow.com","https:\u002F\u002Froboflow.com","https:\u002F\u002Fgithub.com\u002Froboflow",[82,86],{"name":83,"color":84,"percentage":85},"Python","#3572A5",98.3,{"name":87,"color":88,"percentage":89},"Jupyter Notebook","#DA5B0B",1.7,6363,767,"2026-04-12T10:09:31","Apache-2.0","未说明","基准测试在 NVIDIA T4 GPU 上进行（使用 TensorRT, FP16），具体显存和 CUDA 版本要求未在文中明确说明，但作为基于 Transformer 的实时检测模型，强烈建议使用支持 CUDA 的 NVIDIA GPU。",{"notes":97,"python":98,"dependencies":99},"该工具提供开源版本（Apache 2.0）和 Plus 版本（PML 1.0）。基准测试数据基于 TensorRT 和 FP16 精度。代码示例中依赖'supervision'库进行结果处理。安装源地址包含特定的 develop 分支选项。",">=3.10",[100,101],"rfdetr","supervision",[15,14],[104,105,106,107,64,108,109],"computer-vision","detr","machine-learning","object-detection","instance-segmentation","sota","2026-03-27T02:49:30.150509","2026-04-13T04:24:20.628311",[113,118,123,128,133,137],{"id":114,"question_zh":115,"answer_zh":116,"source_url":117},31263,"如何启用 MLflow 日志记录功能？","MLflow 日志记录已集成到最新版本中。您只需在调用 `model.train()` 时传递参数 `logger=\"mlflow\"`（或相应的配置）即可启用。请确保升级到最新释放版：`pip install -U rfdetr`。该功能现在与 WandB 和 TensorBoard 并列可用。","https:\u002F\u002Fgithub.com\u002Froboflow\u002Frf-detr\u002Fissues\u002F110",{"id":119,"question_zh":120,"answer_zh":121,"source_url":122},31264,"为什么本地训练的 RF-DETR Nano 模型效果远不如在 Roboflow 平台上训练的效果？","这通常是因为分辨率设置不一致导致的。Roboflow 平台如果不指定调整大小，默认会将分辨率设为 640，而 RF-DETR Nano 模型的最佳训练分辨率应为 384x384。对于包含微小物体的数据集，较高的分辨率（如默认的 640）会导致质量下降。为了获得可比较的结果，请在本地训练时显式指定正确的数据集分辨率（例如 384x384），或者在 Roboflow 平台上手动设置分辨率。","https:\u002F\u002Fgithub.com\u002Froboflow\u002Frf-detr\u002Fissues\u002F484",{"id":124,"question_zh":125,"answer_zh":126,"source_url":127},31265,"如何在小数据集上微调 RF-DETR 以获得更好的效果？","针对小数据集微调，建议采取以下措施：\n1. **使用增强的数据增强**：从 v1.5.0 开始，支持自定义 Albumentations 配置或内置预设（如 `AUG_CONSERVATIVE`, `AUG_AGGRESSIVE`, `AUG_AERIAL`, `AUG_INDUSTRIAL`）。升级命令：`pip install rfdetr>=1.6.1`。\n2. **调整学习率调度器**：尝试使用 `cosine` 调度器代替默认的 `step` 调度器。\n3. **迁移学习**：寻找与您的任务相似的对象检测预训练权重进行微调。\n4. **增加数据量**：如果可能，通过标注更多数据来扩大数据集规模。","https:\u002F\u002Fgithub.com\u002Froboflow\u002Frf-detr\u002Fissues\u002F81",{"id":129,"question_zh":130,"answer_zh":131,"source_url":132},31266,"模型导出为 ONNX 格式时卡住或不完成怎么办？","这是一个已知问题，特别是在 Jupyter Notebook 或 Kaggle 等交互式环境中运行时，导出过程可能会挂起。有效的解决方法是：**不要在 Notebook 中运行导出代码，而是将其保存为独立的 Python 脚本（.py 文件）并在终端中执行**。例如，将导出逻辑写入 `export_model.py` 然后运行 `python export_model.py`。","https:\u002F\u002Fgithub.com\u002Froboflow\u002Frf-detr\u002Fissues\u002F101",{"id":134,"question_zh":135,"answer_zh":136,"source_url":127},31267,"RF-DETR 支持哪些图像增强策略？如何配置？","从 v1.5.0 版本起，RF-DETR 支持强大的图像增强功能：\n1. **内置预设**：可直接使用 `AUG_CONSERVATIVE`（保守）、`AUG_AGGRESSIVE`（激进）、`AUG_AERIAL`（航拍）和 `AUG_INDUSTRIAL`（工业）。\n2. **自定义配置**：支持通过字典配置自定义 Albumentations 增强。\n3. **嵌套变换**：v1.5.1 增加了 `OneOf` 和 `Sequential` 等嵌套变换支持。\n4. **可视化**：设置 `save_dataset_grids=True` 可预览增强后的数据。\n请确保安装版本 >= 1.6.1 以修复 `AUG_AGGRESSIVE` 中的已知 bug。",{"id":138,"question_zh":139,"answer_zh":140,"source_url":132},31268,"加载预训练权重时出现 \"num_classes mismatch\" 警告是否正常？","这是正常现象。当您加载一个在不同类别数量上预训练的权重（例如 COCO 数据集的 80 类）到您的新模型（例如 1 类）时，会出现 \"num_classes mismatch\" 警告。系统会自动重新初始化检测头（detection head）以匹配您指定的新类别数量，同时保留主干网络（backbone）的预训练权重。您可以忽略此警告并继续训练或导出。",[142,147,152,157,162,167,172,177,182,186,191,196,201,206,211,216],{"id":143,"version":144,"summary_zh":145,"released_at":146},230984,"1.6.4","## 🌱 变更\n\n- **预测结果中的类别名称。** `predict()` 现在会在返回的 `detections.data` 字典中包含 `class_name`，将每个检测的以 0 开始的类别 ID 映射为其可读的名称。无需再手动查找了。（#914）\n\n    ```python\n    model = RFDETRSmall(pretrain_weights=\"path\u002Fto\u002Ffine_tuned.pth\")\n    detections = model.predict(\"image.jpg\", threshold=0.5)\n    print(detections.data[\"class_name\"])  # [\"cat\", \"dog\", \"cat\"]\n    ``` \n\n## 🔧 修复\n\n- 修复了在多 GPU DDP 设置下分割训练崩溃的问题。分割头在某些前向传播步骤中会留下一些未使用的参数，从而触发 `RuntimeError: parameters that were not used in producing the loss` 错误。`build_trainer()` 现在会在 `segmentation_head=True` 时自动启用 `find_unused_parameters=True`。（#947）\n\n- 修复了 FP32 多 GPU 训练过程中融合 AdamW 优化器崩溃的问题。在 Ampere 及更高版本的 GPU 上，只要硬件支持 BF16，融合 AdamW 就会被启用——即使训练器被显式配置为 `precision=\"32-true\"`。这会导致 DDP 梯度桶中的数据类型不匹配。现在，优化器会检查训练器的实际精度设置，而不仅仅是 GPU 的能力。（#947）\n\n- 修复了 Jupyter Notebook 和 Kaggle 中多 GPU DDP 训练失败的问题。基于 fork 的 DDP 会破坏 PyTorch 的 OpenMP 线程池，导致第二个进程出现 `SIGABRT` 信号。RF-DETR 现在在交互式环境中使用基于 spawn 的 DDP 策略，从而完全避免了线程池问题。（#928）\n\n- 修复了 `RFDETR.train(resolution=...)` 被静默忽略的问题。`resolution` 关键字参数是模型级别的设置，而不是训练配置字段，因此它会被悄悄丢弃。现在，该参数会在训练开始前应用到模型配置中，并会验证其值是否能被 `patch_size * num_windows` 整除。（#933）\n\n    ```python\n    model = RFDETRSmall()\n    model.train(dataset_dir=\".\u002Fdataset\", resolution=768)  # 现在可以正常工作\n    ```\n\n- 修复了 `save_dataset_grids` 静默无操作的问题。网格保存功能从未连接到训练循环中。现在，当启用时，数据集样本网格会被保存到 `{output_dir}\u002Fdataset_grids\u002F` 目录下。如果网格保存失败，系统会捕获并记录错误，而不会中断训练。（#946）\n\n- 修复了训练 epoch 结尾部分梯度累积窗口不完整的问题。当数据集长度不能被 `effective_batch_size * world_size` 整除时，PyTorch Lightning 会在梯度累积尚未完成的情况下就执行优化器更新。现在，训练数据集会被填充到恰好能被整除的长度，从而确保每次优化器步骤都使用完整的梯度窗口。（#937）\n\n- 修复了 `torch.export.export` 在 Transformer 解码器上失败的问题。`spatial_shapes_hw` 参数没有传递到解码器各层中，导致使用多尺度可变形注意力的模型无法成功导出。（#936）\n\n- 修复了 `download_pretrain_weights()` 静默覆盖微调检查点的问题。当微调检查点与注册表中的模型文件名相同（例如 `rf-detr-nano.pth`）时，如果 MD5 校验和不匹配，就会触发重新…","2026-04-10T11:26:15",{"id":148,"version":149,"summary_zh":150,"released_at":151},230985,"1.6.3","## 🌱 变更\n\n- **`predict()` 在检测结果中返回源图像和形状。** 返回的 `sv.Detections` 对象现在包含 `detections.data[\"source_image\"]`（原始图像，以 NumPy 数组形式）和 `detections.data[\"source_shape\"]`（一个 `(height, width)` 元组），因此您无需单独加载图像即可对结果进行标注。(#892)\n\n    ```python\n    detections = model.predict(\"https:\u002F\u002Fmedia.roboflow.com\u002Fdog.jpg\", threshold=0.5)\n    annotated = sv.BoxAnnotator().annotate(detections.data[\"source_image\"], detections)\n    ```\n\n- **`RFDETR.train()` 会自动从数据集中检测 `num_classes`。** 当未显式设置 `num_classes` 时，RF-DETR 会从数据集目录中读取类别数量，并自动重新初始化检测头。如果您的配置值与数据集中的类别数不同，则会发出警告。(#893)\n\n    ```python\n    model = RFDETRSmall()\n    model.train(dataset_dir=\".\u002Fdataset\")  # 从数据集中推断 num_classes\n    ```\n\n- **`optimize_for_inference()` 现在接受字符串形式的数据类型。** 除了 `torch.float16` 外，还可以传入 `\"float16\"` 或 `\"bfloat16\"`；无效输入现在将统一抛出 `TypeError`。(#899)\n\n## 🔧 修复\n\n- 修复了微调后的模型导出 ONNX 时类别数错误的问题：`reinitialize_detection_head` 现在会替换 `nn.Linear` 模块，而不是就地修改张量数据，从而确保在微调后 `out_features` 与实际权重形状保持一致。(#904)\n- 修复了 `optimize_for_inference()` 在多 GPU 设置下泄漏 CUDA 上下文的问题——深度拷贝、导出和 JIT 编译现在都在正确的设备上下文中运行。此外还修复了以下问题：优化过程中失败时能够干净地回滚状态，临时下载文件现在使用每个进程唯一的路径，以避免并行工作进程之间的冲突。(#899)\n- 修复了 PyTorch Lightning 迁移后 `deploy_to_roboflow` 抛出 `FileNotFoundError` 的问题——`class_names.txt` 现在会被写入上传目录，并且在保存检查点之前会填充 `args.class_names`，从而恢复包括分割在内的所有模型类型的上传功能。(#890)\n\n---\n\n## 🏆 贡献者\n\n欢迎我们的新贡献者，并感谢所有为本次发布提供帮助的人：\n\n- **Md Faruk Alam** (@farukalamai) ([LinkedIn](https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Ffarukalamai\u002F)) — *预测源图像和形状*\n- **Jirka Borovec** (@Borda) ([LinkedIn](https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Fjirka-borovec\u002F)) — *版本协调、代码评审*\n\n*自动化贡献：@copilot-swe-agent[bot], @pre-commit-ci[bot]*\n\n---\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002Froboflow\u002Frf-detr\u002Fcompare\u002F1.6.2...1.6.3","2026-04-02T14:04:37",{"id":153,"version":154,"summary_zh":155,"released_at":156},230986,"1.6.2","## 🚀 新增\n\n- **`RFDETR.predict(shape=...)`** — 传入显式的 `(height, width)` 元组，以非正方形分辨率运行推理，匹配导出模型时使用的分辨率。两个维度都必须是能被 14 整除的正整数。(#866)\n\n\t```python\n\tdetections = model.predict(\"image.jpg\", shape=(480, 640))\n\t``` \n\n## 🌱 变更\n\n- **`ModelConfig.device` 和 `RFDETR.train(device=...)`** 现在接受 `torch.device` 对象以及索引形式的设备字符串（`\"cuda:0\"`、`\"cuda:1\"`）。现有的字符串值（`\"cpu\"`、`\"cuda\"`）保持不变。当向 PyTorch Lightning 的自动检测传递一个有效但未映射的设备类型时，`RFDETR.train()` 会发出警告。(#872)\n\n\t```python\n\tfrom rfdetr import RFDETRSmall\n\tfrom torch import device\n\t\n\tmodel = RFDETRSmall(...)\n\t\n\tmodel.train(..., device=device(\"cuda:1\"))\n\tmodel.train(..., device=\"cuda:0\")\n\t``` \n\n## 🔧 修复\n\n- 修复了 ONNX 导出忽略显式 `patch_size` 参数的问题：现在 `export()` 和 `predict()` 默认从 `model_config` 中解析 `patch_size`，对其进行严格验证（必须是正整数，而非布尔值），并强制要求 `(H, W)` 尺寸能被 `patch_size × num_windows` 整除。(#876)\n- 修复了使用动态批次维度追踪的模型的 ONNX 导出问题——现在对 Python 整数型的空间维度使用 `torch.full`，以避免 `H_.expand(N_)` 追踪器失败。(#871)\n\n---\n\n## 🏆 贡献者\n\n欢迎新加入的贡献者，并感谢所有为本次发布提供帮助的人：\n\n- **zhaoshuo** (@zhaoshuo1223) — *ONNX 导出的形状验证及 patch_size 修复*\n- **Sven Goluza** (@svengoluza) — *ONNX 导出动态批次修复*\n- **Jirka Borovec** (@Borda) ([LinkedIn](https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Fjirka-borovec\u002F)) — *形状推断、torch.device 支持、版本协调*\n\n---\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002Froboflow\u002Frf-detr\u002Fcompare\u002F1.6.1...1.6.2","2026-03-27T16:33:40",{"id":158,"version":159,"summary_zh":160,"released_at":161},230987,"1.6.1","## 🗑️ 已弃用\n\n- **移除了 ONNX 导出简化功能。** `RFDETR.export(..., simplify=..., force=...)` — 这两个参数现在都为空操作，并会发出 `DeprecationWarning` 警告。RF-DETR 不再自动执行 ONNX 简化；请从您的调用中移除这两个参数。它们将在 v1.8 中被彻底移除。（#861）\n\n## 🔧 修复\n\n- 修复了 `RFDETR.train()`：如果缺少 `rfdetr[train]` 安装（例如在 Colab 中仅运行 `pip install rfdetr`），现在会抛出一条带有可操作提示的 `ImportError` — `pip install \"rfdetr[train,loggers]\"` — 而不再是没有任何安装提示的原始 `ModuleNotFoundError`。（#858）\n- 修复了 `AUG_AGGRESSIVE` 预设：`translate_percent` 曾为 `(0.1, 0.1)` — 这是一个退化的范围，会导致 Albumentations 的 `Affine` 变换始终精确地向右\u002F向下平移 10%。现已更正为 `(-0.1, 0.1)`，以实现对称的双向平移。（#863）\n- 修复了 PTL 训练路径：`latest.ckpt` 和按间隔保存的检查点文件（`checkpoint_interval_N.ckpt`）现在能够正确写入，并在恢复训练时正常加载。（#847）\n- 修复了当 `eval_interval > 1` 时，`BestModelCallback` 和检查点监控器在非评估周期中抛出 `MisconfigurationException` 的问题 — 现在能够优雅地处理监控键缺失的情况。（#848）\n- 修复了 `loggers` extra 中对 `protobuf` 版本的约束，以防止在使用 ≥ 4 版本的 `protobuf` 时出现 TensorBoard 描述符崩溃（`TypeError: Descriptors cannot be created directly`）。（#846）\n- 修复了当 `checkpoint_interval=1` 时出现的 `ModelCheckpoint` 状态键重复问题；在这种配置下会省略 `last.ckpt`，以避免冲突。（#859）\n\n---\n\n## 🏆 贡献者\n\n感谢所有为本次发布提供帮助的人员：\n\n* **Jirka Borovec** (@Borda) ([LinkedIn](https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Fjirka-borovec\u002F)) – *补丁修复：PTL 检查点恢复、BestModelCallback 崩溃、检查点键重复、Colab ImportError、protobuf 版本锁定、AUG_AGGRESSIVE 平移问题、ONNX 简化已弃用提示*\n\n---\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002Froboflow\u002Frf-detr\u002Fcompare\u002F1.6.0...1.6.1","2026-03-25T13:51:14",{"id":163,"version":164,"summary_zh":165,"released_at":166},230988,"1.6.0","## 🚀 新增功能\r\n\r\n- **可组合的 PyTorch Lightning 训练构建块。** 现在，训练栈基于 [PyTorch Lightning](https:\u002F\u002Flightning.ai) 构建，并以模块化、可替换的组件形式暴露出来——就像乐高积木一样。如果你只需要最简单的用法，可以直接使用熟悉的单行代码；或者你可以自行组合这些模块，获得完全的控制权：自定义回调、多 GPU 策略、YAML 配置文件以及通过编程方式构建 Trainer。(#757, #794，关闭 #709)\r\n\r\n\t**级别 1 — 始终如一的 API：**\r\n\t\r\n\t```python\r\n\tfrom rfdetr import RFDETRSmall\r\n\t\r\n\tmodel = RFDETRSmall()\r\n\tmodel.train(dataset_dir=\"path\u002Fto\u002Fdataset\", epochs=50)\r\n\t```\r\n\t\r\n\t**级别 2 — 使用构建块自定义你的训练流程：**\r\n\t\r\n\t```python\r\n\tfrom rfdetr import RFDETRModelModule, RFDETRDataModule, build_trainer\r\n\tfrom rfdetr.training import RFDETREMACallback, COCOEvalCallback, BestModelCallback\r\n\tfrom pytorch_lightning import Trainer\r\n\t\r\n\t# 每个模块都是标准的 PTL 组件——你可以随意替换、继承或扩展任何部分\r\n\tmodule = RFDETRModelModule(model_config=..., train_config=...)\r\n\tdatamodule = RFDETRDataModule(dataset_dir=\"path\u002Fto\u002Fdataset\", train_config=...)\r\n\t\r\n\t# build_trainer() 会为你自动配置好所有 RF-DETR 的回调 ...\r\n\ttrainer = build_trainer(train_config=...)\r\n\t\r\n\t# ... 或者你也可以从单独的回调中自由组合\r\n\ttrainer = Trainer(\r\n\t    max_epochs=50,\r\n\t    callbacks=[\r\n\t        RFDETREMACallback(decay=0.9998),   # 指数移动平均\r\n\t        COCOEvalCallback(),                # COCO mAP 评估\r\n\t        BestModelCallback(),               # 保存最佳检查点\r\n\t        # ... 在这里添加你自己的 Lightning 回调\r\n\t    ],\r\n\t)\r\n\t\r\n\ttrainer.fit(module, datamodule)\r\n\t```\r\n\t\r\n\t**级别 3 — YAML 配置 + CLI，无需编写任何 Python 代码：**\r\n\t\r\n\t```yaml\r\n\t# configs\u002Frfdetr-base.yaml\r\n\tmodel:\r\n\t  class_path: rfdetr.RFDETRSmall\r\n\ttrainer:\r\n\t  max_epochs: 50\r\n\t  precision: \"16-mixed\"\r\n\t  devices: 4  # 4-GPU DDP，无需修改代码\r\n\t```\r\n\t\r\n\t```bash\r\n\trfdetr fit --config configs\u002Frfdetr-base.yaml\r\n\t```\r\n\r\n- **通过 `model.train()` 实现多 GPU DDP。** 直接将 `strategy`、`devices` 和 `num_nodes` 参数传递给熟悉的单行代码——无需自定义 Trainer。当这些参数被省略时，单 GPU 的行为保持不变。(#808，关闭 #803)\r\n\r\n\t```python\r\n\tmodel.train(\r\n\t    dataset_dir=\"path\u002Fto\u002Fdataset\",\r\n\t    epochs=50,\r\n\t    strategy=\"ddp\",\r\n\t    devices=4,\r\n\t)\r\n\t```\r\n\r\n- **`batch_size='auto'` 自动发现批次大小。** RF-DETR 在训练开始前会运行一个轻量级的 CUDA 显存探测，以找到最大的安全微批次大小，然后推荐合适的 `grad_accum_steps` 来达到可配置的有效批次大小目标（默认为 16）。最终确定的值会被记录下来，以便你随时了解实际使用的设置。(#814)\r\n\r\n\t```python\r\n\tmodel.train(\r\n\t    dataset_dir=\"path\u002Fto\u002Fdataset\",\r\n\t    batch_size=\"auto\",\r\n\t    auto_batch_target_effective=16,  # 可选，默认为 16\r\n\t)\r\n\t# 日志： “安全微批次 = 3，梯度累积步数 = 4，有效批次大小 = 12”\n\t```\r\n\r\n- **合成数据集生成器支持分割任务。**","2026-03-20T15:54:49",{"id":168,"version":169,"summary_zh":170,"released_at":171},230989,"1.5.2","## 🚀 新增\n\n- **进度条中显示峰值 GPU 显存。** 在 CUDA 上运行时，训练和评估的 tqdm 进度条现在会显示 `max_mem`（单位：MB），无需使用单独的性能分析工具即可轻松跟踪硬件利用率。该指标具有设备感知能力，在 CPU 和 MPS 上运行时将被忽略。（#773）\n\n## 🔧 修复\n\n- 修复了在 YOLO 格式数据集上训练时 `aug_config` 会被静默忽略的问题——`build_roboflow_from_yolo` 函数从未传递该值，因此无论配置如何，变换始终会回退到默认的 `AUG_CONFIG`。（#774）\n- 修复了验证阶段分割评估指标未写入 `results_mask.json` 的问题。该文件现在与 `results.json` 具有相同结构，并在验证和测试运行后都会更新。（#772）\n- 修复了当 DinoV2 主干网络层结构不匹配任何已知模式时，`update_drop_path` 中出现 `AttributeError` 导致程序崩溃的问题。现在，_get_backbone_encoder_layers_ 函数会对无法识别的架构返回 `None`，而 `update_drop_path` 则会提前退出，不再抛出异常。（#762）\n- 修复了 `drop_path_rate` 未传递到 DinoV2 模型配置的问题，导致即使显式设置了该参数，随机深度也从未真正生效。现在，当使用非窗口化主干网络且 `drop_path_rate > 0.0` 时，系统会发出警告，提示该参数在此类架构中无效。（#762）\n- 修复了错误的 COCO 层次过滤逻辑，该逻辑会导致本应保留的父类别被排除在类别列表之外。（#759）\n- 修复了因 _should_use_raw_category_ids_ 中存在缺陷的连续性检查而导致的 1 索引 Roboflow 数据集评估指标损坏问题——旧的启发式方法会检查每个批次的标签，并可能根据最先出现的标签选择错误的处理路径。（#755）\n\n---\n\n## 🏆 贡献者\n\n特别欢迎我们的新贡献者，并向所有为本次发布提供帮助的人表示衷心感谢：\n\n* **Samuel Lima** (@samuellimabraz) – *修复 DinoV2 主干网络中的 drop path 问题*\n* **youthfrost** (@youthfrost) – *修复分割结果 results_mask.json 的保存问题*\n* **Jelle R. Dalenberg** (@jrdalenberg) ([LinkedIn](https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Fjelledalenberg)) – *修复 COCO 层次过滤逻辑*\n* **Abdul Mukit** (@Abdul-Mukit) ([LinkedIn](https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Fabdul-mukit-in)) – *修复 1 索引数据集中的类别连续性及评估指标损坏问题*\n* **Jirka Borovec** (@Borda) ([LinkedIn](https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Fjirka-borovec\u002F)) – *修复 YOLO 数据集构建器中的 aug_config、max_mem 监测功能以及 CI\u002F测试基础设施*\n\n---\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002Froboflow\u002Frf-detr\u002Fcompare\u002F1.5.1...1.5.2","2026-03-04T11:46:29",{"id":173,"version":174,"summary_zh":175,"released_at":176},230990,"1.5.1","## 🚀 新增\n\n- **嵌套的 Albumentations 变换。** `OneOf` 和 `Sequential` 容器现在可以在增强管道中正确工作。容器变换上的概率设置将被忽略——它们总是会触发，从而使组合保持可预测性。推理管道也可以传递 `None` 目标，这样同一个变换对象就可以同时用于训练和推理。（#752）\n\n    ```python\n    from rfdetr import RFDETRSmall\n\n    model = RFDETRSmall()\n    model.train(\n        dataset_dir=\"...\",\n        aug_config={\n            \"OneOf\": [\n                {\"RandomBrightnessContrast\": {\"p\": 0.5}},\n                {\"HueSaturationValue\": {\"p\": 0.5}},\n            ],\n            \"HorizontalFlip\": {\"p\": 0.5},\n        },\n    )\n    ``` \n\n## 🌱 更改\n\n- 数据集变换管道现在使用 torchvision 原生的 `Compose`、`ToImage` 和 `ToDtype`，而非自定义实现。`Normalize` 的默认值已改为 ImageNet 的均值和标准差。（#745）\n\n## 🔧 修复\n\n- 修复了 `RFDETRMedium` 未出现在公共 API 中的问题——`__all__` 列表中误包含了重复的 `RFDETRSmall` 条目。（#748）\n- 修复了 `AR50_90` 在 `MetricsMLFlowSink` 中因 COCO 评估指标错误而报告不正确值的问题。（#735）\n- 修复了在具有扁平或混合超类别结构的 COCO 数据集中，`_load_classes` 函数中的超类别过滤问题。（#744）\n- 修复了当样本包含面积为零或空的掩码时，几何变换（翻转、裁剪等）导致程序崩溃的问题。（#727）\n- 修复了在 Colab 上进行分割训练时出现的问题——`DepthwiseConvBlock` 现在会为深度可分离卷积禁用 cuDNN。（#728）\n- 将 `onnxsim` 锁定至 `\u003C0.6.0` 版本，以防止 `pip install` 无限期挂起。（#749）\n\n---\n\n## 🏆 贡献者\n\n特别欢迎我们的新贡献者，并向所有为本次发布提供帮助的人表示衷心感谢：\n\n* **tillfri** (@tillfri) – *修复 MLflow sink 中的 AR50_90 指标索引*\n* **justin-alt-account** (@justin-alt-account) – *修复 `RFDETRMedium` 未出现在 `__all__` 中的问题*\n* **Jirka Borovec** (@Borda) ([LinkedIn](https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Fjirka-borovec\u002F)) – *支持嵌套 Albumentations、重构变换管道、修复掩码问题、修复超类别问题、锁定 onnxsim 版本、改进 CI\u002F测试基础设施*\n\n---\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002Froboflow\u002Frf-detr\u002Fcompare\u002F1.5.0...1.5.1","2026-02-27T10:22:10",{"id":178,"version":179,"summary_zh":180,"released_at":181},230991,"1.5.0","## 🚀 新增功能\n\n- **通过 Albumentations 自定义数据增强。** 现在可以通过 `train()` 方法中的 `aug_config` 参数来控制训练时的数据增强。您可以传递一个包含 Albumentations 变换的字典，选择内置的命名预设，或者完全禁用数据增强。边界框和分割掩码会自动随图像一起进行变换。（#263、#702）\n\n    ```python\n    from rfdetr import RFDETRSmall\n    from rfdetr.datasets.aug_config import AUG_CONSERVATIVE, AUG_AGGRESSIVE, AUG_AERIAL, AUG_INDUSTRIAL\n\n    model = RFDETRSmall()\n\n    # 使用内置预设\n    model.train(dataset_dir=\"...\", aug_config=AUG_AGGRESSIVE, progress_bar=True)\n\n    # 或者显式定义变换\n    model.train(\n        dataset_dir=\"...\",\n        aug_config={\n            \"HorizontalFlip\": {\"p\": 0.5},\n            \"RandomBrightnessContrast\": {\"brightness_limit\": 0.2, \"p\": 0.4},\n            \"GaussianBlur\": {\"blur_limit\": 3, \"p\": 0.2},\n        },\n        progress_bar=True,\n    )\n\n    # 禁用所有数据增强\n    model.train(dataset_dir=\"...\", aug_config={})\n    ```\n\n    | 预设             | 最适合场景                          |\n    | ------------------ | --------------------------------- |\n    | `AUG_CONSERVATIVE` | 小规模数据集（少于 500 张图像） |\n    | `AUG_AGGRESSIVE`   | 大规模数据集（2000 张以上图像）     |\n    | `AUG_AERIAL`       | 卫星\u002F俯视图像                     |\n    | `AUG_INDUSTRIAL`   | 制造业\u002F质检数据                   |\n\n- **保存增强后的训练图像样本。** 在 `TrainConfig` 中启用 `save_dataset_grids=True`，即可在训练开始前将增强后的训练集和验证集图像以 3×3 的 JPEG 格式网格图写入输出目录，从而无需运行完整的一个 epoch 即可轻松验证您的数据增强流程。（#153）\n\n    ```python\n    from rfdetr import RFDETRSmall\n\n    model = RFDETRSmall()\n    model.train(dataset_dir=\"...\", save_dataset_grids=True, output_dir=\"output\u002F\")\n    # 网格图将保存到 output\u002F：\n    #   train_batch0_grid.jpg, train_batch1_grid.jpg, train_batch2_grid.jpg\n    #   val_batch0_grid.jpg,   val_batch1_grid.jpg,   val_batch2_grid.jpg\n    ```\n\n- **ClearML 训练日志记录器。** 在 `TrainConfig` 中设置 `clearml=True`，即可将每个 epoch 的指标直接流式传输到您的 ClearML 项目中。（#520）\n\n    ```python\n    from rfdetr import RFDETRSmall\n\n    model = RFDETRSmall()\n    model.train(dataset_dir=\"...\", clearml=True)\n    ```\n\n- **MLflow 训练日志记录器。** 在 `TrainConfig` 中设置 `mlflow=True`，即可将实验和指标记录到 MLflow，并支持自定义跟踪 URI 和系统指标。（#109）\n\n    ```python\n    from rfdetr import RFDETRSmall\n\n    model = RFDETRSmall()\n    model.train(dataset_dir=\"...\", mlflow=True)\n    ```\n\n- **训练和验证进度条。** 现在，训练和验证过程中会显示实时的批次级进度条，屏幕上的日志也进行了结构化处理，便于阅读。（#204）\n\n- 向 `TrainConfig` 中添加了 `device` 字段，允许显式指定设备。","2026-02-23T16:01:23",{"id":183,"version":184,"summary_zh":77,"released_at":185},230992,"1.5.0.rc1","2026-02-20T20:43:30",{"id":187,"version":188,"summary_zh":189,"released_at":190},230993,"1.4.3","## 🐞 修复\n\n* **导出：** 修复 `deploy_to_roboflow` 分割模型导出问题 (#578)\n\n## 🛠️ 变更 \u002F 维护\n\n* **验证：** 为文件下载和预训练权重处理添加 MD5 校验 (#679)\n* **测试与基准测试：**\n  * 添加 COCO 数据集的分割模型基准测试 (#684)\n  * 调整 COCO 推理统计\u002F阈值 (#678)\n* **文档：** 更新 README.md 中的许可证部分\n\n---\n\n### 🏆 贡献者\n\n特别欢迎我们的新贡献者，并向所有参与本次发布工作的人员表示衷心感谢：\n\n* **Francesco Bodria** (@francescobodria) ([LinkedIn](https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Ffrancescobodria\u002F)) – *COCO 导出修复*\n* **Matvei Popov** (@Matvezy) ([LinkedIn](https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Fmatvezy\u002F)) – *分割模型导出修复*\n* **Jirka Borovec** (@Borda) ([LinkedIn](https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Fjirka-borovec\u002F)) – *MD5 校验、基准测试及维护*\n\n---\n\n**完整变更日志**：[1.4.2...1.4.3](https:\u002F\u002Fgithub.com\u002Froboflow\u002Frf-detr\u002Fcompare\u002F1.4.2...1.4.3)","2026-02-16T13:24:33",{"id":192,"version":193,"summary_zh":194,"released_at":195},230994,"1.4.2","## 🚀 新增\n* **YOLO 支持**：更新 YOLO 数据集格式支持 (#74)\n* **推理**：支持在预测中使用图像 URL (#629)\n* **训练**：\n    * 当 `run_test=False` 时，允许在没有测试集划分的自定义数据集上进行训练 (#628)\n    * 添加自定义 `print-freq` 参数 (#603)\n\n## 🐞 修复\n* **CLI**：修复 CLI 脚本中的错误 (#246)\n* **导出**：修复 RFDETR-Seg ONNX 导出失败的问题 (#626)\n* **训练\u002F验证**：\n    * 修改了具有误导性的 `num_classes` 警告信息 (#261)\n    * 在测试中添加 F1 分数断言，并明确 IoU 阈值 (#596)\n* **依赖项**：热修复：将 `transformers` 依赖锁定在版本范围 >4.0.0, \u003C5.0.0 内 (#599)\n\n## 🛠️ 变更 \u002F 维护\n* **合成数据**：添加合成数据集生成模块及相应测试 (#617)\n* **基准测试**：\n    * 添加 COCO 推理基准测试 (#652)，并为多种模型尺寸实现参数化 (#661, #662)\n    * 添加合成收敛性基准测试 (#638)\n* **开发者体验**：\n    * 将 `print` 语句替换为日志记录调用，并移除未使用的导入 (#158)\n* **重构**：\n    * 将平台子模块分离，并迁移到 `rfdetr_plus` 包中 (#645)\n* **测试与 CI**：\n    * 稳定训练测试，并通过 `seed_all` 中心化种子逻辑 (#655)\n* **文档格式化**：标准化文档格式，并启用 `codespell`\u002F`mdformat` 钩子 (#634, #635, #637)\n\n---\n\n### 🏆 贡献者\n\n特别欢迎我们的新贡献者，并向所有参与本次发布工作的人员表示衷心感谢：\n\n* **Jirka Borovec** (@Borda) ([LinkedIn](https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Fjirka-borovec\u002F)) – *合成数据生成与 COCO 基准测试*\n* **Piotr Skalski** (@SkalskiP) ([LinkedIn](https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Fpiotr-skalski-36b5b4122\u002F)) – *日志重构与清理*\n* **Omkar Kabde** (@omkar-334) ([LinkedIn](https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Fomkar-kabde\u002F)) – *类型注解与自定义打印参数*\n* **Damiano Ferrari** (@ferraridamiano) ([LinkedIn](https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Fdamiano-ferrari\u002F)) – *Python 版本管理*\n* **Panagiotis Moraitis** (@panagiotamoraiti) ([LinkedIn](https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Fp-moraiti\u002F)) – *修复误导性警告信息*\n* **Mario De Genaro** (@mario-dg) ([LinkedIn](https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Fmario-da-graca-1796b8273\u002F)) – *YOLO 数据集格式更新*\n* **Tahar H.** (@taharh) ([LinkedIn](https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Ftaha-rehah\u002F)) – *RFDETR-Seg ONNX 导出修复*\n* **Hardik Dava** (@hardikdava) – *支持预测中的图像 URL*\n* **Alex Holliday** (@AHolliday) – *无测试集划分的自定义数据集支持*\n* **Surya** (@surya3214) – *CLI 脚本错误修复*\n* **Y. Yang** (@y-yang42) – *窗口注意力机制修复*\n\n---\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002Froboflow\u002Frf-detr\u002Fcompare\u002F1.4.1...1.4.2","2026-02-12T00:46:30",{"id":197,"version":198,"summary_zh":199,"released_at":200},230995,"1.4.1","# Changelog\r\n\r\n## 🌱 Changed\r\n\r\n* Refined the licensing - update checkpoint tables with license column (#614)\r\n\r\n## 🔧 Fixed\r\n\r\n* Pinned `transformers` dependency to version range `\u003C5.0.0` to prevent compatibility issues with newer versions. (#599)\r\n* Fixed license link badges in the installation section of the documentation. (#591)\r\n* Addressed various issues in YOLO dataset processing, including image ID start values, class ID mismatches, and better user notifications for skipped files. (#74)\r\n\r\n# 🏆 Contributors\r\n\r\n@SkalskiP ([Piotr Skalski](https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Fskalskip92\u002F)), @Borda ([Jirka Borovec](https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Fjirka-borovec\u002F)), @mario-dg ([Mario da Graca](https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Fmario-da-graca-1796b8273\u002F)), @ferraridamiano ([Damiano Ferrari](https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Fdamiano-ferrari\u002F)), @omkar-334 ([Omkar Kabde](https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Fomkar-kabde\u002F)), @panagiotamoraiti ([Panagiota Moraiti](https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Fpanagiota-moraiti\u002F)), @surya3214, @PierreMarieCurie","2026-01-30T14:52:58",{"id":202,"version":203,"summary_zh":204,"released_at":205},230996,"1.4.0","# Changelog\r\n\r\n> [!WARNING]\r\n> Starting with version `1.4.0`, RF-DETR drops support for Python `3.9`. If your environment still relies on Python `3.9`, stay on RF-DETR `1.3.x` or upgrade your Python runtime to `3.10` or newer.\r\n\r\n## 🚀 Added\r\n\r\n- New pre-trained checkpoints. Object detection includes new L, XL, and 2XL checkpoints. Instance segmentation includes N, S, M, L, XL, and 2XL checkpoints. ([#539](https:\u002F\u002Fgithub.com\u002Froboflow\u002Frf-detr\u002Fpull\u002F539))\r\n\r\n    \u003Cimg alt=\"rf_detr_1-4_latency_accuracy_object_detection\" src=\"https:\u002F\u002Fstorage.googleapis.com\u002Fcom-roboflow-marketing\u002Frf-detr\u002Frf_detr_1-4_latency_accuracy_object_detection.png\" \u002F>\r\n    \r\n    \u003Cimg alt=\"rf_detr_1-4_latency_accuracy_instance_segmentation\" src=\"https:\u002F\u002Fstorage.googleapis.com\u002Fcom-roboflow-marketing\u002Frf-detr\u002Frf_detr_1-4_latency_accuracy_instance_segmentation.png\" \u002F>\r\n    \r\n    ```python\r\n    import requests\r\n    import supervision as sv\r\n    from PIL import Image\r\n    from rfdetr import RFDETRSegMedium\r\n    from rfdetr.util.coco_classes import COCO_CLASSES\r\n    \r\n    model = RFDETRSegMedium()\r\n    \r\n    image = Image.open(requests.get('https:\u002F\u002Fmedia.roboflow.com\u002Fdog.jpg', stream=True).raw)\r\n    detections = model.predict(image, threshold=0.5)\r\n    \r\n    labels = [\r\n        f\"{COCO_CLASSES[class_id]}\"\r\n        for class_id\r\n        in detections.class_id\r\n    ]\r\n    \r\n    annotated_image = sv.MaskAnnotator().annotate(image, detections)\r\n    annotated_image = sv.LabelAnnotator().annotate(annotated_image, detections, labels)\r\n    ```\r\n\r\n    https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002Fadd23fd1-266f-4538-8809-d7dd5767e8e6\r\n\r\n- Support for training object detection and instance segmentation models using datasets in YOLO format. ([#569](https:\u002F\u002Fgithub.com\u002Froboflow\u002Frf-detr\u002Fpull\u002F569))\r\n\r\n## 🌱 Changed\r\n\r\n- Simplified project dependencies by removing `cython`, `fairscale`, `timm`, `accelerate`, `ninja`, `einops`, `pandas`, `pylabel`, and `open_clip_torch` from `pyproject.toml`. This reduces the dependency footprint and makes RF-DETR easier to install alongside other Python packages. ([#571](https:\u002F\u002Fgithub.com\u002Froboflow\u002Frf-detr\u002Fpull\u002F571))\r\n\r\n## 🔧 Fixed\r\n\r\n- Fixed precision, recall, and F1 computation during confidence sweeps. This resolves an issue where recall values were identical across classes and aligns per-class and class-averaged metrics with expected COCO-style behavior. ([#545](https:\u002F\u002Fgithub.com\u002Froboflow\u002Frf-detr\u002Fpull\u002F545))\r\n\r\n# 🏆 Contributors\r\n\r\n@isaacrob ([Isaac Robinson](https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Frobinsonish\u002F)), @probicheaux ([Peter Robicheaux](https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Fpeter-robicheaux-01958813b\u002F)), @Matvezy ([Matvei Popov](https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Fmatvezy\u002F)), @mkaic ([Kai Christensen](https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Fmkaic\u002F)), @anujonthemove ([Anuj Khandelwal](https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Fanujonthemove\u002F)), @brunopicinin ([Bruno Cardoso](https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Fbrunopicinin\u002F)), @capjamesg ([James Gallagher](https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Fjg12927\u002F)), @Borda ([Jirka Borovec](https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Fjirka-borovec\u002F)), @SkalskiP ([Piotr Skalski](https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Fskalskip92\u002F))","2026-01-22T16:18:04",{"id":207,"version":208,"summary_zh":209,"released_at":210},230997,"1.3.0","## What's new 🔥 \r\n\r\n### Support for instance segmentation\r\n\r\nRF-DETR 1.3.0 adds RF-DETR Seg (Preview), a new, state-of-the-art instance segmentation model.\r\n\r\nRF-DETR Seg (Preview) is 3x faster and more accurate than the largest YOLO11 when evaluated on the Microsoft COCO Segmentation benchmark, defining a new real-time state-of-the-art for the industry-standard benchmark in segmentation model evaluation.\r\n\r\n\u003Cimg width=\"1309\" height=\"736\" alt=\"Screenshot 2025-10-02 at 21 33 37 (1)\" src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F35248e18-a236-4db5-89b0-8e73dd909407\" \u002F>\r\n\r\nWith the `rfdetr` Python package, you can train and run models with the new `RFDETRSegPreview` trainer.\r\n\r\nThe training API is as follows:\r\n\r\n```python\r\nfrom rfdetr import RFDETRSegPreview\r\n\r\nmodel = RFDETRSegPreview()\r\n\r\nmodel.train(\r\n    dataset_dir=\u003CDATASET_PATH>,\r\n    epochs=10,\r\n    batch_size=4,\r\n    grad_accum_steps=4,\r\n    lr=1e-4,\r\n    output_dir=\u003COUTPUT_PATH>\r\n)\r\n```\r\n\r\nTrained models can also be [deployed with Roboflow Inference](https:\u002F\u002Frfdetr.roboflow.com\u002Flearn\u002Fdeploy\u002F) with the new `deploy_to_roboflow` function. This allows you to provision a serverless cloud API for running your model, as well as deploy your model in a Roboflow Workflow or with a Roboflow Inference server:\r\n\r\n```python\r\nfrom rfdetr import RFDETRSegPreview\r\n\r\nx = RFDETRSegPreview(pretrain_weights=\"\u003Cpath\u002Fto\u002Fprtrain\u002Fweights\u002Fdir>\")\r\nx.deploy_to_roboflow(\r\n  workspace=\"\u003Cyour-workspace>\",\r\n  project_ids=[\"\u003Cyour-project-id>\"],\r\n  api_key=\"\u003CYOUR_API_KEY>\"\r\n)\r\n```\r\n\r\n🏆 Contributors\r\n\r\n@probicheaux @isaacrob-roboflow @Matvezy @SkalskiP @capjamesg","2025-10-02T22:48:23",{"id":212,"version":213,"summary_zh":214,"released_at":215},230998,"1.2.0","## What's new 🔥 \r\n\r\n### New model sizes\r\n\r\nRF-DETR 1.2.0 introduces three new, state-of-the-art, model sizes for object detection:\r\n\r\n- Nano (`RFDETRNano`)\r\n- Small (`RFDETRSmall`)\r\n- Medium (`RFDETRMedium`)\r\n\r\n\u003Cimg width=\"2369\" height=\"989\" alt=\"image (8)\" src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002Fd99aa04e-696f-4f15-9365-7f17f3b3df58\" \u002F>\r\n\r\nWith the `rfdetr` Python package, you can train and run models with these architectures.\r\n\r\nThe training API is as follows:\r\n\r\n```python\r\nfrom rfdetr import RFDETRNano\r\n\r\nmodel = RFDETRNano()\r\n\r\nmodel.train(\r\n    dataset_dir=\u003CDATASET_PATH>,\r\n    epochs=10,\r\n    batch_size=4,\r\n    grad_accum_steps=4,\r\n    lr=1e-4,\r\n    output_dir=\u003COUTPUT_PATH>\r\n)\r\n```\r\n\r\nTrained models can also be [deployed with Roboflow Inference](https:\u002F\u002Frfdetr.roboflow.com\u002Flearn\u002Fdeploy\u002F) with the new `deploy_to_roboflow` function. This allows you to provision a serverless cloud API for running your model, as well as deploy your model in a Roboflow Workflow or with a Roboflow Inference server:\r\n\r\n```python\r\nfrom rfdetr import RFDETRNano\r\n\r\nx = RFDETRNano(pretrain_weights=\"\u003Cpath\u002Fto\u002Fprtrain\u002Fweights\u002Fdir>\")\r\nx.deploy_to_roboflow(\r\n  workspace=\"\u003Cyour-workspace>\",\r\n  project_ids=[\"\u003Cyour-project-id>\"],\r\n  api_key=\"\u003CYOUR_API_KEY>\"\r\n)\r\n```\r\n\r\nhttps:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F607f8462-0e17-4777-bdd4-9be012174e42\r\n\r\n### New documentation\r\n\r\n[RF-DETR now has its own documentation website.](https:\u002F\u002Frfdetr.roboflow.com\u002F) This website has tutorials on running RF-DETR with base weights, fine-tuning RF-DETR models, and deploying RF-DETR models. You can also see auto-generated docstring documentation for the main model classes.\r\n\r\n🏆 Contributors\r\n\r\n@probicheaux @isaacrob-roboflow @Matvezy @MadeWithStone @SkalskiP @capjamesg","2025-07-23T18:02:34",{"id":217,"version":218,"summary_zh":219,"released_at":220},230999,"1.1.0","# Changelog\r\n\r\nhttps:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F87a3cefe-f3d1-42df-a799-f1d45dddf75e\r\n\r\n## 🚀 Added\r\n\r\n- Early stopping - Early stopping monitors validation mAP and halts training if improvements remain below a threshold for a set number of epochs. This can reduce wasted computation once the model converges. Additional parameters—such as `early_stopping_patience`, `early_stopping_min_delta`, and `early_stopping_use_ema`—let you fine-tune the stopping behavior. (https:\u002F\u002Fgithub.com\u002Froboflow\u002Frf-detr\u002Fpull\u002F87)\r\n\r\n```python\r\nfrom rfdetr import RFDETRBase\r\n\r\nmodel = RFDETRBase()\r\n\r\nmodel.train(dataset_dir=\u003CDATASET_PATH>, epochs=12, batch_size=4, grad_accum_steps=4, early_stopping=True)\r\n```\r\n\r\n- Gradient checkpointing - Gradient checkpointing - Gradient checkpointing re-computes certain parts of the forward pass during backpropagation to reduce peak memory usage. This allows training larger models or higher batch sizes on limited GPU memory at the cost of slightly longer training time. Enable it by setting `gradient_checkpointing=True`. (https:\u002F\u002Fgithub.com\u002Froboflow\u002Frf-detr\u002Fpull\u002F91)\r\n\r\n```python\r\nfrom rfdetr import RFDETRBase\r\n\r\nmodel = RFDETRBase()\r\n\r\nmodel.train(dataset_dir=\u003CDATASET_PATH>, epochs=12, batch_size=8, grad_accum_steps=2, gradient_checkpointing=True)\r\n```\r\n\r\n- Saving metrics - Training and validation metrics (e.g., losses, mAP) are now automatically saved to your output directory after training. (https:\u002F\u002Fgithub.com\u002Froboflow\u002Frf-detr\u002Fpull\u002F58)\r\n\r\n![427308662-9088a1c0-fc20-495d-8237-a65d3881fbd5](https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002Ffaa37772-8a7f-4c52-8989-bfd20e763f68)\r\n\r\n- Logging with TensorBoard - Added support for logging training progress and metrics to TensorBoard, providing live visualizations of your model’s performance. Simply pass `tensorboard=True` to `.train()`, then run `tensorboard --logdir \u003COUTPUT_DIR>` to monitor. (https:\u002F\u002Fgithub.com\u002Froboflow\u002Frf-detr\u002Fpull\u002F62)\r\n\r\n    \u003Cdetails>\r\n    \u003Csummary>Using TensorBoard with RF-DETR\u003C\u002Fsummary>\r\n    \r\n    \u003Cbr>\r\n    \r\n    - TensorBoard logging requires additional packages. Install them with:\r\n    \r\n        ```bash\r\n        pip install \"rfdetr[metrics]\"\r\n        ```\r\n      \r\n    - To activate logging, pass the extra parameter `tensorboard=True` to `.train()`:\r\n    \r\n        ```python\r\n        from rfdetr import RFDETRBase\r\n        \r\n        model = RFDETRBase()\r\n        \r\n        model.train(dataset_dir=\u003CDATASET_PATH>, epochs=12, batch_size=4, grad_accum_steps=4, tensorboard=True, output_dir=\u003COUTPUT_PATH>)\r\n        ```\r\n    \r\n    - To use TensorBoard locally, navigate to your project directory and run:\r\n    \r\n        ```bash\r\n        tensorboard --logdir \u003COUTPUT_DIR>\r\n        ```\r\n    \r\n        Then open `http:\u002F\u002Flocalhost:6006\u002F` in your browser to view your logs.\r\n    \r\n    - To use TensorBoard in Google Colab run:\r\n    \r\n        ```bash\r\n        %load_ext tensorboard\r\n        %tensorboard --logdir \u003COUTPUT_DIR>\r\n        ```\r\n          \r\n    \u003C\u002Fdetails>\r\n\r\n- Logging with Weights and Biases - Integrated Weights and Biases (W&B) for collaborative, cloud-based experiment tracking. Passing wandb=True to .train() will automatically log metrics, hyperparameters, and system stats to your W&B project. (https:\u002F\u002Fgithub.com\u002Froboflow\u002Frf-detr\u002Fpull\u002F70)\r\n\r\n    \u003Cdetails>\r\n    \u003Csummary>Using Weights and Biases with RF-DETR\u003C\u002Fsummary>\r\n    \r\n    \u003Cbr>\r\n    \r\n    - Weights and Biases logging requires additional packages. Install them with:\r\n    \r\n        ```bash\r\n        pip install \"rfdetr[metrics]\"\r\n        ```\r\n    \r\n    - Before using W&B, make sure you are logged in:\r\n    \r\n        ```bash\r\n        wandb login\r\n        ```\r\n    \r\n        You can retrieve your API key at wandb.ai\u002Fauthorize.\r\n    \r\n    - To activate logging, pass the extra parameter `wandb=True` to `.train()`:\r\n    \r\n        ```python\r\n        from rfdetr import RFDETRBase\r\n        \r\n        model = RFDETRBase()\r\n        \r\n        model.train(dataset_dir=\u003CDATASET_PATH>, epochs=12, batch_size=4, grad_accum_steps=4, wandb=True, project=\u003CPROJECT_NAME>, run=\u003CRUN_NAME>)\r\n        ```\r\n    \r\n        In W&B, projects are collections of related machine learning experiments, and runs are individual sessions where training or evaluation happens. If you don't specify a name for a run, W&B will assign a random one automatically.\r\n      \r\n    \u003C\u002Fdetails>\r\n\r\n- Automated Python package publish - Implemented a GitHub Actions workflow to build and publish the `rfdetr` package to PyPI on each new release, ensuring the latest version is immediately available. (https:\u002F\u002Fgithub.com\u002Froboflow\u002Frf-detr\u002Fpull\u002F71) \r\n\r\n## 🔧 Fixed\r\n\r\n- Resume training - You can resume training from a previously saved checkpoint by passing the path to the `checkpoint.pth` file using the `resume` argument. This is useful when training is interrupted or you want to continue fine-tuning an already partially trained model. The training loop will automatically load the weights and optimizer state from the provided checkpoint file. (https:\u002F\u002Fgithub.c","2025-04-03T07:17:07"]