In-person user identity verification is slow to scale, costly, and high friction for users. Machine learning (ML) powered facial recognition technology can enable online user identity verification. अमेज़ॅन रेकग्निशन offers pre-trained चेहरे की पहचान capabilities that you can quickly add to your user onboarding and authentication workflows to verify opted-in users’ identities online. No ML expertise is required. With Amazon Rekognition, you can onboard and authenticate users in seconds while detecting fraudulent or duplicate accounts. As a result, you can grow users faster, reduce fraud, and lower user verification costs.
In this post, we describe a typical identity verification workflow and show how to build an identity verification solution using various Amazon Rekognition APIs. We provide a complete sample implementation in our गिटहब भंडार.
User registration workflow
The following figure shows a sample workflow of a new user registration. Typical steps in this process are:
- User captures selfie image and the image of a government-issued identity document.
- Quality check of the selfie image and optional निष्ठा का पता लगाने of the user face.
- Comparison of the selfie image with the identity document face image.
- Check of the selfie against a database of existing user faces.
You can customize the flow according to the business process. It often contains some or all of the steps presented in the preceding diagram. You can choose to run all the steps synchronously (wait for one step to complete before moving on to the next step). Alternately, you can run some of the steps highlighted in orange asynchronously (don’t wait for that step to complete) to speed up the user registration process and improve the customer experience. If the steps aren’t successful, you must roll back the user registration.
In addition to new user registration, another common flow is an existing or returning user login. In this flow, a check of the user face (selfie) is performed against a previously registered face. Typical steps in this process include user face capture (selfie), check of the selfie image quality, and search and compare of the selfie against the faces database. The following diagram shows a possible flow.
You can customize the steps of the process according to your business needs, and choose to include or exclude the liveness detection.
समाधान अवलोकन
निम्नलिखित संदर्भ वास्तुकला से पता चलता है कि आप पहचान सत्यापन को लागू करने के लिए अन्य AWS सेवाओं के साथ Amazon Rekognition का उपयोग कैसे कर सकते हैं।
वास्तुकला में निम्नलिखित घटक शामिल हैं:
- आवेदन आह्वान अमेज़ॅन एपीआई गेटवे अनुरोधों को सही करने के लिए AWS लाम्बा उपयोगकर्ता प्रवाह के आधार पर कार्य। इस समाधान में चार प्रमुख क्रियाएं हैं: प्रमाणित करें, रजिस्टर करें, आईडी कार्ड के साथ पंजीकरण करें और अपडेट करें।
- एपीआई गेटवे को चलाने के लिए सेवा एकीकरण का उपयोग करता है AWS स्टेप फ़ंक्शंस express state machine corresponding to the specific path called from API Gateway. Within each step, Lambda functions are responsible for triggering the correct set of calls to and from अमेज़ॅन डायनेमोडीबी और अमेज़न सरल भंडारण सेवा (अमेज़ॅन एस 3), प्रासंगिक अमेज़ॅन रिकॉग्निशन एपीआई के साथ।
- DynamoDB के पास फेस आईडी हैं (
face-id
), S3 पथ URI, और प्रत्येक के लिए अद्वितीय आईडी (उदाहरण के लिए कर्मचारी आईडी संख्या)face-id
. Amazon S3 सभी चेहरे की छवियों को संग्रहीत करता है। - समाधान का अंतिम प्रमुख घटक Amazon Rekognition है। प्रत्येक प्रवाह (प्रमाणित करें, पंजीकरण करें, आईडी कार्ड के साथ पंजीकरण करें, और अपडेट करें) कार्य के आधार पर अलग-अलग अमेज़ॅन रिकॉग्निशन एपीआई को कॉल करता है।
समाधान को परिनियोजित करने से पहले, निम्नलिखित अवधारणाओं और API विवरणों को जानना महत्वपूर्ण है:
- संग्रह - Amazon Rekognition पहचाने गए चेहरों के बारे में जानकारी को सर्वर-साइड कंटेनर में संग्रहीत करता है जिसे के रूप में जाना जाता है संग्रह. आप छवियों, संग्रहीत वीडियो और स्ट्रीमिंग वीडियो में ज्ञात चेहरों को खोजने के लिए संग्रह में संग्रहीत चेहरे की जानकारी का उपयोग कर सकते हैं। आप विभिन्न परिदृश्यों में संग्रह का उपयोग कर सकते हैं। उदाहरण के लिए, आप का उपयोग करके स्कैन की गई बैज छवियों को संग्रहीत करने के लिए एक चेहरा संग्रह बना सकते हैं
IndexFaces
operation. When an employee enters the building, an image of the employee’s face is captured and sent to theSearchFacesByImage
कार्यवाही। यदि चेहरा मिलान पर्याप्त रूप से उच्च समानता स्कोर (मान लीजिए 99%) उत्पन्न करता है, तो आप कर्मचारी को प्रमाणित कर सकते हैं। - डिटेक्टफेस एपीआई – This API detects faces within an image provided as input and returns information about faces. In a user registration workflow, this operation may help you screen images before moving to the next step. For example, you can check if a photo contains a face, if the person identified is in the right orientation, and if they’re not wearing any face blocker such as sunglasses or a cap.
- इंडेक्सफेस एपीआई - यह एपीआई इनपुट छवि में चेहरों का पता लगाता है और उन्हें निर्दिष्ट संग्रह में जोड़ता है। इस ऑपरेशन का उपयोग भविष्य के प्रश्नों के लिए संग्रह में एक स्क्रीन की गई छवि को जोड़ने के लिए किया जाता है।
- SearchFacesByImage एपीआई - किसी दिए गए इनपुट छवि के लिए, एपीआई पहले छवि में सबसे बड़े चेहरे का पता लगाता है, और फिर मिलान करने वाले चेहरों के लिए निर्दिष्ट संग्रह की खोज करता है। ऑपरेशन निर्दिष्ट संग्रह में चेहरे की विशेषताओं के साथ इनपुट चेहरे की विशेषताओं की तुलना करता है।
- तुलनाफेस एपीआई - यह एपीआई लक्ष्य इनपुट छवि में पाए गए 100 सबसे बड़े चेहरों में से प्रत्येक के साथ स्रोत इनपुट छवि में एक चेहरे की तुलना करता है। यदि स्रोत छवि में कई चेहरे हैं, तो सेवा सबसे बड़े चेहरे का पता लगाती है और लक्ष्य छवि में पहचाने गए प्रत्येक चेहरे से इसकी तुलना करती है। हमारे उपयोग के मामले में, हम उम्मीद करते हैं कि स्रोत और लक्ष्य छवि दोनों में एक ही चेहरा होगा।
- डिलीटफेस एपीआई - यह एपीआई संग्रह से चेहरों को हटाता है। आप हटाने के लिए एक संग्रह आईडी और चेहरा आईडी की एक सरणी निर्दिष्ट करते हैं।
.. पूर्वापेक्षाएँ
आरंभ करने से पहले, निम्नलिखित पूर्वापेक्षाएँ पूरी करें:
- एडब्ल्यूएस खाता बनाएं.
- अपने स्थानीय मशीन पर नमूना रेपो क्लोन करें:
We use the test client in this repository to test the various workflows.
- स्थापित करें अजगर 3.6+ अपने स्थानीय मशीन पर।
समाधान तैनात करें
उपयुक्त चुनें एडब्ल्यूएस CloudFormation stack to provision the solution into your AWS account in your preferred Region:
As we discussed earlier, this solution uses API Gateway integrated with Step Functions and Amazon Rekognition APIs to run the identity verification workflows. To test the solution, follow the steps in the कोड रिपॉजिटरी to use the provided test client.
The following sections describe the various workflows implemented via Step Functions.
नया उपयोगकर्ता पंजीकरण
The following image illustrates the Step Functions definition for new user registration. The steps are defined in the register_user.py
फ़ाइल.
इस कार्यप्रवाह में तीन कार्यों को बुलाया जाता है: पता लगाने वाले चेहरे, खोज-चेहरे, तथा सूचकांक-चेहरे। पता लगाने वाले चेहरे function calls the Amazon Rekognition DetectFaces API to determine if a face is detected in an image and is usable. Some of the quality checks include determining that only the face is present in the image, ensuring the face isn’t obscured by sunglasses or a hat, and confirming that the face isn’t rotated by using the ढोंग आयाम। अगर छवि गुणवत्ता जांच पास कर लेती है, तो खोज-चेहरे फ़ंक्शन पुष्टि करके Amazon Rekognition संग्रह में मौजूदा फेस मैच की खोज करता है फेसमैच दहलीज confidence score meets your threshold objective. For more information, refer to the section on using similarity thresholds to match faces. यदि संग्रह में चेहरे की छवि मौजूद नहीं है, तो सूचकांक-चेहरे function is called to index the face into the collection. The face image metadata is stored in the DynamoDB table and the face images are stored in an S3 bucket.
To register a new user, run the ऐप.पी.ई script (test-client
) by running the following code:
If the new user registration succeeds, the face image attribute information is added in DynamoDB.
New user registration with ID card
The steps to register a new user with an ID card are similar to the steps for registering a new user. The following image illustrates the steps, which are defined in the register_idcard.py
फ़ाइल.
The same three functions that we used to register a user (detect-faces
, search-faces
, तथा index-faces
) are called in for this workflow. First, the customer captures an image of their ID and a live image of their face. The face image is checked to confirm it meets our defined quality standards using the DetectFaces
API. If the image meets the quality standards, the live face image is compared to the face in the ID to determine if they’re a match. If the images don’t match, the user receives an error and the process ends. If the images match, we check if the face already exists in the Amazon Rekognition collections using the SearchFacesByImage
API. The search results are compared to the user’s current face image. If the user already exists, the user isn’t registered. If the user doesn’t exist in the collections, the relevant properties are extracted from the ID card. You can extract key-value pairs from identity documents using the newly launched अमेज़न टेक्सट्रेक AnalyzeID
API. The extracted properties from the ID card are merged and the user’s face is indexed in the DynamoDB table. After the image is indexed, the new user ID registration process is complete.
Existing user authentication
The following image illustrates the workflow for authenticating an existing user. The steps are defined in the auth.py
फ़ाइल.
यह चरण फ़ंक्शन वर्कफ़्लो तीन फ़ंक्शन को कॉल करता है: detect-faces
, compare-faces
, तथा search-faces
। के बाद detect-faces
फ़ंक्शन सत्यापित करता है कि कैप्चर की गई चेहरे की छवि मान्य है, compare-faces
function checks the DynamoDB table for a face image that matches an existing user. If a match is found in DynamoDB, the user authenticates successfully. If a match isn’t found, the search-faces
function is called to search for the face image in the collections. The user is verified and the authentication process completes if their face image exists in the collections. Otherwise, the user’s access is denied.
To test authenticating an existing user, run the app.py
script (test-client
) by running the following code::
Existing user login with a request for photo update
The following image illustrates the workflow to update an existing user’s photo. The steps are defined in the update.py
फ़ाइल.
This workflow calls four functions: detect-faces
, compare-faces
, search-faces
, तथा index-faces
. The steps are similar to the steps in the existing user authentication workflow. After the user captures their face image and the image quality is checked, we check for a matching face image in DynamoDB using the compare-faces
function. If a match for the user is found, their user profile is updated, their new face image is indexed by calling the index-faces
function, and the update process completes. Alternatively, if a match isn’t found, the search-faces function is called to search for the face image in the Amazon Rekognition collections. If the face image is found in the collection, the user’s profile is updated and their new face image is indexed. The user’s access is denied if their image isn’t found in the collections.
To update an existing user’s photo, run the ऐप.पी.ई script (test-client
) by running the following code:
क्लीन अप
अपने एडब्ल्यूएस खाते में अतिरिक्त शुल्क जमा होने से रोकने के लिए, एडब्ल्यूएस क्लाउडफॉर्मेशन कंसोल पर नेविगेट करके और आपके द्वारा प्रावधान किए गए संसाधनों को हटा दें। Riv-Prod
ढेर।
Deleting the stack doesn’t delete the S3 bucket you created. This bucket stores all the face images. If you choose to delete the S3 bucket, navigate to the Amazon S3 console, empty the bucket, and then confirm you want to permanently delete it.
निष्कर्ष
Amazon Rekognition सिद्ध, अत्यधिक स्केलेबल, गहन शिक्षण तकनीक का उपयोग करके आपके पहचान सत्यापन अनुप्रयोगों में छवि विश्लेषण को जोड़ना आसान बनाता है जिसके उपयोग के लिए किसी ML विशेषज्ञता की आवश्यकता नहीं होती है। अमेज़न मान्यता प्रदान करता है चेहरा पहचान और तुलना क्षमताएं। के संयोजन के साथ पता लगाने की जगह, चेहरे की तुलना करें, सूचकांक चेहरे, तथा चेहरे द्वारा छवि खोजें APIs, you can implement the common flows around new user registration and existing user logins.
Amazon Rekognition संग्रह सर्वर-साइड कंटेनर में पहचाने गए चेहरों के बारे में जानकारी संग्रहीत करने के लिए एक विधि प्रदान करते हैं। फिर आप छवियों में ज्ञात चेहरों को खोजने के लिए संग्रह में संग्रहीत चेहरे की जानकारी का उपयोग कर सकते हैं। संग्रह का उपयोग करते समय, संग्रह में चेहरों को अनुक्रमित करने के बाद आपको मूल फ़ोटो संग्रहीत करने की आवश्यकता नहीं होती है। Amazon Rekognition संग्रह वास्तविक छवियों को जारी नहीं रखते हैं। इसके बजाय, अंतर्निहित पहचान एल्गोरिथ्म इनपुट छवि में चेहरों का पता लगाता है, चेहरे की विशेषताओं को प्रत्येक चेहरे के लिए एक फीचर वेक्टर में निकालता है, और इसे संग्रह में संग्रहीत करता है।
पहचान सत्यापन की दिशा में अपनी यात्रा शुरू करने के लिए, यहां जाएं Amazon Rekognition का उपयोग करके पहचान सत्यापन.
लेखक के बारे में
नैट बाचमेयर एक AWS सीनियर सॉल्यूशंस आर्किटेक्ट है जो खानाबदोश रूप से न्यूयॉर्क की खोज करता है, एक समय में एक क्लाउड एकीकरण। वह अनुप्रयोगों को स्थानांतरित करने और आधुनिकीकरण करने में माहिर हैं। इसके अलावा, नैट एक पूर्णकालिक छात्र है और उसके दो बच्चे हैं।
एंथोनी पासक्वेरीलो is an Enterprise Solutions Architect based in New York City. He provides technical consultation to customers during their cloud journey, especially around security best practices. He has an MS and BS in electrical and computer engineering from Boston University. In his free time, he enjoys ramen, writing non-fiction, and philosophy.
लॉरेन मुलेननेक्स डेनवर, CO में स्थित एक सॉल्यूशन आर्किटेक्ट है। वह AWS पर आर्किटेक्ट सॉल्यूशन में मदद करने के लिए ग्राहकों के साथ काम करती है। अपने खाली समय में, वह लंबी पैदल यात्रा और हवाईयन व्यंजन पकाने का आनंद लेती हैं।
अमित गुप्ता एडब्ल्यूएस में वरिष्ठ एआई सर्विसेज सॉल्यूशंस आर्किटेक्ट हैं। वह बड़े पैमाने पर अच्छी तरह से आर्किटेक्टेड मशीन लर्निंग सॉल्यूशंस के साथ ग्राहकों को सक्षम बनाने के बारे में भावुक हैं।
- '
- 100
- 107
- 7
- पहुँच
- लेखा
- अतिरिक्त
- AI
- ऐ सेवा
- कलन विधि
- सब
- वीरांगना
- अमेज़ॅन रेकग्निशन
- विश्लेषण
- एपीआई
- एपीआई
- अनुप्रयोगों
- स्थापत्य
- चारों ओर
- प्रमाणीकरण
- एडब्ल्यूएस
- BEST
- सर्वोत्तम प्रथाओं
- बोस्टन
- बोस्टन विश्वविद्यालय
- निर्माण
- इमारत
- व्यापार
- प्रभार
- जाँचता
- City
- बादल
- कोड
- संग्रह
- सामान्य
- अंग
- आत्मविश्वास
- कंसोल
- कंटेनरों
- खाना पकाने
- लागत
- वर्तमान
- ग्राहक अनुभव
- ग्राहक
- डाटाबेस
- ध्यान लगा के पढ़ना या सीखना
- डेन्वेर
- खोज
- आयाम
- दस्तावेजों
- समाप्त होता है
- अभियांत्रिकी
- उद्यम
- उद्यम समाधान
- में प्रवेश करती है
- अनुभव
- अर्क
- चेहरा
- चेहरे के
- चेहरे की पहचान
- चेहरे की पहचान प्रौद्योगिकी
- Feature
- विशेषताएं
- आकृति
- प्रथम
- प्रवाह
- का पालन करें
- धोखा
- मुक्त
- समारोह
- भविष्य
- आगे बढ़ें
- हाई
- हाइलाइट
- हाइकिंग
- कैसे
- How To
- HTTPS
- पहचान
- पहचान की जाँच
- की छवि
- छवि विश्लेषण
- अनुक्रमणिका
- करें-
- एकीकरण
- IT
- बच्चे
- सीख रहा हूँ
- स्थानीय
- यंत्र अधिगम
- प्रमुख
- मैच
- ML
- MS
- न्यूयॉर्क
- न्यू यॉर्क शहर
- ऑफर
- ज्ञानप्राप्ति
- ऑनलाइन
- ओरेगन
- अन्य
- दर्शन
- वर्तमान
- प्रोफाइल
- अजगर
- गुणवत्ता
- को कम करने
- पंजीकरण
- उपयुक्त संसाधन चुनें
- परिणाम
- रिटर्न
- रोल
- मार्ग
- रन
- दौड़ना
- स्केल
- स्क्रीन
- Search
- सुरक्षा
- सेल्फी
- सेवाएँ
- सेट
- सरल
- समाधान ढूंढे
- माहिर
- गति
- मानकों
- प्रारंभ
- शुरू
- राज्य
- भंडारण
- की दुकान
- भंडार
- स्ट्रीमिंग
- छात्र
- सफल
- लक्ष्य
- तकनीकी
- टेक्नोलॉजी
- परीक्षण
- स्रोत
- पहर
- विश्वविद्यालय
- अपडेट
- उपयोगकर्ताओं
- सत्यापन
- वीडियो
- वर्जीनिया
- प्रतीक्षा
- अंदर
- वर्कफ़्लो
- कार्य
- लिख रहे हैं