VisionFaceDetectorOptions
class VisionFaceDetectorOptions : NSObject
Options for specifying a face detector.
-
The face detector classification mode for characterizing attributes such as smiling. Defaults to
.none
.Declaration
Swift
var classificationMode: VisionFaceDetectorClassificationMode { get set }
-
The face detector performance mode that determines the accuracy of the results and the speed of the detection. Defaults to
.fast
.Declaration
Swift
var performanceMode: VisionFaceDetectorPerformanceMode { get set }
-
The face detector landmark mode that determines the type of landmark results returned by detection. Defaults to
.none
.Declaration
Swift
var landmarkMode: VisionFaceDetectorLandmarkMode { get set }
-
The face detector contour mode that determines the type of contour results returned by detection. Defaults to
.none
.The following detection results are returned when setting this mode to
.all
:performanceMode
set to.fast
, and bothclassificationMode
andlandmarkMode
set to.none
, then only the prominent face will be returned with detected contours.performanceMode
set to.accurate
, or ifclassificationMode
orlandmarkMode
is set to.all
, then all detected faces will be returned, but only the prominent face will have detecteted contours.Declaration
Swift
var contourMode: VisionFaceDetectorContourMode { get set }
-
The smallest desired face size. The size is expressed as a proportion of the width of the head to the image width. For example, if a value of 0.1 is specified, then the smallest face to search for is roughly 10% of the width of the image being searched. Defaults to 0.1. This option does not apply to contour detection.
Declaration
Swift
var minFaceSize: CGFloat { get set }
-
Whether the face tracking feature is enabled for face detection. Defaults to NO. When
performanceMode
is set to.fast
, and bothclassificationMode
andlandmarkMode
set to.none
, this option will be ignored and tracking will be disabled.Declaration
Swift
var isTrackingEnabled: Bool { get set }