> This page is for version 9.2 (default).
> For other versions, use one of these documentation indexes:
> - 9.2 (default): https://docs.nvidia.com/deepstream/9.2/llms.txt
> - Archives: https://docs.nvidia.com/deepstream/archives/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/deepstream/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/deepstream/_mcp/server.

# Gst-nvsegvisual

The Gst-nvsegvisual plugin visualizes segmentation results. Segmentation is based on image recognition, except that the classifications occur at the pixel level as opposed to the image level as with image recognition. The segmentation output size is generally same as the input size.
For more information, see the segmentation training reference at:
[https://github.com/qubvel/segmentation_models](https://github.com/qubvel/segmentation_models)

![Gst-nvsegvisual](/deepstream/_fern-img/f2294220fb69b6f537d20cf8f8502c5911ddb58f3b57d25101b62d62d3aa5351.webp)

## Inputs and Outputs

* Inputs

  * GStreamer buffer containing NV12/RGBA frame(s)
  * NvDsInferSegmentationMeta containing class numbers, pixel class map, width, height, etc. generated by Gst-nvinfer.
  * gpu-id: selects the GPU ID
  * width, set according the segmentation output size
  * height, set according the segmentation output size

* Output

This plugin allocates different colors for different classes. For example, the industrial model’s output has only one representing defective areas. Thus, defective areas and background have different colors. The semantic model outputs four classes with four different colors: car, pedestrian, bicycle, and background.
This plugin shows the segmentation overlay on video output.

## Features

The following table summarizes the features of the plugin.

**Gst-nvsegvisual plugin features**

| Feature                 | Description                                                                                          | Release |
| ----------------------- | ---------------------------------------------------------------------------------------------------- | ------- |
| Configure GPU selection | Sets the GPU ID to be used for segmentation visualization operations (valid only for dGPU platforms) | DS 4.0  |
| Configure width         | Sets width according to the segmentation output size                                                 | DS 4.0  |
| Configure height        | Sets height according to the segmentation output size                                                | DS 4.0  |

## Gst Properties

The following table describes the Gst properties of the Gst-nvsegvisual plugin.

**Gst-nvsegvisual plugin gst properties**

| Property               | Meaning                                                                                                | Type and Range               | Example and Notes         |
| ---------------------- | ------------------------------------------------------------------------------------------------------ | ---------------------------- | ------------------------- |
| gpu-id                 | Device ID of the GPU to be used for decoding                                                           | Integer, 0 to 4,294,967,295  | gpu-id=0                  |
| width                  | Segmentation output width                                                                              | Integer, 0 to 4,294,967,295  | width=512                 |
| height                 | Segmentation output height                                                                             | Integer, 0 to 4,294,967,295  | height=512                |
| unique-id              | Unique ID for the element; can be used to identify the output of the element                           | Integer, 0 to 4,294,967,295  | unique-id=15              |
| batch-size             | Maximum batch size for inference                                                                       | Integer, 1 to 4,294,967,295  | batch-size=4              |
| operate-on-seg-meta-id | Visualize segmentation on the seg-metadata with this unique ID; set to -1 to visualize on all metadata | Integer, -1 to 2,147,483,647 | operate-on-seg-meta-id=-1 |
| original-background    | Shows the original background instead of the masked background when set                                | Boolean                      | original-background=0     |
| class-id               | Class ID of the background; should be set if original-background is TRUE                               | Integer, 0 to 4,294,967,295  | class-id=0                |
| alpha                  | Alpha value for per-pixel blending                                                                     | Float, 0.0 to 1.0            | alpha=1.0                 |
| gpu-on                 | Switches between device and host memory                                                                | Boolean                      | gpu-on=1                  |