Skip to navigation

Serve YOLO

Runs on: gpu, cpu Dockerfile
First run can take longer while the worker pulls the configured Docker image.

Overview

Answers object detection requests over HTTP from a YOLO model that stays loaded in memory. Start it from the Deployments page or place it on the canvas as a deploy node. It keeps running until you stop it, and every call reuses the weights read at startup instead of loading them again.

Calls go to POST /predict and name images that already live in your workspace. Each image comes back with a detection annotation, so the endpoint is the way to get YOLO predictions from your own code, a script, or another service.

Model decides what the deployment serves. To try the endpoint before you have trained anything, copy a pretrained detector from the catalog into the workspace and pick it.

Prerequisites

RequirementWhat you need
MachineA machine class with a GPU for real traffic. A class without one works too, far slower.
Trained modelA YOLO detection model, for example one produced by Train YOLO or a pretrained one copied from the catalog.
Images in the workspaceThe images you want detections for, already uploaded. Calls name assets by id, so images are never sent in the request body.
API tokenA personal token created under Settings → Developer. Every call carries it.

How it works

1

Reads the selected model once at startup and keeps its weights in memory, on the GPU when the machine has one and on the CPU otherwise.

2

Reports itself as not ready until the weights are in memory, then starts accepting calls.

3

Downloads the images named in a request and runs detection over them in one batch.

4

Answers with one result per requested image, carrying its detection annotation and the number of objects found.

FAQ

Open the deployment on the Deployments page. It shows the base URL of that deployment and a ready-made command for each route it serves. Calls go through OvalBee, which checks your API token and forwards them to the container, so you never address the container directly.

A list of image asset ids, and an optional block of settings. The settings replace the matching values in Config for that one call, so you can tighten or loosen the confidence threshold per request without restarting the deployment. One call takes at most 128 ids, so split larger sets across several calls. An empty list is accepted and comes back with no results.

One result per requested image, in the order you sent them. Each carries the asset id, a detection annotation with one box and one class per detected object, and how many objects were found. The class names come from the model, falling back to the names stored with the weights when the model records none. A setting outside Config’s keys is refused with a 400.

No. The annotations exist only in the response, and nothing is written to the images or to a dataset. Store what you need on your side, or use Predict YOLO when you want the predictions written into a new dataset instead.

The weights recorded on the selected model: a model in OvalBee’s layout is built from the Ultralytics model definition of its architecture, an ONNX file runs on ONNX Runtime, and an Ultralytics .pt loads only while the safe-weights policy is off. A catalog model whose weights OvalBee does not host is downloaded from the checkpoint its catalog entry names, checked against its SHA-256. Weights are read only at startup, so switching to another model means stopping this deployment and starting one with the new model selected.

Either the deployment is not running yet, or it is still loading the model. The first start is the slow one, because the worker pulls the image and, for a catalog model, downloads the weights before the model is ready.

Usually one of the asset ids does not resolve to an image in the workspace: it names nothing, or it names another kind of asset, such as an annotation file of the dataset. The error names those ids, with the kind of each that is not an image, and the whole call is refused before any image is downloaded rather than partly answered. An image asset whose file cannot be decoded as an image is refused the same way, by id and file name, before the model sees the batch.

Images only, and object detection only: no video, no segmentation masks, and no uploading an image with the request. Calls are served one at a time on the single GPU behind the model, so overlapping requests wait their turn. Settings that would redirect where the model reads from or writes to are ignored.

Inputs

Model
modelRequired

Model the deployment loads and keeps in memory, trained in this workspace or installed from the zoo. Key: MODEL.

Config
yamlRequired

YAML defaults passed to YOLO predict - image size, confidence and IoU thresholds, maximum detections, batch size, half precision, test-time augmentation, class-agnostic NMS, class indices and verbose logging. Any other key is refused. A request may override any of these per call. Key: CONFIG.

Runtime

The deployment runs in its own container on the machine class picked in the deploy dialog, on an image that ships Ultralytics YOLO. It holds that machine from the moment it starts until you stop it, idle or not, so stop a deployment you are done with.

JSON config

Machine-readable node interface for automation and advanced usage.

{
"name": "Serve YOLO",
"description": "Loads a YOLO checkpoint once and keeps answering prediction requests until the deployment is stopped. Holds its machine for its whole lifetime. Runs on a GPU when the machine has one, and on the CPU otherwise.\n",
"category": "Models",
"namespace": "ovalbee",
"templateKey": "models/yolo/serve_yolo",
"version": "v1",
"inputs": [
{
"key": "MODEL",
"label": "Model",
"type": "model",
"description": "Model the deployment loads and keeps in memory, trained in this workspace or installed from the zoo.\n",
"required": true,
"default": null,
"visibleWhen": null,
"options": {
"framework": "yolo",
"task_type": "object_detection"
}
},
{
"key": "CONFIG",
"label": "Config",
"type": "yaml",
"description": "YAML defaults passed to YOLO predict - image size, confidence and IoU thresholds, maximum detections, batch size, half precision, test-time augmentation, class-agnostic NMS, class indices and verbose logging. Any other key is refused. A request may override any of these per call.\n",
"required": true,
"default": "imgsz: 640\nconf: 0.25\niou: 0.7\nmax_det: 300\nverbose: false\n",
"visibleWhen": null
}
],
"outputs": [],
"runtime": {
"type": "docker",
"devices": [
"gpu",
"cpu"
],
"dockerImage": "ovalbee/node-yolo:0.0.39"
}
}

References