Face or facial-feature information detected by an image analysis request.


class VNFaceObservation : VNDetectedObjectObservation


This type of observation results from a VNDetectFaceRectanglesRequest. It contains information about facial landmarks and regions found in the image.


Creating an Observation

init(requestRevision: Int, boundingBox: CGRect, roll: NSNumber?, yaw: NSNumber?)

Creates a face observation with the given revision number, bounding box, roll, and yaw.

Finding Face Landmarks

var landmarks: VNFaceLandmarks2D?

The facial features found in the detected face.

class VNFaceLandmarks2D

A collection of all facial features detected in a face observation, with 2D geometry information for each.

class VNFaceLandmarkRegion2D

2D geometry information for a specific facial feature.

class VNFaceLandmarks

The abstract superclass for containers of face landmark information.

class VNFaceLandmarkRegion

The abstract superclass for information about a specific face landmark.

Determining Facial Orientation

var roll: NSNumber?

The detected face's roll angle, as populated by the VNDetectFaceRectanglesRequest.

var yaw: NSNumber?

The detected face's yaw angle, as populated by the VNDetectFaceRectanglesRequest.

Determining Capture Quality

var faceCaptureQuality: Float?

The capture quality of the face, normalized between 0.0 and 1.0.

class VNDetectFaceCaptureQualityRequest

A request that produces a floating-point number representing the capture quality of a given face in a photo.


Conforms To

See Also

Face and Body Detection

Selecting a Selfie Based on Capture Quality

Compare face capture quality in a set of images using Vision.

class VNDetectFaceRectanglesRequest

An image analysis request that finds faces within an image.

class VNDetectFaceLandmarksRequest

An image analysis request that finds facial features (such as the eyes and mouth) in an image.

class VNDetectHumanRectanglesRequest

An image analysis request that finds rectangular regions containing humans in an image.