rskill-rtdetr_v2_r50vd-any-coco-fp32
OpenRAL rSkill β RT-DETRv2 (Real-Time DEtection TRansformer v2) with a ResNet-50vd backbone, trained on COCO 2017. Runs as a perception producer on the camera tee and publishes
ObjectsMetadatato/openral/perception/objects. No actuators. This skill useskind: detector(ADR-0037); it emits noActionchunks and drives noros2_controljoints.Weights are a direct mirror of PekingU/rtdetr_v2_r50vd (Apache-2.0). This repo adds the OpenRAL
rskill.yamlmanifest.
Preview
Real output of this skill's ONNX model.onnx (the Hub copy) through build_manifest_detector's ObjectsDetector CPU tier (onnxruntime, fp32) on a RoboCasa GR1 kitchen sim frame (rskills/rldx1-ft-gr1-nf4/media/rc-pick-cup_success_start.jpg, 480Γ480), score β₯ 0.5. The cup and toaster are right; the "knife" and "scissors" boxes are the robot's fingers.
What it does
RT-DETRv2-R50 detects 80 COCO-category objects in each camera frame and
publishes per-frame ObjectsMetadata events containing bounding boxes, class
labels, and confidence scores. The runtime ObjectsDetector (in
openral_runner) reads the detector manifest block at configure time to
initialise the inference session and bind the class-id β label mapping.
The OpenRAL detector perception path (ros_image_detector_node β
DetectorRunner β ObjectsDetector) is ONNX-based, so this rSkill ships
an ONNX export (model.onnx + external-data model.onnx.data) produced by
tools/export_rtdetr_onnx.py. The manifest declares runtime: onnx with
fp32 weights, so onnxruntime runs it on any host (CPU or CUDA EP). The
detector tier is chosen by the host, not the manifest: with OpenRAL Pro
installed, the NVMM aggregator tier builds and caches a TensorRT engine from
the same model.onnx on first load. The weights/ PyTorch checkpoint remains for standalone
transformers inference (see Standalone inference below).
RT-DETRv2 improves over RT-DETR v1 with selective multi-scale feature extraction, a discrete sampling operator, and improved training strategies.
Supported robots / embodiments
This detector is embodiment-agnostic: it requires only an RGB camera of at
least 640Γ480 and emits ObjectsMetadata. The manifest declares the
embodiment_tags: ["any"] wildcard; the sensors_required entry sets modality: rgb
with no vla_feature_key, so the loader accepts any RGB camera stream
regardless of its key name.
Sensors / observation contract
| Direction | Key | Modality | Shape / format | Notes |
|---|---|---|---|---|
| in | any RGB camera | RGB sensor_msgs/Image |
min 640 Γ 480 | vla_feature_key unset β any camera name accepted |
| (preprocessing) | β | β | resized to 640 Γ 640, /255 β float32 [0,1], NCHW |
pixel_values (batch, 3, 640, 640) |
| out | COCO-80 detections | ObjectsMetadata |
per object: label, confidence, bbox |
published to /openral/perception/objects |
The detector emits no Action chunks and has no proprioception
(observation.state) contract.
Latency
| Host | Runtime | Median latency (ms) |
|---|---|---|
| Intel Core Ultra 7 255HX (20 threads, shared machine under load) | onnxruntime CPU, fp32 | 372 (R18 on the same run: 146) |
Measured 2026-11-19, 640Γ640 input, 30 runs after 5 warm-up. No GPU
measurement yet. The manifest's per_chunk_ms: 50.0 is a GPU budget (CUDA
or the OpenRAL Pro TensorRT tier); the CPU tier does not meet it. The
detector is a background producer, so a slow tier lowers its publish rate
rather than blocking the action loop.
VRAM
| dtype | VRAM |
|---|---|
| fp32 | ~700 MB |
The shipped weights are fp32 (dtype: fp32), and the OpenRAL Pro TensorRT
tier builds an fp32 engine from them (it passes no reduced precision).
Accuracy (COCO val2017)
Weights
Two artefacts ship in this rSkill:
ONNX (used by the OpenRAL detector path) β
model.onnx+model.onnx.data. Not committed to git (binary artefact; see.gitignore). Reproduce with the same ephemeral overlay used forrtdetr-coco-r18:uv run --isolated --no-project \ --with "transformers>=4.45,<5" --with "torch>=2.2" --with torchvision \ --with onnx --with onnxscript \ python tools/export_rtdetr_onnx.py \ --out rskills/rtdetr-v2-r50vd/model.onnx \ --model-id PekingU/rtdetr_v2_r50vdUse
--isolated --no-projectβ a plainuv run --withoverlays the project venv whosetorchvisionis built against a differenttorch, breaking theRTDetrForObjectDetectionimport. Neveruv sync --group onnx-export(it prunespydantic/structlogfrom the dev venv).File Description sha256 (first 16 hex) Size model.onnxONNX graph (references model.onnx.data)e2c96541b7f9e110...3.9 MB model.onnx.dataExternal weight data (loaded by ORT/TRT) eb70cc9cb101c445...165 MB The new torch exporter is not bit-reproducible across toolchain versions; treat the digests as a same-host integrity check. The published copies on the HF Hub repo are canonical.
Field Value model_idPekingU/rtdetr_v2_r50vdinputpixel_valuesβ shape(batch, 3, 640, 640), float32, range[0,1]outputslogits (1, 300, 80)pre-sigmoid;pred_boxes (1, 300, 4)cxcywhPyTorch (
weights/model.safetensors) β mirrored from PekingU/rtdetr_v2_r50vd, same Apache-2.0 license, with the upstreamconfig.jsonandpreprocessor_config.json. Used only by the standalonetransformersexample below; the OpenRAL detector path does not load it.
Upstream model / training
This rSkill packages RT-DETRv2 (Real-Time DEtection TRansformer v2) with a
ResNet-50vd backbone (r50vd). It copies no new weights β both the ONNX
export and weights/model.safetensors derive from the upstream Transformers
checkpoint (see the Weights section above).
| Field | Value |
|---|---|
| Architecture | RT-DETRv2, r50vd backbone |
| Source repo | PekingU/rtdetr_v2_r50vd |
| Training data | COCO 2017 (80 categories) |
| Detector runtime | onnxruntime (fp32), or the OpenRAL Pro TensorRT tier, from model.onnx |
| Standalone runtime | PyTorch / transformers (RTDetrV2ForObjectDetection, weights/) |
| Paper | arxiv:2407.17140 β RT-DETRv2: Improved Baseline with Bag-of-Freebies for Real-Time Detection Transformer |
| License | apache-2.0 |
Usage in OpenRAL
Activate the skill
openral rskill install OpenRAL/rskill-rtdetr_v2_r50vd-any-coco-fp32
Use in a deploy graph
Pass the manifest to the deploy graph as the continuous object detector:
openral deploy sim --config scenes/deploy/<scene>.yaml \
--object-detector-manifest rskills/rtdetr-v2-r50vd/rskill.yaml
Standalone inference (Python)
import torch
from PIL import Image
from transformers import RTDetrV2ForObjectDetection, RTDetrImageProcessor
image_processor = RTDetrImageProcessor.from_pretrained(
"OpenRAL/rskill-rtdetr_v2_r50vd-any-coco-fp32", subfolder="weights"
)
model = RTDetrV2ForObjectDetection.from_pretrained(
"OpenRAL/rskill-rtdetr_v2_r50vd-any-coco-fp32", subfolder="weights"
).cuda()
image = Image.open("kitchen.jpg")
inputs = image_processor(images=image, return_tensors="pt")
inputs = {k: v.cuda() for k, v in inputs.items()}
with torch.no_grad():
outputs = model(**inputs)
results = image_processor.post_process_object_detection(
outputs,
target_sizes=torch.tensor([(image.height, image.width)], device="cuda"),
threshold=0.5,
)
for result in results:
for score, label_id, box in zip(
result["scores"], result["labels"], result["boxes"]
):
label = model.config.id2label[label_id.item()]
print(f"{label}: {score:.2f} {[round(i, 2) for i in box.tolist()]}")
Supported object classes (80 COCO)
Household objects: bottle, wine glass, cup, fork, knife, spoon, bowl, banana, apple, sandwich, orange, broccoli, carrot, hot dog, pizza, donut, cake, chair, couch, potted plant, bed, dining table, toilet, tv, laptop, mouse, remote, keyboard, cell phone, microwave, oven, toaster, sink, refrigerator, book, clock, vase, scissors, teddy bear, hair drier, toothbrush
People & animals: person, cat, dog, bird, horse, sheep, cow, elephant, bear, zebra, giraffe
Outdoor / transport: car, bicycle, motorcycle, bus, train, truck, airplane, boat, traffic light, fire hydrant, stop sign, parking meter, bench, backpack, umbrella, handbag, tie, suitcase, frisbee, skis, snowboard, sports ball, kite, baseball bat, baseball glove, skateboard, surfboard, tennis racket
Manifest summary
| Field | Value |
|---|---|
name |
OpenRAL/rskill-rtdetr_v2_r50vd-any-coco-fp32 |
version |
0.1.0 |
license |
apache-2.0 |
role |
s1 |
kind |
detector (ADR-0037 perception producer) |
embodiment_tags |
["any"] (any robot with an RGB camera) |
runtime / quantization.dtype |
onnx / fp32 |
weights_uri |
local://rskills/rtdetr-v2-r50vd |
latency_budget.per_chunk_ms |
50.0 |
detector.labels |
80 COCO categories |
detector.input_size |
[640, 640] |
detector.score_threshold |
0.5 |
Full schema: openral_core.schemas.RSkillManifest.
Citation
@article{lv2024rtdetrv2,
title={RT-DETRv2: Improved Baseline with Bag-of-Freebies for Real-Time Detection Transformer},
author={Lv, Wenyu and Zhao, Yian and Chang, Qinyao and Huang, Kui and Wang, Guanzhong and Liu, Yi},
journal={arXiv preprint arXiv:2407.17140},
year={2024}
}
License
- Weights (
weights/): Apache-2.0, mirrored from PekingU/rtdetr_v2_r50vd - rSkill manifest and packaging (
rskill.yaml,README.md): Apache-2.0
Model tree for OpenRAL/rskill-rtdetr_v2_r50vd-any-coco
Base model
PekingU/rtdetr_v2_r50vd