October 12, 2018 / Nirav Shah
Face detection is the latest cutting-edge computer technology that is being used in a variety of applications to identify human faces in digital images and streaming videos. With the increase in IT and IP security organizations, face detection through live videos has become the industry standard for IT security firms.
Face detection and recognition has found its huge implementation in social media and a variety of other applications. In this blog post, we are going to talk about how you can get a super-accurate facial recognition enabled application in just a few hours, with a little investment, Eternal’s Amazon Video Rekognition expertise and some cups of coffee.
First you create an S3 bucket to upload an .mp4, .mov or .avi format video file to your S3 Bucket then using Amazon Rekognition video api.
All the technical stuff begins here
1. Go to AWS console management to create a S3 becket and its permission. It’s important that s3 bucket has sufficient read write permission to perform operation.
a. Create s3 bucket.
b. Change policy.
c. Click on bucket policy to read and write operation
d. Click on CORS configuration to allow all REST method to any domain.
2.Starts asynchronous detection of faces in a stored video.
Amazon Rekognition Video can detect faces in a video stored in an Amazon S3 bucket. Use Video to specify the bucket name and the filename of the video. StartFaceDetection returns a job identifier (JobId ) that you use to get the results of the operation. When face detection is finished, Amazon Rekognition Video publishes a completion status to the Amazon Simple Notification Service topic that you specify in NotificationChannel . To get the results of the label detection operation, first check that the status value published to the Amazon SNS topic is SUCCEEDED . If so, call and pass the job identifier (JobId ) from the initial call to StartFaceDetection .
3.Gets face detection results for a Amazon Rekognition Video analysis started by .
Face detection with Amazon Rekognition Video is an asynchronous operation. You start face detection by calling which returns a job identifier (JobId ). When the face detection operation finishes, Amazon Rekognition Video publishes a completion status to the Amazon Simple Notification Service topic registered in the initial call to StartFaceDetection . To get the results of the face detection operation . If so, call and pass the job identifier (JobId ) from the initial call to StartFaceDetection.
GetFaceDetection returns an array of detected faces (Faces ) sorted by the time the faces were detected.
Use MaxResults parameter to limit the number of labels returned. If there are more results than specified in MaxResults , the value of NextToken in the operation response contains a pagination token for getting the next set of results. To get the next page of results, call GetFaceDetection and populate the NextToken request parameter with the token value returned from the previous call to GetFaceDetection .
create a python script to detect Face
As a Director of Eternal Web Private Ltd an AWS consulting partner company, Nirav is responsible for its operations. AWS, cloud-computing and digital transformation are some of his favorite topics to talk about. His key focus is to help enterprises adopt technology, to solve their business problem with the right cloud solutions.
Have queries about your AWS project ideas and concepts? Please drop in your project details to discuss with our AWS experts, professionals and consultants.