Face Recognition With Python 3.10 Tutorial (Webcam)

Поділитися
Вставка
  • Опубліковано 18 жов 2024

КОМЕНТАРІ • 163

  • @Hackerzx
    @Hackerzx 11 місяців тому +43

    There is no source code in description !!!

  • @BeckyBenton
    @BeckyBenton Рік тому +31

    Lovely tutorial. I did have a bit of a problem at runtime with small_frame[:, :, ::-1]. I fixed it by calling this, instead: cv2.cvtColor(small_frame, cv2.COLOR_BGR2RGB)

    • @ptk_trindade
      @ptk_trindade Рік тому +2

      I had the same problem, thanks!

    • @ahmadyasser0
      @ahmadyasser0 Рік тому +2

      Same 🤝

    • @paulmanoha9678
      @paulmanoha9678 Рік тому +1

      Thank you ! You saved me !

    • @Badoofhmz
      @Badoofhmz Рік тому

      can u share the source code I m having trouble running in mine

    • @AbhishekSingh-xg3zj
      @AbhishekSingh-xg3zj 5 місяців тому

      Thanks a lot Becky. I wasn't getting any fix for this and I got it from you. Thanks a lot once again.

  • @richieT737
    @richieT737 10 місяців тому +1

    Firstly an excellent tutorial, very well presented. I had a couple of issues with the code and I offer solutions for these in case anyone has the same. Firstly I added the following line of code to remove the file extension for a nicer display:
    name = self.known_face_names[best_match_index]
    # remove the file extension for a neater display
    name = name.split('.')[0]
    I also found with more than one face it would call everyone by the same name. This is because the zip line repeats until the shortest tuple is completed then stops. If a single face is in frame for a while before a second face appears only the first will be annotated. To fix this I reversed the names and location lists to give a last in first out solution. Change line to: for (top, right, bottom, left), name in zip(reversed(self.face_location), reversed(self.face_names)):
    I hope this helps someone.

    • @rayendammak7303
      @rayendammak7303 9 місяців тому

      can you provide us with the code , thanks :)

    • @morbid1134
      @morbid1134 9 місяців тому

      You said "firstly" twice and had no "secondly."

  • @MrNosiks
    @MrNosiks Рік тому +5

    I changed the line and it worked for me
    rgb_small_frame = small_frame[:, :, ::-1]
    rgb_small_frame = cv2.cvtColor(small_frame, cv2.COLOR_BGR2RGB)

  • @dnedya
    @dnedya 2 роки тому +3

    such a fun and to-the-point tutorial, thanks so much!

  • @asifrehman4214
    @asifrehman4214 Рік тому +3

    Hi Author Its a great article...
    with perfection...
    1) If a show a pic consisting of multiple faces then it only detect just one face at a time...What is the reason for it?
    2) Its quite slow as well...
    Can you guide on these two aspects.
    A great video.

  • @mrmartin438
    @mrmartin438 Рік тому +10

    Hi! when run face_encodings in the while, my fps dorops to 3-4, can i imporove or optimize this function?

  • @abdulrahmansabri4547
    @abdulrahmansabri4547 Рік тому +7

    thank you so much for such a huge effort, when trying recognition, it is lagging too much, do you have any idea about what is the problem? thanks in advance

  • @swiftt3942
    @swiftt3942 Рік тому +9

    where is the code in the description?

  • @가라세상의미사일공방

    You're amazing. No one has ever described it so easily and so succinctly. Thank you.

  • @zhilaanrusmawan7913
    @zhilaanrusmawan7913 2 роки тому +5

    hey there, i love your tutorial because it is simple and easily understandable.. one question? can we make this as an .exe file and then install it through setup.exe in other computer?

  • @nelsongibson9231
    @nelsongibson9231 2 місяці тому

    Apparently the source code mentioned near 5:00 in video is well hidden. Otherwise, the video is informative. At 75, I like to follow along with the code. Sometimes I do try the code and sometimes not. The source code does make it handy for me when it isn't so well hidden.

  • @shahnewazparvez4502
    @shahnewazparvez4502 Рік тому

    Huge help, learned a lot, thank you.

  • @RashedUlIslam-zx5fy
    @RashedUlIslam-zx5fy Рік тому

    It's Awesome!! You are great Boss!! ❤❤

  • @cgsoldier4196
    @cgsoldier4196 2 роки тому +6

    Is it possible to dynamically add photos to the faces folder? For instance, if a face is detected that is not recognized, could the user possibly be promoted to take a screenshot and that picture will be saved to the faces folder and encoded like the others?

  • @mpoltav2
    @mpoltav2 Рік тому

    Cool lesson. Thanks!

  • @Sternhammer89
    @Sternhammer89 10 місяців тому +1

    Great tutorial, but where's the source code you mentioned ?

  • @ddesmond4435
    @ddesmond4435 11 місяців тому +1

    I'm on Windows, and the program runs very slowly and laggy when it detects my face. Is there a way to improve the performance? I notice that your Mac system is running very smoothly. Maybe it's an OS thing? I hope you can reply, thank you~!!

  • @PANDURANG99
    @PANDURANG99 Рік тому +1

    Instead of web cam I wants to use live desktop screen to detect objects, is it possible? And show in desktop rectangle itself?

  • @tareworku
    @tareworku 8 місяців тому

    thanks for the tutorial. it was very helpful.

  • @shreejitnair6594
    @shreejitnair6594 Рік тому

    great tutorial!!❤

  • @shrenath4476
    @shrenath4476 Рік тому

    thanks dude it works perfectly

  • @enormousearl8838
    @enormousearl8838 8 місяців тому

    So can you only train it on one image per unique face? You can't give it multiple angles of the same face to help it recognize it better?

  • @joniebech
    @joniebech Рік тому +2

    Thank you very much for the tutorial! I have a question, is it still accurate for 50 faces? I am working on a project that needs to distinguish the unknown faces but I find it hard to do because of many encoded faces

  • @coordinator3039
    @coordinator3039 9 місяців тому

    I think you got left and right mixed up as well. Left is y. Right is the width.

  • @mmtv9511
    @mmtv9511 4 місяці тому

    Could I take more pictures of me, from different angles to make the detection better, also could I use this to detect or even Recognize my cats? Thanks in advance🎉

  • @tcc3281
    @tcc3281 9 місяців тому

    Thank you so much, my program ran. But it is slow and I want it run fresher and faster. I need the help 😮

  • @Kiotenhariyo
    @Kiotenhariyo 2 роки тому

    Great presentation - very much appreciated. I am a noob hack messing with python and esp32-cams. Any easy/quick suggestions/references for using this with multiple video streams?

  • @yourname-scorpion
    @yourname-scorpion 5 місяців тому

    thank you so much!
    it's worked for me.. however, i need to update some config to adapt from my laptop..

  • @rezahasny9036
    @rezahasny9036 Рік тому +1

    sir, when i try to running that using my web cam, nothing happen, camera on but no windows show the face recognition, the pop up windows doesn't show image read well

  • @henriklauridsen9686
    @henriklauridsen9686 Рік тому +1

    Hi, I get an error when trying to run the script IndexError: list index out of range. The script finds 2 faces in the faces dir. What can I do solve this error? Thank you in advance

  • @unailopezlozano6248
    @unailopezlozano6248 2 місяці тому

    Hi, i have been getting this error: RuntimeError: Unsupported image type, must be 8bit gray or RGB image. I cant find a way to fix it beacause if i use RGB format it tells me that it has to be jpg, png...

  • @oluchionyeguke
    @oluchionyeguke 11 місяців тому +2

    pls where is the source code i cant find it anywhere

  • @SolverMindEdu
    @SolverMindEdu 4 місяці тому

    I dont know why but it says that the face recognition module is not able to be found, Even when I try to import the Face Recongition again it still just wont work. And all I did was try the first part. Is this a version issue or is this something else. Please check out this comment if you have time. Thanks!

  • @rayendammak7303
    @rayendammak7303 9 місяців тому +1

    thank you , i have a small problem the cam opens just for a second then disappear , any solution please :)

  • @VojtaGaming25
    @VojtaGaming25 Рік тому +1

    can i make it that when the program sees a new face it saves it and then when it sees it again it remembers it perhaps using a database i dont know?

  • @loanpia7718
    @loanpia7718 2 роки тому

    hi, your tutorial so good, I hope the next time you gonna post up about face_Encoding and compare them in the database...~

  • @georgejere2306
    @georgejere2306 Рік тому +2

    Mine its saying dlib cannot be downloaded because there's no project.toml-based projects. Please help😢

    • @CodeOmega_
      @CodeOmega_ Рік тому

      hey, i got the same issue. Did yours get solved?

  • @RnRSolutions-xp2nh
    @RnRSolutions-xp2nh Рік тому +1

    are there any specific version that we need to install Eg : Python , opencv?

  • @valentinlorenz4444
    @valentinlorenz4444 Рік тому +7

    Great video, but I have a problem: my video crashes as soon as a face gets detected :(
    Im told that the line
    "self.face_encodings = face_recognition.face_encodings(rgb_small_frame, self.face_locations)" is the problem but i have no clue why
    please help because i really want this programm to work because its pretty cool

    • @Loopyengineeringco
      @Loopyengineeringco Рік тому

      Same problem... 😢

    • @Loopyengineeringco
      @Loopyengineeringco Рік тому +4

      if you change "rgb_small_frame" to just "small_frame" on that line, it works. Not 100% sure why, maybe Python doesn't like the rgb_small_frame = small_frame[:, :, ::-1] bit at the end '::-1'

    • @glmbrt2396
      @glmbrt2396 Рік тому +5

      ​@@Loopyengineeringco you are right i had the same problem, i solved by changing "rgb_small_frame = small_frame[:, :, ::-1]" with "rgb_small_frame = cv2.cvtColor(small_frame, cv2.COLOR_BGR2RGB)" i hope it will solve your problem as well

  • @venicegolocino5281
    @venicegolocino5281 10 місяців тому

    very cool video, Please make a tutorial how to install dlib in windows 10 and specify version of python.❤❤

  • @arnoldkee117
    @arnoldkee117 9 місяців тому

    Looks like it should run, but when I run the selection from a MacBook, the program doesn't launch, nor do I get an error message.

  • @dotnet8925
    @dotnet8925 Рік тому +3

    getting this error
    error: subprocess-exited-with-error
    × Building wheel for dlib (pyproject.toml) did not run successfully.

    • @rileymchugh5316
      @rileymchugh5316 7 місяців тому

      same error here...

    • @betaflame3418
      @betaflame3418 4 місяці тому

      @@rileymchugh5316 you have to import cmake. Google it online if you need specifics on how to do it. I think I got it from some stack overflow page after a few minutes of searching.

    • @economia_em_foco_br
      @economia_em_foco_br 20 днів тому

      If you are using VS Code on Windows, you have to download dependencies

  • @dailybloggerr
    @dailybloggerr Рік тому +2

    where is code?

  • @SamAlian
    @SamAlian Рік тому

    Great video....i do not see the source code, can you please add a link?

  • @VietnameseBoii
    @VietnameseBoii Рік тому +2

    I got this:
    cv2.error: OpenCV(4.7.0) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src
    esize.cpp:4062: error: (-215:Assertion failed) !ssize.empty() in function 'cv::resize'
    in line 51

    • @askelardd
      @askelardd 7 місяців тому

      eu consegui resolver esse erro agorinha

    • @VietnameseBoii
      @VietnameseBoii 7 місяців тому

      @@askelardd What language is that...

  • @Sebastian.200x
    @Sebastian.200x Рік тому

    Can you make a face recognition tutorial using flask?

  • @ديارقاسممحمدعزيز

    Hi bro which algorithm you used?

  • @shaikahalkandri3092
    @shaikahalkandri3092 Рік тому

    Thank you so much , everything work with me from the first time without any error 😍

    • @sunitsawant885
      @sunitsawant885 8 місяців тому

      Can you please help me too?
      I'm having couple of issues

  • @andreeabejan3199
    @andreeabejan3199 11 місяців тому

    Hello! What app are you using for writting the code?

  • @namtruong4071
    @namtruong4071 Рік тому

    I encountered some problems when using this system. If the people are captured in the dataset, face detection is correct. But when there is an unknown person who is not captured in the dataset, face detection is not detected unknow label, it show name of someone in dataset. Can you give me solution ?

  • @FinaritraAndriam
    @FinaritraAndriam Рік тому

    does it works with 3.11 python version?

  • @omdelvadia8903
    @omdelvadia8903 Рік тому

    Hello. I found your video is very important. Thank you for the tutorial. Now my question is I don't want to recognize the static images like photo copy or something else that is static because any person can recognize the face by scanning the static photo copy. So, is there any way to recognize only the live face? Like in your case, obama's photo is recognized but it should not be because any person can get the photo of obama from internet and he/she can just scan it.I hope you understood my question.

  • @coordinator3039
    @coordinator3039 9 місяців тому

    self.faceEncodings = face_recognition.face_encodings(rgbSmallFrame, self.faceLocations) I keep getting a type error

  • @AhmadBakdash07
    @AhmadBakdash07 2 роки тому

    Can you make it to detect what is on the screen like a dog, cat, human etc. 🤔

  • @mkarthikeyan9817
    @mkarthikeyan9817 Рік тому

    How to train the model bro for a set of images

  • @Nithin_3424
    @Nithin_3424 2 місяці тому

    My webcam sometimes Not responding how can i solve the problem. but the cam working good.the recognition is strucked sometimes

  • @rpc6882
    @rpc6882 Рік тому +3

    Hello , where can I download this code?

  • @biblefilmshow
    @biblefilmshow Рік тому

    thiis really nice. i intend to put this on A web aopp as interface. any idea how?

  • @AhmadBakdash07
    @AhmadBakdash07 2 роки тому

    Using Tensorflow isn't better than python face dedication dependencies?

  • @erikrex0073
    @erikrex0073 2 роки тому

    your tut are soooooooooooooo cool I love

  • @azizpubg1161
    @azizpubg1161 11 місяців тому

    hi i just want to ask how can fix this because im using window 10
    "in run recognition small frame = cv2.resize(frame, (0, 0), fx=0.25, fy=0.25) cv2.error: OpenCV(4.8.1) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src
    esize.cpp:4062: error: (-215:Assertion failed) !ssize.empty() in function 'cv::resize'"

    • @askelardd
      @askelardd 7 місяців тому

      need help , i fixed

  • @remixowlz
    @remixowlz 6 місяців тому +1

    my cv2 keeps crashing?

  • @nidhi320
    @nidhi320 11 місяців тому +1

    I can't find the source code !!!!!!!!!

  • @drewchua6861
    @drewchua6861 2 роки тому

    hello, how can I add some checker in the form of a txt or csv file?

  • @rizafajardo3586
    @rizafajardo3586 Рік тому

    Hello, I followed your tutorial, but my camera is capturing my face with noticeable lag. Could this be due to my camera's high 1080-pixel resolution, also I'm using the "hog" model for the face.location function?

    • @MSneberger
      @MSneberger 5 місяців тому

      Same here even after I commented out "self.process_current_frame = not self.process_current_frame"

  • @yashakayash4888
    @yashakayash4888 Рік тому

    can we implement this in website? if yes..how to?

  • @ayencoscolfield3312
    @ayencoscolfield3312 6 місяців тому

    hi good video but i cant seem to get the source code guthub link an you please share that. Thanks so much would appreciate

  • @krishnanaik24
    @krishnanaik24 Рік тому

    thank u so much bro
    heartlyllove u

  • @dahiya-vc6xs
    @dahiya-vc6xs Рік тому +1

    Where is source code ?

  • @abdulrehmananwar6990
    @abdulrehmananwar6990 Рік тому +1

    Any option how to recongnize only live faces. I want to make attendance management and dont want some one to show other person pic from mobile and mark attendance

    • @asifrehman4214
      @asifrehman4214 Рік тому

      Have you done any progress on that? I am thinking in the same direction...
      How to stop somebody showing the picture for the attendance?

    • @abdulrehmananwar6990
      @abdulrehmananwar6990 Рік тому

      @@asifrehman4214 i am thinking to use windows tab and use this application on windows tab.

  • @donkzilla2802
    @donkzilla2802 10 місяців тому +1

    where is the source code

  • @dotnet8925
    @dotnet8925 Рік тому

    which version python are you using ?

  • @azizpubg1161
    @azizpubg1161 11 місяців тому

    small_frame = cv2.resize(frame, (1, 1), fx=0.35, fy=0.35)
    how to fix this?

  • @eliteturtle6090
    @eliteturtle6090 Рік тому

    I've been trying to instal dlib for so long!! Ugh

  • @NurAsifAs-Sulaiman
    @NurAsifAs-Sulaiman 9 місяців тому

    may I have the code/github link ?

  • @PANDURANG99
    @PANDURANG99 Рік тому

    How to make web application, where to store data

  • @asifrehman4214
    @asifrehman4214 Рік тому +1

    There is no such thing in the tutorial like Training the model? what else if I Want to use it using a trained model?
    kindly brief on this.

    • @Indently
      @Indently  Рік тому

      Start by learning machine learning

    • @asifrehman4214
      @asifrehman4214 Рік тому

      @@Indently Ok I will start to convert it to the machine learning model...thankx for your support.

  • @savagemonkey501
    @savagemonkey501 Рік тому

    Hey great video! I wrote it on my machine and it worked, just one question tho - I tried to convert the same program to do face detection on a video file instead of the camera stream, but the video plays extremely slowly when its running in the face detection program, like 1/50th the normal speed. Is there anyway you know of to fix this?

    • @RnRSolutions-xp2nh
      @RnRSolutions-xp2nh Рік тому

      what versions of python and opencv did you use

    • @mhdta_dev
      @mhdta_dev Рік тому +1

      Run recognition process in other thread and that's it

  • @benjamincorneliojr.8099
    @benjamincorneliojr.8099 7 місяців тому

    the camera opens and working, but after it detects face it stops or lag. HElp

  • @Austin-vz9rt
    @Austin-vz9rt Рік тому

    why do i get "cannot find reference 'videocapture' in '__init__.py | __init__.py' " i had to downgrade opencv to get other references to cv2 operational. It didn't fix the video capture issue though. using windows 11, x64 if that makes a difference.

    • @Austin-vz9rt
      @Austin-vz9rt Рік тому

      i have no idea what fixed this because i did a million things, but it works now. i downgraded opencv, numpy and imported cv2 as cv2 for starters. i also had to clear open cv cache with some pip command that i already forgot lmao

    • @georgejere2306
      @georgejere2306 Рік тому

      ​@@Austin-vz9rt hey man, can you please help me on this issue😢

  • @SahdeuAriel
    @SahdeuAriel 2 місяці тому

    can i use vs code rather than pycharm

  • @flm_thunder.8597
    @flm_thunder.8597 Рік тому

    will this work on LFW datasets?

  • @dedisupardi2815
    @dedisupardi2815 Рік тому

    Cool 👍

  • @SouleymAI
    @SouleymAI 9 місяців тому

    I do not see the code in description 😭😭

  • @LaurynGrosshans
    @LaurynGrosshans Рік тому

    I tried to add a face into the folder and got the error IndexError: list index out of range. whats happening?

    • @shreejitnair6594
      @shreejitnair6594 Рік тому

      i had also gotten the same error, its because it can't locate the face from your database of photos. Try uploading a clear photo with a clear background.

    • @farukhkhan659
      @farukhkhan659 Рік тому

      When i tried to add a face, it says permission denied. How to tackle that issue?

  • @AVTerrorX
    @AVTerrorX 2 роки тому

    I'm getting one problem, an error just occurred, saying 'no module named face_recognition'. How can I solve this problem?

    • @Indently
      @Indently  2 роки тому

      ua-cam.com/video/7xbRHiYNSds/v-deo.html

    • @georgejere2306
      @georgejere2306 Рік тому

      ​@@Indently i also need help. My webcam is starting but not showing the names

  • @aasutoshverma8164
    @aasutoshverma8164 Рік тому

    its so annoyed ! it getting eror! not detecting faces . what u skiped in his video nothing is working as excepted

  • @tsilaaviad4675
    @tsilaaviad4675 Рік тому +3

    I faild to install dlib

  • @prajwalbr8223
    @prajwalbr8223 Рік тому +2

    Getting error in installing dlib

  • @anushamarts
    @anushamarts Рік тому

    Getting index out of range error can someone help?

  • @coordinator3039
    @coordinator3039 9 місяців тому

    Did not work. I keep getting type errors.

  • @cakeas9248
    @cakeas9248 Рік тому

    I expected to write 50 lines...

  • @VHANSEN
    @VHANSEN 9 місяців тому

    its just not detecting my face

  • @asifrehman4214
    @asifrehman4214 Рік тому +1

    Sir One Question:
    After 05 minutes of working; the system stops detecting images...No detection on the camera.
    Plz can you guide ?

  • @ItsJustSawyer
    @ItsJustSawyer 2 роки тому +1

    Dlib will not install for me

    • @Indently
      @Indently  2 роки тому +2

      We’re sorry to hear that you’re facing trouble with this tutorial. We have some suggestions for you:
      1. Try watching the tutorial again to check if you missed something (remember that programming languages are strict, and that uppercase & lowercase characters are completely different.) 

      2. If you’re facing an error, try copying and pasting it into the Google search engine, it’s the fastest way to find the best response for the issue you are facing. 

      3. If it’s still too confusing for you, try taking a step back and working on an easier project to try to improve your programming skills before tackling the project in this video.
      We wish you the best of luck with your project!

    • @fernandez06
      @fernandez06 Рік тому +1

      If you still need help, reply.

    • @ano0os050
      @ano0os050 Рік тому +1

      @@fernandez06 Still trying to download dlib but it seems impossible to do :(

    • @fernandez06
      @fernandez06 Рік тому

      @@ano0os050 ok, did you try deleting and downloading it again?

  • @thaihongkramxa7563
    @thaihongkramxa7563 6 місяців тому

    source code

  • @vinnybeastpro8230
    @vinnybeastpro8230 Рік тому

    its not working

  • @JTKING397
    @JTKING397 Рік тому

    does this work in vs code

    • @moneymolanta6151
      @moneymolanta6151 9 місяців тому

      Mine worked fine in VS Code, only issue I ran into was that rgb_small_frame would crash my system whenever it detected a face.
      Fixed by rgb_small_frame = cv2.cvtColor(small_frame, cv2.COLOR_BGR2RGB)

  • @freepythoncode
    @freepythoncode 2 роки тому

    Very very slow 😔
    What i can do 🙂

    • @Indently
      @Indently  2 роки тому +2

      We’re sorry to hear that you’re facing trouble with this tutorial. We have some suggestions for you:
      1. Try watching the tutorial again to check if you missed something (remember that programming languages are strict, and that uppercase & lowercase characters are completely different.) 

      2. If you’re facing an error, try copying and pasting it into the Google search engine, it’s the fastest way to find the best response for the issue you are facing. 

      3. If it’s still too confusing for you, try taking a step back and working on an easier project to try to improve your programming skills before tackling the project in this video.
      We wish you the best of luck with your project!

    • @freepythoncode
      @freepythoncode 2 роки тому

      @@Indently
      Thank you so much 🙂❤

    • @VojtaGaming25
      @VojtaGaming25 Рік тому

      mine is also very slow did you fix this?

    • @kusbrololo4220
      @kusbrololo4220 Рік тому

      Same if you found how to fix this imma search on my part, I noticed that if no face is recognised it isn't slow maybe it comes from something updated @@VojtaGaming25