Rekognition101 Demo

Overview

The purpose of this exercise is to create a web application that leverages Amazon Rekognition and managed services to take advantage of general computer vision topics based on deep learning, such as object recognition and facial recognition. This exercise enables you to quickly and easily implement real-time face recognition that can be extended to a variety of use cases, such as user identification or emotional analysis.

Prerequisites

The lab takes 20-30 minutes and requires the following :

Hands-on Lab Material

http://bit.ly/2pjEQAv : Korean

AWS account

AWS Command Line Interface

To complete the last module of this workshop, you must have the AWS Command Line Interface (CLI) installed on your computer. Use the CLI to copy the object to the S3 Web site bucket and create a face collection. Follow the AWS CLI Getting Started Guide to install and configure the CLI on your system.

Git client

Configure Node.js environment (Optional, for local testing)

Firefox browser

Note: This lab uses a webcam, and if you are using a webcam in HTML, most modern browsers require a secure connection (HTTPS). In this example, the web hosting is through S3, and this lab does not cover how to configure HTTPS for S3, so the camera may not work with some browsers, such as Chrome. Therefore, it is recommended to use Firefox for this lab, and use HTTPS for real service.

Web Cam

Getting Started

1. Clone this repository

git clone https://github.com/junghee-kang/rekognition-demo.git

2. Creating a CloudFormation stack

Create a stack through the included CloudFormation template file (cfn_template.json).

Must choose a region that Rekognition supported.

3. Deploying the Application

Modifying Application environment file (js/config.js) and Deploying Application

Modify the Application environment file (js / config.js) based on the output generated by CloudFormation. You can specify face_collection as the name of the face metadata repository to be used in the next step.

region: 'us-east-1',
upload_bucket_name: 'demogo-s3upload',
identity_pool_id: 'us-east-1:XXXXXXXX-XXXX-XXXX-XXXXXXXXXXXXXXXX',
face_collection :'rekognition-demo-go',
ddb_table:'rekognition-demo-go'

Deploy the modified Application s3. (Using the WebsiteURL bucket name)


# on the project's root directory (rekognition-demo)
aws s3 cp . s3://YOUR_Bucket_NAME --recursive --acl public-read

Real-time face recognition demo

For real-time face recognition, you must first create a face collection, which is a repository that stores only the metadata of the input face.

Use the AWS CLI command below to create it. Id is the same as config.js.

$ aws rekognition create-collection --collection-id rekognition-demo-go --region us-east-1