start_face_search
async
¶
start_face_search(
video: Video,
collection_id: CollectionId,
*,
config_overrides: Optional[AsyncRekognitionClientConfig] = None,
client_request_token: Optional[ClientRequestToken] = None,
face_match_threshold: Optional[Percent] = None,
notification_channel: Optional[NotificationChannel] = None,
job_tag: Optional[JobTag] = None,
) -> StartFaceSearchResponse
Starts the asynchronous search for faces in a collection that match the faces of persons detected in a stored video.
The video must be stored in an Amazon S3 bucket. Use Video to specify the bucket name and the filename of the video. StartFaceSearch returns a job identifier (JobId) which you use to get the search results once the search has completed. When searching is finished, Amazon Rekognition Video publishes a completion status to the Amazon Simple Notification Service topic that you specify in NotificationChannel. To get the search results, first check that the status value published to the Amazon SNS topic is SUCCEEDED. If so, call GetFaceSearch and pass the job identifier (JobId) from the initial call to StartFaceSearch. For more information, see Searching stored videos for faces.
Parameters:
-
video(Video) –The video you want to search. The video must be stored in an Amazon S3 bucket.
-
client_request_token(Optional[ClientRequestToken], default:None) –Idempotent token used to identify the start request. If you use the same token with multiple
StartFaceSearchrequests, the sameJobIdis returned. UseClientRequestTokento prevent the same job from being accidently started more than once. -
face_match_threshold(Optional[Percent], default:None) –The minimum confidence in the person match to return. For example, don't return any matches where confidence in matches is less than 70%. The default value is 80%.
-
collection_id(CollectionId) –ID of the collection that contains the faces you want to search for.
-
notification_channel(Optional[NotificationChannel], default:None) –The ARN of the Amazon SNS topic to which you want Amazon Rekognition Video to publish the completion status of the search. The Amazon SNS topic must have a topic name that begins with AmazonRekognition if you are using the AmazonRekognitionServiceRole permissions policy to access the topic.
-
job_tag(Optional[JobTag], default:None) –An identifier you specify that's returned in the completion notification that's published to your Amazon Simple Notification Service topic. For example, you can use
JobTagto group related jobs and identify them in the completion notification.
Raises:
-
AccessDeniedException–You are not authorized to perform the action.
-
IdempotentParameterMismatchException–A
ClientRequestTokeninput parameter was reused with an operation, but at least one of the other input parameters is different from the previous call to the operation. -
InternalServerError–Amazon Rekognition experienced a service issue. Try your call again.
-
InvalidParameterException–Input parameter violated a constraint. Validate your parameter before calling the API operation again.
-
InvalidS3ObjectException–Amazon Rekognition is unable to access the S3 object specified in the request.
-
LimitExceededException–An Amazon Rekognition service limit was exceeded. For example, if you start too many jobs concurrently, subsequent calls to start operations (ex:
StartLabelDetection) will raise aLimitExceededExceptionexception (HTTP status code: 400) until the number of concurrently running jobs is below the Amazon Rekognition service limit. -
ProvisionedThroughputExceededException–The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition.
-
ResourceNotFoundException–The resource specified in the request cannot be found.
-
ThrottlingException–Amazon Rekognition is temporarily unable to process the request. Try your call again.
-
VideoTooLargeException–The file size or duration of the supplied media is too large. The maximum file size is 10GB. The maximum duration is 6 hours.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_rekognition/_services/async_rekognition.py
5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 | |