UserIdentification
@objc(VerIDUserIdentification)
public class UserIdentification : NSObject
Identify users in an image
Since
1.9.0-
Ver-ID environment
Since
1.9.0Declaration
Swift
@objc public let verid: VerID
-
Constructor
Since
1.9.0Declaration
Swift
@objc public init(verid: VerID)
Parameters
verid
Ver-ID environment
-
Identify users in a face
Since
1.9.0Note
The method must be run on a background thread to prevent your application’s UI from locking up. If you want to dispatch the call on the main (UI) thread consider using the asynchronous alternativeidentifyUsersInFace(_:progress:completion:)
Declaration
Swift
@objc public func identifyUsersInFace(_ face: Recognizable) throws -> [String : Float]
Parameters
face
Face in which to identify users
Return Value
Dictionary with IDs of identified users and the score of the match
-
Identify users in a face
Note
This is an asynchronous version ofidentifyUsersInFace(_:)
Since
2.3.0Declaration
Swift
public func identifyUsersInFace(_ face: Recognizable, progress: Progress? = nil, completion: @escaping (Result<[String : Float], Error>) -> Void)
Parameters
face
Face in which to identify users
progress
Progress callback
completion
Completion callback
-
Find faces that are similar to a challenge face
Since
2.0.0Note
The method must be run on a background thread to prevent your application’s UI from locking up. If you want to dispatch the call on the main (UI) thread consider using the asynchronous alternativefindFacesSimilarTo(_:in:threshold:progress:completion:)
Declaration
Swift
@objc public func findFacesSimilarTo(_ face: Recognizable, in faces: [Recognizable], threshold: NSNumber? = nil) throws -> [FaceWithScore]
Parameters
face
Challenge face
faces
Faces among which to look to find matches
threshold
Similarity score threshold
Return Value
Array of matching faces and their scores
-
Find faces that are similar to a challenge face
Since
2.0.0Declaration
Swift
public func findFacesSimilarTo(_ face: Recognizable, in faces: [Recognizable], threshold: Float? = nil, progress: Progress? = nil, completion: @escaping (Result<[FaceWithScore], Error>) -> Void)
Parameters
face
Challenge face
faces
Faces among which to look to find matches
threshold
Similarity score threshold
progress
Progress callback
completion
Completion callback