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
- Install with
pip install rfdetr - Import RFDETRSegMedium from rfdetr as in the Segmentation example
- Run model.predict on your image with threshold=0.5
- 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
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