Face Recognition with Amazon Rekognition

Uthpala Pitawela
4 min readMay 8, 2020

Face recognition has become a crucial requirement for developers when building a verification system, automate video editing, or for security applications in cases such as to identify people or objects in a series of video streams or images. As a solution machine learning models can be used but it is time consuming, expensive and needs advanced knowledge related to machine learning.

Amazon Rekognition is based on highly scalable, deep learning technology developed by Amazon’s computer vision scientists. Amazon Rekognition API can easily identify objects, text, people, scenes , activities and inappropriate content in a given context. Common use cases of Amazon Rekognition can be listed down as follows.

  1. Searchable image and video libraries
  2. Face-based user verification
  3. Sentiment and demographic analysis
  4. Facial Search
  5. Unsafe content detection
  6. Celebrity recognition
  7. Text detection

Amazon Rekognition provides two APIs.

  1. Amazon Rekognition Image : To analyse images
  2. Amazon Rekognition Video: To analyse videos

The types of analysis which can be done using the above two APIs can be listed as follows.

  1. Labels : A label refers to an object (eg: tree, flower), events (weddings, parties) , concepts (landscape, evening) or activities (playing football). These labels can be detected in both images and videos using Amazon Rekognition except for activities which cannot be detected in images.
  2. Custom Labels: Objects and scenes those are specific to custom needs can be detected using a trained machine learning model. Amazon Rekognition provides a console to create, train, evaluate and run machine learning models.
  3. Faces: Faces in an image or video, facial landmarks, facial emotions such as happy and sad can be detected. Comparison of faces between two images also can be done.
  4. Face Search: Facial information is indexed in a container named collection. Face information can then be matched with faces detected in images, stored videos, and streaming video.
  5. People Paths: Can detect the paths of people detected in videos such as path tracking, face details and in-frame location information for people detected in a video.
  6. Celebrities: Can recognize thousands of celebrities in images and videos and details such as the place of the image where the celebrity’s face is located, facial landmarks and the pose of the celebrity’s face.
  7. Text Detection: Can be used to detect text in images and can be converted into machine-readable text.
  8. Unsafe Content: Can analyze images and videos for adult and violent content.

If you need to integrate this to your application, it can be done using AWS SDK APIs which are available for languages such as .NET, C++, Go, Javascript, Java, PHP v3, Python etc.

Let’s see how rekognition works in AWS Management console.

  1. Facial analysis

Analyze facial attributes with confidence scores

2. Compare faces

Compares faces based on a similarity percentage

3. Celebrity recognition

Recognizes celebrities in images and provides a confidence score

4. Object and scene detection

Rekognition automatically labels objects, concepts and scenes in your images, and provides a confidence score.

5. Text in image

Texts can be extracted from a given image

6. Video analysis

Video analysis results are given in categories such as people, celebrities, objects and activities.

--

--