Amazon Rekognition¶
Description¶
This is the API Reference for Amazon Rekognition Image, Amazon Rekognition Bulk Image Analysis, Amazon Rekognition Custom Labels, Amazon Rekognition Stored Video, Amazon Rekognition Face Liveness, Amazon Rekognition Streaming Video. It provides descriptions of actions, data types, common parameters, and common errors.
Amazon Rekognition Image
associate_faces compare_faces create_collection create_user delete_collection delete_faces delete_user describe_collection detect_faces detect_labels detect_moderation_labels detect_protective_equipment detect_text disassociate_faces get_celebrity_info index_faces list_collections list_faces list_users recognize_celebrities search_faces search_faces_by_image search_users search_users_by_image
Amazon Rekognition Bulk Image Analysis
get_media_analysis_job ListMediaAnalysisJob start_media_analysis_job
Amazon Rekognition Custom Labels
copy_project_version create_dataset create_project create_project_version delete_dataset delete_project delete_project_policy delete_project_version describe_dataset describe_projects describe_project_versions detect_custom_labels distribute_dataset_entries list_dataset_entries list_dataset_labels list_project_policies put_project_policy start_project_version stop_project_version update_dataset_entries
Amazon Rekognition Stored Video
get_celebrity_recognition get_content_moderation get_face_detection get_face_search get_label_detection get_person_tracking get_segment_detection get_text_detection start_celebrity_recognition start_content_moderation start_face_detection start_face_search start_label_detection start_person_tracking start_segment_detection start_text_detection
Amazon Rekognition Face Liveness
create_face_liveness_session get_face_liveness_session_results StartFaceLivenessSession
Amazon Rekognition Streaming Video
create_stream_processor delete_stream_processor describe_stream_processor list_stream_processors start_stream_processor stop_stream_processor update_stream_processor
Usage¶
Arguments¶
-
configOptional configuration of credentials, endpoint, and/or region.
- credentials:
- creds:
- access_key_id: AWS access key ID
- secret_access_key: AWS secret access key
- session_token: AWS temporary session token
- profile: The name of a profile to use. If not given, then the default profile is used.
- anonymous: Set anonymous credentials.
- creds:
- endpoint: The complete URL to use for the constructed client.
- region: The AWS Region used in instantiating the client.
- close_connection: Immediately close all HTTP connections.
- timeout: The time in seconds till a timeout exception is thrown when attempting to make a connection. The default is 60 seconds.
- s3_force_path_style: Set this to
trueto force the request to use path-style addressing, i.e.http://s3.amazonaws.com/BUCKET/KEY. - sts_regional_endpoint: Set sts regional endpoint resolver to regional or legacy https://docs.aws.amazon.com/sdkref/latest/guide/feature-sts-regionalized-endpoints.html
- use_dual_stack: Set this to
trueto use the dualstack (IPv4 and IPv6) endpoint for a service, where available, falling back to the regular endpoint when it isn't. Defaults to theAWS_USE_DUALSTACK_ENDPOINTenvironment variable when unset.
- credentials:
-
credentialsOptional credentials shorthand for the config parameter
- creds:
- access_key_id: AWS access key ID
- secret_access_key: AWS secret access key
- session_token: AWS temporary session token
- profile: The name of a profile to use. If not given, then the default profile is used.
- anonymous: Set anonymous credentials.
- creds:
-
endpointOptional shorthand for complete URL to use for the constructed client.
-
regionOptional shorthand for AWS Region used in instantiating the client.
Value¶
A client for the service. You can call the service's operations using syntax like svc$operation(...), where svc is the name you've assigned to the client. The available operations are listed in the Operations section.
Service syntax¶
svc <- rekognition(
config = list(
credentials = list(
creds = list(
access_key_id = "string",
secret_access_key = "string",
session_token = "string"
),
profile = "string",
anonymous = "logical"
),
endpoint = "string",
region = "string",
close_connection = "logical",
timeout = "numeric",
s3_force_path_style = "logical",
sts_regional_endpoint = "string",
use_dual_stack = "logical"
),
credentials = list(
creds = list(
access_key_id = "string",
secret_access_key = "string",
session_token = "string"
),
profile = "string",
anonymous = "logical"
),
endpoint = "string",
region = "string"
)
Operations¶
associate_faces |
Associates one or more faces with an existing UserID |
|---|---|
compare_faces |
Compares a face in the source input image with each of the 100 largest faces detected in the target input image |
copy_project_version |
This operation applies only to Amazon Rekognition Custom Labels |
create_collection |
Creates a collection in an AWS Region |
create_dataset |
This operation applies only to Amazon Rekognition Custom Labels |
create_face_liveness_session |
This API operation initiates a Face Liveness session |
create_project |
Creates a new Amazon Rekognition project |
create_project_version |
Creates a new version of Amazon Rekognition project (like a Custom Labels model or a custom adapter) and begins training |
create_stream_processor |
Service availability notice: Streaming Video and Bulk Image Analysis is no longer available to new customers |
create_user |
Creates a new User within a collection specified by CollectionId |
delete_collection |
Deletes the specified collection |
delete_dataset |
This operation applies only to Amazon Rekognition Custom Labels |
delete_faces |
Deletes faces from a collection |
delete_project |
Deletes a Amazon Rekognition project |
delete_project_policy |
This operation applies only to Amazon Rekognition Custom Labels |
delete_project_version |
Deletes a Rekognition project model or project version, like a Amazon Rekognition Custom Labels model or a custom adapter |
delete_stream_processor |
Service availability notice: Streaming Video and Bulk Image Analysis is no longer available to new customers |
delete_user |
Deletes the specified UserID within the collection |
describe_collection |
Describes the specified collection |
describe_dataset |
This operation applies only to Amazon Rekognition Custom Labels |
describe_projects |
Gets information about your Rekognition projects |
describe_project_versions |
Lists and describes the versions of an Amazon Rekognition project |
describe_stream_processor |
Service availability notice: Streaming Video and Bulk Image Analysis is no longer available to new customers |
detect_custom_labels |
This operation applies only to Amazon Rekognition Custom Labels |
detect_faces |
Detects faces within an image that is provided as input |
detect_labels |
Detects instances of real-world entities within an image (JPEG or PNG) provided as input |
detect_moderation_labels |
Detects unsafe content in a specified JPEG or PNG format image |
detect_protective_equipment |
Detects Personal Protective Equipment (PPE) worn by people detected in an image |
detect_text |
Detects text in the input image and converts it into machine-readable text |
disassociate_faces |
Removes the association between a Face supplied in an array of FaceIds and the User |
distribute_dataset_entries |
This operation applies only to Amazon Rekognition Custom Labels |
get_celebrity_info |
Gets the name and additional information about a celebrity based on their Amazon Rekognition ID |
get_celebrity_recognition |
Gets the celebrity recognition results for a Amazon Rekognition Video analysis started by StartCelebrityRecognition |
get_content_moderation |
Gets the inappropriate, unwanted, or offensive content analysis results for a Amazon Rekognition Video analysis started by StartContentModeration |
get_face_detection |
Gets face detection results for a Amazon Rekognition Video analysis started by StartFaceDetection |
get_face_liveness_session_results |
Retrieves the results of a specific Face Liveness session |
get_face_search |
Gets the face search results for Amazon Rekognition Video face search started by StartFaceSearch |
get_label_detection |
Gets the label detection results of a Amazon Rekognition Video analysis started by StartLabelDetection |
get_media_analysis_job |
Service availability notice: Streaming Video and Bulk Image Analysis is no longer available to new customers |
get_person_tracking |
End of support notice: On October 31, 2025, AWS will discontinue support for Amazon Rekognition People Pathing |
get_segment_detection |
Gets the segment detection results of a Amazon Rekognition Video analysis started by StartSegmentDetection |
get_text_detection |
Gets the text detection results of a Amazon Rekognition Video analysis started by StartTextDetection |
index_faces |
Detects faces in the input image and adds them to the specified collection |
list_collections |
Returns list of collection IDs in your account |
list_dataset_entries |
This operation applies only to Amazon Rekognition Custom Labels |
list_dataset_labels |
This operation applies only to Amazon Rekognition Custom Labels |
list_faces |
Returns metadata for faces in the specified collection |
list_media_analysis_jobs |
Service availability notice: Streaming Video and Bulk Image Analysis is no longer available to new customers |
list_project_policies |
This operation applies only to Amazon Rekognition Custom Labels |
list_stream_processors |
Service availability notice: Streaming Video and Bulk Image Analysis is no longer available to new customers |
list_tags_for_resource |
Returns a list of tags in an Amazon Rekognition collection, stream processor, or Custom Labels model |
list_users |
Returns metadata of the User such as UserID in the specified collection |
put_project_policy |
This operation applies only to Amazon Rekognition Custom Labels |
recognize_celebrities |
Returns an array of celebrities recognized in the input image |
search_faces |
For a given input face ID, searches for matching faces in the collection the face belongs to |
search_faces_by_image |
For a given input image, first detects the largest face in the image, and then searches the specified collection for matching faces |
search_users |
Searches for UserIDs within a collection based on a FaceId or UserId |
search_users_by_image |
Searches for UserIDs using a supplied image |
start_celebrity_recognition |
Starts asynchronous recognition of celebrities in a stored video |
start_content_moderation |
Starts asynchronous detection of inappropriate, unwanted, or offensive content in a stored video |
start_face_detection |
Starts asynchronous detection of faces in a stored video |
start_face_search |
Starts the asynchronous search for faces in a collection that match the faces of persons detected in a stored video |
start_label_detection |
Starts asynchronous detection of labels in a stored video |
start_media_analysis_job |
Service availability notice: Streaming Video and Bulk Image Analysis is no longer available to new customers |
start_person_tracking |
End of support notice: On October 31, 2025, AWS will discontinue support for Amazon Rekognition People Pathing |
start_project_version |
This operation applies only to Amazon Rekognition Custom Labels |
start_segment_detection |
Starts asynchronous detection of segment detection in a stored video |
start_stream_processor |
Service availability notice: Streaming Video and Bulk Image Analysis is no longer available to new customers |
start_text_detection |
Starts asynchronous detection of text in a stored video |
stop_project_version |
This operation applies only to Amazon Rekognition Custom Labels |
stop_stream_processor |
Service availability notice: Streaming Video and Bulk Image Analysis is no longer available to new customers |
tag_resource |
Adds one or more key-value tags to an Amazon Rekognition collection, stream processor, or Custom Labels model |
untag_resource |
Removes one or more tags from an Amazon Rekognition collection, stream processor, or Custom Labels model |
update_dataset_entries |
This operation applies only to Amazon Rekognition Custom Labels |
update_stream_processor |
Service availability notice: Streaming Video and Bulk Image Analysis is no longer available to new customers |
Examples¶
svc <- rekognition()
# This operation compares the largest face detected in the source image
# with each face detected in the target image.
svc$compare_faces(
SimilarityThreshold = 90L,
SourceImage = list(
S3Object = list(
Bucket = "mybucket",
Name = "mysourceimage"
)
),
TargetImage = list(
S3Object = list(
Bucket = "mybucket",
Name = "mytargetimage"
)
)
)