YOLOlite is a lightweight object detection model family from Roboflow, designed for low-latency deployments and edge hardware. You can train YOLOlite on a Project in Roboflow and deploy it via our Serverless Cloud API.
For self-hosted deployment, see Roboflow Inference.
YOLOlite input size is configured during training on Roboflow.
YOLOlite available variants
YOLOlite ships in two scaling families: a standard set and an edge-optimized set. Each is available in five sizes.
| Family | Variants |
|---|---|
| Standard | yololite-n, yololite-s, yololite-m, yololite-l, yololite-xl |
| Edge | yololite-edge-n, yololite-edge-s, yololite-edge-m, yololite-edge-l, yololite-edge-xl |
You select a variant when you start a training on a Project. The trained model is then served from the Serverless Cloud API, where you call it by its per-model {workspace}/{model-slug} ID (see Versions, Trainings, and Models).
YOLOlite API
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"Install the dependencies
Install the Inference SDK and supervision:
pip install -U inference-sdk supervisionRun the model
This example runs a public YOLOlite model trained on a screws dataset (screw, flat-washer, hex-nut). Swap in your own {workspace}/{model-slug} to run your trained weights.
import os
import cv2
import supervision as sv
from inference_sdk import InferenceHTTPClient
image = sv.load_image_from_url("https://media.roboflow.com/docs/bolts.jpg")
client = InferenceHTTPClient(
api_url="https://serverless.roboflow.com",
api_key=os.environ["ROBOFLOW_API_KEY"],
)
results = client.infer(image, model_id="erik-pe6au/rf-bolts-4-yololite-s-t1")
detections = sv.Detections.from_inference(results)
annotated = sv.BoxAnnotator().annotate(image.copy(), detections)
cv2.imwrite("annotated.png", annotated)
Set api_url to match your deployment target:
https://serverless.roboflow.comfor the Serverless Cloud API.http://localhost:9001for a local Inference server.- Your Dedicated Deployment URL for a private endpoint.