DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to detect and annotate objects in a few lines of Python with Supervision

Run a detector, wrap its output as sv.Detections and draw clean boxes with an annotator.

Short answer: Run pip install supervision; then install the example dependencies with pip install pillow rfdetr; load an image and run RFDETRSmall() predict with a threshold to get detections. All steps.

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

  1. Run pip install supervision
  2. Install the example dependencies with pip install pillow rfdetr
  3. Load an image and run RFDETRSmall() predict with a threshold to get detections
  4. Create sv.BoxAnnotator() and call annotate on a copy of the image with the detections
  5. 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

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer