Skip to content

Search Users By Image

rekognition_search_users_by_image R Documentation

Searches for UserIDs using a supplied image

Description

Searches for UserIDs using a supplied image. It first detects the largest face in the image, and then searches a specified collection for matching UserIDs.

The operation returns an array of UserIDs that match the face in the supplied image, ordered by similarity score with the highest similarity first. It also returns a bounding box for the face found in the input image.

Information about faces detected in the supplied image, but not used for the search, is returned in an array of UnsearchedFace objects. If no valid face is detected in the image, the response will contain an empty UserMatches list and no SearchedFace object.

Usage

rekognition_search_users_by_image(CollectionId, Image,
  UserMatchThreshold, MaxUsers, QualityFilter)

Arguments

CollectionId

[required] The ID of an existing collection containing the UserID.

Image

[required]

UserMatchThreshold

Specifies the minimum confidence in the UserID match to return. Default value is 80.

MaxUsers

Maximum number of UserIDs to return.

QualityFilter

A filter that specifies a quality bar for how much filtering is done to identify faces. Filtered faces aren't searched for in the collection. The default value is NONE.

Value

A list with the following syntax:

list(
  UserMatches = list(
    list(
      Similarity = 123.0,
      User = list(
        UserId = "string",
        UserStatus = "ACTIVE"|"UPDATING"|"CREATING"|"CREATED"
      )
    )
  ),
  FaceModelVersion = "string",
  SearchedFace = list(
    FaceDetail = list(
      BoundingBox = list(
        Width = 123.0,
        Height = 123.0,
        Left = 123.0,
        Top = 123.0
      ),
      AgeRange = list(
        Low = 123,
        High = 123
      ),
      Smile = list(
        Value = TRUE|FALSE,
        Confidence = 123.0
      ),
      Eyeglasses = list(
        Value = TRUE|FALSE,
        Confidence = 123.0
      ),
      Sunglasses = list(
        Value = TRUE|FALSE,
        Confidence = 123.0
      ),
      Gender = list(
        Value = "Male"|"Female",
        Confidence = 123.0
      ),
      Beard = list(
        Value = TRUE|FALSE,
        Confidence = 123.0
      ),
      Mustache = list(
        Value = TRUE|FALSE,
        Confidence = 123.0
      ),
      EyesOpen = list(
        Value = TRUE|FALSE,
        Confidence = 123.0
      ),
      MouthOpen = list(
        Value = TRUE|FALSE,
        Confidence = 123.0
      ),
      Emotions = list(
        list(
          Type = "HAPPY"|"SAD"|"ANGRY"|"CONFUSED"|"DISGUSTED"|"SURPRISED"|"CALM"|"UNKNOWN"|"FEAR",
          Confidence = 123.0
        )
      ),
      Landmarks = list(
        list(
          Type = "eyeLeft"|"eyeRight"|"nose"|"mouthLeft"|"mouthRight"|"leftEyeBrowLeft"|"leftEyeBrowRight"|"leftEyeBrowUp"|"rightEyeBrowLeft"|"rightEyeBrowRight"|"rightEyeBrowUp"|"leftEyeLeft"|"leftEyeRight"|"leftEyeUp"|"leftEyeDown"|"rightEyeLeft"|"rightEyeRight"|"rightEyeUp"|"rightEyeDown"|"noseLeft"|"noseRight"|"mouthUp"|"mouthDown"|"leftPupil"|"rightPupil"|"upperJawlineLeft"|"midJawlineLeft"|"chinBottom"|"midJawlineRight"|"upperJawlineRight",
          X = 123.0,
          Y = 123.0
        )
      ),
      Pose = list(
        Roll = 123.0,
        Yaw = 123.0,
        Pitch = 123.0
      ),
      Quality = list(
        Brightness = 123.0,
        Sharpness = 123.0
      ),
      Confidence = 123.0,
      FaceOccluded = list(
        Value = TRUE|FALSE,
        Confidence = 123.0
      ),
      EyeDirection = list(
        Yaw = 123.0,
        Pitch = 123.0,
        Confidence = 123.0
      )
    )
  ),
  UnsearchedFaces = list(
    list(
      FaceDetails = list(
        BoundingBox = list(
          Width = 123.0,
          Height = 123.0,
          Left = 123.0,
          Top = 123.0
        ),
        AgeRange = list(
          Low = 123,
          High = 123
        ),
        Smile = list(
          Value = TRUE|FALSE,
          Confidence = 123.0
        ),
        Eyeglasses = list(
          Value = TRUE|FALSE,
          Confidence = 123.0
        ),
        Sunglasses = list(
          Value = TRUE|FALSE,
          Confidence = 123.0
        ),
        Gender = list(
          Value = "Male"|"Female",
          Confidence = 123.0
        ),
        Beard = list(
          Value = TRUE|FALSE,
          Confidence = 123.0
        ),
        Mustache = list(
          Value = TRUE|FALSE,
          Confidence = 123.0
        ),
        EyesOpen = list(
          Value = TRUE|FALSE,
          Confidence = 123.0
        ),
        MouthOpen = list(
          Value = TRUE|FALSE,
          Confidence = 123.0
        ),
        Emotions = list(
          list(
            Type = "HAPPY"|"SAD"|"ANGRY"|"CONFUSED"|"DISGUSTED"|"SURPRISED"|"CALM"|"UNKNOWN"|"FEAR",
            Confidence = 123.0
          )
        ),
        Landmarks = list(
          list(
            Type = "eyeLeft"|"eyeRight"|"nose"|"mouthLeft"|"mouthRight"|"leftEyeBrowLeft"|"leftEyeBrowRight"|"leftEyeBrowUp"|"rightEyeBrowLeft"|"rightEyeBrowRight"|"rightEyeBrowUp"|"leftEyeLeft"|"leftEyeRight"|"leftEyeUp"|"leftEyeDown"|"rightEyeLeft"|"rightEyeRight"|"rightEyeUp"|"rightEyeDown"|"noseLeft"|"noseRight"|"mouthUp"|"mouthDown"|"leftPupil"|"rightPupil"|"upperJawlineLeft"|"midJawlineLeft"|"chinBottom"|"midJawlineRight"|"upperJawlineRight",
            X = 123.0,
            Y = 123.0
          )
        ),
        Pose = list(
          Roll = 123.0,
          Yaw = 123.0,
          Pitch = 123.0
        ),
        Quality = list(
          Brightness = 123.0,
          Sharpness = 123.0
        ),
        Confidence = 123.0,
        FaceOccluded = list(
          Value = TRUE|FALSE,
          Confidence = 123.0
        ),
        EyeDirection = list(
          Yaw = 123.0,
          Pitch = 123.0,
          Confidence = 123.0
        )
      ),
      Reasons = list(
        "FACE_NOT_LARGEST"|"EXCEEDS_MAX_FACES"|"EXTREME_POSE"|"LOW_BRIGHTNESS"|"LOW_SHARPNESS"|"LOW_CONFIDENCE"|"SMALL_BOUNDING_BOX"|"LOW_FACE_QUALITY"
      )
    )
  )
)

Request syntax

svc$search_users_by_image(
  CollectionId = "string",
  Image = list(
    Bytes = raw,
    S3Object = list(
      Bucket = "string",
      Name = "string",
      Version = "string"
    )
  ),
  UserMatchThreshold = 123.0,
  MaxUsers = 123,
  QualityFilter = "NONE"|"AUTO"|"LOW"|"MEDIUM"|"HIGH"
)

Examples

## Not run: 
# Searches for UserIDs using a supplied image.
svc$search_users_by_image(
  CollectionId = "MyCollection",
  Image = list(
    S3Object = list(
      Bucket = "bucket",
      Name = "input.jpg"
    )
  ),
  MaxUsers = 2L,
  QualityFilter = "MEDIUM",
  UserMatchThreshold = 70L
)

## End(Not run)