searchUsers
inline suspend fun RekognitionClient.searchUsers(crossinline block: SearchUsersRequest.Builder.() -> Unit): SearchUsersResponse
Searches for UserIDs within a collection based on a FaceId
or UserId
. This API can be used to find the closest UserID (with a highest similarity) to associate a face. The request must be provided with either FaceId
or UserId
. The operation returns an array of UserID that match the FaceId
or UserId
, ordered by similarity score with the highest similarity first.
Samples
fun main() {
//sampleStart
// Searches for UserIDs within a collection based on a FaceId or UserId.
val resp = rekognitionClient.searchUsers {
collectionId = "MyCollection"
userId = "DemoUser"
maxUsers = 2
userMatchThreshold = 70.toFloat()
}
//sampleEnd
}