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

How to detect objects in images with a pretrained model with RF Detr

Load a COCO pretrained RFDETRMedium, predict on an image URL or file, and draw labeled boxes with supervision.

Short answer: Install with pip install rfdetr; then import RFDETRMedium and COCO_CLASSES as in the README Detection example; call model.predict on your image with threshold=0.5. All steps.

  • Top pick
  • Software and DevOps
  • Beginner
  • 30 minutes
  • From the README
  • Claude Code
  • Codex
  • Cursor
  • Gemini CLI

Who it is forA developer prototyping a vision feature such as counting items or spotting vehicles.

The problemPicking a detector that is both accurate and safe to ship commercially takes time.

The outcomeAn annotated image with boxes and COCO class labels.

What you need first

  • Python >= 3.10 and `pip install rfdetr`
  • supervision for drawing boxes and masks (used in the README examples)
  • A GPU helps for real-time use, but the examples run on single images

Steps

  1. Install with pip install rfdetr
  2. Import RFDETRMedium and COCO_CLASSES as in the README Detection example
  3. Call model.predict on your image with threshold=0.5
  4. Draw results with sv.BoxAnnotator and sv.LabelAnnotator, and swap the class name to change model size

Prompt for your agent

Using roboflow/rf-detr, install it, run RFDETRMedium on every image in <my folder> with threshold 0.5, and save annotated copies plus a CSV of class counts.

Caveat. For fine-tuned models the README says to use detections.data class_name instead of COCO_CLASSES.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for roboflow/rf-detr and "Detect objects in images with a pretrained model"

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