RiO-DETRv2
RiO-DETRv2 是一个实时的旋转框 DETR。它在框自身的坐标系里把框的四条边预测为分布,由粗到细地细化角度,并用一个感知角度的质量分数为每个框打分。LibreYOLO 以仅推理的方式移植了它,提供五种尺寸,以及 DOTA-v1.0 和 DIOR-R 检查点。
- 任务
- oriented boxes
- 安装
pip install libreyolo- 支持层级
- 仅推理,自 v1.8.0 起。仅支持预测、验证和导出。训练相关的功能不适用。
- 许可
- 代码采用 Apache-2.0,权重采用 Apache-2.0。商用
安装
RiO-DETRv2 不需要任何可选 extra。
pip install libreyolo预测
权重在首次使用时从 LibreYOLO 的 Hugging Face 镜像下载。这些模型是在航拍图像上训练的, 所以请使用俯拍的照片。
from libreyolo import LibreYOLO model = LibreYOLO("LibreRiODETRv2s-obb.pt") # DOTA-v1.0,15 个类别result = model("aerial.jpg", save=True) print(result.obb.xywhr) # (N, 5):中心、尺寸和角度print(result.obb.conf, result.obb.cls)from libreyolo import LibreYOLO model = LibreYOLO("LibreRiODETRv2s-obb-diorr.pt") # DIOR-R,20 个类别result = model("aerial.jpg")libreyolo predict model=LibreRiODETRv2s-obb.pt source=aerial.jpg save=Trueresult.obb 存放旋转框:xywhr(中心、宽、高和角度)、conf 和 cls,类别名来自
检查点。载荷和绘图见旋转框检测任务页。
变体
五种尺寸 n、s、m、l 和 x,每种有两个检查点:
| 检查点 | 数据集 | 类别数 | 画布 |
|---|---|---|---|
LibreRiODETRv2<size>-obb.pt | DOTA-v1.0 | 15 | 1024 px |
LibreRiODETRv2<size>-obb-diorr.pt | DIOR-R | 20 | 800 px |
原生画布尺寸从检查点里读取。在 CPU 上,全部十个检查点的原始输出和解码后的旋转框都与 上游采用 Apache-2.0 许可的发布版完全一致(最大绝对差为 0)。
RiO-DETRv2 仅支持推理。train() 会抛出异常:上游的训练配方(DINOv3 特征蒸馏、OBB
匈牙利匹配、边界和角度分布损失函数)没有移植。需要可训练的旋转框检测,请用
GTR 或 YOLO-NAS。
导出
| 任务 | ONNX | TorchScript | ExecuTorch | TensorRT | OpenVINO | Paddle | MNN | RKNN | Axelera | ncnn | TFLite | CoreML | Core AI |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Oriented boxes | Oriented boxes to ONNX:支持 | Oriented boxes to TorchScript:支持 | Oriented boxes to ExecuTorch:支持 | Oriented boxes to TensorRT:支持 | Oriented boxes to OpenVINO:支持 | Oriented boxes to Paddle:不支持 | Oriented boxes to MNN:不支持 | Oriented boxes to RKNN:不支持 | Oriented boxes to Axelera:不支持 | Oriented boxes to ncnn:不支持 | Oriented boxes to TFLite:不支持 | Oriented boxes to CoreML:不支持 | Oriented boxes to Core AI:不支持 |
ONNX 和 TorchScript 导出可以往返:导出的文件能通过 LibreYOLO() 重新加载,并返回
同样的 Results。
from libreyolo import LibreYOLO model = LibreYOLO("LibreRiODETRv2s-obb.pt")model.export(format="onnx")model.export(format="torchscript")libreyolo export model=LibreRiODETRv2s-obb.pt format=onnx检查点
| 文件 | 权重许可 |
|---|---|
| Oriented boxes | |
| LibreRiODETRv2l-obb.pt | apache-2.0 |
| LibreRiODETRv2l-obb-diorr.pt | apache-2.0 |
| LibreRiODETRv2m-obb.pt | apache-2.0 |
| LibreRiODETRv2m-obb-diorr.pt | apache-2.0 |
| LibreRiODETRv2n-obb.pt | apache-2.0 |
| LibreRiODETRv2n-obb-diorr.pt | apache-2.0 |
| LibreRiODETRv2s-obb.pt | apache-2.0 |
| LibreRiODETRv2s-obb-diorr.pt | apache-2.0 |
| LibreRiODETRv2x-obb.pt | apache-2.0 |
| LibreRiODETRv2x-obb-diorr.pt | apache-2.0 |
上面的每个文件目前都在 LibreYOLO 组织中,并会在首次使用时下载。
许可证
请检查你所下载的具体权重在 Hugging Face 仓库中的许可。LibreYOLO 组织里的每个检查点都附有许可,同一家族内也不一定相同。该仓库是权威来源;以下摘要说明本页上次验证时适用的情况。
这里只说明涉及的许可证,不构成法律意见。如果答案对商用很重要,请自行阅读许可证并咨询法律顾问。
- 原始工作
- RiO-DETRv2, RiO-DETRv2 authors (RicePasteM)
- 上游许可
- Apache-2.0
- LibreYOLO 代码
- MIT
- 权重
- 采用 Apache-2.0 许可,重新发布在 huggingface.co/LibreYOLO
- 解读
- Apache-2.0 is a permissive license, so the RiO-DETRv2 code and checkpoints can be used in commercial and closed-source products. Redistributing them means keeping the license text and notices, and the license grants a patent license. About 33 minutes after its initial commit (ab8b22df5d800a927774c8c67e77fd29c0fe6967), upstream changed its LICENSE file to AGPL-3.0; later commits change only the README and LICENSE, not the code. LibreYOLO's port relies on the Apache-2.0 grant of that initial release, uses nothing from later commits, and preserves the Apache-2.0 snapshot at LibreYOLO/RiO-DETRv2 (tag apache-2.0-ab8b22d). The adapted decoder keeps Apache-2.0 with its RT-DETR, D-FINE, DEIM and RT-DETRv4 copyright lines (libreyolo/models/riodetrv2/LICENSE and NOTICE); the HGNetv2 backbone, encoder and decoder blocks reuse LibreYOLO's dfine and rtdetrv2 families, and the wiring around them is LibreYOLO's MIT code. The official checkpoints (Hugging Face RicePasteM/RiO-DETRv2 at revision 5f578f57929aded1962ebf8c5584a4771461124f, tagged apache-2.0) are mirrored as LibreYOLO/LibreRiODETRv2{n,s,m,l,x}-obb (DOTA-v1.0) and -obb-diorr (DIOR-R) with the upstream LICENSE and NOTICE; conversion renames keys and drops a training-only projector, learned tensors are unchanged. The DOTA-v1.0 and DIOR-R training sets carry their own terms.
RiO-DETRv2 出自 RicePasteM
(RicePasteM/RiO-DETRv2)。代码和
权重采用 Apache-2.0 许可,所以可以商用。上游在首次提交约 33 分钟后把 LICENSE 文件
改成了 AGPL-3.0,代码没有任何改动。LibreYOLO 的移植只使用最初那个采用 Apache-2.0
许可的版本(commit ab8b22d),并在 LibreYOLO/RiO-DETRv2 保留了这份快照。官方
检查点(checkpoint)镜像为 LibreYOLO/LibreRiODETRv2{n,s,m,l,x}-obb 和
-obb-diorr,只重命名了键,学到的张量没有改动。DOTA-v1.0 和 DIOR-R 训练集有各自的
条款。
引用
@misc{hu2026riodetrv2geometryawareuncertaintymodeling,
title={RiO-DETRv2: Geometry-Aware Uncertainty Modeling Meets Real-Time Oriented Object Detection Transformer},
author={Zhangchi Hu and Zilong He and Yifan Zhao and Xiangyu Yu and Jie Chen and Peixi Wu and Yansong Peng and Hebei Li and Xiaoyan Sun},
year={2026},
eprint={2610.29159},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2610.29159},
}复制自作者在 arxiv.org/bibtex/2610.29159 上提供的引用块。