README.md
August 28, 2026 ยท View on GitHub
RiO-DETR: DETR for Real-time Oriented Object Detection
RiO-DETR is a real-time DETR designed for oriented object detection, which solves foundamental issues in this area. It serves as a robust foundation for future research and applications in the field of real-time end-to-end oriented object detection.
๐ง Corresponding author: lihebei@mail.ustc.edu.cn
If you like our work, please give us a โญ!
๐ข A Note on the Release of RiO-DETR
Unfortunately, I am currently unable to release the complete research code.
I have always hoped to make the full implementation of RiO-DETR publicly available, and I began preparing the codebase for an open-source release at an early stage. However, due to intellectual property restrictions involving one of the collaborating institutions, I was not granted permission to release the parts of the codebase containing the specific technical improvements introduced in the paper.
This restriction does not reflect any change in my personal commitment to open research and reproducibility. I sincerely appreciate your understanding.
What Will Be Released
I will release a clean implementation of the core framework built upon RT-DETRv2. This release will include:
-
A baseline RT-DETR-OBB model;
-
A code architecture and supporting infrastructure that I have independently reorganized and optimized;
-
Pretrained weights, which will be uploaded progressively.
However, please note that this version will not include the paper-specific technical improvements affected by the intellectual property restrictions. As a result, there remains a performance gap between this foundational release and the full RiO-DETR implementation. I hope this foundational release can still provide the community with a useful starting point. I also warmly welcome the community to build upon this framework, independently reproduce the missing components, and share open implementations.
Good News: RiO-DETRv2 Is on the Way
We are excited to share that RiO-DETRv2 is already under development and will be published soon. This new version includes reworked architectural improvements and optimizations for bounding-box localization, and it will not be subject to the intellectual property restrictions mentioned above. Please stay tuned. ๐ฅ
๐ Updates
-
[2026.08.09] ๐ RiO-DETR is selected as an oral(spotlight) presentation!
-
[2026.07.31] We have released a clean implementation of the core RT-DETR-OBB framework, along with a selection of pretrained weights. More pretrained weights will be uploaded in the next few days.
-
[2026.06.20] ๐ RiO-DETR has been accepted to ECCV 2026!
-
[2026.03.10] Release paper on arxiv.
Model Zoo
DIOR-R
| Model | mAP | Params | Config | Log | Checkpoint |
|---|---|---|---|---|---|
| RT-DETRv2-OBB-N | 62.74 | 3.97M | yml | metrics | ckpt |
| RT-DETRv2-OBB-S | 73.75 | 8.15M | yml | metrics | ckpt |
| RT-DETRv2-OBB-M | 75.61 | 19.07M | yml | metrics | ckpt |
| RT-DETRv2-OBB-L | 75.69 | 27.96M | yml | metrics | ckpt |
| RT-DETRv2-OBB-X | 76.52 | 63.59M | yml | metrics | ckpt |
Release metadata: manifest ยท metrics.
DOTA-v1.0 Single-Scale
The released checkpoints are selected by the highest completed VOC mAP (AP50) among the odd-epoch evaluations available through 2026-08-03. AP75 and COCO mAP below are reported for the same selected epoch.
| Model | Epoch | AP50 | AP75 | COCO mAP | Params | Config | Logs | Checkpoint |
|---|---|---|---|---|---|---|---|---|
| RT-DETRv2-OBB-N | 159 | 69.82 | 35.27 | 38.08 | 3.97M | yml | train ยท eval | ckpt |
| RT-DETRv2-OBB-S | 139 | 78.12 | 51.36 | 48.63 | 8.15M | yml | train ยท eval | ckpt |
| RT-DETRv2-OBB-M | 101 | 80.12 | 54.21 | 50.57 | 19.06M | yml | train ยท eval | ckpt |
| RT-DETRv2-OBB-L | 93 | 80.48 | 54.97 | 51.18 | 27.95M | yml | train ยท eval | ckpt |
| RT-DETRv2-OBB-X | 65 | 80.63 | 56.73 | 51.85 | 63.57M | yml | train ยท eval | ckpt |
Release metadata: manifest ยท metrics.
DOTA-v1.0 Multi-Scale
The released checkpoints are selected by the highest completed VOC mAP (AP50) among the submitted odd-epoch evaluations available through 2026-08-24. AP75 and COCO mAP below are reported for the same selected epoch.
| Model | Epoch | AP50 | AP75 | COCO mAP | Params | Config | Logs | Checkpoint |
|---|---|---|---|---|---|---|---|---|
| RT-DETRv2-OBB-M | 43 | 80.15 | 54.62 | 50.94 | 19.06M | yml | train ยท eval | ckpt |
| RT-DETRv2-OBB-X | 33 | 80.72 | 54.61 | 50.86 | 63.57M | yml | train ยท eval | ckpt |
Release metadata: manifest ยท metrics.
Original RiO-DETR Training and Evaluation Logs
For reference, we provide the console logs from the original RiO-DETR experiments. DOTA-v1.0 SS entries also include CSV evaluation metric tables. Machine-specific storage paths, user names, host names, and network addresses have been redacted from the published logs.
| Dataset | N | S | M | L | X |
|---|---|---|---|---|---|
| DIOR-R | log | log | log | log | log |
| DOTA-v1.0 SS | train ยท eval | train ยท eval | train ยท eval | train ยท eval | train ยท eval |
| FAIR1M-2.0 MS | โ | โ | log | โ | log |
Getting Started
Installation
Create a Python environment, install a CUDA-compatible build of PyTorch and torchvision, and then install the remaining dependencies:
conda create -n rio-detr python=3.10 -y
conda activate rio-detr
# Install PyTorch and torchvision for your CUDA version first.
pip install -r requirements.txt
The HGNetV2 ImageNet-pretrained backbone weights are downloaded automatically
on first use and cached under pretrain/hgnetv2/. If automatic downloading is
unavailable, follow the URL printed by the program and place the downloaded
file in that directory.
Data Preparation
DOTA-v1.0
Split the original DOTA images and polygon annotations into 1024 ร 1024 patches using the standard DOTA patch naming convention. Both single-scale (SS) and multi-scale (MS) configurations are provided. Arrange the processed data as follows:
DOTA-v1.0/
โโโ split_ss_dota/
โ โโโ trainval/
โ โ โโโ images/
โ โ โโโ annfiles/
โ โโโ test/
โ โโโ images/
โ โโโ annfiles/
โโโ split_ms_dota/
โโโ trainval/
โ โโโ images/
โ โโโ annfiles/
โโโ test/
โโโ images/
โโโ annfiles/
Each annotation is a DOTA-format text file with one object per line:
x1 y1 x2 y2 x3 y3 x4 y4 class_name difficulty
Keep an empty matching annotation file for each unlabeled test image. Update
the /path/to/DOTA-v1.0/... placeholders in:
configs/dataset/dota_1_ss_detection_offline.ymlconfigs/dataset/dota_1_ms_detection_offline.yml
The released training configurations use the offline evaluator. It merges patch predictions and writes a DOTA submission archive.
For automated checkpoint submission and evaluation on DOTA, we recommend DOTA-Auto-Eval. This companion repository streamlines submitting checkpoints during training.
DIOR-R
The released DIOR-R configurations expect the original images, oriented XML annotations, and train/validation/test split files:
DIOR/
โโโ JPEGImages-trainval/
โโโ JPEGImages-test/
โโโ Annotations/
โ โโโ Oriented Bounding Boxes/
โโโ ImageSets/
โโโ Main/
โโโ train.txt
โโโ val.txt
โโโ test.txt
Update the img_folder, ann_folder, and ann_file entries in
configs/dataset/dior_detection.yml to match your local dataset location.
The checked-in paths use /path/to/DIOR/... placeholders and must be changed
before training.
FAIR1M-2.0
Convert the FAIR1M oriented annotations to DOTA-style text files, split the
large images into 1024 ร 1024 patches, and use the FAIR1M-2.0 class names
defined in engine/data/dataset/fair1m_dataset.py:
FAIR1M-2.0/
โโโ fair1m_split/
โโโ train/
โ โโโ images/
โ โโโ annfiles/
โโโ validation/
โโโ images/
โโโ annfiles/
Update the /path/to/FAIR1M-2.0/... placeholders in
configs/dataset/fair1m_2_ms_detection.yml. The FAIR1M configurations use
the labeled validation split for local mAP evaluation.
Usage
Available Configurations
| Dataset | Variants | Configuration |
|---|---|---|
| DIOR-R | N, S, M, L, X | configs/rtdetrv2_obb/rtdetrv2_obb_hgnetv2_{n,s,m,l,x}_diorr.yml |
| DOTA-v1.0 SS | N, S, M, L, X | configs/rtdetrv2_obb/rtdetrv2_obb_hgnetv2_{n,s,m,l,x}_dota_1_ss.yml |
| DOTA-v1.0 MS | M, X | configs/rtdetrv2_obb/rtdetrv2_obb_hgnetv2_{m,x}_dota_1_ms.yml |
| FAIR1M-2.0 MS | M, X | configs/rtdetrv2_obb/rtdetrv2_obb_hgnetv2_{m,x}_fair1m_2_ms.yml |
Training
To train it on one GPU:
CUDA_VISIBLE_DEVICES=0 torchrun \
--master_port=7001 \
--nproc_per_node=1 \
train.py \
-c configs/rtdetrv2_obb/rtdetrv2_obb_hgnetv2_{}.yml \
--use-amp \
--seed=0
For multi-GPU training, expose the desired devices and set
--nproc_per_node to the number of GPUs. The total_batch_size in the YAML
configuration is divided across all processes:
CUDA_VISIBLE_DEVICES=0,1,2,3 torchrun \
--master_port=7001 \
--nproc_per_node=4 \
train.py \
-c configs/rtdetrv2_obb/rtdetrv2_obb_hgnetv2_{}.yml \
--use-amp \
--seed=0
To resume an interrupted run:
CUDA_VISIBLE_DEVICES=0,1,2,3 torchrun \
--master_port=7001 \
--nproc_per_node=4 \
train.py \
-c configs/rtdetrv2_obb/rtdetrv2_obb_hgnetv2_{}.yml \
--use-amp \
--seed=0 \
-r outputs/rtdetrv2_obb_hgnetv2_{}/last.pth
Checkpoints and training logs are written to the output_dir declared in the
selected configuration. You can override it with --output-dir.
Evaluation
Evaluate a checkpoint on the validation/test split with:
CUDA_VISIBLE_DEVICES=0 torchrun \
--master_port=7001 \
--nproc_per_node=1 \
train.py \
-c configs/rtdetrv2_obb/rtdetrv2_obb_hgnetv2_{}.yml \
--test-only \
-r /path/to/checkpoint.pth
The equivalent convenience command is:
bash test.sh /path/to/checkpoint.pth \
configs/rtdetrv2_obb/rtdetrv2_obb_hgnetv2_{}.yml
For DOTA-v1.0, the offline evaluator stores merged submission archives under
<output_dir>/dota_results/. DIOR-R and FAIR1M-2.0 report local mAP when
ground-truth annotations are available.
TensorRT FP16 Latency Benchmark
tools/deployment/benchmark_tensorrt_latency.py reproduces the latency
measurement used for RiO-DETR on Tesla T4. It uses GPU-resident input/output
buffers and CUDA events, so the reported latency covers TensorRT execution
only; preprocessing, host/device copies, NMS, and host-side postprocessing are
excluded.
Install the deployment dependencies and benchmark one or more TensorRT 10
engines. Repeat --engine to compare multiple model variants:
pip install -r tools/benchmark/requirements.txt
CUDA_VISIBLE_DEVICES=0 python tools/deployment/benchmark_tensorrt_latency.py \
--engine RT-DETRv2-OBB-S=/path/to/model_s_fp16.engine \
--engine RT-DETRv2-OBB-M=/path/to/model_m_fp16.engine \
--require-fp16-io \
--warmup 100 \
--runs 300 \
--trials 5 \
--json-out outputs/tensorrt_latency.json
Use --cuda-graph to benchmark CUDA Graph replay. The optional
--require-fp16-io check rejects engines whose floating-point bindings are
not FP16.
Citation
If you use RiO-DETR or its methods in your work, please cite the following BibTeX entries:
bibtex
@article{hu2026rio,
title={RiO-DETR: DETR for Real-time Oriented Object Detection},
author={Hu, Zhangchi and Zhao, Yifan and Peng, Yansong and Sun, Wenzhang and Yin, Xiangchen and Chen, Jie and Wu, Peixi and Li, Hebei and Wang, Xinghao and Jiang, Dongsheng and others},
journal={arXiv preprint arXiv:2603.09411},
year={2026}
}
Acknowledgement
Our work is built upon RT-DETRv4. Thanks to the inspirations from RT-DETRv4, D-FINE, DEIMv2, and RHINO.
โจ Feel free to contribute and reach out if you have any questions! โจ