This repo contains an IoT Edge solution developed using VSCode IoT extension (highly recommended!).
You will find a step-by-step tutorial about how to implement most of the components needed to deploy a highly scalable IoT solution inside the workshop folder.
The main module (FaceAPIServerModule) integrates the fantastic face-api.js tensorflow wrapper for browser/nodejs face detection. If the detected face on the webcam matches the provided models, a new message is written in the IotEdge-hub and forwarded to the Azure IoT Hub to be processed with an Azure Function.
The function checks if the matched names are considered dangerous in a CosmoDB database and in that case uses the hub to send a Direct Method Invocation to the IoT Edge Module.
If the IoT Edge Module method is invoked, it executes a HTTP query to change the state of a Sonoff relay (burnt with Espurna firmwared) to switch on a siren.
The repository also includes several other examples, including a python example about how to create and visualize a Histogram of Oriented Gradients and Facial landmarks.
The first version of this project was used in a demo during the Global Azure Bootcamp 2019 in Barcelona. The slides are also available for viewing, although they are not intended to provide useful guidance but to help presenting IoT Edge and face recognition technology.
Detailed instructions to run this project will be provided at some point in the future but in the meanwhile feel free to contact Javi on Twitter or Linked-in if you want to run this code on your own.