<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Vision",
  "identifier" : "/documentation/Vision/VNGeneratePersonSegmentationRequest",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Vision"
    ],
    "preciseIdentifier" : "c:objc(cs)VNGeneratePersonSegmentationRequest"
  },
  "title" : "VNGeneratePersonSegmentationRequest"
}
-->

# VNGeneratePersonSegmentationRequest

An object that produces a matte image for a person it finds in the input image.

```
class VNGeneratePersonSegmentationRequest
```

## Overview

Perform this request to detect and generate an image mask for a person in an image. The request returns the resulting image mask in an instance of [`VNPixelBufferObservation`](/documentation/Vision/VNPixelBufferObservation).

## Topics

### Creating a Request

[`init()`](/documentation/Vision/VNGeneratePersonSegmentationRequest/init())

Creates a generate person segmentation request.

[`init(completionHandler:)`](/documentation/Vision/VNGeneratePersonSegmentationRequest/init(completionHandler:))

Creates a generate person segmentation request with a completion handler.

[`new`](/documentation/Vision/VNGeneratePersonSegmentationRequest/new)

Returns a new generate person segmentation request.

### Configuring the Request

[`outputPixelFormat`](/documentation/Vision/VNGeneratePersonSegmentationRequest/outputPixelFormat)

The pixel format of the output image.

[`qualityLevel`](/documentation/Vision/VNGeneratePersonSegmentationRequest/qualityLevel-swift.property)

A value that indicates how the request balances accuracy and performance.

[`VNGeneratePersonSegmentationRequest.QualityLevel`](/documentation/Vision/VNGeneratePersonSegmentationRequest/QualityLevel-swift.enum)

Constants that define the levels of quality for a person segmentation request.

### Getting the supported output pixel formats

[`supportedOutputPixelFormats()`](/documentation/Vision/VNGeneratePersonSegmentationRequest/supportedOutputPixelFormats())

Returns a list of output pixel formats that the request supports.

### Accessing the Results

[`results`](/documentation/Vision/VNGeneratePersonSegmentationRequest/results)

The results of the segmentation request.

[`VNPixelBufferObservation`](/documentation/Vision/VNPixelBufferObservation)

An object that represents an image that an image-analysis request produces.

### Identifying Request Revisions

[`VNGeneratePersonSegmentationRequestRevision1`](/documentation/Vision/VNGeneratePersonSegmentationRequestRevision1)

A constant for specifying revision 1 of the person segmentation generation request.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)