FaceTemplateUtility
public class FaceTemplateUtility
Utility for comparing and converting Ver-ID face templates
Since
1.0.0-
Default standard deviation value to use at comparison
Since
2.1.0Declaration
Swift
public static let defaultStandardDeviation: Float -
Standard deviation used when comparing face templates
Since
2.1.0Declaration
Swift
private(set) public var standardDeviation: Float
-
Initialize an instance with default settings
Since
2.1.0Declaration
Swift
public static var `default`: FaceTemplateUtility { get } -
Initialize an instance with unit norm (1)
Since
2.1.0Declaration
Swift
public static var withUnitNorm: FaceTemplateUtility { get } -
Initialize an instance with given standard deviation to use when comparing face templates
Since
2.1.0Declaration
Swift
public static func withStandardDeviation(_ standardDeviation: Float) -> FaceTemplateUtilityParameters
standardDeviationStandard deviation
-
Set standard deviation on an instance and return the instance
Since
2.1.0Declaration
Swift
public func setStandardDeviation(_ standardDeviation: Float) -> FaceTemplateUtilityParameters
standardDeviationStandard deviation
-
Compare two face templates
Since
1.0.0Declaration
Swift
public static func compareFaceTemplate(_ template1: String, to template2: String) throws -> FloatParameters
template1First face template
template2Second face template
-
Compare two face templates
Since
1.0.0Declaration
Swift
public static func compareFaceTemplate(_ template1: [Float], to template2: [Float]) -> FloatParameters
template1First face template
template2Second face template
-
Compare two face templates using given norms
Since
1.0.0Declaration
Swift
public static func compareFaceTemplate(_ template1: [Float], withNorm norm1: Float, to template2: [Float], withNorm norm2: Float) -> FloatParameters
template1First face template
norm1First face template norm
template2Second face template
norm2Second face template norm
-
Get norm for face template
Since
1.0.0Declaration
Swift
public static func normForTemplate(_ template: [Float]) -> FloatParameters
templateFace template
-
Compare two face templates
Note
The return value will depend on the value of thestandardDeviationproperty.Since
2.1.0Declaration
Swift
public func compareFaceTemplate(_ template1: FaceTemplateConvertible, to template2: FaceTemplateConvertible) throws -> FloatParameters
template1First face template
template2Second face template
Return Value
Score that indicates similarity between the two templates
-
Compare two face templates
Note
The return value will depend on the value of thestandardDeviationproperty.Since
2.1.0Declaration
Swift
public func compareFaceTemplate(_ template1: [Float], to template2: [Float]) -> FloatParameters
template1First face template
template2Second face template
Return Value
Score that indicates similarity between the two templates
-
Get a norm for the specified face template
Since
2.1.0Declaration
Swift
public func normForFaceTemplate(_ template: FaceTemplateConvertible) throws -> FloatParameters
templateFace template
-
Get a norm for the specified face template
Since
2.1.0Declaration
Swift
public func normForFaceTemplate(_ faceTemplate: [Float]) -> FloatParameters
templateFace template
-
Convert face template to string
Note
As of version 2.1.0 the framework contains aStringextension that conforms toFaceTemplateEncodable, making this function redundant.Since
1.0.0Declaration
Swift
public static func stringFromFaceTemplate(_ template: [Float]) -> StringParameters
templateFace template to be converted
-
Convert string to face template
Note
As of version 2.1.0 the framework contains aStringextension that conforms toFaceTemplateDecodable, making this function redundant.Since
1.0.0Declaration
Swift
public static func faceTemplateFromString(_ string: String) throws -> [Float]Parameters
stringString representing base 64 encoded face template
FaceTemplateUtility Class Reference