Amazon Rekognition
See Amazon Rekognition Developer Guide for general guidance using Rekognition.
API Access
The IRekognitionClient interface and its implementation TRekognitionClient provides access to Rekognition operations.
program DetectFacesInVideo;
uses
AWS.Rekognition;
var
Client: IRekognitionClient;
Request: IRekognitionStartFaceDetectionRequest;
Response: IRekognitionStartFaceDetectionResponse;
begin
Client := TRekognitionClient.Create;
Request := TRekognitionStartFaceDetectionRequest.Create(
TRekognitionVideo.FromS3Object('my-input-bucket', 'video.mp4')
);
try
Response := Client.StartFaceDetection(Request);
// Inspect Response which includes a JobId to later retrieve results.
except
on E: ERekognitionException do
Writeln(E.ClassName, ': ', E.Message);
end;
end.
Detecting objects and concepts
Labels (objects and concepts) can be detected in images using DetectLabels.
Labels can be detected in stored video (on Amazon S3) by starting an asynchronous job with StartLabelDetection, and later retrieving the results with GetLabelDetection.
Amazon Rekognition Custom Labels can be trained to identify objects, logos, and scenes specific to your business needs.
Detecting and analyzing faces
Faces can be detected in images using DetectFaces.
Faces can be detected in stored video (on Amazon S3) by starting an asynchronous job with StartFaceDetection, and later retrieving the results with GetFaceDetection.
Faces can also be compared using CompareFaces.
Searching faces in a collection
Faces can be stored in a collection for searching images or videos.
First create a collection with CreateCollection, and then index faces into it using IndexFaces.
Once indexed, the collection can be used in SearchFaces, and SearchFacesByImage.
Multiple faces can be aggregated to improve identification of people. First use CreateUser to create a "user", and then AssociateFaces with the user. Users can then be searched for within an image using SearchUsers, or SearchUsersByImage.
To search for faces within a stored video (on Amazon S3), you can use the StartFaceSearch function, and later retrieve the results using GetFaceSearch.
Detecting personal protective equipment
Personal Protective Equipment (PPE) can be detected in an image using DetectProtectiveEquipment.
Recognizing celebrities
Amazon Rekognition is capable of recognizing tens of thousands of well-known personalities.
Detect celebrities in images using RecognizeCelebrities. Celebrities can be recognized in stored video (on Amazon S3) using StartCelebrityRecognition and later retrieving the results with GetCelebrityRecognition.
Moderating content
Amazon Rekognition can be used to detect content that is inappropriate, unwanted, or offensive.
Content in images can be labeled using DetectModerationLabels. Content in stored video (on Amazon S3) can be detected using StartContentModeration, and later retrieving the results with GetContentModeration.
Detecting text
Text can be detected in images using DetectText.
Text in stored video (on Amazon S3) can be detected using StartTextDetection, and later retrieving the results with GetTextDetection.
Detecting video segments
Segments in stored video (on Amazon S3) can be detected such as black frames and end credits. Use StartSegmentDetection to detect segments, and later retrieve the results with GetSegmentDetection.
Bulk analysis
Bulk analysis of images can be performed providing an input manifest to StartMediaAnalysisJob, and later retrieving the results manifest through GetMediaAnalysisJob.