RF-DETR Seg 2XLarge

RF_DETR_SEG_2XLARGE

Finds every object of 80 everyday kinds in a picture, such as people, vehicles, animals and furniture, and outlines each with a mask, a box and a score. Fine-tune it to outline your own kinds of objects.

Utilitiesimage-segmentationinstance-segmentationreal-timecocorf-detrapache-2.0Fine-tunable
RF-DETR Seg 2XLarge: Utilities model on Kainguru

About RF-DETR Seg 2XLarge

Capabilities

  • Masks, boxes and scores — every object found comes with its mask at the picture's size, its box and a score, best first
  • 80 COCO classes — people, vehicles, animals, food, furniture and more, each named in the result
  • No prompt — send a picture and get the instances back
  • Your own classes — fine-tune it on COCO-style annotations of your own objects

Good to know

  • Pictures are PNG, JPEG or WebP, up to 20 MB and 40 megapixels, at least 32 pixels a side and at most 8 times longer than wide. The model sees the picture squashed to 768 x 768 pixels, so very small objects in a large photo can be missed; masks have the picture's size as displayed, scaled down to 2048 pixels on the longer side.
  • At most the 100 best instances are returned; the default score threshold is 0.5.
  • Each mask comes in the JSON as COCO run-length encoding, {"size": [height, width], "counts": "..."}; pycocotools' mask.decode turns it into a 0/1 array (1 = the object). When the masks would take a response past 800 KB, as only very detailed ones do, they come at half the size or less; boxes stay in the picture's pixels.
  • Fine-tuning takes one ZIP (at most 4 GB and 10000 entries, no password) with 4 to 2000 pictures and one COCO annotations JSON: "images" (id, file_name, and if given width and height as displayed), "categories" (1 to 100: id and a name of up to 64 characters) and "annotations" (image_id, category_id, segmentation as polygons in pixels or an RLE of the picture's size).
  • At most 100 annotations a picture and 20000 in all; crowd annotations (iscrowd 1) are left out. A picture without an annotation is not used.
  • A picture's file_name is its path relative to the JSON or, as in exports that keep the JSON in an annotations folder, the end of exactly one file's path in the ZIP (x.jpg finds images/x.jpg).
  • Categories whose names are all among the model's 80 class names (same spelling, in any case) keep its class head; any other set gives the fine-tuned model your categories only, with a new class head.
  • Training sees one picture at a time and updates after the batch size you ask for, mirrors half of the pictures, and stops after 5,000 steps or 9 hours, whichever comes first, keeping what it learned.

Attribution

RF-DETR by Roboflow (rf-detr, built on LW-DETR by Baidu and Deformable DETR), released under the Apache License 2.0; its backbone is DINOv2 by Meta, also Apache License 2.0.

RF-DETR Seg 2XLarge inputs and output

NameTypeRequiredDefaultDetails
imagefileYes—The picture: PNG, JPEG or WebP, up to 20 MB and 40 megapixels. Masks have its size, scaled down to 2048 pixels on the longer side.
1–2048 characters · image/png, jpeg, webp
thresholdnumberNo—Lowest segment score to return, 0 to 1; higher returns fewer, surer segments. Empty uses the model's recommended value.
0–1

Output. JSON: {"width", "height", "segments": [{"label", "score", "box", "mask"}]}, best first, at most 100: box [x0, y0, x1, y1] in pixels, mask a COCO RLE {"size": [h, w], "counts"}.

Run RF-DETR Seg 2XLarge with the API

Send your API key in the X-API-Key header. The run is asynchronous: submit it, then poll it until it finishes. Create an API key.

cURL
curl -X POST "https://api.kainguru.com/api/v1/executions?mlFlowId=RF_DETR_SEG_2XLARGE" \
  -H "X-API-Key: kg_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "image": "https://example.com/input.png"
  },
  "outputFormat": "json"
}'

# Poll until the execution reaches a terminal state
curl "https://api.kainguru.com/api/v1/executions/{executionId}" \
  -H "X-API-Key: kg_your_api_key"
Python
from kainguru import KainguruClient

with KainguruClient(api_key="kg_your_api_key", base_url="https://api.kainguru.com/api") as client:
    submitted = client.executions.execute(
        "RF_DETR_SEG_2XLARGE",
        {
          "image": "https://example.com/input.png"
        },
        output_format="json",
    )
    result = client.executions.await_completion(submitted.id)
    print(result.execution.output)

Fine-tune RF-DETR Seg 2XLarge

You can fine-tune RF-DETR Seg 2XLarge on your own data and run the tuned model through the same API. Dataset: One ZIP (at most 4 GB, no password) with 4 to 2000 pictures and one COCO annotations JSON (images, 1 to 100 categories, annotations with polygon or RLE segmentation). More in Good to know, in the README.

The steps are in the docs.

RF-DETR Seg 2XLarge pricing

Price per image: 0.0874 credits ($0.000874). The price is shown again before every run; all prices are on the pricing page.

Licence and source

RF-DETR Keypoint Preview: Utilities model on Kainguru
Utilities

RF-DETR Keypoint Preview

Finds every person in a photo and returns their 17 body keypoints (nose, eyes, ears, shoulders, elbows, wrists, hips…

Fine-tunable
SAM 2.1 Hiera Large: Utilities model on Kainguru
Utilities

SAM 2.1 Hiera Large

Click or draw a box on an object and get back a mask outlining it.

Fine-tunable
Grounded SAM 2: Utilities model on Kainguru
Utilities

Grounded SAM 2

Outlines the things you name in a picture, such as "red car, person with a helmet", with a mask and a box for each one.

Fine-tunable
EoMT Large COCO Panoptic: Utilities model on Kainguru
Utilities

EoMT Large COCO Panoptic

Splits a picture into its objects and regions, such as people, cars, sky and road, with a label and a mask for each one.

Fine-tunable
Prithvi-EO 2.0 Sen1Floods11: Utilities model on Kainguru
Utilities

Prithvi-EO 2.0 Sen1Floods11

Maps water and floods from satellite images: send a Sentinel-2 GeoTIFF and get a water mask at the image's size, with…

Fine-tunable
Rembg U2-Net: Utilities model on Kainguru
Utilities

Rembg U2-Net

Fast background removal that returns the subject of a photo on a transparent background, or as a black-and-white mask.

Fine-tunable