rtdetr
Real-time object detection you can ship: PyTorch training, OpenVINO inference, 100% Apache-2.0 — code and pretrained weights alike.
Install
pip install rtdetr # inference
pip install "rtdetr[train]" # + training
Detect
from rtdetr import RTDETR
model = RTDETR("rtdetr-r18") # COCO weights, downloaded on first use
r = model("bus.jpg", conf=0.5)[0]
r.boxes.xyxy, r.boxes.conf, r.boxes.cls # plain numpy
r.names[int(r.boxes.cls[0])] # "person"
r.plot(); r.save(); r.show()
Point it at an image, a folder, a glob, a video, an RTSP stream, a webcam index, or a numpy array. Long sources stream:
for r in model.predict(0, stream=True, show=True): # webcam, q or Esc quits
print(r.boxes.xyxyn)
model.track("clip.mp4") # adds r.boxes.id
Label
rtdetr label source=images/ names=can,bottle # browser tool, auto-label + fix
Train
model = RTDETR("rtdetr-r18")
model.train(data="data.yaml", epochs=100, imgsz=640, batch=8, device=0)
model.val(data="data.yaml").box.map50
model.export(format="openvino", half=True) # IR + labels.txt
# data.yaml
path: /data/cans
train: images/train
val: images/val
names: {0: can, 1: bottle}
Command line
rtdetr predict model=rtdetr-r18 source=bus.jpg conf=0.5
rtdetr train model=rtdetr-r18 data=data.yaml epochs=100
rtdetr val model=best.pt data=data.yaml
rtdetr export model=best.pt format=openvino half=true
rtdetr label source=images/ names=can,bottle
Models
| name | params | COCO AP | notes |
|---|---|---|---|
rtdetr-r18 |
20M | 46.4 | fastest |
rtdetr-r34 |
31M | 48.9 | |
rtdetr-r50 |
43M | 53.1 | most accurate |
Docs
- Using the model — sources, results, tracking, saving
- Labelling — the browser tool, auto-labelling
- Training — datasets, validation, export, CLI
- Weights — the mirror, building it, offline use
- Performance — measured speeds and how to improve them
- Design — architecture and provenance
- Development — tests, releases
한국어
from rtdetr import RTDETR
model = RTDETR("rtdetr-r18") # COCO 사전학습 가중치 자동 다운로드
model("bus.jpg", conf=0.5)[0].save() # 결과 이미지 저장
model.train(data="data.yaml", epochs=100) # 내 데이터로 학습
model.export(format="openvino", half=True) # 배포용 IR + labels.txt
가중치 캐시는 ~/.rtdetr/, 사내 미러는 RTDETR_ASSETS_URL 환경변수로 지정합니다.
License
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rtdetr-0.4.0.tar.gz.
File metadata
- Download URL: rtdetr-0.4.0.tar.gz
- Upload date:
- Size: 66.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
90b2365c4ea45232600420d4c0ff0460186e65d5c2ec850b0b0d98fc8075828c
|
|
| MD5 |
cac5257f19c65957a70b3cd007b4db4b
|
|
| BLAKE2b-256 |
158cf6f6c8b281d97d6df03be1e6124e356fdec106d9adb8790e7763b02e560e
|
Provenance
The following attestation bundles were made for rtdetr-0.4.0.tar.gz:
Publisher:
publish.yml on leeyunjai82/rtdetr
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rtdetr-0.4.0.tar.gz -
Subject digest:
90b2365c4ea45232600420d4c0ff0460186e65d5c2ec850b0b0d98fc8075828c - Sigstore transparency entry: 2754264882
- Sigstore integration time:
-
Permalink:
leeyunjai82/rtdetr@3787637d3959033d58eb5c77204a4c0dfc954444 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/leeyunjai82
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3787637d3959033d58eb5c77204a4c0dfc954444 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file rtdetr-0.4.0-py3-none-any.whl.
File metadata
- Download URL: rtdetr-0.4.0-py3-none-any.whl
- Upload date:
- Size: 60.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b12c7d6de9bf7457ba51570e7181fec2809092499422ececbabdbc1cc3dc696
|
|
| MD5 |
f2a7a1834cb6043fbfefd73271c06710
|
|
| BLAKE2b-256 |
0a163938abd1beeab2b947ece9bb5505e6e9f17b3ef12f2b2212967f884e77f9
|
Provenance
The following attestation bundles were made for rtdetr-0.4.0-py3-none-any.whl:
Publisher:
publish.yml on leeyunjai82/rtdetr
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rtdetr-0.4.0-py3-none-any.whl -
Subject digest:
3b12c7d6de9bf7457ba51570e7181fec2809092499422ececbabdbc1cc3dc696 - Sigstore transparency entry: 2754264986
- Sigstore integration time:
-
Permalink:
leeyunjai82/rtdetr@3787637d3959033d58eb5c77204a4c0dfc954444 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/leeyunjai82
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3787637d3959033d58eb5c77204a4c0dfc954444 -
Trigger Event:
workflow_dispatch
-
Statement type: