-
Notifications
You must be signed in to change notification settings - Fork 517
Description
Search before asking
- I have searched the RF-DETR issues and found no similar bug report.
Bug
I am working on my Master's thesis related to object detection. One goal is to compare how different architectures perform when trained on limited hardware (8GB VRAM). The results on roboflow.com using DETR-NANO look impressive:
However when running training script:
I notice that when trained on roboflow.com the model immidietly starts from ~0.5 MAP and achives far better result:
When trained locally:
Environment
Python
Version: 3.10.0 (tags/v3.10.0:b494f59, Oct 4 2021, 19:00:18) [MSC v.1929 64 bit (AMD64)]
Executable: C:\Program Files\Python310\python.exe
Implementation: CPython
Prefix: C:\Program Files\Python310
System: Windows
Release: 10
Version: 10.0.26200
Machine: AMD64
Processor: Intel64 Family 6 Model 141 Stepping 1, GenuineIntel
Platform string: Windows-10-10.0.26200-SP0
RF-DETR
rfdetr module: <module 'rfdetr' from 'C:\Users\micha\AppData\Roaming\Python\Python310\site-packages\rfdetr\init.py'>
rfdetr (importlib.metadata): 1.3.0
rfdetr module file: C:\Users\micha\AppData\Roaming\Python\Python310\site-packages\rfdetr_init_.py
PyTorch / CUDA
torch.version: 2.9.0+cu130
torch.version.cuda: 13.0
torch.backends.cudnn.version(): 91200
CUDA available (torch.cuda.is_available()): True
Device count: 1
- Device 0: NVIDIA GeForce RTX 3070 Laptop GPU, capability (8, 6)
Key Python packages
rfdetr==1.3.0
torch==2.9.0+cu130
torchvision==0.24.0+cu130
torchaudio: not installed or not found
transformers==4.57.3
timm==1.0.22
pip freeze
absl-py==2.3.1
accelerate==1.12.0
annotated-types==0.7.0
anywidget==0.9.21
asttokens==3.0.1
bbox_visualizer==0.2.2
certifi==2025.10.5
charset-normalizer==3.4.4
colorama==0.4.6
comm==0.2.3
contourpy==1.3.2
cycler==0.12.1
Cython==3.2.2
decorator==5.2.1
defusedxml==0.7.1
einops==0.8.1
exceptiongroup==1.3.1
executing==2.2.1
fairscale==0.4.13
filelock==3.19.1
filetype==1.2.0
filterpy==1.4.5
fonttools==4.60.1
fsspec==2025.9.0
ftfy==6.3.1
gitdb==4.0.12
GitPython==3.1.45
grpcio==1.76.0
huggingface-hub==0.36.0
idna==3.7
ipython==8.37.0
ipywidgets==8.1.8
jedi==0.19.2
Jinja2==3.1.6
joblib==1.5.2
jupyter_bbox_widget==0.6.0
jupyterlab_widgets==3.0.16
kiwisolver==1.4.9
lap==0.5.12
Markdown==3.10
markdown-it-py==4.0.0
MarkupSafe==2.1.5
matplotlib==3.10.7
matplotlib-inline==0.2.1
mdurl==0.1.2
mpmath==1.3.0
networkx==3.3
ninja==1.13.0
norfair==2.3.0
numpy==2.2.6
open_clip_torch==3.2.0
opencv-python==4.12.0.88
opencv-python-headless==4.10.0.84
packaging==25.0
pandas==2.3.3
parso==0.8.5
peft==0.18.0
pi_heif==1.1.1
pillow==11.3.0
pillow-avif-plugin==1.5.2
polars==1.35.1
polars-runtime-32==1.35.1
polygraphy==0.49.26
prompt_toolkit==3.0.52
protobuf==6.33.1
psutil==7.1.3
psygnal==0.15.0
pure_eval==0.2.3
pycocotools==2.0.10
pydantic==2.12.5
pydantic_core==2.41.5
Pygments==2.19.2
pylabel==0.1.55
pyparsing==3.2.5
python-dateutil==2.9.0.post0
python-dotenv==1.2.1
pytz==2025.2
PyYAML==6.0.3
regex==2025.11.3
requests==2.32.5
requests-toolbelt==1.0.0
rf100vl==1.1.0
rfdetr==1.3.0
rich==14.2.0
roboflow==1.2.11
safetensors==0.7.0
scikit-learn==1.7.2
scipy==1.15.3
seaborn==0.13.2
six==1.17.0
smmap==5.0.2
stack-data==0.6.3
supervision==0.27.0
sympy==1.14.0
tensorboard==2.20.0
tensorboard-data-server==0.7.2
threadpoolctl==3.6.0
timm==1.0.22
tokenizers==0.22.1
torch==2.9.0+cu130
torchvision==0.24.0+cu130
tqdm==4.67.1
traitlets==5.14.3
transformers==4.57.3
typing-inspection==0.4.2
typing_extensions==4.15.0
tzdata==2025.2
ultralytics==8.3.223
ultralytics-thop==2.0.18
urllib3==2.5.0
wcwidth==0.2.14
Werkzeug==3.1.4
widgetsnbextension==4.0.15
Minimal Reproducible Example
`
def main():
model = RFDETRNano()
model.maybe_download_pretrain_weights()
model.train(
dataset_dir=DATASET_DIR,
output_dir=OUTPUT_DIR,
epochs=300,
batch_size=16,
grad_accum_steps=1,
resolution=384,
device="cuda",
dataloader_num_workers=4,
# --- EARLY STOPPING ---
early_stopping=True,
early_stopping_patience=20,
early_stopping_min_delta=0.0,
)
if __name__ == "__main__":
import torch.multiprocessing as mp
mp.freeze_support()
main()
`
Additional
No response
Are you willing to submit a PR?
- Yes, I'd like to help by submitting a PR!