start_face_search
¶
start_face_search(
video: Video,
collection_id: CollectionId,
*,
config_overrides: Optional[RekognitionClientConfig] = 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/rekognition.py
4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 | |