M-Davies / eye-of-horus

A facial and gesture recognition authentication system
GNU General Public License v3.0
3 stars 0 forks source link

Investigate AWS Rekognition for facial comparison capabilities #1

Closed M-Davies closed 3 years ago

M-Davies commented 3 years ago

Why?

AWS provides more powerful and refined services than local python libraries for a reasonable cheap, if not free, price. Albeit harder to set up and understand initially, it'll save me a lot of development time later into the project

Aims

Investigate AWS Rekognition, mainly following this tutorial to produce a prototype script. Collect video evidence to confirm it works.

This script would take in a video stream (from my laptop or phone camera) and compare the faces in it to stored images on an AWS bucket. The response would be similar to the examples here. A successful test would be a positive match with my face stored in AWS to a group of faces in the video stream.

M-Davies commented 3 years ago

Steps

Crossed means completed, un-crossed means in-progress

M-Davies commented 3 years ago

Amazon kinesis and streaming services setup using guide => https://docs.aws.amazon.com/rekognition/latest/dg/setting-up-your-amazon-rekognition-streaming-video-resources.html

Proceeding to prosecute plugin setup for streaming from device camera => https://docs.aws.amazon.com/rekognition/latest/dg/streaming-using-gstreamer-plugin.html

M-Davies commented 3 years ago

Plugin setup, I can now stream video from my device (a macbook) to AWS.

Now proceeding to read and analyse the results to try and get facial recog working

M-Davies commented 3 years ago

Read and analysis is working after a small hiccup with the role permissions (solved using this guide section to rejig my role permissions).

I can now stream video to the cloud and have it analysed, returning the result with a confidence match to the stored face in aws. I will attempt to replicate this success with Python scripts, since that will be the main method of communication between the backend and AWS

M-Davies commented 3 years ago

I am unsure if Python scripts will be the best solution for analysing the results due to the differences between NodeJS and Python. The NodeJS backend will need to be able to execute the python scripts in order to deploy assets and conduct investigations on the video streams.

While I feel comfortable that this should be possible after looking online, I think I may likely have dependancy issues and problems with feedbacking to the user when something goes wrong (due to the inconsistent nature of python script exiting, even with the throw() function). I feel I may have to also look into producing nodejs scripts that achieve the same goals (luckily, there is an SDK for that too) but I will reserve that thought until after I build the website skeleton

M-Davies commented 3 years ago

Moved milestone ahead since this won't be completed until after the NodeJS opportunity has been explored

M-Davies commented 3 years ago

NodeJS has been instantiated for the website backend side and it's been decided in my latest blog to use boto for most of the heavylifting. Facial recog scripts are in place but need testing

M-Davies commented 3 years ago

New spinoff issues for this epic -> https://github.com/M-Davies/eye-of-horus/issues?q=is%3Aissue+is%3Aopen+label%3Aface

M-Davies commented 3 years ago

Python scripts are functional! We just need the website to hook them up to a nice UI now :)