Recognition App with Azure Functions and Cognitive Services Shaikh Wasif Emerging Tech Architect Digital Office November 2021 Deck URL: https://bit.ly/3kCS7AN
container orchestrators, introduced deployment of containerized web-apps on the cloud. Bare-metal servers Cloud 1.0 VM VM Cloud 2.0 Containers Containers Traditionally web-apps would be deployed on a bare-metal server on-premise or provided by a hosting service. This server would be a physical machine running a web server like Apache, NGINX, etc. on which the web-app would be deployed. Then came Cloud 1.0, which allowed us to move our workloads to cloud providers’ data-centers. This meant deploying our web-app on VMs provided by the cloud service.
to the concept of building and running applications that do not require server management. There’s no need for a traditional always-on server component. Can be broadly categorized into BaaS and FaaS. Backend-as-a-Service (BaaS) is a cloud service model in which developers outsource all the behind-the- scenes aspects of a web or mobile application so that they only have to write and maintain the frontend. Function-as-a-Service (FaaS) is about running backend code without managing your own server systems or your own long-lived server applications Serverless computing does not mean that we no longer use servers to host and run code; nor does it mean that operations engineers are no longer required. Rather, it refers to the idea that consumers of serverless computing no longer need to spend time and resources on server provisioning, maintenance, updates, scaling, and capacity planning. Instead, all of these tasks and capabilities are handled by a serverless platform and are completely abstracted away from the developers and IT/operations teams. As a result, developers focus on writing their applications’ business logic.
platform For - short-running, stateless computation And - event-driven applications Which - scales up and down instantly & automatically And - charges for actual usage at a millisecond granularity No servers to provision or manage Scales with usage Pay for what you use Built-in scalability, availability, security and reliability
is run in response to events Services Events Functions API Gateway Storage Database API Call File uploaded Database updated Your code Your business logic
EC2 GCE Infrastructure- as-a-Service IaaS Kubernetes AKS ECS GKE Container-as-a- Service CaaS OpenShift Heroku AZ App Service GAE Platform-as-a- Service PaaS Fission Azure Functions AWS Lambda GCF Function-as-a- Service FaaS DropBox Salesforce SAP Office 365 Software-as-a- Service SaaS
is not good for • Stateless event-drive tasks • Tasks that can be broken into small independent units of work • Tasks that have infrequent or unpredictable usage patterns • Background work or system to system communication. • Stateful tasks • Long running tasks • Computationally intensive • Streaming
is rendered with AWS Lambda. They perform over 100 million serverless function invocations per day. Lego uses 200+ AWS Lambda functions to transform its legacy website. Architecture for Email notification with signed URL for vouchers
Facial recognition technology is a set of algorithms that work together to identify people in a video or a static image. Face recognition is one of Computer Vision Technology’s capabilities based on algorithms known as neural networks. This technology aims to find, recognize, and distinguish faces. Create face templates by extracting face landmarks based on their facial features (geometry): spacing of the eyes, bridge of the nose, the contour of the lips, ears, chin, etc. Tests by the National Institute of Standards and Technology (NIST) say that as of April of 2020, the best face identification algorithm boasted an error rate of just 0.08%. That's a big improvement from 2014, when the best algorithm had an error rate of 4.1%.
is one of Computer Vision Technology’s capabilities based on algorithms known as neural networks. This technology aims to find, The FRT algorithm consists of two stages: identification and verification. Typically, the sequence of the algorithm’s actions is as follows: 1. Face detection. The algorithm highlights the person’s face in the image. 2. Facial features detection. The algorithm calculates the anthropometric points. The system finds features of the face that define individual characteristics. Previously, the main reference point for algorithms was the eyes, but as FRT evolves, at least 68 points on the face are considered nowadays. 3. Face normalization. The FRT system does additional image transformations (head tilt removal, face color correction, etc.) to obtain a clear frontal image. 4. Feature extraction and descriptor computation. A descriptor is calculated — a set of characteristics that describe a face regardless of extraneous factors (age, hairstyle, makeup). Comparing different descriptors makes it possible to assess whether two received facial images refer to the same person. 5. Verification. The resulting digital template is compared with the known faces in the database to complete the identification process.
of a biometric system? One way could be to check biometric performance figures reported by vendors. They often come in a form similar to this: FRR 1% @ FAR 1 / 10,000 By applying a varying score threshold to the similarity scores, pairs of FNMR and FMR can be calculated. FMR – False Match Rate Proportion of impostor attempts that are falsely declared to match a template of another object. FNMR – False NonMatch Rate Proportion of genuine attempts that are falsely declared not to match a template of the same object. EER – Equal Error Rate The point where the proportion of False Matches is the same as False Non- Matches (FNMR = FMR). FRR 1% @ FAR 1 / 10,000 means that – When the system operates in a mode where one out of ten thousand impostor attempts is (falsely) considered a match, one per cent of the genuine attempts would fail (be falsely considered nonmatches).
Azure Cognitive Services brings APIs for AI solutions Provides APIs for Speech, Language, Vision and Decision After creating a Cognitive Service resource in the Azure portal, you'll get an endpoint and a key for authenticating your applications. Integration can be done using REST APIs or client library SDKs From faces to objects, allow your apps to understand images and video Hear and speak to your users by filtering noise, identifying speakers, and understanding intent Process text and learn how to recognize what users want Make smarter decisions faster
Face service provides AI algorithms that detect, recognize, and analyze human faces in images. Facial recognition software is important in many different scenarios, such as identity verification, touchless access control, and face blurring for privacy. Verification is also a "one-to-one" matching of a face in an image to a single face from a secure repository or photo to verify they are the same individual. Verification can be used for Identity Verification, such as a banking app that enables users to open a credit account remotely by taking a selfie and taking a picture of a photo ID to verify their identity. Face identification can address "one-to-many" matching of one face in an image to a set of faces in a secure repository. Match candidates are returned based on how closely their face data matches the query face. This scenario is used in granting building or airport access to a certain group of people or verifying the user of a device. Detect faces and their attributes within an image Check if two faces belong to the same person Find similar faces within a set of faces Organize many faces into groups Search face belongs to which person
Azure Subscription, VS Code, NodeJS 2. Create serverless-app resource group 3. Create Azure Cognitive Services resource 4. Create Azure Storage Account resource 5. Create Azure Function 6. Deploy on Azure Develop a serverless function which leverages Azure Cognitive Services’ face recognition capabilities to identify duplicate customers using their face and send an email notification.
blob storage 2. Blob storage triggers an event for ingest function 3. Ingest function creates an entry in the table storage and adds a message on the identification queue 4. A new message on identification queue triggers the face function 5. Face function performs face detection, adds the face to the group, trains and performs identification. If a duplicate face is found, then it creates an entry on table storage and adds a message on the notification queue 6. A new message on notification queue triggers the email function 7. Email function sends an email that a duplicate face has been found Ingest function Face function Email function Identification queue Notification queue Blob storage User Table storage Face API Email API