Face recognition in real-time | with Opencv and Python

  Рет қаралды 247,819

Pysource

Pysource

2 жыл бұрын

Blog and Notebook: pysource.com/2021/08/16/face-...
With face recognition, we not only identify the person by drawing a box on his face but we also know how to give a precise name. With OpenCV and Python, through a database, we compare the person's photo and we know how to identify it precisely. For example in the preview photo, the software was able to tell that person in the photo is Jeff Bezos.
➤ Courses:
Training Mask R-CNN PRO (Notebook + Mini-Course): pysource.com/mask-rcnn-traini...
Full Computer Vision course: pysource.com/object-detection...
➤ Follow me on:
Instagram: / pysource7
LinkedIn: / pysource
➤ For business inquiries:
pysource.com/contact
#FaceRecognition #OpenCV #DeepLearning

Пікірлер: 324
@pysource-com
@pysource-com 2 жыл бұрын
►► You can Build a Computer Vision software to DETECT and TRACK any Object. → 4-Step FREE Workshop pysource.com/blueprint-workshop-signup/
@rheaynah
@rheaynah 2 жыл бұрын
what algorithm did you use?
@trick_bros
@trick_bros Жыл бұрын
What algorithm did you use
@meltysensei2652
@meltysensei2652 2 жыл бұрын
This is amazing and it works (python 3.7, pip installs), thank you!
@omidalekasir4736
@omidalekasir4736 Жыл бұрын
Awesome! The question is, why is it working so smoothly? Causey I wrote the same thing with face_recognition and it only shows 1 frame per second. Is your CPU like really powerful? I tried to run it on GPU but it didn't work!
@selenawilliams5051
@selenawilliams5051 Жыл бұрын
This is great, thank you for sharing! I am working on a research project related to real-time facial expression recognition for mental health. Could you post a video that implements facial expression recognition on top of this?
@a-tiku-r
@a-tiku-r 3 күн бұрын
This is magnificent, Thanks for sharing! Currently i am working on a project in this related topic (Human Face Recognition).
@henkhbit5748
@henkhbit5748 2 жыл бұрын
Indeed a great library for image recognition. But I found that when a person face is slanted in the picture, say 30 degrees then the face_encodings function will get an exception. That is a drawback of this module..., otherwise it does an exellent job for face matching.
@vamshimaskuri5208
@vamshimaskuri5208 Жыл бұрын
Yes
@aliciahock9651
@aliciahock9651 Ай бұрын
I just tried this and it works perfectly! Thank you so much!
@aiforyounow
@aiforyounow 2 жыл бұрын
You are doing a fantastic job God bless you and increase your ability ❤️
@fadhelalsuwaidi1221
@fadhelalsuwaidi1221 2 жыл бұрын
could u work in multiple dataset for on person for make the detection more accurate, this would be great.
@drewenia
@drewenia 2 жыл бұрын
Hello Sergio. What kind of camera is this?
@kavyan3731
@kavyan3731 7 ай бұрын
Amazing tutorial! Worked perfectly! thanks!
@cgoody3170
@cgoody3170 Жыл бұрын
Ive noticed a lot of comments here by folks wanting to scale up the recognition to many thousands of images. There are solutions to this but you will need to learn about high performance computing architectures first and that is a field in of itself. But to be honest: if you don't know how to scale this problem then you should question whether you should be even trying, since the legal and ethical issues you may encounter if you get it wrong may land you in serious trouble. Great tutorial though.
@sedky69
@sedky69 4 ай бұрын
Great tutorial and great choice of library. Thanks
@leilaghasemzade5880
@leilaghasemzade5880 2 жыл бұрын
Thanks for the tut. How this library recognize the people? when you show a different pics of the same people how it can understand that this is that person? by what technique it compares photos?
@rover1615
@rover1615 2 жыл бұрын
hello sir, what algorithm do you use? thank you
@fadhelalsuwaidi1221
@fadhelalsuwaidi1221 2 жыл бұрын
Hi Mr Seraio, do u think this library could handle more than one thousand face ? , and if not tell me model or library may will depend on ur experiance.
@gantagayatri1251
@gantagayatri1251 2 жыл бұрын
Could you please explain what is the use of "simplefacerec" file that downloaded to accomplish the task
@chitrakaseri5203
@chitrakaseri5203 Жыл бұрын
hey can u tell me from where do we download that file
@GolemTH9
@GolemTH9 2 жыл бұрын
Can i use this face recognize method is use to detect somthings like car or object by compare with image data?
@suryakanth5370
@suryakanth5370 2 жыл бұрын
Sir what's the use of simple facerec file ?
@sshahnawaz980
@sshahnawaz980 7 ай бұрын
Amazing tutorial, kindly explain simple facerec code it will be helpful....
@thatza547
@thatza547 4 ай бұрын
I have a question, My camera seem to be lagging when it detect one of the dataset. Anyway to make it less laggy like perhaps 60fps?
@anshucodevita7752
@anshucodevita7752 2 жыл бұрын
This face_recogntition module is getting install on windows os. can you make this module for windows also
@mahmudaromarahman5528
@mahmudaromarahman5528 2 жыл бұрын
Dear Mr. Sergio, which algorithm has been used here? Mention, please.
@mr-strange-0w0
@mr-strange-0w0 Жыл бұрын
Very Helpful Video For Me, Thanks
@usmanhassan1170
@usmanhassan1170 2 жыл бұрын
There should be more accuracy, and for future do one thing that store encodings in a excel file so that one can have his face encodings and that will help to make face decoders in future.
@pysource-com
@pysource-com 2 жыл бұрын
I agree about the accuracy. I on purpose (reduced the accuracy on this one, by shrinking image size that is processed) to make it in realtime with just the CPU.
@usmanhassan1170
@usmanhassan1170 2 жыл бұрын
@@pysource-com okay, i see, btw you are doing great work.
@niteeshanithi906
@niteeshanithi906 Жыл бұрын
What line should we add to this code to tell the recognised person name
@dongli7383
@dongli7383 2 жыл бұрын
grat job bro ! thanks for the toturial
@Furkan-mc6cm
@Furkan-mc6cm 2 жыл бұрын
Hey, very great projects bro 👍
@imranshaikh-ez4ht
@imranshaikh-ez4ht Жыл бұрын
Hello sir, thank you for your greate efforts..I really appretiate it..sir actually I am working on facial application can you tell me for large dataset which technology should I prefer dataset is custom images into millions images
@serkankaracan9014
@serkankaracan9014 2 жыл бұрын
I changed the project a bit. My aim is to open the door by opening the magnetic lock when the camera sees my face. There is a button in my project. When I press the button, the cv2 library is activated. At this time, when the camera sees my face, I activate the relay for 3 seconds, then the relay turns off. But this relay pull event happens many times. I guess it's a problem like this because it frames my face so many times. What kind of arrangement do I need to take only 1 frame and turn the relay on and off. Thanks for your help..
@Gh0st_0723
@Gh0st_0723 2 жыл бұрын
Instead of capturing the camera live, have it capture the first or second frame only eg cv2.frame ...
@SahilSingh-zh6ee
@SahilSingh-zh6ee Жыл бұрын
but it might be not good idea to actually put it on home door as it can be open by your picture too
@nbsu766
@nbsu766 Жыл бұрын
Can i ask if there is another way to load the faces pictures? i have a students data (more than 100 faces). it wont be practical if i encode each student in the code. so is there another way for doing it? *i have the pictures loaded on mysql phpmyadmin* maybe that would help?
@Subagyo-Tepil
@Subagyo-Tepil 2 жыл бұрын
thanks for clear explanation
@sltechgalaxy1677
@sltechgalaxy1677 2 жыл бұрын
Hey excuse me sir please can we use Esp 32 camera module for this project??
@liviuconstantin9960
@liviuconstantin9960 2 жыл бұрын
Hey Sergio, excellent job sir, but.....how do we import that SimpleFacerec file? The link it's not in the mail box. Or is it? what am I missing?
@pysource-com
@pysource-com 2 жыл бұрын
you need to go here pysource.com/2021/08/16/face-recognition-in-real-time-with-opencv-and-python/ the link is unlocked and displayed on the blog page after you confirm your email (you do not get it directly to the email)
@liviuconstantin9960
@liviuconstantin9960 2 жыл бұрын
@@pysource-com Thanks Sergio, now I'm able to finish this project. Thank you for replying, some don't. I think I will subscribe to your courses now. May I suggest that you offer courses on a monthly basis payment (pyimagesource offers that possibility). This will make it easier for some of us to pay as opposed to one big lump sum which is harder to obtain for some. Thank you again !!!
@smukerji7065
@smukerji7065 4 ай бұрын
Excellent work
@eduardmart1237
@eduardmart1237 Жыл бұрын
Why does it work so fast on your machine? I get a horrendous performance on big_buck_bunny_720p_5mb.mp4 video! Does it use dlib under the hood?
@zijinzhang20
@zijinzhang20 2 жыл бұрын
does the library accept multiple samples of one face?
@POOJAKUMARI-gy2ys
@POOJAKUMARI-gy2ys 2 жыл бұрын
which algorithm is used in this project????
@ntuindip5042
@ntuindip5042 2 жыл бұрын
Wow the project is great. I would like to know how to connect the project with a Phone or a device for capturing the face then send the Information to the computer for Display
@moonx2516
@moonx2516 2 жыл бұрын
@pysource is there any way to write by eye using virtual keyboard on the screen without using blinking?
@pysource-com
@pysource-com 2 жыл бұрын
It would be possible by having some hat keeping the webcam a few centimeters from the eye, because otherwise with the eye too far, it won't be precise enough and it would be almost impossible to hit the keys correctly
@v1hana350
@v1hana350 2 жыл бұрын
How did you calculate accuracy and loss functions by using the face recognition library?
@lolgamer8591
@lolgamer8591 2 жыл бұрын
Hi, Have you found how to calculate accuracy? Cuz we're doing a project and we need to have the accuracy but we were stuck in it
@mohammedazzan7529
@mohammedazzan7529 Жыл бұрын
@@lolgamer8591 did u get thr solution?
@godphoenix1916
@godphoenix1916 2 жыл бұрын
how can we add an excel sheet in it so that we can keep the track of people that were scanned
@bilgekaanozturk222
@bilgekaanozturk222 2 ай бұрын
hey im trying to build a face tracking camera using esp32 and i really need to use a face recognition on my computer using its own cpu so can i alter this code to recognize face from given website if so how thank you for reading
@wilsonnkhata1020
@wilsonnkhata1020 Ай бұрын
@Pysource , that simple facerec file , where to get please assist
@alyallam4815
@alyallam4815 2 ай бұрын
Than you Sergio, such a great way of explanation .. I am just a beginner and somehow I managed to run it without errors can you please share something related to 3D object detection ( using Lidar or 3D cameras like Zed) as it is my project at the moment and somehow lost. Thanks in advance 😘
@AHMADKELIX
@AHMADKELIX 2 жыл бұрын
permission to learn sir. thank you
@JNET_Reloaded
@JNET_Reloaded 2 жыл бұрын
How can i do this with an external ip camer on same network please? not built in web cam on an rpi4 or anything?
@aryanexegamer8748
@aryanexegamer8748 3 ай бұрын
Good morning sir, how we can acieve attendance recording based on face recognization only from real person face, not by comparing images from showing pic from mobile.
@cvicracer
@cvicracer 2 жыл бұрын
Awesome work
@heeeeykid
@heeeeykid 7 ай бұрын
Great video! I looked for the files that you mentioned to download and i didn't found it. the link in your description takes me to your website with a button to download the source code, but without these files. Can you help me with it?
@derencakr9450
@derencakr9450 7 ай бұрын
I couldn't find it either
@ashikmahmud7398
@ashikmahmud7398 2 жыл бұрын
thank you very mutch for the video it really helped me 😍😍
@zaidomar3402
@zaidomar3402 2 жыл бұрын
I got this probelm operands could not be broadcast together with shapes *(1,16)(128,)* any idea or video that helps. thanks
@yami_no_ember
@yami_no_ember 2 жыл бұрын
from where do i download those 2 py files?
@kaziranga_national_park
@kaziranga_national_park 2 жыл бұрын
Sir, is possible ?. Photo-recognition software catches tigers by their stripes. Already given name to tiger Id
@youssefthebest1784
@youssefthebest1784 2 жыл бұрын
Hello can you please help me I want an algorithme that tells me if two shapes are the same shape
@aliashmawy425
@aliashmawy425 11 ай бұрын
what is your pc specs, i tried the code on my laptop but it slows down when it detects a face
@JESUSCHRIST-bb7fp
@JESUSCHRIST-bb7fp Жыл бұрын
Is there a way to use face tracking and swapping in real time using a live stream video feed, another words not using web cam for my own face, but instead swap anyone's face in real time on obs live stream, i cant seem to find any info if this is possible?
@zourrimis9706
@zourrimis9706 Жыл бұрын
Thank you so much! I finally found a code working for me and my project :) please keep it up
@sreevanijalagari3863
@sreevanijalagari3863 Жыл бұрын
Can u help when i try installing face recognition module it is giving error i am using python 3.8
@vinuthnachowdary725
@vinuthnachowdary725 9 ай бұрын
Hlo can u hel me to download simle_facerec
@warriorhistory
@warriorhistory 4 ай бұрын
Hello sir new subscriber here thanks for the tutorials I am truly grateful may I know what webcam you're using?
@thanhtaiphan2651
@thanhtaiphan2651 2 жыл бұрын
Can you make a tutorial about how to detect a specific person after YOLO-training detecting all people? Thanks
@pysource-com
@pysource-com 2 жыл бұрын
That's an interesting idea. I'll definitely take it into consideration for future videos
@allfires4957
@allfires4957 Жыл бұрын
@@pysource-com please sir,we will really appreciate it
@dmitrystasiukewicz3841
@dmitrystasiukewicz3841 Жыл бұрын
what algorithm was used to identify the face?
@kartiksharma674
@kartiksharma674 Жыл бұрын
where are the files as u said they are in description
@ajaymusk6123
@ajaymusk6123 2 жыл бұрын
AI humanoid robot working. good video for my project. thank sir.
@t.r.abhishekkasturi9616
@t.r.abhishekkasturi9616 10 ай бұрын
hey im not able to download the code from ur site even after registering
@ryoo5295
@ryoo5295 Жыл бұрын
Is there a score that describe similarity between the images
@mastersidea89
@mastersidea89 Жыл бұрын
Initial i i saw as a good tutorial but why do you make it hard to get the simplefacerec file?
@user-ff7kj2ik4i
@user-ff7kj2ik4i 3 ай бұрын
Thank you sir it perfectly working
@robo4827
@robo4827 Ай бұрын
hey can u pls help me out facing a lot of issues downloading the face_recognition libraray? how did u do it?
@mikiashailu8119
@mikiashailu8119 2 жыл бұрын
hello! please build other project on face recognition based attendance system
@aradhyakumarchandra8900
@aradhyakumarchandra8900 Ай бұрын
where is the link for simple_facerec?????
@atharvagosavi7771
@atharvagosavi7771 2 жыл бұрын
The Rectangle frame is not getting created it throws error at simple_facerec.py file, what should I do????
@nguyenhuydinh
@nguyenhuydinh 2 жыл бұрын
uhm. i have a question. if my application is like open door with face. i want to add more face to open the door. i have to reload encoding face image or something ... ?
@pysource-com
@pysource-com 2 жыл бұрын
exactly, you need to write the code in order that stores new encoding faces dinamically once a new face is detected
@sivachandran2389
@sivachandran2389 Жыл бұрын
Actually this is cool bro!
@mohamad241
@mohamad241 2 жыл бұрын
grat job bro ! thanks for the toturial i have a question about that if i want to save a lot of encoding image in to database and from at the application i just want to search for the faces how can i do that ? how should i saved encoding image ?
@pysource-com
@pysource-com 2 жыл бұрын
Now we use a while loop to load the frames from the camera. The concept is the same, simply instead of getting the frames from the camera on the while loop, you loop through the images of a folder
@mohamad241
@mohamad241 2 жыл бұрын
@@pysource-com and how can i save those endocing images to database ? which type of data ?
@buluecolour3190
@buluecolour3190 Жыл бұрын
Excuse me sir i do type everthing like you did but when my camera detect my face it just quit itself and show error >> 'str' object is not callable. If i delete the line cv.putText it will works normally i dont know how to fix it
@udaykiran5602
@udaykiran5602 2 жыл бұрын
Bro help me to how to download the face recognition and simple facereck files
@abdulrehmany5309
@abdulrehmany5309 2 жыл бұрын
the face recognition is pretty slow when it recognizes a face, down to 2 fps only? any way to solve this, urgent!
@Tuncaycortez
@Tuncaycortez 2 жыл бұрын
did you solve
@bks637
@bks637 2 жыл бұрын
Hello sir, how to make face recognition with app lock using python interface
@hofitroy1
@hofitroy1 2 жыл бұрын
hey, nice tutorial but can I add more pictures of the same person to get better accuracy? or its not possible?
@AiPhile
@AiPhile 2 жыл бұрын
Probably it will improve the accuracy. Check out official docs of face_recognition module .
@hofitroy1
@hofitroy1 2 жыл бұрын
@@AiPhile yeah it make sense but when I have like 4000 pictures to every person (like 12K pictures in total) I get low fps on realtime video using the face_encodings method. should I use the KNN instead?
@AiPhile
@AiPhile 2 жыл бұрын
surly the fps will decrease, other then that take look at this module named retinaface it has 98 Accuracy.
@AiPhile
@AiPhile 2 жыл бұрын
Thank you sir
@joshuaemeghai8872
@joshuaemeghai8872 Жыл бұрын
Pls, how about object recognition? I have a project I'm working on object recognition. Kindly help out
@rayatopia
@rayatopia 9 ай бұрын
i cant find simple face rec file. where is it?
@kaustubhmokal8947
@kaustubhmokal8947 2 жыл бұрын
bro you are genius
@rog0079
@rog0079 2 жыл бұрын
Just one question, How can i make use of multiple images of a single person, like for example my folder structure is: /images -> person1_folder/image1, image2, image.... person2_folder/image1, image2, image...., So the question is how to generate encodings of these? Like stacking the encodings of similar person? how..
@pysource-com
@pysource-com 2 жыл бұрын
With this code right here, for the way I structured it, it's not possible. You should manually edit the simplefacerec file to change the way the faces for encodings are loaded and group them by people faces
@muhammadilham248
@muhammadilham248 Жыл бұрын
Could anyone advise, I got it running but it seems like when it detects a face the webcam seems to be so laggy
@chitrakaseri5203
@chitrakaseri5203 Жыл бұрын
Where do we get that Simple_facerec python file from????
@nitinkeshri7156
@nitinkeshri7156 2 жыл бұрын
please explain the simple facerec file too
@bacetto73carlotto94
@bacetto73carlotto94 2 жыл бұрын
Sempre al top!!!
@litunmeher9588
@litunmeher9588 2 жыл бұрын
Can we modify that code, if a unknown person comes in frot of the camera then it will show the UNKNOWN PERSON?? How to do that?
@rasheed3039
@rasheed3039 2 жыл бұрын
Thanks for sharing..when I add Arabic text instead of English I get question marks ?? What should I fix to display it properly ?
@pysource-com
@pysource-com 2 жыл бұрын
You need some text encodings which will allow you to use that. you can look for arabic text python, and probably there is some library which will convert the text format to be displayed
@mangtomasgaming7884
@mangtomasgaming7884 2 жыл бұрын
'pip' is not recognized as an internal or external command, operable program or batch file.
@lesptitsoiseaux
@lesptitsoiseaux Жыл бұрын
How do you use the gpu do do this?
@AbdulWahab-bm4gt
@AbdulWahab-bm4gt 2 жыл бұрын
brah you are a gem
@amishah4145
@amishah4145 10 ай бұрын
can you name the tech stacks used?
@zarafshanbibi2035
@zarafshanbibi2035 2 жыл бұрын
Hi Sir! I need your help in my college project. My project is a Door Security System (first the system will recognize the face if face matched then door will open otherwise door remain close). My teacher ask me to create a desktop application for this. But i don't know how to do this. Can you please help me in my project?
@saaidalkamha7240
@saaidalkamha7240 2 жыл бұрын
Dude, Am working on the exact same project, i think you would need a face recognition code with confidence measured in it. Unfortunatley this code won't work for you
@Ankitkumar-kk5rm
@Ankitkumar-kk5rm 2 жыл бұрын
have you made your project by now? @zarafshan Bibi
@fathimafaziya3778
@fathimafaziya3778 Жыл бұрын
can i know what does simple face file contain ?
@rheyasharma2548
@rheyasharma2548 5 ай бұрын
its showing unresolved reference face_recognition even after I download face recognition model and util where to download face_recognition package
@anshulmaheshwari2408
@anshulmaheshwari2408 Жыл бұрын
how do i save detections using imwrite function to a folder
@danishhussain4816
@danishhussain4816 Жыл бұрын
my web cam live-video is freezing. its reaction time is very low, what should i do?
@sharvariwalde8116
@sharvariwalde8116 2 жыл бұрын
i have lots of errors installing dlib library , it's unable to install, what should i do?👏
@gugupcoutinho
@gugupcoutinho Жыл бұрын
14:36 if you get an error rey another value for VideoCapture( ) I tried with VideoCapture(0) and it worked
Python Face Recognition (Beginner Tutorial)
12:36
Matthew Berman
Рет қаралды 38 М.
Object Tracking from scratch with OpenCV and Python
1:00:13
Pysource
Рет қаралды 232 М.
NO NO NO YES! (50 MLN SUBSCRIBERS CHALLENGE!) #shorts
00:26
PANDA BOI
Рет қаралды 102 МЛН
He tried to save his parking spot, instant karma
00:28
Zach King
Рет қаралды 12 МЛН
Free Anti Spoofing/ Liveliness Detector for Face Recognition System Fake VS Real | Computer Vision
2:26:55
Face Recognition With Raspberry Pi + OpenCV + Python
7:15
Core Electronics
Рет қаралды 171 М.
Code with me using Python and AI to build a face detection app
10:55
Python Face Recognition Tutorial
31:18
Traversy Media
Рет қаралды 623 М.
How does facial recognition work?
6:43
Interesting Engineering
Рет қаралды 187 М.
Цифровые песочные часы с AliExpress
0:45
wyłącznik
0:50
Panele Fotowoltaiczne
Рет қаралды 23 МЛН
What percentage of charge is on your phone now? #entertainment
0:14