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

How to get pixel masks with RF-DETR-Seg with RF Detr

Use RFDETRSegMedium for instance segmentation and paint each object's mask with supervision.

Short answer: Install with pip install rfdetr; then import RFDETRSegMedium from rfdetr as in the Segmentation example; run model.predict on your image with threshold=0.5. All steps.

Who it is forA developer measuring areas or cutting objects out of images.

The problemBoxes are too coarse when you need exact object outlines.

The outcomeAn image with per object masks and 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 RFDETRSegMedium from rfdetr as in the Segmentation example
  3. Run model.predict on your image with threshold=0.5
  4. Draw with sv.MaskAnnotator and sv.LabelAnnotator

Prompt for your agent

With roboflow/rf-detr, run RFDETRSegMedium on <my image> and save the masked output, then tell me how many objects of each class it found.

Caveat. Every RF-DETR-Seg size from Nano to 2XLarge is Apache 2.0 according to the README.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for roboflow/rf-detr and "Get pixel masks with RF-DETR-Seg"

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