Workflow:Roboflow Rf detr Roboflow Deployment
| Knowledge Sources | |
|---|---|
| Domains | Computer_Vision, Deployment, MLOps |
| Last Updated | 2026-02-08 15:00 GMT |
Overview
End-to-end process for deploying a fine-tuned RF-DETR model to the Roboflow platform for serverless cloud inference and integration with Roboflow Workflows.
Description
This workflow covers the deployment of a trained RF-DETR model (detection or segmentation) to Roboflow's hosted infrastructure. The process packages the model weights and architecture metadata, uploads them to a Roboflow project version via the Roboflow Python SDK, and makes the model available through a serverless inference API. Once deployed, the model can be accessed via the Roboflow Inference library for cloud-based or on-device predictions without managing infrastructure.
Usage
Execute this workflow after completing model training (see Custom Dataset Finetuning workflow) and when you need to deploy the model for production use. This is appropriate when you want serverless cloud inference without managing GPU infrastructure, need to integrate the model into Roboflow Workflows for multi-step computer vision pipelines, or want to download weights for on-device deployment via Roboflow Inference.
Execution Steps
Step 1: Prepare Roboflow Account
Set up authentication with the Roboflow platform. Obtain your API key, workspace ID, and the project ID for the target project version. The API key can be provided directly as a parameter or set as the ROBOFLOW_API_KEY environment variable.
Key considerations:
- Create a Roboflow account at roboflow.com if you do not have one
- Find your API key at the Roboflow dashboard authentication settings
- Identify your workspace and project IDs from the Roboflow dashboard
Step 2: Load Trained Model
Instantiate the appropriate RF-DETR model class with the fine-tuned checkpoint weights. The model class determines the size identifier used during deployment (e.g., rfdetr-base, rfdetr-nano, rfdetr-seg-medium).
Key considerations:
- The model size identifier is set automatically based on the model class (e.g., RFDETRNano sets size to rfdetr-nano)
- For custom architectures, you must explicitly provide the size parameter in the deploy call
- Both detection and segmentation models are supported
Step 3: Deploy to Roboflow
Call the deploy_to_roboflow() method with your workspace, project_id, version number, and API key. Internally, this creates a temporary directory, saves the model state dict and architecture arguments as a weights.pt file, authenticates with Roboflow using the SDK, and uploads the weights to the specified project version. The temporary files are cleaned up after upload completes.
Key considerations:
- The deployment packages both model weights and architecture configuration
- The version parameter must correspond to an existing version in your Roboflow project
- Upload requires network connectivity and valid Roboflow API credentials
Step 4: Run Inference via Roboflow
After deployment, run inference using the Roboflow Inference library. Instantiate a model via get_model() with your Roboflow model ID, and call infer() on images. The predictions can be converted to supervision Detections objects for annotation and visualization.
Key considerations:
- First inference call caches model weights locally
- The inference library handles preprocessing and post-processing automatically
- Deployed models are accessible both via cloud API and local Inference server