rekognition searsh users by id not works

1

AWS Rekognition search users by user id service does not find data for an existing user, only found with face-id parameter. Whats is bad in my request?

List Users rekognition list-users --collection-id KLPNOQFXDTUC { "Users": [ { "UserId": "robert", "UserStatus": "CREATED" }, { "UserId": "elizabeth", "UserStatus": "ACTIVE" }, { "UserId": "gwyneth", "UserStatus": "CREATED" }, { "UserId": "pratt", "UserStatus": "CREATED" }, { "UserId": "evans", "UserStatus": "ACTIVE" }, { "UserId": "scarlett", "UserStatus": "CREATED" } ] }

Search with user-id rekognition search-users --collection-id KLPNOQFXDTUC --user-id elizabeth { "UserMatches": [], "FaceModelVersion": "7", "SearchedUser": { "UserId": "elizabeth" } }

With face-id rekognition search-users --collection-id KLPNOQFXDTUC --face-id "136917e1-d74d-4832-bd85-cd0d0a398d27" { "UserMatches": [ { "Similarity": 99.99994659423828, "User": { "UserId": "elizabeth", "UserStatus": "ACTIVE" } } ], "FaceModelVersion": "7", "SearchedFace": { "FaceId": "136917e1-d74d-4832-bd85-cd0d0a398d27" } }

1 Answer
2
Accepted Answer

Hi Daniel,

This is expected, as in SearchUser operation, the input user itself would be excluded from the search response. The user is not excluded in the response when using SearchFaces as Face and User are different entities. If you want to test out the search performance for this operation, you can create two users that associated with the faces of the same person, e.g. "elizabeth1", "elizabeth2". If you then call SearchUser with "elizabeth1", only "elizabeth2" will be in the response.

AWS
answered 3 months ago
profile picture
EXPERT
reviewed a month ago
  • hanks for the reply!

    I'm confused, so if it returns the searched user ID within the "SearchedUser" attribute, does the user exist? It seems counterintuitive, especially when searching for a user ID that does not exist, the service returns an error of type "InvalidParameterException", when it should be "ResourceNotFoundException", in my opinion.

    aws-particulares rekognition search-users --collection-id KLPNOQFXDTUC --user-id carlos An error occurred (InvalidParameterException) when calling the SearchUsers operation: Request has invalid parameters

    In short, I think there is an opportunity for improvement here, but since I am not an AWS engineer, I better sleep with the doubt. I'm going to adapt my application to be compatible with these API responses

  • I came here to ask the same question, and I agree with Daniel's comment above. I want my application to verify that the user exists in rekognition before attempting to perform operations that involve that user. So for now, if this is the expected behavior, I will assume the user has been created unless it throws an exception.

  • Sorry if my past answer was ambiguous, let me clarify:

    There are three key fields in the SearchUser response: "SearchedUser", "SearchedFace", and "UserMatches".

    • If User id or Face id does not exist, then the call would throw an InvalidParameterException exception. We only treat collection as resource, so ResourceNotFoundException is thrown only when a collection is not found.
    • If User id or Face id exist in the collection:
      • When SearchUser with a user id, "SearchedUser" field is always present in the response with the value of input user.
      • When SearchUser with a face id, "SearchedUser" field is always present in the response with the value of input face.
      • When SearchUser with a user id, "UserMatches" returns all the matched users, excluding the input user.
      • When SearchUser with a face id, "UserMatches" returns all the matched users.
  • back to me, so how do I see the details of a specific user in a collection?, such as their status

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions