Build a Facial Recognition App on AWS from Scratch | Rekognition, Lambda, DynamoDB, API Gateway, S3
ฝัง
- เผยแพร่เมื่อ 11 ก.ค. 2024
- In this video, I explained how to build a facial recognition application on AWS in great details.
Video on uploading files to S3 via API Gateway: • Build a File Upload AP...
Video on how to build a serviceless API with API Gateway: • Build a CRUD Serverles...
Video on how to host a website on AWS with S3: • Host a Website on AWS ...
Configure AWS CLI: docs.aws.amazon.com/cli/lates...
0:00 - Intro and architecture diagram walkthrough
3:10 - S3 bucket creations
4:28 - Registration lambda function creation
08:01 - DynamoDB table creation
08:54 - Writing the code for the registration lambda
16:31 - Creating a Rekonigtion collection
18:41 - Testing the registration flow
21:48 - Authentication lambda function creation
28:15 - API Gateway creation
35:57 - Creating the React frontend
52:00 - Code mistake correction
53:56 - End to end product testing / demo
This was a very complex project. Would love to see more of these! Thank you so much Felix.
What a fantastic tutorial! Good job, mate. Keep going!!!🙏
Thank you!!
Good and practical tutorial! Looking forward to this kind of videos! Thank you so much for sharing this!
glad that u found it helpful!! 👍
Clearly a lot of work is going into your videos. Thanks for doing these, excellent learning tools!
do you have source code with u ?
@@pratikpowar4725 you should ask the author of the video.
Wow, l am learning Facial Recognition. I came across with this tutorial which is amazing. Thanks man!
Fantastic! You are the best Felix
glad that u found it helpful!! 👍
good demo, thanks
Hi. Please, keep with this tutorial. Great. From Spain
Glad that u found it helpful!!
Thank you for making such a great tutorial! I'm actually preparing for my SAA exam, and this tutorial is gonna be a great help for obtaining some practical exp♥
Are you available to share your AWS account with me? I pay
Really helpful video. Each step clearly mentioned and explained 👍🏻
Glad you liked it
do you have source code can you please share
learning a lot about how aws services work together just by fixing my errors when trying this myself. thanks so much
glad that u found it helpful!!
Are you available to share your AWS account with me? I pay
Awesome video.
Thanks!
Awesome tutorial! please make this type of real architecture videos. Thanks
Glad that u found it helpful mate!!
Thanks!
Good work! Really a nice tutorial. Can you please add tutorial to test your API gateway using postman.
How to send an image for upload and verification to the lambda function other than the react Frontend. Thanks!
Do we have to include policies, such as those related to Amazon Rekognition, in the IAM user configuration for the AWS Command Line Interface (CLI)?
Do we need to upload the visitor pics to S3 bucket in the visitor images bucket?
Dynamic imports are not working in Vite. I am not able to import the images dynamically using Vite with React.js. Also, 'require' does not work in Vite. Please help ASAP
thank you for your work sir! i have a question that where can I get the code sir?
How can we capture, and upload the image instead of choosing a a pre exisiting photo?
I am learning about AWS and Flutter to develop a mobile app (Android)
I face problem
My question is if there is a way to send an image from the app directly to a S3 Bucket and just store the URL related to that image in DynamoDB. through aws lambda and api gateway
I will be thank full for any kind of your guidance because I am new to AWS and I actually don't know what is the actual Procedure
How can I access the code you did in this project, is there any link to the code work, because I am facing some issues in my code.
Hello Felix, thanks for your generous sharing, these fantastic videos helps me a lot! But as a beginner, I do want to figure out that how do you learn this coding process? I mean from the work flow to put it into reality. It's so cool to coding like you, but how do I learn to do a new one by myself?
Great video. Do you have training sessions? If yes I would like to join. Thanks
Brother can you tell me how to create a live video streaming platform using AWS Cloud for in India as some of the features like elemental streaming in India, please
could this work with license plate recognition on the company parking lot?
while uploading image only my catch block is executing and vistor images are storing in my bucket but gettion error in authentication
hiya, thanks for spending your time creating this project, could you provide a link for the code please.
That was awesome, could you please share the git hub link for the project ?
Hi Felix, I have been trying it since 3 days. Can you share me the code.
does this cost money ? or is it included in the free tier ?
Hi can you make make a video on how to make a liveliness system using aws rekognition
had any solved the problem:There is an error during the authentication process.PLease try again
when i select the iimage and click on authenticate ,, its showing error , i cant find the bug help me anyone pls.
its showing error sir (has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.)
I am facing the same issue...
me too
same issue with me right now
Sampe Problem :(
Do you found how to solve it?
@@inbal6999 no
Hey bro can u give me the link of ur api ?
Could you please share code as well for much more understanding?
hey!! can you please provide source code for react frontend
Hi Sir, I tested the application but all of the pictures I tried to authenticate results in an error during authentication process. Do you have any idea where this could be come from? Thank you.
yes i am also getting sam type of error after authenticating the same pics that i have added in my s3 bucket
can you share your code
Hi Christopher and @kiran, Did you guys managed to find the solution to this?
YOu are far far too kind......I assume leaving this on will incur a lot of bills. How do we delete these resources so we do not have anything running in the background and incurring charges after we are done. Thank you Felix
woooooow look at him
Their documentation says you can create a collection from the console but I don't see any option either, I thought it was just me lol
can I get the source code please?
Im getting this error "There is an error during the authentication process. Please try again." While I send a picture for authentication
Did you get a solution to this?
@@comp-nm8qwnope
can anyone please send the source code
Hello sir, I just new learner with your video for academic purposes, and at the final it showing me this error: ERROR in ./src/App.js 91:11-47
Module not found: Error: Can't resolve './visitors/${visitorName}' in 'C:\Users\Leong\Downloads\AWS project\code\facial-recognition-app\src', what wrong with my code can you please help me identify as soon as possible, it is urgent for me. Thank you. If anyone have face this issues and solve it before, please provide the solution to me so that I can solve it. I didn't have any experience with React Native previously so it is hard for me to debug. Appreciate those help, thank you.
i had the same issue and looks like we have to use backticks(`) instead of single quotes('). After the correction i didnt face this error.
Can we do this in free tier accounts plss replyy
yes
sir, I really need you help urgently, Could you please provide platform to contact you? I am a new learner for academic purposes and I without any experience already debugging more than whole week already still cannot solve it, when I upload the image to authenticate and it always displaying the result of "These is an error during the authentication process. Please try again.". Please help me or anyone have facing this issues before, please help me.
Hi, have you resolve it? I am also facing the same issue with this one.
@@christopherpalma3121 no, still can't solve it, if you able to solve it. Please share the code with me, thank you.
@@user-mr8vn9hi6w can you send me an email so I can help you with the same issue thanks
@@christopherpalma3121bro have you solved it, please reply
that means there is an error in the lambda function. please check cloudwatch logs and see what the issue was
Hello, i keep getting "There is an error during the authentication process" when i try to authenticate my images. This is the error that shows in my CloudWatch log. Could you please help as soon as possible?
{
"errorMessage": "'queryStringParameters'",
"errorType": "KeyError",
"requestId": "6f82dd6b-d001-49aa-bfad-182c4fb85d44",
"stackTrace": [
" File \"/var/task/lambda_function.py\", line 17, in lambda_handler
objectKey = event['queryStringParameters']['objectKey']
"
]
}
Did you get any solution to this error? I am having the same issue
Hello sir, I just start to learn AWS and I need you help, I follow the first part to store the image to DynamoDB but it giving me the following errors: [ERROR] UnboundLocalError: cannot access local variable 'index_employee_image' where it is not associated with a value
Traceback (most recent call last):
File "/var/task/lambda_function.py", line 30, in lambda_handler
raise e
File "/var/task/lambda_function.py", line 17, in lambda_handler
response = index_employee_image(bucket, key)
What wrong with the code? I have try to check the code for whole day but still can't solve it, please help me, it is important and urgent for my study, appreciate you help.
Code:
import boto3
s3 = boto3.client('s3')
rekognition = boto3.client('rekognition', region_name = 'ap-southeast-1')
dynamodbTableName = 'employee'
dynamodb = boto3.resource('dynamodb', region_name='ap-southeast-1')
employeeTable = dynamodb.Table(dynamodbTableName)
# once upload the image will invoked the bucket name and file name is going to our event and object
def lambda_handler(event, context):
print(event)
# extract the key (1. bucket name 2. object image name)
bucket = event['Records'][0]['s3']['bucket']['name']
key = event['Records'][0]['s3']['object']['key']
try:
response = index_employee_image(bucket, key)
print(response)
if response['ResponseMetadata']['HTTPStatusCode'] == 200:
faceId = response['FaceRecords'][0]['Face']['FaceId']
# get the image name
name = key.split('.')[0].split('_')
firstName = name [0]
lastName = name[1]
register_employee(faceId, firstName, lastName)
return response
except Exception as e:
print(e)
print('Error processing employee image {} from bucket {} .'.format(key, bucket))
raise e
def index_employee_image(bucket, key):
response = rekognition.index_faces(
Image ={
'S3Object':
{
'Bucket':bucket,
'Name': key,
}
},
CollectionId = "employees"
)
return response
def register_employee(faceId, firstName, lastName):
employeeTable.put_item(
Item={
'rekognitionId': faceId,
'firstName': firstName,
'lastName': lastName,
}
)
try to change the region to us-east-1 in console and also in all the buckets
@@kumarshivam5532 sir, have you done this tutorial? If yes, can you please share the source code so that I can doing comparison
@@kumarshivam5532 was this source code error resolved as I am also facing it
@@user-mr8vn9hi6w was this source code error resolved as I am also facing it
Thanks!
Thank you for the support!! 🙂 really appreciate it!!