# Object Detection Model

### About this block

The Object Detection Model block lets you run an object detection model trained on or uploaded to Roboflow.

Object detection models let you identify custom objects in an image. For example, you could use an object detection block to:

1. Identify defects in a product
2. Find the location of vehicles on a road
3. Find items on an assembly line

You can run private models stored in your Workspace, or public models on Roboflow Universe.

<figure><img src="/files/aHkOzM1JfS5NrVR6VvfI" alt=""><figcaption><p>The Object Detection Model block.</p></figcaption></figure>

### What you can send into this block

You can run the Object Detection Model block on:

1. An image that you send to your Workflow
2. A video frame that you send to your Workflow
3. A cropped region of an image that is calculated in your Workflow (i.e. with a Crop block)

### What this block returns

The object detection model block returns predictions that can be used in other blocks. Predictions contain information about:

* The location of each object found (xyxy coordinates)
* The class name associated with each object location

To see the results from your object detection model plotted on an image, you need to use a Visualizer block. You may want to use the:

* [Bounding Box Visualization](/workflows/workflow-blocks/visualize-predictions/bounding-box-visualization.md): Show the bounding boxes returned by a model.
* Label Visualization: Show the class labels returned by a model.

Here is an example showing object detections returned by this block visualized with both the Bounding Box and Label visualizations:

<figure><img src="/files/B7aLyzbevt3jbZVFsmib" alt=""><figcaption><p>Predictions from an object detection model displayed on an image.</p></figcaption></figure>

### How to configure the block

When you set up this block, you will be asked to choose a model from your Workspace:

<figure><img src="/files/xJqsM3BUkvpXmbFmahch" alt=""><figcaption></figcaption></figure>

To use a model in your Workspace, choose from the list of Your Models.

We also have a range of base and public models available.

You can select from:

* Base models like RF-DETR base and YOLO11
* Recommended models for specific use cases like vehicle detection and retail inventory detection

You can also specify the ID of any model found on Universe. [Learn how to find a model on Universe.](/universe/find-a-model-on-universe.md)

You can then configure the block using the options available in the Workflows editor.

The most common properties set are the confidence threshold for a model and the "Class Filter" tool to only return predictions with a specific class.

### Use cases

This block is useful for any Workflow that involves running a model.

If you want to track objects in a video, you can combine an object detection model with Byte Tracker. The model will return the locations of objects and Byte Tracker will track their locations throughout the video.

### Predictions format

Expand the card below to see the JSON data returned by this block.

<details>

<summary>Predictions format</summary>

Predictions are returned in the following format:

```json
[
  {
    "model_predictions": {
      "image": {
        "width": 2048,
        "height": 1080
      },
      "predictions": [
        {
          "width": 795,
          "height": 808,
          "x": 883.5,
          "y": 676,
          "confidence": 0.985406219959259,
          "class_id": 0,
          "class": "can",
          "detection_id": "8797945b-bb46-4f35-b076-9a8f832b1bb0",
          "parent_id": "image"
        },
        {
          "width": 248,
          "height": 470,
          "x": 1924,
          "y": 845,
          "confidence": 0.9593697190284729,
          "class_id": 0,
          "class": "can",
          "detection_id": "0a61f2e5-0fd3-44e0-955b-1b66308dfab3",
          "parent_id": "image"
        }
      ]
    }
  }
]
```

</details>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.roboflow.com/workflows/workflow-blocks/run-a-model/object-detection-model.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
