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)
</th><th>TensorRT FP16 (ms)</th></tr></thead><tbody><tr><td><code>yolo26n-640</code></td><td>640x640</td><td>40.9</td><td>3.5</td><td>2.2</td></tr><tr><td><code>yolo26s-640</code></td><td>640x640</td><td>48.6</td><td>4.7</td><td>3.0</td></tr><tr><td><code>yolo26m-640</code></td><td>640x640</td><td>53.1</td><td>8.4</td><td>4.4</td></tr><tr><td><code>yolo26l-640</code></td><td>640x640</td><td>55.0</td><td>10.7</td><td>5.6</td></tr><tr><td><code>yolo26x-640</code></td><td>640x640</td><td>57.5</td><td>18.4</td><td>8.0</td></tr></tbody></table>

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)
</th><th>TensorRT FP16 (ms)</th></tr></thead><tbody><tr><td><code>yolo26n-seg-640</code></td><td>640x640</td><td>39.6</td><td>33.9</td><td>8.3</td><td>6.8</td></tr><tr><td><code>yolo26s-seg-640</code></td><td>640x640</td><td>47.3</td><td>40.0</td><td>10.8</td><td>8.5</td></tr><tr><td><code>yolo26m-seg-640</code></td><td>640x640</td><td>52.5</td><td>44.1</td><td>16.4</td><td>11.9</td></tr><tr><td><code>yolo26l-seg-640</code></td><td>640x640</td><td>54.4</td><td>45.5</td><td>18.4</td><td>12.8</td></tr><tr><td><code>yolo26x-seg-640</code></td><td>640x640</td><td>56.5</td><td>47.0</td><td>28.9</td><td>15.7</td></tr></tbody></table>

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)
</th><th>TensorRT FP16 (ms)</th></tr></thead><tbody><tr><td><code>yolo26n-pose-640</code></td><td>640x640</td><td>57.2</td><td>3.8</td><td>2.3</td></tr><tr><td><code>yolo26s-pose-640</code></td><td>640x640</td><td>63.0</td><td>5.1</td><td>3.3</td></tr><tr><td><code>yolo26m-pose-640</code></td><td>640x640</td><td>68.8</td><td>9.0</td><td>4.6</td></tr><tr><td><code>yolo26l-pose-640</code></td><td>640x640</td><td>70.4</td><td>11.2</td><td>5.8</td></tr><tr><td><code>yolo26x-pose-640</code></td><td>640x640</td><td>71.6</td><td>19.1</td><td>8.3</td></tr></tbody></table>

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).