Roboflow Docs
DashboardResourcesProducts
  • Product Documentation
  • Developer Reference
  • Changelog
  • Roboflow Documentation
  • Quickstart
  • Workspaces
    • Workspaces, Projects, and Models
    • Create a Workspace
    • Rename a Workspace
    • Delete a Workspace
  • Team Members
    • Invite a Team Member
    • Role-Based Access Control (RBAC)
    • Change a Team Member Role
    • Remove a Team Member
  • Single Sign On (SSO)
  • Workflows
    • What is Workflows?
    • Create a Workflow
    • Build a Workflow
    • Test a Workflow
    • Deploy a Workflow
    • Workflow Examples
      • Multimodal Model Workflow
    • Share a Workflow
    • Workflows AI Assistant
  • Enterprise Integrations
  • Workflow Blocks
    • Run a Model
      • Object Detection Model
      • Single-Label Classification Model
    • Visualize Predictions
      • Bounding Box Visualization
      • Label Visualization
      • Circle Visualization
      • Background Color Visualization
      • Classification Label Visualization
      • Crop Visualization
  • Dataset Management
    • Create a Project
    • Upload Images, Videos, and Annotations
      • Import Data from Cloud Providers
        • AWS S3 Bucket
        • Azure Blob Storage
        • Google Cloud Storage
      • Import from Roboflow Universe
    • Manage Datasets
      • Dataset Batches
      • Search a Dataset
      • Set Dataset Classes
      • Add Tags to Images
      • Create an Annotation Attribute
      • Download an Image
      • Delete an Image
    • Dataset Versions
      • Create a Dataset Version
      • Preprocess Images
      • Image Augmentation
        • Augmentation Types
          • Flip Augmentation
          • 90º Rotate Augmentation
          • Crop Augmentation
          • Rotation Augmentation
          • Shear Augmentation
          • Grayscale Augmentation
          • Hue Augmentation
          • Saturation Augmentation
          • Brightness Augmentation
          • Exposure Augmentation
          • Blur Augmentation
          • Noise Augmentation
          • Cutout Augmentation
          • Mosaic Augmentation
        • Add Augmentations to Images
      • Delete a Version
    • Dataset Analytics
    • Merge Projects
    • Rename a Project
    • Delete a Project
    • Project Folders
    • Make a Project Public
    • Download a Dataset
  • Annotate
    • Introduction to Roboflow Annotate
    • Annotate an Image
      • Keyboard Shortcuts
      • Comment on an Image
      • Annotation History
      • Similarity Search
    • AI Labeling
      • Label Assist
      • Smart Polygon
      • Box Prompting
      • Auto Label
    • Set Keypoint Skeletons
    • Annotate Keypoints
    • Annotate Multimodal Data
    • Collaborate on Labeling
    • Annotation Insights
  • Roboflow Labeling Services
  • Train
    • Train a Model
      • Train from a Universe Checkpoint
      • Train from Azure Vision
      • Train from Google Cloud
    • Roboflow Instant
    • Cancel a Training Job
    • Stop Training Early
    • View Training Results
    • View Trained Models
    • Evaluate Trained Models
  • Deploy
    • Deploy a Model or Workflow
    • Supported Models
    • Managed Deployments
    • Serverless Hosted API V2
      • Use in a Workflow
      • Use with the REST API
      • Run an Instant Model
    • Serverless Hosted API
      • Object Detection
      • Classification
      • Instance Segmentation
        • Semantic Segmentation
      • Keypoint Detection
      • Foundation Models
        • CLIP
        • OCR
        • YOLO-World
      • Video Inference
        • Use a Fine-Tuned Model
        • Use CLIP
        • Use Gaze Detection
        • API Reference
        • Video Inference JSON Output Format
      • Pre-Trained Model APIs
        • Blur People API
        • OCR API
        • Logistics API
        • Image Tagging API
        • People Detection API
        • Fish Detection API
        • Bird Detection API
        • PPE Detection API
        • Barcode Detection API
        • License Plate Detection API
        • Ceramic Defect Detection API
        • Metal Defect Detection API
    • Dedicated Deployments
      • Create a Dedicated Deployment
      • Make Requests to a Dedicated Deployment
      • Manage Dedicated Deployments with an API
    • Batch Processing
    • SDKs
      • Python inference-sdk
      • Web Browser
        • inferencejs Reference
        • inferencejs Requirements
      • Lens Studio
        • Changelog - Lens Studio
      • Luxonis OAK
    • Upload Custom Model Weights
    • Download Model Weights
    • Enterprise Deployment
      • License Server
      • Offline Mode
      • Kubernetes
      • Docker Compose
    • Model Monitoring
      • Alerting
  • Universe
    • What is Roboflow Universe?
    • Find a Dataset on Universe
    • Explore Images in a Universe Dataset
    • Fork a Universe Dataset
    • Find a Model on Universe
    • Download a Universe Dataset
  • Set a Project Description
  • View Project Analytics
  • Support
    • Share a Workspace with Support
    • Delete Your Roboflow Account
    • Apply for Academic Credits
  • Billing
    • Premium Trial
    • Credits
      • View Credit Usage
      • Enable or Disable Flex Billing
      • Purchase Prepaid Credits
    • Plans
      • Purchase a Plan
      • Cancel a Plan
      • Update Billing Details
      • Update Payment Method
      • View Invoices
Powered by GitBook
On this page
  • Model Support
  • Versioned vs. Versionless Models Upload
  • Upload Custom Weights
  • Next Steps

Was this helpful?

  1. Deploy

Upload Custom Model Weights

Roboflow offers the ability to upload model weights for your custom-trained models to your Roboflow projects for model deployment.

PreviousLuxonis OAKNextDownload Model Weights

Last updated 1 day ago

Was this helpful?

Once you've completed training your custom model, upload your model weights back to your Roboflow project to take advantage of .

Model Support

Model weights uploads are currently available for:

  • YOLOv5 (n, s, m, l, x) Object Detection and Instance Segmentation

  • YOLOv7 Instance Segmentation (yolov7-seg)

  • YOLOv8 (n, s, m, l, x) Object Detection, Instance Segmentation, Classification, and Keypoint Detection

  • YOLOv9 (n, s, m, l, x) Object Detection

  • YOLOv10 (n, s, m, l, x) Object Detection

  • YOLOv11 (n, s, m, l, x) Object Detection, Instance Segmentation

  • YOLOv12 (n, s, m, l, x) Object Detection

  • YOLO-NAS (s, m, l) Object Detection

  • RF-DETR (rfdetr-base, rfdetr-large) Object Detection

  • Florence-2 (base, large) Multimodal

  • PaliGemma (3b-pt-224, 3b-pt-448, 3b-pt-896) Multimodal

  • PaliGemma 2 (3b-pt-224, 3b-pt-448, 3b-pt-896) Multimodal

  • YOLOv8 models must be trained on ultralytics==8.0.196

  • YOLOv9 models must be trained and uploaded using ultralytics from

  • YOLOv10 models must be trained and uploaded using ultralytics from

  • YOLOv11 models must be trained on ultralytics<=8.3.40

  • YOLOv12 models must be trained and uploaded using ultralytics from

Larger model sizes provide better training results. However, the larger the model size, the slower the training time, and inference (model prediction) speed. Consider whether you're looking for real-time inference on fast-moving objects or video feeds (better to use a smaller model), or you are processing data after it is collected, and more concerned with higher prediction accuracy (choose a larger model).

Versioned vs. Versionless Models Upload

Roboflow provides two distinct approaches for deploying models to your projects, each serving different use cases and organizational needs. The choice between versioned and versionless deployments depends on whether you need to track model evolution alongside dataset versions or want to share models across multiple projects in your workspace.

  • Versionless Deployments

    • Tied to the workspace level

    • Can be deployed to multiple projects simultaneously

    • Ideal for sharing models across different projects within the same workspace

  • Versioned Deployments

    • Tied to specific project versions

    • One model per dataset version

    • Ideal for tracking model evolution alongside dataset versions

    • Ideal for using model on Label Assist

    • Ideal for using model as checkpoint for training other models

Upload Custom Weights

Before starting, make sure you have roboflow>=1.1.53 to use the versionless deploy.

To upload versionless custom weights, use the workspace.deploy_model method in the Python SDK.

Usage

workspace.deploy_model(
    model_type="yolov8",  # Type of the model
    model_path="path/to/model",  # Path to model directory
    project_ids=["project1", "project2"],  # List of project IDs
    model_name="my-model",  # Name for the model (must have at least 1 letter, and accept numbers and dashes)
    filename="weights/best.pt"  # Path to weights file (default)
)

Parameters

  • model_type (str): The type of model being deployed (e.g., "yolov8", "yolov11")

  • model_path (str): File path to the directory containing the model weights

  • project_ids (list[str]): List of project IDs to deploy the model to

  • model_name (str): Name to identify the model - (must have at least 1 letter, and accept numbers and dashes)

  • filename (str, optional): Name of the weights file (defaults to "weights/best.pt")

Example

from roboflow import Roboflow

rf = Roboflow(api_key="YOUR_API_KEY")
workspace = rf.workspace("YOUR_WORKSPACE")

workspace.deploy_model(
  model_type="yolov8",
  model_path="./runs/train/weights",
  project_ids=["project-1", "project-2", "project-3"],
  model_name="my-custom-model"
)

Before starting, make sure you have roboflow>=1.0.1 to use the.deploy() command.

To upload custom weights, use the version.deploy() method in the Python SDK.

Usage

version.deploy(
    model_type="yolov8",  # Type of the model
    model_path="path/to/model",  # Path to model directory
    filename="weights/best.pt"  # Path to weights file (default)
)

Parameters

  • model_type (str): The type of model to be deployed (e.g., "yolov8", "yolov11")

  • model_path (str): File path to the directory containing the model weights

  • filename (str, optional): Name of the weights file (defaults to "weights/best.pt")

Example

from roboflow import Roboflow

rf = Roboflow(api_key="YOUR_API_KEY")
project = rf.workspace().project("PROJECT_ID")

#can specify weights_filename, default is "weights/best.pt"
version = project.version(VERSION_ID)

#example1 - directory path is "training1/model1.pt" for yolov8 model
version.deploy("yolov8", "training1", "model1.pt")

#example2 - directory path is "training1/weights/best.pt" for yolov8 model
version.deploy("yolov8", "training1")

Important Notes

  1. A version can only have one trained model at a time

  2. Attempting to upload to a version that already has a model will result in a 429 error

Installation

To install the Roboflow Python package, you can use pip:

pip install roboflow

Authentication

Before using any CLI commands, you need to authenticate with Roboflow:

  1. Run the authentication command: roboflow login

  2. Get your authentication token from the website

  3. Paste the token in your terminal

The credentials will be automatically saved to ~/.config/roboflow/config.json

Uploading Model Weights

The Roboflow CLI provides a command to upload trained model weights to your Roboflow projects. This is useful when you want to deploy custom-trained models to Roboflow.

Basic Usage

roboflow upload_model -w <workspace> -p <project> -t <model_type> -m <model_path> [-v <version>] [-f <filename>] [-n <model_name>]

Parameters

  • -w, --workspace: Your workspace ID or URL (optional - will use default workspace if not specified)

  • -p, --project: Project ID to upload the model into (for versionless upload can be specified multiple times for multiple projects)

  • -t, --model_type: Type of the model (e.g., yolov8, paligemma2)

  • -m, --model_path: Path to the directory containing the trained model file

  • -v, --version_number: Version number to upload the model to (optional)

  • -f, --filename: Name of the model file (default: "weights/best.pt")

  • -n, --model_name: Name of the model (required for versionless model deploy)

Examples

# 1. Upload a model to a specific version: 
roboflow upload_model -w my-workspace -p my-project -v 1 -t yolov8 -m ./weights

# 2. Upload a versionless model to multiple projects:
roboflow upload_model -w my-workspace -p project1 -p project2 -t yolov11 -n my-model-v1 -m ./weights

Next Steps

  1. Check out your model in the "Models" tab of Roboflow

One versioned model must be linked to just one corresponding dataset version. If you do not have a version generated in your dataset, you can create on or via the .

See docs on or reference the example below.

Visit the URL shown in the terminal:

Run your model locally with .

Roboflow Inference
https://github.com/WongKinYiu/yolov9
https://github.com/THU-MIG/yolov10
https://github.com/sunsmarterjie/yolov12
https://app.roboflow.com/auth-cli
Roboflow Inference Server
Deploy your model
in-app
API
how to load a version through the API