> For the complete documentation index, see [llms.txt](https://docs.roboflow.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.roboflow.com/workflows/blocks/blocks/run-a-model/seg-preview.md).

# Seg Preview

Seg Preview

### Type identifier

Use the following identifier in step `"type"` field: `roboflow_core/seg-preview@v1` to add the block as a step in your workflow.

### Properties

| **Name**      | **Type**                | **Description**                           | Refs |
| ------------- | ----------------------- | ----------------------------------------- | ---- |
| `name`        | `str`                   | Enter a unique identifier for this step.. | ❌    |
| `class_names` | `Union[List[str], str]` | List of classes to recognise.             | ✅    |
| `threshold`   | `float`                 | Threshold for predicted mask scores.      | ✅    |

The **Refs** column marks possibility to parametrise the property with dynamic values available in `workflow` runtime. See *Bindings* for more info.

### Runtime compatibility

`requires_internet` - air-gapped / offline deployments : This block depends on a service that is not reachable from fully offline / air-gapped deployments.

`hard` - runtime `self_hosted_cpu`, `self_hosted_gpu`, `inference_pipeline` : Seg Preview calls the Roboflow-internal API\_BASE\_URL/inferenceproxy/seg-preview endpoint, which is only reachable from Roboflow-hosted runtimes (HOSTED\_SERVERLESS, DEDICATED\_DEPLOYMENT). Self-hosted deployments cannot run this block.

### Input and Output Bindings

The available connections depend on its binding kinds. Check what binding kinds `Seg Preview` in version `v1` has.

<details>

<summary>Input and output bindings</summary>

* input
  * `images` ([*`image`*](/workflows/developer-guide/developer-guide/kinds/image.md)): The image to infer on..
  * `class_names` (*Union\[*[*`list_of_values`*](/workflows/developer-guide/developer-guide/kinds/list-of-values.md)*,* [*`string`*](/workflows/developer-guide/developer-guide/kinds/string.md)*]*): List of classes to recognise.
  * `threshold` ([*`float`*](/workflows/developer-guide/developer-guide/kinds/float.md)): Threshold for predicted mask scores.
* output
  * `predictions` ([`instance_segmentation_prediction`](/workflows/developer-guide/developer-guide/kinds/instance-segmentation-prediction.md)): Prediction with detected bounding boxes and segmentation masks in form of sv.Detections(...) object.

</details>

<details>

<summary>Example JSON definition</summary>

```json
{
	    "name": "<your_step_name_here>",
	    "type": "roboflow_core/seg-preview@v1",
	    "images": "$inputs.image",
	    "class_names": [
	        "car",
	        "person"
	    ],
	    "threshold": 0.3
	}
```

</details>
