DETR ResNet-50

DETR_RESNET_50

Detects the 80 COCO object classes in a photo and returns labelled boxes with scores (DETR ResNet-50).

Vision & Analysis

About DETR ResNet-50

Finds the 80 COCO object classes in a photo and returns a box and a score for each one. The box is in pixels of the image you sent.

The weights are facebook/detr-resnet-50 at revision 1d5f47bd3bdd2c4bbfa585418ffe6da5028b4c0b, published by Facebook AI. DETR was created by Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov and Sergey Zagoruyko. The model card states the licence as Apache-2.0: https://huggingface.co/facebook/detr-resnet-50. The weights file model.safetensors is 166,587,896 bytes (about 160 MB) and is public.

Limits

Still photos only. One image per request. A file over 20 MB, or over 4096 pixels on either side, is refused. The model does not read text, faces as identities, or anything outside the 80 COCO classes. A score is a detection confidence, not a measure of importance. Small or overlapping objects are often missed. The model runs on CPU.

DETR ResNet-50 inputs and output

NameTypeRequiredDefaultDetails
imagefileYes—Photo to scan. PNG, JPEG or WebP, at most 20 MB and 4096 pixels on a side.
image/jpeg, png, webp
thresholdnumberNo0.7Minimum score for a detection, from 0.05 to 0.99.
0.05–0.99
max_detectionsintegerNo50Maximum number of boxes to return, from 1 to 100.
1–100

Output. Returns plain text.

Run DETR ResNet-50 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=DETR_RESNET_50" \
  -H "X-API-Key: kg_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "image": "https://example.com/input.png",
    "max_detections": 50,
    "threshold": 0.7
  },
  "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(
        "DETR_RESNET_50",
        {
          "image": "https://example.com/input.png",
          "max_detections": 50,
          "threshold": 0.7
        },
        output_format="json",
    )
    result = client.executions.await_completion(submitted.id)
    print(result.execution.output)

DETR ResNet-50 pricing

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

Florence-2 Large: Vision & Analysis model on Kainguru
Vision & Analysis

Florence-2 Large

One small vision model that captions images, reads text, boxes objects and finds things named by a phrase.

Fine-tunable
BLIP2 Flan T5 XL: Vision & Analysis model on Kainguru
Vision & Analysis

BLIP2 Flan T5 XL

Describes a photo in a sentence or answers a question about it in plain English.

Fine-tunable
BLIP Image Captioning Large: Vision & Analysis model on Kainguru
Vision & Analysis

BLIP Image Captioning Large

Writes a short English caption for a photo, and can finish a caption you start.

Fine-tunable
BLIP VQA Base: Vision & Analysis model on Kainguru
Vision & Analysis

BLIP VQA Base

Answers short questions about a photo, such as what colour the car is or how many people are in it.

Fine-tunable
Deplot: Vision & Analysis model on Kainguru
Vision & Analysis

Deplot

DePlot from Google reads a chart or plot image and returns the data table drawn in it.

Docling Layout Heron: Vision & Analysis model on Kainguru
Vision & Analysis

Docling Layout Heron

Finds the layout of a document page, such as text blocks, titles, section headers, tables, pictures, captions…

Fine-tunable