VerIDFaceDetection
@objc
public class VerIDFaceDetection : NSObject, FaceDetection
Ver-ID SDK’s default implementation of the FaceDetection
protocol
-
Face template extraction (for face recognition) will only be run if the detected face’s quality meets this threshold
Declaration
Swift
@objc public var faceExtractQualityThreshold: Float { get set }
-
Full face detection (slower) will be run if the detected face quality falls below this threshold when tracking a face in a sequence of images
Declaration
Swift
@objc public var landmarkTrackingQualityThreshold: Float { get set }
-
Core C++ library wrapper
Declaration
Swift
@objc public let detRecLib: DetRecLib
-
Image processors used to prepare images for face detection
Since
1.6.0Declaration
Swift
@objc public var imageProcessors: [ImageProcessorService]
-
Detect faces in image
Note
UseFaceRecognition.createRecognizableFacesFromFaces(_:inImage:)
to use the faces for face recognitionThrows
Error if the detection failsDeclaration
Swift
public func detectFacesInImage(_ image: ImageProvider, limit: Int32, options: UInt) throws -> [Face]
Parameters
image
Image in which to detect faces
limit
Maximum number of faces to detect
options
Option flags (unused in this version)
Return Value
Array of detected faces
-
Start face tracking
Declaration
Swift
public func startFaceTracking() -> FaceTracking
Return Value
Face tracking session
-
Extract an attribute from face
Throws
Exception if the extraction failsNote
The SDK comes with face covering classifier. To specify this classifier set the classifier argument toClassifier.faceCovering.name
. Other classifiers must be added to theVerIDFaceDetectionRecognitionFactory
before creatingVerID
usingVerIDFactory
.Since
2.2.0Declaration
Swift
@objc public func extractAttributeFromFace(_ face: Face, image: ImageProvider, using classifier: String) throws -> NSNumber
Parameters
face
Face from which to extract the attribute
image
Image in which the face was detected
classifier
Classifier to use for extracting the attribute (see note below)
Return Value
NSNumber containing a score float with value between from 0–1
-
Return an array of available face attribute classifiers
Since
2.2.0Declaration
Swift
@objc public lazy var faceAttributeClassifiers: [String] { get set }