# Scout (`scout-1`): Object detection

Find and count 80 kinds of objects, with boxes.

Scout finds people, vehicles, animals, furniture, food, electronics and 70 more everyday objects in a photo and returns a box and score for each, plus counts by label.

Filter with `labels` to count only what you care about: cars in a parking lot, people in a room, bottles on a shelf.

- **Price:** $0.30 per 1,000 images. One unit per image.
- **Languages:** Not applicable
- **Input:** An image: an https URL, a data URL (`data:image/png;base64,...`), or a file in a multipart upload. JPEG, PNG, WebP, GIF, AVIF or TIFF, up to 10 MB.
- **Batch:** no, one input per call
- **Status:** live
- **Built on:** [facebook/detr-resnet-50](https://huggingface.co/facebook/detr-resnet-50), Apache-2.0, 41M

## Request

```bash
curl https://labs.greatwork.company/v1/run \
  -H "Authorization: Bearer $GWL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"scout-1","input":"https://labs.greatwork.company/examples/street.jpg"}'
```

Upload a local file with multipart: `curl https://labs.greatwork.company/v1/run -H "Authorization: Bearer $GWL_API_KEY" -F model=scout-1 -F input=@file`

## Options

| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| `input` | image (URL, data URL or upload) | yes | | An image: an https URL, a data URL (`data:image/png;base64,...`), or a file in a multipart upload. JPEG, PNG, WebP, GIF, AVIF or TIFF, up to 10 MB. |
| `threshold` | number | no | `0.7` | Score at or above which an object is returned. |
| `labels` | string[] | no |  | Only return these labels (COCO names like `person`, `car`, `dog`, `bottle`). |

## Output

| Field | Type | Description |
|---|---|---|
| `objects` | object[] | `label`, `score`, `box` {x, y, width, height} in pixels, best first. |
| `counts` | object | Objects per label. |

The response envelope is always `{"id", "object": "run", "model", "created", "output", "usage": {"units", "unit", "cost_usd", "cost_micros"}, "latency_ms"}`.

## Examples (real outputs from our servers)

### Street

```json
{
  "model": "scout-1",
  "input": "https://labs.greatwork.company/examples/street.jpg"
}
```

```json
{
  "objects": [
    {
      "label": "car",
      "score": 0.9993,
      "box": {
        "x": 633,
        "y": 512,
        "width": 413,
        "height": 150
      }
    },
    {
      "label": "dog",
      "score": 0.9991,
      "box": {
        "x": 330,
        "y": 600,
        "width": 97,
        "height": 76
      }
    },
    {
      "label": "person",
      "score": 0.9985,
      "box": {
        "x": 162,
        "y": 480,
        "width": 97,
        "height": 202
      }
    },
    {
      "label": "car",
      "score": 0.9984,
      "box": {
        "x": 506,
        "y": 519,
        "width": 265,
        "height": 126
      }
    },
    {
      "label": "person",
      "score": 0.9971,
      "box": {
        "x": 256,
        "y": 520,
        "width": 63,
        "height": 160
      }
    },
    {
      "label": "person",
      "score": 0.9968,
      "box": {
        "x": 425,
        "y": 468,
        "width": 59,
        "height": 185
      }
    },
    {
      "label": "person",
      "score": 0.9965,
      "box": {
        "x": 575,
        "y": 480,
        "width": 95,
        "height": 187
      }
    },
    {
      "label": "person",
      "score": 0.9953,
      "box": {
        "x": 495,
        "y": 479,
        "width": 50,
        "height": 135
      }
    },
    {
      "label": "person",
      "score": 0.9951,
      "box": {
        "x": 84,
        "y": 470,
        "width": 91,
        "height": 205
      }
    },
    {
      "label": "bicycle",
      "score": 0.9951,
      "box": {
        "x": 550,
        "y": 563,
        "width": 130,
        "height": 141
      }
    },
    {
      "label": "car",
      "score": 0.9855,
      "box": {
        "x": 938,
        "y": 493,
        "width": 96,
        "height": 70
      }
    },
    {
      "label": "person",
      "score": 0.982,
      "box": {
        "x": 0,
        "y": 393,
        "width": 41,
        "height": 194
      }
    },
    {
      "label": "person",
      "score": 0.975,
      "box": {
        "x": 399,
        "y": 488,
        "width": 47,
        "height": 134
      }
    },
    {
      "label": "person",
      "score": 0.9657,
      "box": {
        "x": 567,
        "y": 494,
        "width": 42,
        "height": 77
      }
    },
    {
      "label": "umbrella",
      "score": 0.9518,
      "box": {
        "x": 718,
        "y": 455,
        "width": 164,
        "height": 37
      }
    },
    {
      "label": "person",
      "score": 0.9254,
      "box": {
        "x": 737,
        "y": 484,
        "width": 30,
        "height": 55
      }
    },
    {
      "label": "backpack",
      "score": 0.8771,
      "box": {
        "x": 444,
        "y": 501,
        "width": 36,
        "height": 55
      }
    },
    {
      "label": "person",
      "score": 0.8596,
      "box": {
        "x": 769,
        "y": 493,
        "width": 25,
        "height": 44
      }
    },
    {
      "label": "person",
      "score": 0.8228,
      "box": {
        "x": 805,
        "y": 497,
        "width": 26,
        "height": 32
      }
    },
    {
      "label": "car",
      "score": 0.8076,
      "box": {
        "x": 941,
        "y": 484,
        "width": 94,
        "height": 31
      }
    },
    {
      "label": "person",
      "score": 0.794,
      "box": {
        "x": 785,
        "y": 494,
        "width": 24,
        "height": 39
      }
    },
    {
      "label": "umbrella",
      "score": 0.7676,
      "box": {
        "x": 722,
        "y": 450,
        "width": 155,
        "height": 81
      }
    },
    {
      "label": "person",
      "score": 0.7632,
      "box": {
        "x": 810,
        "y": 495,
        "width": 26,
        "height": 32
      }
    },
    {
      "label": "backpack",
      "score": 0.7459,
      "box": {
        "x": 625,
        "y": 517,
        "width": 49,
        "height": 65
      }
    }
  ],
  "counts": {
    "car": 4,
    "dog": 1,
    "person": 14,
    "bicycle": 1,
    "umbrella": 2,
    "backpack": 2
  },
  "width": 1024,
  "height": 1024
}
```

2339 ms, $0.0003.

### Only people

```json
{
  "model": "scout-1",
  "input": "https://labs.greatwork.company/examples/street.jpg",
  "labels": [
    "person"
  ],
  "threshold": 0.6
}
```

```json
{
  "objects": [
    {
      "label": "person",
      "score": 0.9985,
      "box": {
        "x": 162,
        "y": 480,
        "width": 97,
        "height": 202
      }
    },
    {
      "label": "person",
      "score": 0.9971,
      "box": {
        "x": 256,
        "y": 520,
        "width": 63,
        "height": 160
      }
    },
    {
      "label": "person",
      "score": 0.9968,
      "box": {
        "x": 425,
        "y": 468,
        "width": 59,
        "height": 185
      }
    },
    {
      "label": "person",
      "score": 0.9965,
      "box": {
        "x": 575,
        "y": 480,
        "width": 95,
        "height": 187
      }
    },
    {
      "label": "person",
      "score": 0.9953,
      "box": {
        "x": 495,
        "y": 479,
        "width": 50,
        "height": 135
      }
    },
    {
      "label": "person",
      "score": 0.9951,
      "box": {
        "x": 84,
        "y": 470,
        "width": 91,
        "height": 205
      }
    },
    {
      "label": "person",
      "score": 0.982,
      "box": {
        "x": 0,
        "y": 393,
        "width": 41,
        "height": 194
      }
    },
    {
      "label": "person",
      "score": 0.975,
      "box": {
        "x": 399,
        "y": 488,
        "width": 47,
        "height": 134
      }
    },
    {
      "label": "person",
      "score": 0.9657,
      "box": {
        "x": 567,
        "y": 494,
        "width": 42,
        "height": 77
      }
    },
    {
      "label": "person",
      "score": 0.9254,
      "box": {
        "x": 737,
        "y": 484,
        "width": 30,
        "height": 55
      }
    },
    {
      "label": "person",
      "score": 0.8596,
      "box": {
        "x": 769,
        "y": 493,
        "width": 25,
        "height": 44
      }
    },
    {
      "label": "person",
      "score": 0.8228,
      "box": {
        "x": 805,
        "y": 497,
        "width": 26,
        "height": 32
      }
    },
    {
      "label": "person",
      "score": 0.794,
      "box": {
        "x": 785,
        "y": 494,
        "width": 24,
        "height": 39
      }
    },
    {
      "label": "person",
      "score": 0.7632,
      "box": {
        "x": 810,
        "y": 495,
        "width": 26,
        "height": 32
      }
    },
    {
      "label": "person",
      "score": 0.6189,
      "box": {
        "x": 927,
        "y": 488,
        "width": 26,
        "height": 28
      }
    }
  ],
  "counts": {
    "person": 15
  },
  "width": 1024,
  "height": 1024
}
```

2354 ms, $0.0003.

## Good for

- Count people or cars in camera stills
- Check a product photo shows the product
- Auto-crop around the main subject
- Pre-label images for a dataset

## Limits and caveats

- The 80 COCO categories only (no logos, faces or custom objects).
- Small objects in big photos are often missed.
