Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Obss Sahi Download Rtdetr Model

From Leeroopedia


Knowledge Sources
Domains Object_Detection, Model_Setup
Last Updated 2026-02-08 12:00 GMT

Overview

Utility functions for downloading RT-DETR model weights (Large and X variants) from Ultralytics releases.

Description

The sahi.utils.rtdetr module provides convenience functions for downloading RT-DETR (Real-Time Detection Transformer) model weights. RTDETRTestConstants defines the download URLs and default local paths for RT-DETR-L and RT-DETR-X model variants. Each download function checks if the file already exists before downloading, and creates parent directories as needed.

Usage

Use these functions to obtain RT-DETR model weights before initializing the RT-DETR detection model in SAHI, particularly in test environments or first-time setup.

Code Reference

Source Location

Signature

class RTDETRTestConstants:
    RTDETRL_MODEL_URL: str
    RTDETRL_MODEL_PATH: str
    RTDETRX_MODEL_URL: str
    RTDETRX_MODEL_PATH: str

def download_rtdetrl_model(destination_path: str | None = None) -> None: ...
def download_rtdetrx_model(destination_path: str | None = None) -> None: ...

Import

from sahi.utils.rtdetr import download_rtdetrl_model, download_rtdetrx_model, RTDETRTestConstants

I/O Contract

Inputs

Name Type Required Description
destination_path str or None No Custom download path; defaults to tests/data/models/rtdetr/

Outputs

Name Type Description
Model file .pt file RT-DETR model weights at destination path

Usage Examples

Download RT-DETR Models

from sahi.utils.rtdetr import download_rtdetrl_model, download_rtdetrx_model

# Download RT-DETR-L to default test path
download_rtdetrl_model()

# Download RT-DETR-X to custom path
download_rtdetrx_model(destination_path="/models/rtdetr-x.pt")

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment