OpenCV Python TUTORIAL #4 for Face Recognition and Identification

///OpenCV Python TUTORIAL #4 for Face Recognition and Identification

OpenCV Python TUTORIAL #4 for Face Recognition and Identification

FavoriteLoadingAdd to favorites

OpenCV with Python Series #4 : How to use OpenCV in Python for Face Recognition and Identification

Sections
Welcome (0:00:00)
Copy Haar Cascades (0:04:27)
Haar Cascades Classifier (0:07:11)
Using the Face Classifier (0:09:36)
Draw a Rectangle in OpenCV (0:16:15)
Recognizer (0:20:13)
os.walk for image finding (0:23:25)
Labels from directories (0:27:45)
Training image into a numpy array (0:31:04)
Region of Interest in Training Data (0:34:06)
Creating Training Labels (0:37:06)
Using Pickle to Save Label IDs (0:40:38)
Train the OpenCV Recognizer (0:42:20)
Implement Recognizer (0:44:28)
Load Label Names from Pickle(0:47:46)
OpenCV PutText (0:53:02)
Resize Images for Training (0:54:35)
Eyes and Smile (0:58:01)
Live Tests (1:00:46)
Final thoughts (1:02:23)

Subscribe:
Code on Github:

New to OpenCV? Try this:

Learn OpenCV & Python Playlist:

Install OpenCV for Python on your system:
Mac:
Windows:
Linux with Pi Awesome:

NEW!! Slack Channel:

source

By |2019-10-15T23:23:00+00:00October 15th, 2019|Python Video Tutorials|34 Comments

34 Comments

  1. Jose Grullon October 15, 2019 at 11:23 pm - Reply

    This subject is a can of worms for me it reminds me of a future orwellian state and big brother watching. Just saying….

  2. Muhammad Ali October 15, 2019 at 11:23 pm - Reply

    i am getting this type of error please help me out…

    recognizer.train(x_train,np.array(y_labels))

    TypeError: src is not a numpy array, neither a scalar

  3. LEARN FROM MISTAKE thiru October 15, 2019 at 11:23 pm - Reply

    Bro in python 3.7 recognizer module is not available pls help me

  4. UMANG MISHRA October 15, 2019 at 11:23 pm - Reply

    When I run the recognizer it shows cv2.cv2 has no attribute "face", what should I do pls help somebody🥺

  5. Samuel Balmedina October 15, 2019 at 11:23 pm - Reply

    I'm just thinking how this algorithm to use in Wood Identification process? Is there anyone could help me?

  6. Sarvesh Gupta October 15, 2019 at 11:23 pm - Reply

    Very awesome video, it helped me a lot

  7. Live love life October 15, 2019 at 11:23 pm - Reply

    Sir my program is not run plz hel

  8. Nektarios Sylligardakis October 15, 2019 at 11:23 pm - Reply

    Just a question, Can I count the uniques faces that there is in a video? How it will recognize that a face that appear is start of the video is the same with the face that appear by the end of the video?

  9. Vladimir Maksimovic October 15, 2019 at 11:23 pm - Reply

    Where i should put code for this scenario : if Justin then store some data like time and date, and start other functions.

  10. habib ahmed October 15, 2019 at 11:23 pm - Reply

    This code is also not present in your account

  11. Dicky Arya Kesuma October 15, 2019 at 11:23 pm - Reply

    how do i use train method from recognizer but with a few attributes?

  12. suraj Bobe October 15, 2019 at 11:23 pm - Reply

    how can we use this in android.

  13. Akhilesh Mishra October 15, 2019 at 11:23 pm - Reply

    Which python version u r using
    I m lacking some attributes in opencv

  14. Md Shajid October 15, 2019 at 11:23 pm - Reply

    if anyone having problem with this error > Traceback (most recent call last):
    File "tellotv.py", line 46, in
    recognizer = cv2.face.LBPHFaceRecognizer_create()
    AttributeError: module 'cv2.cv2' has no attribute 'face'

    then here is the solution >
    on terminal write >

    pip install opencv-contrib-python –upgrade
    if gives error then
    write
    pip install opencv-contrib-python –user
    it will work fine for cv2.face.LBPHFaceRecognizer_create();

  15. Bob Roy October 15, 2019 at 11:23 pm - Reply

    need to ask for attendance management system, do you have any code that can write immediately in the database/excel before using cam release () function……because the thing is keeping the system alive for longer hours will finish up the buffer ~RAM and will surely degrade the speed………So is there any code that can be used to write the attendance immediately after detecting

  16. Amr Moussa October 15, 2019 at 11:23 pm - Reply

    good teching

  17. Jahid hasan October 15, 2019 at 11:23 pm - Reply

    Traceback (most recent call last):

    File "PycharmProjects/opencv/src/faces.py", line 5, in <module>

    recognizer = cv2.face.LBPHFaceRecognizer_create()

    AttributeError: module 'cv2.cv2' has no attribute 'face'

    I'm really tired of it, please help anybody in solving it.
    Thanks

  18. WAIWAI WAI October 15, 2019 at 11:23 pm - Reply

    Is this dnn approach?

  19. Pnk K October 15, 2019 at 11:23 pm - Reply

    Thank you, sir, awesome video.

  20. Rohith Pokala October 15, 2019 at 11:23 pm - Reply

    Hi,
    I am trying to build an RFID based facial recognition system.
    could you assist with the connection of RFID and laptop using python?

  21. Talha Anwar October 15, 2019 at 11:23 pm - Reply

    how can we train on just one single image?

  22. Ateesh sharma October 15, 2019 at 11:23 pm - Reply

    I am able to print the image_array, but faces is giving empty values when i use the detectMultiScale . please suggest

  23. Virtual Dreamer October 15, 2019 at 11:23 pm - Reply

    saving the portion of the face.png not saving please helppp

  24. Virtual Dreamer October 15, 2019 at 11:23 pm - Reply

    it's not printing the face coordinates even though i used your classifier version

  25. Virtual Dreamer October 15, 2019 at 11:23 pm - Reply

    hello. the video is working great but it's not printing the coordinates. anyone can help me? it's all the same code in the video

  26. Miguel Radaza October 15, 2019 at 11:23 pm - Reply

    ive got some error it say's "TabError: inconsistent use of tabs and spaces in indentation" I already check the spelling and spaces on the codes and they just the same. help me plss thank you

  27. Increadible Angel October 15, 2019 at 11:23 pm - Reply

    thanks

  28. Ouchie October 15, 2019 at 11:23 pm - Reply

    I use a video (.mp4) as source and not a webcam but the video playback is really laggy. Is there a way to improve that?

  29. parimal mahindrakar October 15, 2019 at 11:23 pm - Reply

    your videos ara awesome..!!! love from india

  30. John Wick October 15, 2019 at 11:23 pm - Reply

    How could i make "Unknown" ID appear in case the program does not recognize a face_

  31. darkside games October 15, 2019 at 11:23 pm - Reply

    hello please am getting this error
    ModuleNotFoundError: No module named 'cv2.data'
    i need some help i have tried everything and it isnt working thank you

  32. Harshith Mohan October 15, 2019 at 11:23 pm - Reply

    How do you access the haarcascade file if it's in a different directory?

  33. KK October 15, 2019 at 11:23 pm - Reply

    how far is facial recognition from authenticating?

  34. emucan95 October 15, 2019 at 11:23 pm - Reply

    i am having a problem with the "face" class it says there is no such thing in cv2. Any ideas?

Leave A Comment

*