Roboflow + Google Colab

Train RF-DETR, YOLO26, YOLO11 and other models on your Roboflow datasets in our Colab notebooks, then upload the weights to Roboflow to deploy them.

Google Colab is a hosted Jupyter notebook service with GPU runtimes. Our open-source notebooks repository has Colab notebooks for fine-tuning current models, including RF-DETR for detection, segmentation and keypoints, YOLO26, YOLO11, YOLOv12, PaliGemma 2, Florence-2 and SAM 2.1.

Each notebook reads your Roboflow API key from Colab Secrets, downloads a dataset version with the roboflow package in the format the model needs and trains on the notebook's GPU. The last cells upload the trained weights to your Roboflow project, with model.deploy_to_roboflow() for RF-DETR or version.deploy() for YOLO models, so the model gets a hosted endpoint.

How to connect Google Colab to Roboflow

6 steps
  1. Open a notebook in Colab

    In the roboflow/notebooks README, pick a model and click its Open in Colab badge.

  2. Add your API key to Colab Secrets

    Copy your private key from Roboflow's API settings page, open Secrets (the key icon) in Colab's left pane and save it as ROBOFLOW_API_KEY.

  3. Switch to a GPU runtime

    If nvidia-smi shows no GPU, go to Edit, Notebook settings, Hardware accelerator and choose T4 GPU.

  4. Download your dataset version

    Replace the sample dataset with your workspace, project and version. The roboflow package downloads it in the format the notebook expects, such as COCO for RF-DETR or yolov8 for Ultralytics models.

  5. Train and save the weights

    Run the training cells. Mount Google Drive and point the output folder at it so checkpoints survive the session.

  6. Upload the weights to Roboflow

    Run the deploy cell to attach the weights to your dataset version, then call the model through the Serverless Hosted API, Workflows or Roboflow Inference.

What teams build with Google Colab

  • Fine-tune RF-DETR without a local GPU

    Train on a Colab GPU and serve the result from Roboflow.

  • Compare architectures on one dataset

    Run the RF-DETR and YOLO26 notebooks against the same dataset version and compare the metrics.

  • Try a new model before committing

    Run zero-shot notebooks such as Qwen3-VL or Gemini object detection on your images before labeling more data.

Questions

The notebooks are set up for a T4 GPU and adjust batch size for smaller cards. Larger GPUs such as an A100 let you raise the batch size and finish sooner.

Mount Google Drive before training and write checkpoints there, or download them with files.download(). Uploading them to Roboflow also keeps a hosted copy.

Yes. RF-DETR, YOLO26, YOLO11 and Roboflow 3.0 train in the Roboflow app with no notebook. Colab suits models we do not train in-app, like YOLOv8, or when you want to change the training code.

Why are companies choosing Roboflow?

The end-to-end platform for vision AI: create datasets, train models and deploy to production.

  • Flexible deployment modes

    Move from a scalable cloud API to edge hardware like NVIDIA Jetson without managing complex dependencies.

  • Integrated workflow builder

    Combine multiple AI models, custom business logic and third-party integrations into one production-ready pipeline in a low-code editor.

  • Model monitoring and alerts

    Dashboards track confidence, inference time and request volume for your deployed models, and email alerts tell your team when confidence suddenly drops.

View all
Get started

Build on the Platform

For developers, engineers, and technical founders who want to get hands on. Try the free tier; the docs are open.

Bring it into your operation

For heads of AI, operations leaders, and enterprise teams. Bring a known problem, or work with us to find the first one worth taking on.