Video Processing - API
Start course
Difficulty
Beginner
Duration
1h 11m
Students
2163
Ratings
4.7/5
starstarstarstarstar-half
Description

In this lecture we dive into the Amazon Rekognition service and how it works specifically for processing videos.

Amazon Rekognition Video - is a specialised part of the Rekognition service that performs video analysis. Amazon Rekognition Video has similar and equivalent functionality when compared with Amazon Rekognition (Images). We provide an overview of the asyncronous calling pattern used by the Rekognition Video API operation set. 

Transcript

Welcome back. In this lecture we'll review the Amazon Rekognition Video Service which is the specialized part of the Rekognition service that performs video analysis. Amazon Rekognition Video has similar and equivalent functionality when compared with the image processing APIs that we reviewed in the previous lecture.

The Rekognition Video Service provides API operations specific to processing videos and video streams. Processing video files imposes extra demand on the backend compute resource and therefore several of the Rekognition Video API operations are provided in asynchronous form. These async operations appear together with other operations allowing you to retrieve the async processing results. We'll go through this async pattern in more detail as this lecture proceeds.

The Rekognition Video Service adopts an async model for performing video analysis. The general pattern is to make a call to the relevant start API operation. This call will kick off the requested processing and return control back immediately to the caller. The Rekognition service will perform the requested processing in the background and later upon completion post a completion status to an SNS topic. The completion status can then trigger a lambda function which in turn can trigger a separate call to retrieve the processing results by using the paired get API operation.

The same async pattern is used for the people, faces, labels, celebrities, and content moderation detection functions as per the table shown here.

Every start operation returns a job ID which is an identifier for the job in question. When performing the paired get operation, you pass in the job ID to retrieve the video processing results. With the video processing APIs, you always host the video to be processed as a file within an S3 bucket. You then supply the S3 file location as an input parameter to the respective start operation.

You can use the Rekognition Video Service to track people within a video. The video for which you want to track movement must be stored and located within an Amazon S3 bucket. The StartPersonTracking API operation returns a job identifier which you will use at some later point in time to get the results of the operation.

As previously mentioned, this processing is performed asynchronously. When the Rekognition service has finished processing person tracking within the video, a completion status is published to an SNS topic of your choice which you have specified in the NotificationChannel attribute of the start request.

By subscribing to the SNS topic, you can trigger a call to the GetPersonTracking API operation, you supply the job identifier in the request message. The GetPersonTracking API response contains typical information such as the bounding box and facial features but also additionally tags each person detection with the timestamp of when the detection occurred within the video in milliseconds from the start of the video.

You can use the Rekognition Video Service to track faces within a video. The video for which you want to track faces must be stored and located within an Amazon S3 bucket. The StartFaceDetection API operation returns a job identifier which you will use at some later point in time to get the results of the operation.

As previously mentioned, this processing is performed asynchronously. When the Rekognition service has finished processing face detection within the video, the completion status is published to an SNS topic of your choice which you have specified in the NotifcationChannel attribute of the start request.

By subscribing to the SNS topic you can trigger a call to the GetFaceDetection API operation. You supply the job identifier in the request message. The GetFaceDetection API response contains typical information such as the bounding box and facial features but also additionally tags each face detection with a timestamp of when the detection occurred within the video in milliseconds from the start of the video.

You can use the Rekognition Video Service to perform object and feature detection within a video such as finding cars, buildings, trees etc. The video for which you want to perform object and feature detection must be stored and located within an Amazon S3 bucket. The StartLabelDetection API operation returns a job identifier which you will use at some later point in time to get the results of the operation.

As previously mentioned, this processing is performed asynchronously. When the Rekognition service has finished processing object and feature detections within the video, a completion status is published to an SNS topic of your choice which you have specified in the NotificationChannel attribute of the start request. By subscribing to the SNS topic, you can trigger a call to the GetLabelDetection API operation. You supply the job identifier in the request message. The GetLabelDetection API response contains the label name and confidence value but also additionally tags each object and feature label detection with a timestamp of when the detection occurred within the video in milliseconds from the start of the video.

You can use the Rekognition Video Service to detect celebrities within a video such as famous movie actors and/or politicians etc. The video for which you want to perform object and feature detection must be stored and located within an Amazon S3 bucket. The StartCelebrityRecognition API operation returns a job identifier which you will use at some later point in time to get the results of the operation.

As previously mentioned, this processing is performed asynchronously. When the Rekognition service has finished processing celebrity recognition within the video, a completion status is published to an SNS topic of your choice which you had specified in the NotificationChannel attribute of the start request. By subscribing to the SNS topic, you can trigger a call to the GetCelebrityRecognition API operation. You supply the job identifier in the request message. The GetCelebrityRecognition API response contains typical information such the bounding box and facial features, but also additionally tags each celebrity detection with a timestamp of when the detection occurred within the video in milliseconds from the start of the video.

You can use the Rekognition Video Service to perform content moderation within a video. The video for which you want perform content moderation must be stored and located within an Amazon S3 bucket. The StartContentModeration API operation returns a job identifier which you will use at some later point in time to get the results of the operation. As previously mentioned, this processing is performed asynchronously. When the Rekognition service has finished processing content moderation within the video, a completion status is published to an SNS topic of your choice which you have specified in the NotificationChannel attribute of the start request. By subscribing to the SNS topic, you can trigger a call to the GetContentModeration API operation, you supply the job identifier in the request message. The GetContentModeration API response contains moderation label and confidence value but also additionally tags each content moderation detection with the timestamp of when the detection occurred within the video in milliseconds from the start of the video. 

That concludes our lecture on Rekognition Video processing APIs. In the next lecture, we'll review the Rekognition collections and associated storage-based APIs. Here we'll learn about how collections can be created and populated with facial datasets. Go ahead and close this lecture, and we'll see you shortly in the next one.

About the Author
Students
126297
Labs
66
Courses
113
Learning Paths
180

Jeremy is a Content Lead Architect and DevOps SME here at Cloud Academy where he specializes in developing DevOps technical training documentation.

He has a strong background in software engineering, and has been coding with various languages, frameworks, and systems for the past 25+ years. In recent times, Jeremy has been focused on DevOps, Cloud (AWS, Azure, GCP), Security, Kubernetes, and Machine Learning.

Jeremy holds professional certifications for AWS, Azure, GCP, Terraform, Kubernetes (CKA, CKAD, CKS).