# AI use cases for RF Detr (roboflow/rf-detr)

Repo: [roboflow/rf-detr](https://github.com/roboflow/rf-detr) | Use cases: 3 | Page: https://dedupedai.com/use-cases/roboflow-rf-detr/

RF-DETR is Roboflow's real-time transformer for object detection, instance segmentation and keypoint detection (preview), built on a DINOv2 backbone. One Python API covers model sizes from Nano to 2XLarge, results come back as supervision Detections, and the base `rfdetr` package and its Nano to Large detection, Seg and Keypoint models are Apache 2.0.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Detect objects in images with a pretrained model: https://dedupedai.com/use-cases/roboflow-rf-detr/detect-objects-in-images-with-rf-detr/
- Get pixel masks with RF-DETR-Seg: https://dedupedai.com/use-cases/roboflow-rf-detr/segment-object-masks-with-rf-detr-seg/
- Detect human keypoints for pose analysis: https://dedupedai.com/use-cases/roboflow-rf-detr/detect-human-keypoints-with-rf-detr/

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

Repo: [roboflow/rf-detr](https://github.com/roboflow/rf-detr) | Difficulty: Beginner | Time: 30 minutes | Basis: From the README

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

**Who it is for:** A developer prototyping a vision feature such as counting items or spotting vehicles.

**The problem:** Picking a detector that is both accurate and safe to ship commercially takes time.

**The outcome:** An annotated image with boxes and COCO class labels.

### 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 to paste into your agent

```text
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.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/roboflow-rf-detr/detect-objects-in-images-with-rf-detr/

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

Repo: [roboflow/rf-detr](https://github.com/roboflow/rf-detr) | Difficulty: Beginner | Time: 30 minutes | Basis: From the README

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

**Who it is for:** A developer measuring areas or cutting objects out of images.

**The problem:** Boxes are too coarse when you need exact object outlines.

**The outcome:** An image with per object masks and labels.

### 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 to paste into your agent

```text
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.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/roboflow-rf-detr/segment-object-masks-with-rf-detr-seg/

## How to detect human keypoints for pose analysis with RF Detr

Repo: [roboflow/rf-detr](https://github.com/roboflow/rf-detr) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Run the preview keypoint model, pretrained on COCO person keypoints, to get body joints from photos.

**Who it is for:** A developer building fitness, sports or ergonomics prototypes.

**The problem:** Pose estimation often means a separate model family and license.

**The outcome:** Keypoint predictions for each person in the image.

### Steps

1. Install with `pip install rfdetr`
2. Import RFDETRKeypointPreview from rfdetr
3. Create the model and call model.predict("image.jpg", threshold=0.5)
4. Inspect or plot the returned key points

### Prompt to paste into your agent

```text
Using roboflow/rf-detr, run RFDETRKeypointPreview on <my photo> with threshold 0.5 and draw the keypoints on the image.
```

### Caveat

Keypoint detection is marked preview, so expect API changes. The Atto, Femto, Pico, XL and 2XL detection models need `pip install "rfdetr[plus]"` and use a different license (PML 1.0).

Risk, privacy: Pose analysis of identifiable people should have their consent.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/roboflow-rf-detr/detect-human-keypoints-with-rf-detr/
