Rekognition class
This is the API Reference for Amazon Rekognition Image, Amazon Rekognition Custom Labels, Amazon Rekognition Stored Video, Amazon Rekognition Streaming Video. It provides descriptions of actions, data types, common parameters, and common errors.
Amazon Rekognition Image
- AssociateFaces
- CompareFaces
- CreateCollection
- CreateUser
- DeleteCollection
- DeleteFaces
- DeleteUser
- DescribeCollection
- DetectFaces
- DetectLabels
- DetectModerationLabels
- DetectProtectiveEquipment
- DetectText
- DisassociateFaces
- GetCelebrityInfo
- GetMediaAnalysisJob
- IndexFaces
- ListCollections
- ListMediaAnalysisJob
- ListFaces
- ListUsers
- RecognizeCelebrities
- SearchFaces
- SearchFacesByImage
- SearchUsers
- SearchUsersByImage
- StartMediaAnalysisJob
- CopyProjectVersion
- CreateDataset
- CreateProject
- CreateProjectVersion
- DeleteDataset
- DeleteProject
- DeleteProjectPolicy
- DeleteProjectVersion
- DescribeDataset
- DescribeProjects
- DescribeProjectVersions
- DetectCustomLabels
- DistributeDatasetEntries
- ListDatasetEntries
- ListDatasetLabels
- ListProjectPolicies
- PutProjectPolicy
- StartProjectVersion
- StopProjectVersion
- UpdateDatasetEntries
- GetCelebrityRecognition
- GetContentModeration
- GetFaceDetection
- GetFaceSearch
- GetLabelDetection
- GetPersonTracking
- GetSegmentDetection
- GetTextDetection
- StartCelebrityRecognition
- StartContentModeration
- StartFaceDetection
- StartFaceSearch
- StartLabelDetection
- StartPersonTracking
- StartSegmentDetection
- StartTextDetection
Constructors
- Rekognition({required String region, AwsClientCredentials? credentials, AwsClientCredentialsProvider? credentialsProvider, Client? client, String? endpointUrl})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
associateFaces(
{required String collectionId, required List< String> faceIds, required String userId, String? clientRequestToken, double? userMatchThreshold}) → Future<AssociateFacesResponse> -
Associates one or more faces with an existing UserID. Takes an array of
FaceIds. EachFaceIdthat are present in theFaceIdslist is associated with the provided UserID. The number of FaceIds that can be used as input in a single request is limited to 100. -
close(
) → void - Closes the internal HTTP client if none was provided at creation. If a client was passed as a constructor argument, this becomes a noop.
-
compareFaces(
{required Image sourceImage, required Image targetImage, QualityFilter? qualityFilter, double? similarityThreshold}) → Future< CompareFacesResponse> - Compares a face in the source input image with each of the 100 largest faces detected in the target input image.
-
copyProjectVersion(
{required String destinationProjectArn, required OutputConfig outputConfig, required String sourceProjectArn, required String sourceProjectVersionArn, required String versionName, String? kmsKeyId, Map< String, String> ? tags}) → Future<CopyProjectVersionResponse> - To copy a model version to a different AWS account, you need to create a resource-based policy known as a project policy. You attach the project policy to the source project by calling PutProjectPolicy. The project policy gives permission to copy the model version from a trusting AWS account to a trusted account.
-
createCollection(
{required String collectionId, Map< String, String> ? tags}) → Future<CreateCollectionResponse> - Creates a collection in an AWS Region. You can add faces to the collection using the IndexFaces operation.
-
createDataset(
{required DatasetType datasetType, required String projectArn, DatasetSource? datasetSource, Map< String, String> ? tags}) → Future<CreateDatasetResponse> -
To create a training dataset for a project, specify
TRAINfor the value ofDatasetType. To create the test dataset for a project, specifyTESTfor the value ofDatasetType. -
createFaceLivenessSession(
{String? clientRequestToken, String? kmsKeyId, CreateFaceLivenessSessionRequestSettings? settings}) → Future< CreateFaceLivenessSessionResponse> -
This API operation initiates a Face Liveness session. It returns a
SessionId, which you can use to start streaming Face Liveness video and get the results for a Face Liveness session. -
createProject(
{required String projectName, ProjectAutoUpdate? autoUpdate, CustomizationFeature? feature, Map< String, String> ? tags}) → Future<CreateProjectResponse> -
Creates a new Amazon Rekognition project. A project is a group of
resources (datasets, model versions) that you use to create and manage a
Amazon Rekognition Custom Labels Model or custom adapter. You can specify
a feature to create the project with, if no feature is specified then
Custom Labels is used by default. For adapters, you can also choose
whether or not to have the project auto update by using the AutoUpdate
argument. This operation requires permissions to perform the
rekognition:CreateProjectaction. -
createProjectVersion(
{required OutputConfig outputConfig, required String projectArn, required String versionName, CustomizationFeatureConfig? featureConfig, String? kmsKeyId, Map< String, String> ? tags, TestingData? testingData, TrainingData? trainingData, String? versionDescription}) → Future<CreateProjectVersionResponse> -
Creates a new version of Amazon Rekognition project (like a Custom Labels
model or a custom adapter) and begins training. Models and adapters are
managed as part of a Rekognition project. The response from
CreateProjectVersionis an Amazon Resource Name (ARN) for the project version. -
createStreamProcessor(
{required StreamProcessorInput input, required String name, required StreamProcessorOutput output, required String roleArn, required StreamProcessorSettings settings, StreamProcessorDataSharingPreference? dataSharingPreference, String? kmsKeyId, StreamProcessorNotificationChannel? notificationChannel, List< RegionOfInterest> ? regionsOfInterest, Map<String, String> ? tags}) → Future<CreateStreamProcessorResponse> - Creates an Amazon Rekognition stream processor that you can use to detect and recognize faces or to detect labels in a streaming video.
-
createUser(
{required String collectionId, required String userId, String? clientRequestToken}) → Future< void> -
Creates a new User within a collection specified by
CollectionId. TakesUserIdas a parameter, which is a user provided ID which should be unique within the collection. The providedUserIdwill alias the system generated UUID to make theUserIdmore user friendly. -
deleteCollection(
{required String collectionId}) → Future< DeleteCollectionResponse> - Deletes the specified collection. Note that this operation removes all faces in the collection. For an example, see Deleting a collection.
-
deleteDataset(
{required String datasetArn}) → Future< void> - DescribeDataset
-
deleteFaces(
{required String collectionId, required List< String> faceIds}) → Future<DeleteFacesResponse> - Deletes faces from a collection. You specify a collection ID and an array of face IDs to remove from the collection.
-
deleteProject(
{required String projectArn}) → Future< DeleteProjectResponse> - Deletes a Amazon Rekognition project. To delete a project you must first delete all models or adapters associated with the project. To delete a model or adapter, see DeleteProjectVersion.
-
deleteProjectPolicy(
{required String policyName, required String projectArn, String? policyRevisionId}) → Future< void> - To get a list of project policies attached to a project, call ListProjectPolicies. To attach a project policy to a project, call PutProjectPolicy.
-
deleteProjectVersion(
{required String projectVersionArn}) → Future< DeleteProjectVersionResponse> - Deletes a Rekognition project model or project version, like a Amazon Rekognition Custom Labels model or a custom adapter.
-
deleteStreamProcessor(
{required String name}) → Future< void> -
Deletes the stream processor identified by
Name. You assign the value forNamewhen you create the stream processor with CreateStreamProcessor. You might not be able to use the same name for a stream processor for a few seconds after callingDeleteStreamProcessor. -
deleteUser(
{required String collectionId, required String userId, String? clientRequestToken}) → Future< void> -
Deletes the specified UserID within the collection. Faces that are
associated with the UserID are disassociated from the UserID before
deleting the specified UserID. If the specified
CollectionorUserIDis already deleted or not found, aResourceNotFoundExceptionwill be thrown. If the action is successful with a 200 response, an empty HTTP body is returned. -
describeCollection(
{required String collectionId}) → Future< DescribeCollectionResponse> -
Describes the specified collection. You can use
DescribeCollectionto get information, such as the number of faces indexed into a collection and the version of the model used by the collection for face detection. -
describeDataset(
{required String datasetArn}) → Future< DescribeDatasetResponse> -
This operation requires permissions to perform the
rekognition:DescribeDatasetaction. -
describeProjects(
{List< CustomizationFeature> ? features, int? maxResults, String? nextToken, List<String> ? projectNames}) → Future<DescribeProjectsResponse> - Gets information about your Rekognition projects.
-
describeProjectVersions(
{required String projectArn, int? maxResults, String? nextToken, List< String> ? versionNames}) → Future<DescribeProjectVersionsResponse> -
Lists and describes the versions of an Amazon Rekognition project. You can
specify up to 10 model or adapter versions in
ProjectVersionArns. If you don't specify a value, descriptions for all model/adapter versions in the project are returned. -
describeStreamProcessor(
{required String name}) → Future< DescribeStreamProcessorResponse> - Provides information about a stream processor created by CreateStreamProcessor. You can get information about the input and output streams, the input parameters for the face recognition being performed, and the current status of the stream processor.
-
detectCustomLabels(
{required Image image, required String projectVersionArn, int? maxResults, double? minConfidence}) → Future< DetectCustomLabelsResponse> -
You specify which version of a model version to use by using the
ProjectVersionArninput parameter. -
detectFaces(
{required Image image, List< Attribute> ? attributes}) → Future<DetectFacesResponse> - Detects faces within an image that is provided as input.
-
detectLabels(
{required Image image, List< DetectLabelsFeatureName> ? features, int? maxLabels, double? minConfidence, DetectLabelsSettings? settings}) → Future<DetectLabelsResponse> - Detects instances of real-world entities within an image (JPEG or PNG) provided as input. This includes objects like flower, tree, and table; events like wedding, graduation, and birthday party; and concepts like landscape, evening, and nature.
-
detectModerationLabels(
{required Image image, HumanLoopConfig? humanLoopConfig, double? minConfidence, String? projectVersion}) → Future< DetectModerationLabelsResponse> -
Detects unsafe content in a specified JPEG or PNG format image. Use
DetectModerationLabelsto moderate images depending on your requirements. For example, you might want to filter images that contain nudity, but not images containing suggestive content. -
detectProtectiveEquipment(
{required Image image, ProtectiveEquipmentSummarizationAttributes? summarizationAttributes}) → Future< DetectProtectiveEquipmentResponse> - Detects Personal Protective Equipment (PPE) worn by people detected in an image. Amazon Rekognition can detect the following types of PPE.
-
detectText(
{required Image image, DetectTextFilters? filters}) → Future< DetectTextResponse> - Detects text in the input image and converts it into machine-readable text.
-
disassociateFaces(
{required String collectionId, required List< String> faceIds, required String userId, String? clientRequestToken}) → Future<DisassociateFacesResponse> -
Removes the association between a
Facesupplied in an array ofFaceIdsand the User. If the User is not present already, then aResourceNotFoundexception is thrown. If successful, an array of faces that are disassociated from the User is returned. If a given face is already disassociated from the given UserID, it will be ignored and not be returned in the response. If a given face is already associated with a different User or not found in the collection it will be returned as part ofUnsuccessfulDisassociations. You can remove 1 - 100 face IDs from a user at one time. -
distributeDatasetEntries(
{required List< DistributeDataset> datasets}) → Future<void> - DistributeDatasetEntries
-
getCelebrityInfo(
{required String id}) → Future< GetCelebrityInfoResponse> - Gets the name and additional information about a celebrity based on their Amazon Rekognition ID. The additional information is returned as an array of URLs. If there is no additional information about the celebrity, this list is empty.
-
getCelebrityRecognition(
{required String jobId, int? maxResults, String? nextToken, CelebrityRecognitionSortBy? sortBy}) → Future< GetCelebrityRecognitionResponse> - Gets the celebrity recognition results for a Amazon Rekognition Video analysis started by StartCelebrityRecognition.
-
getContentModeration(
{required String jobId, ContentModerationAggregateBy? aggregateBy, int? maxResults, String? nextToken, ContentModerationSortBy? sortBy}) → Future< GetContentModerationResponse> - Gets the inappropriate, unwanted, or offensive content analysis results for a Amazon Rekognition Video analysis started by StartContentModeration. For a list of moderation labels in Amazon Rekognition, see Using the image and video moderation APIs.
-
getFaceDetection(
{required String jobId, int? maxResults, String? nextToken}) → Future< GetFaceDetectionResponse> - Gets face detection results for a Amazon Rekognition Video analysis started by StartFaceDetection.
-
getFaceLivenessSessionResults(
{required String sessionId}) → Future< GetFaceLivenessSessionResultsResponse> -
Retrieves the results of a specific Face Liveness session. It requires the
sessionIdas input, which was created usingCreateFaceLivenessSession. Returns the corresponding Face Liveness confidence score, a reference image that includes a face bounding box, and audit images that also contain face bounding boxes. The Face Liveness confidence score ranges from 0 to 100. -
getFaceSearch(
{required String jobId, int? maxResults, String? nextToken, FaceSearchSortBy? sortBy}) → Future< GetFaceSearchResponse> - Gets the face search results for Amazon Rekognition Video face search started by StartFaceSearch. The search returns faces in a collection that match the faces of persons detected in a video. It also includes the time(s) that faces are matched in the video.
-
getLabelDetection(
{required String jobId, LabelDetectionAggregateBy? aggregateBy, int? maxResults, String? nextToken, LabelDetectionSortBy? sortBy}) → Future< GetLabelDetectionResponse> - Gets the label detection results of a Amazon Rekognition Video analysis started by StartLabelDetection.
-
getMediaAnalysisJob(
{required String jobId}) → Future< GetMediaAnalysisJobResponse> -
Retrieves the results for a given media analysis job. Takes a
JobIdreturned by StartMediaAnalysisJob. -
getPersonTracking(
{required String jobId, int? maxResults, String? nextToken, PersonTrackingSortBy? sortBy}) → Future< GetPersonTrackingResponse> - StartPersonTracking
-
getSegmentDetection(
{required String jobId, int? maxResults, String? nextToken}) → Future< GetSegmentDetectionResponse> - Gets the segment detection results of a Amazon Rekognition Video analysis started by StartSegmentDetection.
-
getTextDetection(
{required String jobId, int? maxResults, String? nextToken}) → Future< GetTextDetectionResponse> - Gets the text detection results of a Amazon Rekognition Video analysis started by StartTextDetection.
-
indexFaces(
{required String collectionId, required Image image, List< Attribute> ? detectionAttributes, String? externalImageId, int? maxFaces, QualityFilter? qualityFilter}) → Future<IndexFacesResponse> - Detects faces in the input image and adds them to the specified collection.
-
listCollections(
{int? maxResults, String? nextToken}) → Future< ListCollectionsResponse> -
Returns list of collection IDs in your account. If the result is
truncated, the response also provides a
NextTokenthat you can use in the subsequent request to fetch the next set of collection IDs. -
listDatasetEntries(
{required String datasetArn, List< String> ? containsLabels, bool? hasErrors, bool? labeled, int? maxResults, String? nextToken, String? sourceRefContains}) → Future<ListDatasetEntriesResponse> - Creating a manifest file
-
listDatasetLabels(
{required String datasetArn, int? maxResults, String? nextToken}) → Future< ListDatasetLabelsResponse> - Labeling images
-
listFaces(
{required String collectionId, List< String> ? faceIds, int? maxResults, String? nextToken, String? userId}) → Future<ListFacesResponse> - Returns metadata for faces in the specified collection. This metadata includes information such as the bounding box coordinates, the confidence (that the bounding box contains a face), and face ID. For an example, see Listing Faces in a Collection in the Amazon Rekognition Developer Guide.
-
listMediaAnalysisJobs(
{int? maxResults, String? nextToken}) → Future< ListMediaAnalysisJobsResponse> -
Returns a list of media analysis jobs. Results are sorted by
CreationTimestampin descending order. -
listProjectPolicies(
{required String projectArn, int? maxResults, String? nextToken}) → Future< ListProjectPoliciesResponse> - To attach a project policy to a project, call PutProjectPolicy. To remove a project policy from a project, call DeleteProjectPolicy.
-
listStreamProcessors(
{int? maxResults, String? nextToken}) → Future< ListStreamProcessorsResponse> - Gets a list of stream processors that you have created with CreateStreamProcessor.
-
listTagsForResource(
{required String resourceArn}) → Future< ListTagsForResourceResponse> - Returns a list of tags in an Amazon Rekognition collection, stream processor, or Custom Labels model.
-
listUsers(
{required String collectionId, int? maxResults, String? nextToken}) → Future< ListUsersResponse> -
Returns metadata of the User such as
UserIDin the specified collection. Anonymous User (to reserve faces without any identity) is not returned as part of this request. The results are sorted by system generated primary key ID. If the response is truncated,NextTokenis returned in the response that can be used in the subsequent request to retrieve the next set of identities. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
putProjectPolicy(
{required String policyDocument, required String policyName, required String projectArn, String? policyRevisionId}) → Future< PutProjectPolicyResponse> - CopyProjectVersion
-
recognizeCelebrities(
{required Image image}) → Future< RecognizeCelebritiesResponse> - Returns an array of celebrities recognized in the input image. For more information, see Recognizing celebrities in the Amazon Rekognition Developer Guide.
-
searchFaces(
{required String collectionId, required String faceId, double? faceMatchThreshold, int? maxFaces}) → Future< SearchFacesResponse> -
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.
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
confidencevalue for each face match, indicating the confidence that the specific face matches the input face. -
searchFacesByImage(
{required String collectionId, required Image image, double? faceMatchThreshold, int? maxFaces, QualityFilter? qualityFilter}) → Future< SearchFacesByImageResponse> - For a given input image, first detects the largest face in the image, and then searches the specified collection for matching faces. The operation compares the features of the input face with faces in the specified collection.
-
searchUsers(
{required String collectionId, String? faceId, int? maxUsers, String? userId, double? userMatchThreshold}) → Future< SearchUsersResponse> -
Searches for UserIDs within a collection based on a
FaceIdorUserId. This API can be used to find the closest UserID (with a highest similarity) to associate a face. The request must be provided with eitherFaceIdorUserId. The operation returns an array of UserID that match theFaceIdorUserId, ordered by similarity score with the highest similarity first. -
searchUsersByImage(
{required String collectionId, required Image image, int? maxUsers, QualityFilter? qualityFilter, double? userMatchThreshold}) → Future< SearchUsersByImageResponse> - Searches for UserIDs using a supplied image. It first detects the largest face in the image, and then searches a specified collection for matching UserIDs.
-
startCelebrityRecognition(
{required Video video, String? clientRequestToken, String? jobTag, NotificationChannel? notificationChannel}) → Future< StartCelebrityRecognitionResponse> - Starts asynchronous recognition of celebrities in a stored video.
-
startContentModeration(
{required Video video, String? clientRequestToken, String? jobTag, double? minConfidence, NotificationChannel? notificationChannel}) → Future< StartContentModerationResponse> - Starts asynchronous detection of inappropriate, unwanted, or offensive content in a stored video. For a list of moderation labels in Amazon Rekognition, see Using the image and video moderation APIs.
-
startFaceDetection(
{required Video video, String? clientRequestToken, FaceAttributes? faceAttributes, String? jobTag, NotificationChannel? notificationChannel}) → Future< StartFaceDetectionResponse> - Starts asynchronous detection of faces in a stored video.
-
startFaceSearch(
{required String collectionId, required Video video, String? clientRequestToken, double? faceMatchThreshold, String? jobTag, NotificationChannel? notificationChannel}) → Future< StartFaceSearchResponse> - Starts the asynchronous search for faces in a collection that match the faces of persons detected in a stored video.
-
startLabelDetection(
{required Video video, String? clientRequestToken, List< LabelDetectionFeatureName> ? features, String? jobTag, double? minConfidence, NotificationChannel? notificationChannel, LabelDetectionSettings? settings}) → Future<StartLabelDetectionResponse> - Starts asynchronous detection of labels in a stored video.
-
startMediaAnalysisJob(
{required MediaAnalysisInput input, required MediaAnalysisOperationsConfig operationsConfig, required MediaAnalysisOutputConfig outputConfig, String? clientRequestToken, String? jobName, String? kmsKeyId}) → Future< StartMediaAnalysisJobResponse> - Initiates a new media analysis job. Accepts a manifest file in an Amazon S3 bucket. The output is a manifest file and a summary of the manifest stored in the Amazon S3 bucket.
-
startPersonTracking(
{required Video video, String? clientRequestToken, String? jobTag, NotificationChannel? notificationChannel}) → Future< StartPersonTrackingResponse> -
Amazon Rekognition Video can track the path of people in a video stored in
an Amazon S3 bucket. Use Video to specify the bucket name and the
filename of the video.
StartPersonTrackingreturns a job identifier (JobId) which you use to get the results of the operation. When label detection is finished, Amazon Rekognition publishes a completion status to the Amazon Simple Notification Service topic that you specify inNotificationChannel. -
startProjectVersion(
{required int minInferenceUnits, required String projectVersionArn, int? maxInferenceUnits}) → Future< StartProjectVersionResponse> - DescribeProjectVersions
-
startSegmentDetection(
{required List< SegmentType> segmentTypes, required Video video, String? clientRequestToken, StartSegmentDetectionFilters? filters, String? jobTag, NotificationChannel? notificationChannel}) → Future<StartSegmentDetectionResponse> - Starts asynchronous detection of segment detection in a stored video.
-
startStreamProcessor(
{required String name, StreamProcessingStartSelector? startSelector, StreamProcessingStopSelector? stopSelector}) → Future< StartStreamProcessorResponse> -
Starts processing a stream processor. You create a stream processor by
calling CreateStreamProcessor. To tell
StartStreamProcessorwhich stream processor to start, use the value of theNamefield specified in the call toCreateStreamProcessor. -
startTextDetection(
{required Video video, String? clientRequestToken, StartTextDetectionFilters? filters, String? jobTag, NotificationChannel? notificationChannel}) → Future< StartTextDetectionResponse> - Starts asynchronous detection of text in a stored video.
-
stopProjectVersion(
{required String projectVersionArn}) → Future< StopProjectVersionResponse> - DescribeProjectVersions
-
stopStreamProcessor(
{required String name}) → Future< void> - Stops a running stream processor that was created by CreateStreamProcessor.
-
tagResource(
{required String resourceArn, required Map< String, String> tags}) → Future<void> - Adds one or more key-value tags to an Amazon Rekognition collection, stream processor, or Custom Labels model. For more information, see Tagging AWS Resources.
-
toString(
) → String -
A string representation of this object.
inherited
-
untagResource(
{required String resourceArn, required List< String> tagKeys}) → Future<void> - Removes one or more tags from an Amazon Rekognition collection, stream processor, or Custom Labels model.
-
updateDatasetEntries(
{required DatasetChanges changes, required String datasetArn}) → Future< void> - Amazon Rekognition Custom Labels Developer Guide
-
updateStreamProcessor(
{required String name, StreamProcessorDataSharingPreference? dataSharingPreferenceForUpdate, List< StreamProcessorParameterToDelete> ? parametersToDelete, List<RegionOfInterest> ? regionsOfInterestForUpdate, StreamProcessorSettingsForUpdate? settingsForUpdate}) → Future<void> - Allows you to update a stream processor. You can change some settings and regions of interest and delete certain parameters.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited