deeheber / face-match

A program to that does face comparison/matching between uploaded images and images stored in a collection.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

face-match

Description

  • This stack allows you to upload and delete images from a Rekognition collection.
  • You can then upload other images (outside of the Rekognition collection) and then Rekognition searches the images in the collection for a face match with the other images that were uploaded.
  • Could be used for facial recognition to unlock something like a diary or a door.
  • See this open issue for future plans to make this less manual

Technologies Used

  • AWS
    • AWS SAM backed by CloudFormation
    • S3
    • Lambda
    • DynamoDB
    • Rekognition
  • Node

Architecture Overview

Architecture

Directions to run/deploy

  1. Install NodeJS (current version number for this app specified in .nvmrc file at the root of this repo), AWS CLI, and AWS SAM CLI on your local machine if you don't have it yet

  2. Create your Rekognition collection using the AWS CLI (id should satisfy the regex pattern [a-zA-Z0-9_.\-]+). Note this should not match the id of any existing rekognition collections that you have unless you want this program to alter that existing collection

    aws rekognition create-collection --collection-id <YOUR COLLECTION ID HERE>

    Full CLI docs here

  3. Run sam build and sam deploy --guided. When prompted for RekognitionId parameter's value, make sure to add the same collection id from step #2. Select Y to save your config file as samconfig.toml in the root of the project (the default setting).

  4. Add images to the created S3 buckets in the AWS S3 console and check the Cloudwatch logs for the results. Add to the collection images bucket first to add images to compare against to a collection, then add to the images bucket to compare that uploaded image(s) to the images in the collection.

  5. (Optional) I like to use the sam logs command instead of looking for the logs in the AWS console to see the face match comparison results...something like this (update -n to be the name of the function you want to view logs for and the --stack-name to whatever you named the stack)

    sam logs --stack-name face-match --config-file samconfig.toml --tail
  6. More details on what each function does can be found in the various README.md files in this repo

  7. (Optional cleanup when finished) Delete the stack, run sam delete after emptying the two S3 buckets.

  8. (Optional cleanup when finished) Delete the Rekognition collection

    aws rekognition delete-collection --collection-id <YOUR COLLECTION ID HERE>

    Full CLI docs here

Outstanding TODO Items / Open Bugs

See open issues

Logging Issues

If you find a bug or have a question, feel free to open a new issue and our maintainers will reply as soon as they possibly can. Please describe the issue including steps to reproduce if there are any.

Pull Request Process

  1. Fork the respository
  2. Make any changes you'd like
  3. Open a new PR against main with a description of the proposed changes as well as any other information you find relevant.
  4. If your PR fixes an open issue be sure to write fixes #[ issue number here ]

Finding Help

Please send a direct message to @deeheber on Twitter if any of your questions have not been addressed by the documentation in this repository.

About

A program to that does face comparison/matching between uploaded images and images stored in a collection.


Languages

Language:JavaScript 100.0%