Lets find out about the AWS Rekognition

Lets go through AWS Rekognition Service with usage examples

AWS Rekognition Image analysis (Image credit: AWS Rekognition official site)

In 2017 AWS re:Invent, Amazon Introduced brand new concept and feature Rekognition for Image and Video Analysis.

Rekognition is a brand new service that developed based on the same proven, highly scalable, deep learning technology developed by Amazon’s computer vision scientists to analyze billions of images and videos daily.

This service helps and make it easy to add image and video analysis to your applications. You can obtain several insights of an image like objects, people, texts etc. Moreover they provide extremely useful API service to get image behavior add to you application that can detect any inappropriate content as well.

AWS Rekognition have a wide variety of analyze functionalities against with images, stored videos and streaming videos.

Rekognition Scope

Following services will be provided by AWS Rekognition on top of image analysis

  • Identify and detect objects/ labels
  • Identify People, Text, Scenes and activities
  • Identify inappropriate content (moderation)
  • facial analysis and facial recognition
  • Functionality to detect, analyze and compare faces

Images can be provided to recognition service in different ways

1.Images from S3 bucket (.jpg or .png format.)

2.Images from Local File System ( base 64 encoded image Byte)

If you use the AWS CLI to call Rekognition Image operations, passing image bytes as part of the call is not supported.

You can use AWS Rekognition analyze both stored and streaming videos( can use AWS Kinesis for streaming purpose).

  • Can detect labels, faces, Celebrities and do moderation on video content.
  • A typical use case is surveillance where you want to detect a known face in a video stream.
  • Rekognition Video uses Amazon Kinesis Video Streams to receive and process a video stream.

Lets Code

  1. Create IAM user with Rekognition and S3 access.
  2. Copy “accessKeyId” and “secretAccessKey”
  3. If you are going to use analyze S3 hosted images/videos then create S3 bucket with relevant permissions.

following code snippet shows how we can use AWS Rekognition to detect Labels from S3 hosted Image.

Image : sunny.jpg (don’t guess my friends.. I just needed to use an adult content image for test).. let’s test it..!

NodeJS Code

Detect Label Result:

WOW….Result gave required information correctly and the image orientation. :)

following code snippet shows how we can use AWS Rekognition to detect Labels from S3 hosted Image.

Detect Moderation labels

Detect Moderation Label Result:

Moderation Response

Hmm…Rekognition says that image contains adult content by 99.322% confidence

Now Try it your self…!!! Lots of projects and use cases are around you…!!!

Further read on rekognition benifits : https://aws.amazon.com/rekognition/

Use following npm library for image rekognition

https://www.npmjs.com/package/image-recognition-aws

Software Engineer who loves history and psychology