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


class VNDetectFaceLandmarksRequest : VNImageBasedRequest


By default, a face landmarks request first locates all faces in the input image, then analyzes each to detect facial features.

If you’ve already located all the faces in an image, or want to detect landmarks in only a subset of the faces in the image, set the inputFaceObservations property to an array of VNFaceObservation objects representing the faces you want to analyze. (You can either use face observations output by a VNDetectFaceRectanglesRequest or manually create VNFaceObservation instances with the bounding boxes of the faces you want to analyze).


Configuring a Face Landmarks Request

protocol VNFaceObservationAccepting

An image analysis request that operates on face observations.

Locating Face Landmarks

var constellation: VNRequestFaceLandmarksConstellation

A variable describing how a face landmarks request orders or enumerates the resulting features.

enum VNRequestFaceLandmarksConstellation

An enumeration of face landmarks in a constellation object.

Versioning Face Landmark Detection

class func revision(Int, supportsConstellation: VNRequestFaceLandmarksConstellation) -> Bool

A Boolean variable that indicates whether the Vision framework supports a given constellation type for a given request revision.

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 VNFaceObservation

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

class VNDetectHumanRectanglesRequest

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