YOLO-World
Use YOLO-World open-vocabulary object detection through our Serverless Cloud API
YOLO-World is an open-vocabulary object detection model that detects objects from arbitrary text class names without training. We support YOLO-World inferencing via our Serverless Cloud API.
For more details on running YOLO-World, see the Inference docs.
YOLO-World API
Run YOLO-World through the HTTP endpoint directly with curl, or with the inference-sdk wrapper.
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"Run the model
Call the /yolo_world/infer endpoint with curl:
curl --location 'https://serverless.roboflow.com/yolo_world/infer' \
--header 'Content-Type: application/json' \
--header "Authorization: Bearer $ROBOFLOW_API_KEY" \
--data '{
"image": {"type": "url", "value": "https://media.roboflow.com/quickstart/traffic.jpg"},
"text": ["car", "truck"],
"yolo_world_version_id": "v2-s",
"confidence": 0.05
}'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"Run the model
Run YOLO-World with custom class names, then decode and visualize the predictions with supervision.
import os
import cv2
import supervision as sv
from inference_sdk import InferenceHTTPClient, InferenceConfiguration
image = sv.load_image_from_url("https://media.roboflow.com/quickstart/traffic.jpg")
client = InferenceHTTPClient(
api_url="https://serverless.roboflow.com",
api_key=os.environ["ROBOFLOW_API_KEY"],
).configure(InferenceConfiguration(api_key_transport="header"))
results = client.infer_from_yolo_world(
inference_input=image,
class_names=["car", "truck"],
model_version="v2-s",
confidence=0.05,
)
detections = sv.Detections.from_inference(results[0])
labels = [
f"{name} {conf:.2f}"
for name, conf in zip(detections.data["class_name"], detections.confidence)
]
annotated = sv.BoxAnnotator().annotate(image.copy(), detections)
annotated = sv.LabelAnnotator().annotate(annotated, detections, labels=labels)
cv2.imwrite("annotated.png", annotated)
The class_names argument accepts any list of class names. Available model_version values: v2-s, v2-m, v2-l, v2-x, s, m, l, x.
YOLO-World inference speed
Latency measured with Roboflow Inference on 1x NVIDIA L4, batch size 1, mean after warmup.
yolo-world
12.4
Measured on the v2-s variant with two classes. Setting the class list runs a text encoder once, and is excluded from this figure since it is not repeated per frame.
Run YOLO-World with self-hosted Inference
YOLO-World also runs on your own hardware, either loaded in-process with the inference package or served by a local Inference server. On capable hardware (for example a V100 GPU) it runs in real time, which makes it a practical choice for video.
Add the YOLO-World block to a Workflow and set the classes you want to detect. Then stream a webcam, camera feed, or video file through that Workflow with the Inference SDK WebRTC client.
In the native package, YOLO-World checkpoints are identified as yolo_world/<version>, where <version> is one of s, m, l, x, v2-s, v2-m, v2-l, v2-x. The v2- checkpoints are newer and score better on evaluation metrics.
License
YOLO-World is released under GPL-3.0 (the Ultralytics port is AGPL-3.0). What that means for commercial use:
On Roboflow cloud: a commercial license is included for every user, including the free plan.
Self-hosted: you need the Enterprise license add-on, or you must open-source your application under the same license.
See Roboflow's Ultralytics licensing for details.
Last updated
Was this helpful?