YOLO26 Object Detection

Use the YOLO26 model family through our Serverless Cloud API

YOLO26 object detection runs through the Serverless Cloud API, pretrained on COCO. For self-hosted deployment, see Roboflow Inference.

YOLO26 Object Detection API

This sample downloads a test image, runs inference through inference-sdk, decodes the response with supervision, and writes an annotated PNG to disk.

1

Get your API Key

Create a Roboflow account, find your key on the Roboflow API settings page and make it available to your shell:

export ROBOFLOW_API_KEY="your-key-here"
2

Install the dependencies

Install the SDK and the supervision library for annotation:

pip install -U inference-sdk supervision opencv-python
3

Run the model

Run yolo26n-640 on a sample image and annotate boxes and labels:

import os
import cv2
import supervision as sv
from inference_sdk import InferenceHTTPClient

image_url = "https://media.roboflow.com/quickstart/traffic.jpg"
image = sv.load_image_from_url(image_url)

client = InferenceHTTPClient(
    api_url="https://serverless.roboflow.com",
    api_key=os.environ["ROBOFLOW_API_KEY"],
)
result = client.infer(image, model_id="yolo26n-640")
detections = sv.Detections.from_inference(result)

annotated = sv.BoxAnnotator().annotate(image.copy(), detections)
annotated = sv.LabelAnnotator().annotate(annotated, detections)
cv2.imwrite("traffic-annotated.png", annotated)

Set api_url to match your deployment target:

  • https://serverless.roboflow.com for the Serverless Cloud API.
  • http://localhost:9001 for a local Inference server.
  • Your Dedicated Deployment URL for a private endpoint.

YOLO26 Object Detection models and benchmarks

Pass any of these aliases as the model_id. The inference-sdk resolves each alias to its pretrained Roboflow Universe model client-side; the yolov26* prefix variants resolve to the same models.

AliasInput SizemAP50-95ONNX latency (ms)TensorRT FP16 (ms)
yolo26n-640640x64040.93.52.2
yolo26s-640640x64048.64.73.0
yolo26m-640640x64053.18.44.4
yolo26l-640640x64055.010.75.6
yolo26x-640640x64057.518.48.0

YOLO26 Instance Segmentation

YOLO26 instance segmentation runs through the Serverless Cloud API, pretrained on COCO. For self-hosted deployment, see Roboflow Inference.

YOLO26 Instance Segmentation API

Set your API key and install the dependencies as shown above, then run yolo26n-seg-640 and annotate masks and labels:

import os
import cv2
import supervision as sv
from inference_sdk import InferenceHTTPClient

image_url = "https://media.roboflow.com/quickstart/traffic.jpg"
image = sv.load_image_from_url(image_url)

client = InferenceHTTPClient(
    api_url="https://serverless.roboflow.com",
    api_key=os.environ["ROBOFLOW_API_KEY"],
)
result = client.infer(image, model_id="yolo26n-seg-640")
detections = sv.Detections.from_inference(result)

annotated = sv.MaskAnnotator().annotate(image.copy(), detections)
annotated = sv.BoxAnnotator().annotate(annotated, detections)
annotated = sv.LabelAnnotator().annotate(annotated, detections)
cv2.imwrite("traffic-annotated.png", annotated)

YOLO26 Instance Segmentation models and benchmarks

Pass any of these aliases as the model_id; the yolov26* prefix variants resolve to the same models. Box and mask mAP are end-to-end (NMS-free) COCO val values.

AliasInput SizeBox mAP50-95Mask mAP50-95ONNX latency (ms)TensorRT FP16 (ms)
yolo26n-seg-640640x64039.633.98.36.8
yolo26s-seg-640640x64047.340.010.88.5
yolo26m-seg-640640x64052.544.116.411.9
yolo26l-seg-640640x64054.445.518.412.8
yolo26x-seg-640640x64056.547.028.915.7

YOLO26 Keypoint Detection

YOLO26 keypoint/pose detection runs through the Serverless Cloud API, pretrained on COCO. For self-hosted deployment, see Roboflow Inference.

YOLO26 Keypoint Detection API

Set your API key and install the dependencies as shown above, then run yolo26n-pose-640 and annotate keypoints:

import os
import cv2
import supervision as sv
from inference_sdk import InferenceHTTPClient

image_url = "https://media.roboflow.com/notebooks/examples/person-walking.png"
image = sv.load_image_from_url(image_url)

client = InferenceHTTPClient(
    api_url="https://serverless.roboflow.com",
    api_key=os.environ["ROBOFLOW_API_KEY"],
)
result = client.infer(image, model_id="yolo26n-pose-640")
key_points = sv.KeyPoints.from_inference(result)

annotated = sv.VertexAnnotator(color=sv.Color.RED, radius=5).annotate(image.copy(), key_points)
cv2.imwrite("person-walking-annotated.png", annotated)

YOLO26 Keypoint Detection models and benchmarks

Pass any of these aliases as the model_id; the yolov26* prefix variants resolve to the same models. mAP is the end-to-end (NMS-free) COCO val value.

AliasInput SizemAP50-95ONNX latency (ms)TensorRT FP16 (ms)
yolo26n-pose-640640x64057.23.82.3
yolo26s-pose-640640x64063.05.13.3
yolo26m-pose-640640x64068.89.04.6
yolo26l-pose-640640x64070.411.25.8
yolo26x-pose-640640x64071.619.18.3

YOLO26 Semantic Segmentation

YOLO26 semantic segmentation (yolo26-sem) is the recommended architecture for semantic segmentation on Roboflow. It uses Cityscapes pretrained weights and trains at a default resolution of 1024x1024. Available in five sizes: n, s, m, l, x.

To train a YOLO26-SEM model, create a semantic segmentation Project and select YOLO26 as your architecture. You can also upload custom-trained weights for YOLO26-SEM models.

The Cityscapes pretrained models (19 classes) are also available as public models you can run in a Workflow without training.

YOLO26 Semantic Segmentation models and benchmarks

Pass any of these Cityscapes-pretrained aliases as the model_id; the yolov26* prefix variants resolve to the same models. They run on the ONNX backend only; no prebuilt TensorRT engine is published.

AliasInput SizeONNX latency (ms)*
yolo26n-sem-10241024x102423.3
yolo26s-sem-10241024x102425.9
yolo26m-sem-10241024x102434.6
yolo26l-sem-10241024x102435.8
yolo26x-sem-10241024x102453.2

* Latency is measured with Roboflow Inference on 1x NVIDIA L4, batch size 1, mean of 1,000 inferences (100 warmup). The default inference-gpu install runs ONNX on the CUDA execution provider; adding the inference-models[trt10] extra selects a prebuilt TensorRT FP16 engine automatically. FP16 matches FP32 accuracy within 0.1 mAP on COCO val2017. Accuracy is the published COCO val spec (source).