- 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
-
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 -
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 collectionaws rekognition create-collection --collection-id <YOUR COLLECTION ID HERE>
Full CLI docs here
-
Run
sam build
andsam deploy --guided
. When prompted forRekognitionId
parameter's value, make sure to add the same collection id from step #2. SelectY
to save your config file assamconfig.toml
in the root of the project (the default setting). -
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.
-
(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
-
More details on what each function does can be found in the various
README.md
files in this repo -
(Optional cleanup when finished) Delete the stack, run
sam delete
after emptying the two S3 buckets. -
(Optional cleanup when finished) Delete the Rekognition collection
aws rekognition delete-collection --collection-id <YOUR COLLECTION ID HERE>
Full CLI docs here
See open 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.
- Fork the respository
- Make any changes you'd like
- Open a new PR against
main
with a description of the proposed changes as well as any other information you find relevant. - If your PR fixes an open issue be sure to write
fixes #[ issue number here ]
Please send a direct message to @deeheber on Twitter if any of your questions have not been addressed by the documentation in this repository.