Who it is forA developer prototyping a vision feature who wants to see detections on real images fast.
The problemEvery model returns results in a different format, so drawing and filtering them means custom code each time.
The outcomeAnnotated images with boxes from any supported model, using one consistent Detections object.
What you need first
- 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
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
Prompt for your agent
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.
Caveat. Supervision does not include its own detector; accuracy depends entirely on the model you plug in.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for roboflow/supervision and "Detect and annotate objects in a few lines of Python"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer