public class SearchFacesRequest extends AmazonWebServiceRequest implements java.io.Serializable
For a given input face ID, searches for matching faces in the collection the face belongs to. You get a face ID when you add a face to the collection using the IndexFaces operation. The operation compares the features of the input face with faces in the specified collection.
You can also search faces without indexing faces by using the
SearchFacesByImage
operation.
The operation response returns an array of faces that match, ordered by
similarity score with the highest similarity first. More specifically, it is
an array of metadata for each face match that is found. Along with the
metadata, the response also includes a confidence
value for each
face match, indicating the confidence that the specific face matches the
input face.
For an example, see Searching for a Face Using Its Face ID in the Amazon Rekognition Developer Guide.
This operation requires permissions to perform the
rekognition:SearchFaces
action.
Constructor and Description |
---|
SearchFacesRequest()
Default constructor for SearchFacesRequest object.
|
SearchFacesRequest(java.lang.String collectionId,
java.lang.String faceId)
Constructs a new SearchFacesRequest object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getCollectionId()
ID of the collection the face belongs to.
|
java.lang.String |
getFaceId()
ID of a face to find matches for in the collection.
|
java.lang.Float |
getFaceMatchThreshold()
Optional value specifying the minimum confidence in the face match to
return.
|
java.lang.Integer |
getMaxFaces()
Maximum number of faces to return.
|
int |
hashCode() |
void |
setCollectionId(java.lang.String collectionId)
ID of the collection the face belongs to.
|
void |
setFaceId(java.lang.String faceId)
ID of a face to find matches for in the collection.
|
void |
setFaceMatchThreshold(java.lang.Float faceMatchThreshold)
Optional value specifying the minimum confidence in the face match to
return.
|
void |
setMaxFaces(java.lang.Integer maxFaces)
Maximum number of faces to return.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
SearchFacesRequest |
withCollectionId(java.lang.String collectionId)
ID of the collection the face belongs to.
|
SearchFacesRequest |
withFaceId(java.lang.String faceId)
ID of a face to find matches for in the collection.
|
SearchFacesRequest |
withFaceMatchThreshold(java.lang.Float faceMatchThreshold)
Optional value specifying the minimum confidence in the face match to
return.
|
SearchFacesRequest |
withMaxFaces(java.lang.Integer maxFaces)
Maximum number of faces to return.
|
clone, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public SearchFacesRequest()
public SearchFacesRequest(java.lang.String collectionId, java.lang.String faceId)
collectionId
- ID of the collection the face belongs to.
faceId
- ID of a face to find matches for in the collection.
public java.lang.String getCollectionId()
ID of the collection the face belongs to.
Constraints:
Length: 1 - 255
Pattern: [a-zA-Z0-9_.\-]+
ID of the collection the face belongs to.
public void setCollectionId(java.lang.String collectionId)
ID of the collection the face belongs to.
Constraints:
Length: 1 - 255
Pattern: [a-zA-Z0-9_.\-]+
collectionId
- ID of the collection the face belongs to.
public SearchFacesRequest withCollectionId(java.lang.String collectionId)
ID of the collection the face belongs to.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 255
Pattern: [a-zA-Z0-9_.\-]+
collectionId
- ID of the collection the face belongs to.
public java.lang.String getFaceId()
ID of a face to find matches for in the collection.
Constraints:
Pattern:
[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}
ID of a face to find matches for in the collection.
public void setFaceId(java.lang.String faceId)
ID of a face to find matches for in the collection.
Constraints:
Pattern:
[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}
faceId
- ID of a face to find matches for in the collection.
public SearchFacesRequest withFaceId(java.lang.String faceId)
ID of a face to find matches for in the collection.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Pattern:
[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}
faceId
- ID of a face to find matches for in the collection.
public java.lang.Integer getMaxFaces()
Maximum number of faces to return. The operation returns the maximum number of faces with the highest confidence in the match.
Constraints:
Range: 1 - 4096
Maximum number of faces to return. The operation returns the maximum number of faces with the highest confidence in the match.
public void setMaxFaces(java.lang.Integer maxFaces)
Maximum number of faces to return. The operation returns the maximum number of faces with the highest confidence in the match.
Constraints:
Range: 1 - 4096
maxFaces
- Maximum number of faces to return. The operation returns the maximum number of faces with the highest confidence in the match.
public SearchFacesRequest withMaxFaces(java.lang.Integer maxFaces)
Maximum number of faces to return. The operation returns the maximum number of faces with the highest confidence in the match.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Range: 1 - 4096
maxFaces
- Maximum number of faces to return. The operation returns the maximum number of faces with the highest confidence in the match.
public java.lang.Float getFaceMatchThreshold()
Optional value specifying the minimum confidence in the face match to return. For example, don't return any matches where confidence in matches is less than 70%. The default value is 80%.
Constraints:
Length: 0 - 100
Optional value specifying the minimum confidence in the face match to return. For example, don't return any matches where confidence in matches is less than 70%. The default value is 80%.
public void setFaceMatchThreshold(java.lang.Float faceMatchThreshold)
Optional value specifying the minimum confidence in the face match to return. For example, don't return any matches where confidence in matches is less than 70%. The default value is 80%.
Constraints:
Length: 0 - 100
faceMatchThreshold
- Optional value specifying the minimum confidence in the face match to return. For example, don't return any matches where confidence in matches is less than 70%. The default value is 80%.
public SearchFacesRequest withFaceMatchThreshold(java.lang.Float faceMatchThreshold)
Optional value specifying the minimum confidence in the face match to return. For example, don't return any matches where confidence in matches is less than 70%. The default value is 80%.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 0 - 100
faceMatchThreshold
- Optional value specifying the minimum confidence in the face match to return. For example, don't return any matches where confidence in matches is less than 70%. The default value is 80%.
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.