{
 "schema_version": 1,
 "generated": "2026-10-31",
 "id": "roboflow-supervision--detect-and-annotate-objects-in-images",
 "repo": "roboflow/supervision",
 "repo_url": "https://github.com/roboflow/supervision",
 "repo_slug": "roboflow-supervision",
 "title": "Detect and annotate objects in a few lines of Python",
 "page_title": "How to detect and annotate objects in a few lines of Python with Supervision",
 "summary": "Run a detector, wrap its output as sv.Detections and draw clean boxes with an annotator.",
 "who": "A developer prototyping a vision feature who wants to see detections on real images fast.",
 "problem": "Every model returns results in a different format, so drawing and filtering them means custom code each time.",
 "outcome": "Annotated images with boxes from any supported model, using one consistent Detections object.",
 "steps": [
  "Run `pip install supervision`",
  "Install the example dependencies with `pip install pillow rfdetr`",
  "Load an image and run `RFDETRSmall()` predict with a threshold to get detections",
  "Create `sv.BoxAnnotator()` and call annotate on a copy of the image with the detections",
  "Swap in another model through the connectors for Ultralytics, Transformers, MMDetection or Inference"
 ],
 "agent_prompt": "Using roboflow/supervision with RF-DETR, write a script that runs detection on every image in <folder> at threshold 0.5, draws boxes with sv.BoxAnnotator and saves annotated copies to <output folder>, printing the number of detections per image.",
 "agents": [
  "claude-code",
  "codex",
  "cursor"
 ],
 "difficulty": "Beginner",
 "time": "20 minutes",
 "basis": "readme",
 "caveat": "Supervision does not include its own detector; accuracy depends entirely on the model you plug in.",
 "category": "Data and analytics",
 "tags": [
  "Data and analytics"
 ],
 "lang": "python",
 "requirements": [
  "Python 3.10 or later",
  "A detection or segmentation model; the quickstart uses RF-DETR via `pip install pillow rfdetr`",
  "A Roboflow API key only if you use Inference or download datasets from Roboflow"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": true,
 "score": 1.0,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/roboflow-supervision/detect-and-annotate-objects-in-images/",
 "md": "https://dedupedai.com/use-cases/roboflow-supervision/detect-and-annotate-objects-in-images/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/roboflow-supervision--detect-and-annotate-objects-in-images.json",
 "api_version": "v1"
}
