Face Detection and Face Recognition by Different Algorithms Using Python & OpenCV

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 ธ.ค. 2024

ความคิดเห็น • 151

  • @Lahirukevin
    @Lahirukevin  7 ปีที่แล้ว +2

    *Index*
    *Vision system demonstrations*
    Face Detection using Haar Cascades ---------------- Info - 01:17 Demo - 01:55
    Face Recognition using Eigenfaces ------------------- Info - 02:20 Demo - 03:44
    Face Recognition using Fisherfaces ------------------ Info - 04:06 Demo - 04:54
    Face Recognition using LBPH ---------------------------- Info - 05:03 Demo - 05:52
    Face Recognition threshold testing -------------------- Info - 06:18 Demo - 06:33
    *Support Applications*
    How to add a new face to the data set -------------- Info - 06:42 Demo - 07:46
    Training the face recognition algorithms ----------- Info - 08:23 Demo - 08:57
    *Application that were used to obtain the parameters*
    Eigenface Tester ------------------------------------------------Info 09:24 Demo - 10:34
    Fisherface Tester -----------------------------------------------Demo 11:23
    LBPH Tester ------------------------------------------------------ Info - 12:07 Demo 13:02

  • @1nguoixauxi2
    @1nguoixauxi2 4 ปีที่แล้ว

    really clear and easy to understand. thankyou for sharing this. I'm looking everywhere for project like this but hardly find one, suddenly youtube suggestion show me your video. most of the tutorial did not show how and why use which code, but you did that really well. keep it up.

  • @oSGx
    @oSGx 5 ปีที่แล้ว

    At 6:35 , When I run the code, It doesn't give me 'face not recognised' if someone is in the video that is not the dataset. It just returns 'jonathan' or 'sara' etc. Any help with this?

  • @SaurabhSingh-ch6nc
    @SaurabhSingh-ch6nc 5 ปีที่แล้ว +2

    what is NameFind...??
    i didnt find it.

  • @eduardochacuacriollo4867
    @eduardochacuacriollo4867 6 ปีที่แล้ว

    Very good contribution, but I have a question, how could you customize the facial detection box that way ?. The import nameFind module does it? Or there is another additional library.

  • @senshi33000
    @senshi33000 3 ปีที่แล้ว

    Hi good job How did you get corners instead of a full rectangle?

  • @putchingkeewarior9712
    @putchingkeewarior9712 7 ปีที่แล้ว +1

    How do you train images in EigenFacce and FisherFace?

  • @ayarzuki
    @ayarzuki 3 ปีที่แล้ว

    Sir, how about I change with your photo, Can the algorithm still recognize it is you?

  • @sothingrelaxing1354
    @sothingrelaxing1354 6 ปีที่แล้ว +1

    how it's run on pycharm what interpreter will be used and how add those files in which

  • @prodiggyson
    @prodiggyson 4 ปีที่แล้ว +2

    great tutorial but its a bit difficult seeing the code in details and there is no link to get the codes pls

  • @anirudhrodda8268
    @anirudhrodda8268 4 ปีที่แล้ว

    sir i am working face detection project , in that how do i save only one image of a person when it gives us multiple images of same person as in your dataset

  • @ketankachhela9616
    @ketankachhela9616 7 ปีที่แล้ว +1

    Hi i found the error in the NameFind.py file.
    cv2.line(Image, (x, y), (x + (w/5) ,y), WHITE, 2)
    TypeError: integer argument expected, got float
    can you please give me any solution.?

    • @JohnPopoola
      @JohnPopoola 6 ปีที่แล้ว

      change it to cv2.line(Image, (x, y), (x + (w//5) ,y), WHITE, 2). Use // instead of /
      Do for the rest.

  • @mattvideo1994
    @mattvideo1994 4 ปีที่แล้ว

    Hi i would like to ask if you had ever tried training the model with labeled faces of the wild dataset and if so how long did it take to finish? as I am trying it and it seems to be going over 24hrs now

  • @seanbenhur
    @seanbenhur 4 ปีที่แล้ว

    hello please..I am working on face matching project..in this I have to compare a single image with many other images in database..will this work for it!?

  • @24_R
    @24_R 4 ปีที่แล้ว

    how to install NameFind function , my code is done in another way but if i tried in your way there are some issues...
    please help me in installing the NameFind module or help me how to call that function

  • @jananiselvam3332
    @jananiselvam3332 3 ปีที่แล้ว

    Which algorithm use

  • @sachitpahwa9120
    @sachitpahwa9120 6 ปีที่แล้ว

    sir in the NameFind it is giving error in drawbox function that it needs int type but it is getting float type.I have done type casting there but still the same error.

  • @innocentjuma354
    @innocentjuma354 7 ปีที่แล้ว

    is there a key that i should be pressing? coz the code is executing but no face is being detected.

  • @benslife7815
    @benslife7815 6 ปีที่แล้ว +1

    Hi Lahiru! Firstly, thank you for giving such an awesome tutorial. However, I was wondering why for UNKNOWN users (faces, which are not inside the database) were recognized when they should be printed as "Face Not Recognized". For an UNKNOWN user, the ID would be greater than 0 when it shouldn't be greater than 0.

  • @linyagong2838
    @linyagong2838 7 ปีที่แล้ว +1

    Hello, since there is no 'createEigenFaceRecognizer' function in 'cv2.face', I used cv2.face.EigenFaceRecognizer_create. But I cannot load the pre-trained xml/yml file by load or read function. Do you know how to fix this problem? Thanks!

    • @linyagong2838
      @linyagong2838 7 ปีที่แล้ว

      my cv2 version is 3.3.0 and python 3.6.2

    •  7 ปีที่แล้ว

      it's strange, to me the read function works fine, what's the error? I think may be you should see if the XML file is fine... if you want contact me, because I have problems also but with the predict function and I think we can colaborate each other, I also use OpenCV 3.3.0... this is my email: jarh1992@gmail.com

    • @abdullahshalaby3521
      @abdullahshalaby3521 6 ปีที่แล้ว

      when u want to load the xml use read instead of load
      and when u want to save ur training data use write instead of save

  • @bryanwong1003
    @bryanwong1003 6 ปีที่แล้ว

    Hello Lahiru, Do you have some C++ example? Or someone has the tutorial about Face Recognition using C++?

  • @hoshidan_ome
    @hoshidan_ome 7 ปีที่แล้ว +1

    How do you do it, when someone is not recognize there it will put some text as "Face not recognized"
    can you help me with that?

  • @ethern6416
    @ethern6416 7 ปีที่แล้ว

    Ask yourself what is the namefind in the video module and how to install it into python, thanks.

  • @durgeshdubey847
    @durgeshdubey847 6 ปีที่แล้ว

    ok so just a small question can ur system differentiate between 2D and 3D images of a person??

  • @223544k
    @223544k 7 ปีที่แล้ว

    info at - 01:17
    import NameFind -- it is a kind of library
    and where to install this library module?
    becz i m getting this error
    import NameFind
    ImportError: No module named NameFind
    thanks

    • @Lahirukevin
      @Lahirukevin  7 ปีที่แล้ว

      Name find is where all the functions are.. All the files are in bitbucket.org/SpikeSL/vision-systems. The file is there you can download it.

  • @outdoorista9189
    @outdoorista9189 6 ปีที่แล้ว +1

    Thanks for the tutorial but when i used it, it also recognizes unknown faces as people in the dataset. Can you tell me whats wrong I would really appreciate it

    • @Lahirukevin
      @Lahirukevin  6 ปีที่แล้ว

      Maybe the faces are not diffrent enough. (you need to capture faces with a variation of expressions)

    • @outdoorista9189
      @outdoorista9189 6 ปีที่แล้ว

      @@Lahirukevin Thank you sir! but when i replaced the existing images in the dataset it will not start recognizing due to error. How can I make it work?

    • @benslife7815
      @benslife7815 6 ปีที่แล้ว

      jazz lorv Hi! Have you fixed the issue? Cause apparently..i couldnt find a way to fix it. I tried changing the code many times

    • @outdoorista9189
      @outdoorista9189 6 ปีที่แล้ว

      @@benslife7815 you mean the true negative recognition? Yes, but i used over 30-40 images per person and trained random person as unknown

    • @benslife7815
      @benslife7815 6 ปีที่แล้ว

      jazz lorv 1) You used 30-40 instead of 50? Can I maintain at 50?
      2) Can you explain about the training a random person as Unknown more? I dont understand how you do it

  • @jayaprakashsellamuthu8238
    @jayaprakashsellamuthu8238 6 ปีที่แล้ว

    An error showing that """cascadedetect.cpp:1698:error:(-215) !empty() in function cv::CascadeClassifier::detectMultiScale""".How to solve this??Anyone answer please

  • @reddy9698
    @reddy9698 6 ปีที่แล้ว

    Hi Thanks for the great tutorial. i just had one problem for any untrained face it is just showing some random names from the dataset instead of face not recognized. How do i fix it ??

    • @outdoorista9189
      @outdoorista9189 6 ปีที่แล้ว

      I also have this problem. Did you solved it already?

  • @amangarg2327
    @amangarg2327 5 ปีที่แล้ว

    Capture face with rotate is not detecting faces, can someone help me out. Thank you in advance.

  • @syauqisabili3776
    @syauqisabili3776 5 ปีที่แล้ว +1

    ImportError: No module named 'PIL'. where'is the module of PIL?

    • @altais97
      @altais97 5 ปีที่แล้ว

      you must install it with pip or sudo

    • @gokulakrishnan1977
      @gokulakrishnan1977 5 ปีที่แล้ว

      pip install pillow

  • @gunarakulangunaretnam3353
    @gunarakulangunaretnam3353 5 ปีที่แล้ว

    The repo link is not working

  • @unfacedcorp4664
    @unfacedcorp4664 7 ปีที่แล้ว +2

    Thanks for the tutorial, its helping me to finish my IOT project. Thank you very much

  • @lucasrezende2340
    @lucasrezende2340 7 ปีที่แล้ว

    Lahiru, when I try to run the Recogniser_Video_EigonFace, this error appears that I can not solve:
    Traceback (most recent call last):
    File "C:/Users/HOME/Desktop/SpikeSL-vision-systems-1fb3fcebe6d0/Python/TestDataCollector_LBPH.py", line 9, in
    import matplotlib.pyplot as plt # Importing Plot library
    ImportError: No module named matplotlib.pyplot
    Would you help me?
    Thank you

    • @Lahirukevin
      @Lahirukevin  7 ปีที่แล้ว

      Lucas Rezende you need to install pyplot libraries. The plots are drawn using pyplot.

    • @lucasrezende2340
      @lucasrezende2340 7 ปีที่แล้ว

      Hi Lahiru, I installed and the error disappeared !!
      But when I run Face_Capture_with_Rotate, it appears to type a name, but later it does not capture the 50 images. Do I have to press any specific keys to capture? I opened the Names file, and my name is in the file. But the photos are not captured.
      Afterwards just run the training program?
      Thank you very much in advance

    • @Lahirukevin
      @Lahirukevin  7 ปีที่แล้ว

      The Face Capture function will capture images from the camera with delays. As soon as you type your name and hit enter, it will start capturing.
      I don't know if you have all the files but you can try this bit bucket repo.
      SpikeSL@bitbucket.org/SpikeSL/vision-systems.git
      If this is for educational purposes, I can send you the report I wrote for this project.

    • @lucasrezende2340
      @lucasrezende2340 7 ปีที่แล้ว

      Yes Lahiru, it's for academic purposes. Could you send me the report by email:
      Follow:
      lucas.silrez@hotmail.com
      Yes, I downloaded all the files from this repository. I ran Face_Capture_With_Rotate again, the light on my webcam came on, I typed my name, and waited for 10 minutes, but no image was captured.

    • @Lahirukevin
      @Lahirukevin  7 ปีที่แล้ว

      Ah it maybe the Cam ID, I forgot about that. do you know where to change that in the code?

  • @ガアラカリム
    @ガアラカリム 5 ปีที่แล้ว

    can someone help me plz recognise = cv2.face.createEigenFaceRecognizer(15, 4000) # creating EIGEN FACE RECOGNISER
    AttributeError: module 'cv2.cv2' has no attribute 'face'

  • @kurgumedya5906
    @kurgumedya5906 6 ปีที่แล้ว

    No module named 'NameFind' ?
    pip install NameFind --- ERROR ?
    pip3 install NameFind Error?
    please

  • @deepaknv6358
    @deepaknv6358 6 ปีที่แล้ว

    AttributeError: 'cv2.face_EigenFaceRecognizer' object has no attribute 'load'. Please help.

  • @iamputhea
    @iamputhea 7 ปีที่แล้ว

    it could not work while the face of human didn't appear in your database . How can you solve this problem?

    • @Lahirukevin
      @Lahirukevin  7 ปีที่แล้ว

      Well, a face detection system would only work if a human face is in the frame.

  • @samsonteo8628
    @samsonteo8628 3 ปีที่แล้ว

    looking for namfind

  • @lucasrezende2340
    @lucasrezende2340 6 ปีที่แล้ว

    Lahiru, I've finally get run the project. But, when I not register my friend for example, and he stay in front of the webcam, shows my name on him face (in this situaton there are only two face register) However, after register him, him name shows perfectly. How can I do to show on him face, the phrase: Face not recognized, when he isn't register? equal the video
    Because for any people not register, always show any name that registered already

    • @Lahirukevin
      @Lahirukevin  6 ปีที่แล้ว +1

      Lucas Rezende you can change the sensitivity. Like a threshold.

    • @lucasrezende2340
      @lucasrezende2340 6 ปีที่แล้ว

      Hello Lahiru,
      I decreased and increased, increased and decreased both parameters, but did not succeed.
      Could you suggest something else to not recognize faces that are not registered?
      I modified the Eigon and Fisherface parameters
      recognise = cv2.face.EigenFaceRecognizer_create (15, 4000)
      recognise = cv2.face.FisherFaceRecognizer_create (6, 40)

    • @Lahirukevin
      @Lahirukevin  6 ปีที่แล้ว

      Lucas ,
      How did you photograph your face? with a single depressed expression? or with many expressions as possible.?

    • @lucasrezende2340
      @lucasrezende2340 6 ปีที่แล้ว

      With many expressions as possible
      But I've been using just your set of photos as well to test, without my face registered, and the result show your name or the Sam's name. But with more frequently the sam's name and not the phrase: Face not recognized.

    • @udhayshankar2260
      @udhayshankar2260 6 ปีที่แล้ว

      I have the same issue can u help me

  • @shaileshmanhale9253
    @shaileshmanhale9253 6 ปีที่แล้ว

    Hi Lahiru, It's not saving images during training just saving name only.

  • @Skaxarrat
    @Skaxarrat 6 ปีที่แล้ว

    Nice project man! For me, it all works untill I reach the Face_Capture_with_rotate file. It gets my face but don't take any pics, so nothing is saved. I get no error, just says "Name Stored in 23", but I get no "Theta" messages, hence, no captures are saved.

    • @Lahirukevin
      @Lahirukevin  6 ปีที่แล้ว

      There is a limit for the rotation. If you tilt your head too much it will not capture a photo since it cannot be straightened. Try a normal pose.

    • @amangarg2327
      @amangarg2327 5 ปีที่แล้ว

      same problem

  • @115_prachisomkuwar2
    @115_prachisomkuwar2 3 ปีที่แล้ว

    will you plz share thise code

  • @pjossyjoshi7308
    @pjossyjoshi7308 5 ปีที่แล้ว

    Which Algorithm is best

    • @millgefe
      @millgefe 5 ปีที่แล้ว

      LBPH from my experience

  • @pacauzin
    @pacauzin 7 ปีที่แล้ว

    cant pass this: AttributeError: 'cv2.face_EigenFaceRecognizer' object has no attribute 'load'

    • @pacauzin
      @pacauzin 7 ปีที่แล้ว

      Can you help-me please?
      Already triede on python 3.6 and 2.7
      opencv opencv_python-3.3.0+contrib-cp36-cp36m-win_amd64.whl and opencv-contrib-python

    • @noorkhokhar
      @noorkhokhar 7 ปีที่แล้ว

      LBPH = cv2.createLBPHFaceRecognizer(2, 2, 7, 7, 20)
      you should try this.

    •  7 ปีที่แล้ว

      if you are using OpenCV 3.3.0 the EigenFaceRecognizer changes: cv2.face.EigenFaceRecognizer_create() ... and to load the xmltrainedfile, use the read function

  • @11hamma
    @11hamma 4 ปีที่แล้ว

    Nice video but increase font size next time thanks

  • @vineetkargeti5491
    @vineetkargeti5491 5 ปีที่แล้ว

    Can I get the code ??

  • @llvnarayana2544
    @llvnarayana2544 3 ปีที่แล้ว

    Can you post the code plz,

  • @adeeshageappachchi9189
    @adeeshageappachchi9189 7 ปีที่แล้ว

    Khool Sir..

  • @macedit
    @macedit 5 ปีที่แล้ว

    Hi can we talk about your project?

  • @praneeth.singireddy
    @praneeth.singireddy 5 ปีที่แล้ว

    namefind error help me out

    • @amangarg2327
      @amangarg2327 5 ปีที่แล้ว

      try converting all calculation to int in drawbox

  • @mulatugebeyaw8235
    @mulatugebeyaw8235 6 ปีที่แล้ว

    can I get the source code

  • @SenuraFernando
    @SenuraFernando 7 ปีที่แล้ว

    Thank you for the video!!!!
    When I run Detector_video.py I get this error can you please explain why it happens.
    File "C:/Users/Senura Fernando/PycharmProjects/VisionSystem/NameFind.py", line 179
    def tell_time_passed():
    ^
    IndentationError: unindent does not match any outer indentation level

  • @Rohitsingh2410
    @Rohitsingh2410 7 ปีที่แล้ว

    Which version of openCV you are using?

    • @Lahirukevin
      @Lahirukevin  7 ปีที่แล้ว

      I think it was 3.2 or 3.1. I tested both 2 and 3

  • @jsool7810
    @jsool7810 7 ปีที่แล้ว

    C:\Users\YSsquare01\vitual_project2\Scripts\python.exe C:/Users/YSsquare01/vitual_project2/FACE-REC-TRAIN/Recogniser_Video_FisherFace.py
    Traceback (most recent call last):
    File "C:/Users/YSsquare01/vitual_project2/FACE-REC-TRAIN/Recogniser_Video_FisherFace.py", line 14, in
    recognise = cv2.face.createFisherFaceRecognizer(5, 600) # creating FISHER FACE RECOGNISER
    AttributeError: 'module' object has no attribute 'face'
    Process finished with exit code 1
    What is the problem? How can I fix it?

    • @Lahirukevin
      @Lahirukevin  7 ปีที่แล้ว

      you are using an older version of openCV

  • @nasmanasma5690
    @nasmanasma5690 5 ปีที่แล้ว

    can u send me the code plz

  • @kannan10308
    @kannan10308 5 ปีที่แล้ว

    very useful.

  • @sachitpahwa9120
    @sachitpahwa9120 6 ปีที่แล้ว

    it is showing unknown face to be known name

  • @helderlopez150
    @helderlopez150 6 ปีที่แล้ว +1

    Cv2.error: opencv(3.4.3)

  • @Lahirukevin
    @Lahirukevin  7 ปีที่แล้ว

    Hi guys. Sorry for not making any videos but I was very busy. For people who are looking for the files they can find everything in
    SpikeSL@bitbucket.org/SpikeSL/vision-systems.git
    I will try to do more videos soon.

    • @aatikulizlam
      @aatikulizlam 7 ปีที่แล้ว

      thanks for the video. Can you please explain how we can get parameter from LBPH Tester for the recognizer model?

  • @rubaalotaibi8638
    @rubaalotaibi8638 3 ปีที่แล้ว

    can help me pleas !!

  • @Lahirukevin
    @Lahirukevin  7 ปีที่แล้ว

    For everyone who want more information about this project. This is the report I wrote about it. www.researchgate.net/publication/318900718_Face_Detection_Face_Recognition_Using_Open_Computer_Vision_Classifies

  • @jaimonjames2328
    @jaimonjames2328 5 ปีที่แล้ว

    Thanks a lot

  • @sandysingh6698
    @sandysingh6698 7 ปีที่แล้ว

    How you Detect Rotation of Image and Correct that reply me on my mail id pls

  • @ianninasuico3334
    @ianninasuico3334 7 ปีที่แล้ว

    may i know your email please