---
title: instanceMask
framework: vision
role: symbol
role_heading: Instance Property
path: vision/vninstancemaskobservation/instancemask
---

# instanceMask

The resulting mask that represents all instances.

## Declaration

```swift
var instanceMask: CVPixelBuffer { get }
```

## Discussion

Discussion A pixel can only correspond to one instance. A 0 represents the background, and all other values represent the indices of the instances.

## See Also

### Accessing Instances

- [allInstances](vision/vninstancemaskobservation/allinstances.md)
