Face recognition - Python Webcam OpenCV

Поделиться
HTML-код
  • Опубликовано: 27 янв 2025

Комментарии • 182

  • @gilushh1098
    @gilushh1098 3 года назад +2

    well, after countless videos, online "courses" and other resources, yours is spot on.
    i've been able to implement your approach in my project.
    i'm working with multi-threading so that works faster. (i'm too lazy for the GPU opencv module build).
    Keep up the good work!

    • @brunocen
      @brunocen  3 года назад

      Amazing I'm glad that you found my video helpfull

  • @silviokmayorga8613
    @silviokmayorga8613 4 года назад +1

    if someone have trouble install dependencies like cmake or dlib u can install manually also i need to thank sturkmen he found if u use different webcam/cam include a external webcam u will get the following error;
    CvCapture_MSMF::initStream Failed to set mediaType (stream 0, (640x480 @ 30) MFVideoFormat_RGB24(unsupported media type)
    the solution clearly could be
    video_capture = cv2.VideoCapture(0,cv2.CAP_DSHOW)
    at least in my case works
    thanks bruno nice work buddy

    • @brunocen
      @brunocen  4 года назад

      Thanks for the extra info, hope it works for other people with the same problem

  • @mbltechz1711
    @mbltechz1711 3 года назад +2

    Sir, can you please upload a video of multiple face detecting program with python opencv

  • @muhammadirfanghani8298
    @muhammadirfanghani8298 3 года назад +2

    i get
    module 'face_recognition' has no attribute 'load_image_file'
    can you help me fix that?

    • @brunocen
      @brunocen  3 года назад

      Can you double check that you wrote correctly the names? This happens very often, if you misspell it then it will say that there is not that attribute

    • @ujjwaalbhardwaj8355
      @ujjwaalbhardwaj8355 3 года назад

      same error for me also

    • @brunocen
      @brunocen  3 года назад

      @@ujjwaalbhardwaj8355 Hi, so the module has an attribute of load_image_file, please check that the module is correctly instaled and passed on the head section to import it

  • @shiraganegaming5056
    @shiraganegaming5056 3 года назад +1

    I'm getting an error in "source venv/bin/activate" part

    • @brunocen
      @brunocen  3 года назад

      what is the error? make sure you created the enviroment with the name venv (there should be a folder with that name

  • @maheswariramasamy2554
    @maheswariramasamy2554 4 года назад +1

    Face detection is slow using face_recognition package...Please suggest me how to improve FPS in Realtime.

  • @billangle8973
    @billangle8973 3 года назад +1

    Good job Bruno.

  • @samuelcabzki8187
    @samuelcabzki8187 4 года назад +2

    What Face REcognition Algorithm did you use in this program?

    • @brunocen
      @brunocen  4 года назад

      It's a deep learning model based on the dlib.net/ library

  • @technicalcat1508
    @technicalcat1508 3 года назад +1

    Thank you solved my problem

    • @brunocen
      @brunocen  3 года назад

      Excellent!!! I'm glad I was able to help!

  • @adhamsabry6011
    @adhamsabry6011 4 года назад +1

    Hi Bruno,
    It says syntax error at && 0xFF
    And it’s not opening the window

    • @brunocen
      @brunocen  4 года назад

      it's just one & sorry i made that mistake if you see when i run it I correct that part

  • @enmanuelguzman3654
    @enmanuelguzman3654 4 года назад +2

    is there a way to make the camera faster when running the program? it looks laggy even do my webcam is like 50 fps
    and great video man!!

    • @brunocen
      @brunocen  4 года назад

      Hi, the script that is here is set to take the frame of the camera as soon as it finish checking for faces, so one option is to make your machine faster or using a GPU another thing that it will make it faster is reducing the image size, but this will reduce the accuracy recognition

  • @eulamieraz4383
    @eulamieraz4383 3 года назад +1

    Hi, I would like to ask if you know how to get rid the lag when recognizing a person.

    • @brunocen
      @brunocen  3 года назад +1

      The lag is becasue the computer takes a frame, then analyses the frame and then gram the next one, one option is to reduce de size of the frame, another one is to have more computing power. Warning: Reducing the size of the frame will reduce the quality for recognition

  • @Draginx
    @Draginx 3 года назад

    How could I expand this program to detecting several faces at once??

  • @elionajem4876
    @elionajem4876 4 года назад +1

    What Face Recognition Algorithm did you use in this program? can you please tell me?

    • @brunocen
      @brunocen  4 года назад

      It's a deep learning model based on the dlib.net/ library

  • @pablomiranda7
    @pablomiranda7 4 года назад +4

    Nice video! do you know how to improve the fps in the webcam?

    • @brunocen
      @brunocen  4 года назад +3

      Hi, this function video_capture.read() only takes the next frame of the video and then you can search for faces, docs.opencv.org/2.4/modules/highgui/doc/reading_and_writing_images_and_video.html#videocapture-read
      to increase the fps analysis you can resize the image for faster analysis to a 1/4 of the image,
      small_frame = cv2.resize(frame, (0, 0), fx=0.25, fy=0.25)
      docs.opencv.org/2.4/modules/imgproc/doc/geometric_transformations.html?highlight=resize#cv2.resize

    • @suspiciouscitrus6815
      @suspiciouscitrus6815 4 года назад

      @@brunocen Where should I be putting this code? I can't seem to find a spot to put it that works

    • @brunocen
      @brunocen  4 года назад

      @@suspiciouscitrus6815 at the begining of the while loop when you take the read form the webcam

    • @jathins6809
      @jathins6809 4 года назад

      @@brunocen should we replace the ret, frame = video_capture.read() line with the code you have given or add this to the code given in the video.

    • @jathins6809
      @jathins6809 4 года назад

      Please tell

  • @NickyTuan
    @NickyTuan 4 года назад +1

    how to find many face with true name ?

  • @nandinig7585
    @nandinig7585 3 года назад

    I have given multiple images as input but the code is able to detecf only one face and rest all are shown as unknown.
    Do you have any solution where i can increase the accuracy so that it can detect atleast 3-4 faces?

    • @brunocen
      @brunocen  3 года назад

      Hi, you can use this for many faces, but you need to pass each face encodign into the array of known_face_encodings and the corresponding name into the array known_face_names so it will work with multiple people

  • @yasarsahinter6468
    @yasarsahinter6468 2 года назад +1

    It works like a charm! But i need help to add several faces to recognise can you help ?

    • @brunocen
      @brunocen  2 года назад +1

      I have been asked this many times, I definitely need to find the time to make a new video

  • @cqcboy100
    @cqcboy100 3 года назад +2

    Hey Mate, thanks for the guide,! Ive been looking into a way to detect my specific face in a webcam feed compared to others and this one hit the nail on the head.
    I need to look into how to enable GPU for facial recognition / dlib because it was running very slow, even thought my cpu wasent being used much. Might need to compile dlib with cuda enabled or something from what a quick Google mentions.

    • @brunocen
      @brunocen  3 года назад

      yes using a GPU will help get the recognition faster, but you can also reduce the quality of the image, althought you might loose accuracy

  • @mayurmoundekar5252
    @mayurmoundekar5252 3 года назад +1

    hello can you please provide a code of multiple face detection
    all the subscribe getting the same issue please make a tutorial on this

    • @brunocen
      @brunocen  3 года назад

      yes you are right I will definetly do a multiple face detection, I will prepare the code and the video, I will upload it next week

    • @mayurmoundekar5252
      @mayurmoundekar5252 3 года назад +1

      @@brunocen Hello, I have write down the code of Multiple face detection

    • @brunocen
      @brunocen  3 года назад +1

      @@mayurmoundekar5252 awesome!! that's great

    • @mayurmoundekar5252
      @mayurmoundekar5252 3 года назад

      @@brunocen thanks

  • @jeanmarcroberge8759
    @jeanmarcroberge8759 2 года назад

    i used this code and commented out the image lines (7-11) and it work fine giving me "unknown" as the name. recently i tried to add my own pictures but got "IndexError: list index out of range" error. Now i get this error even when going back to the modified code. Would you know what is causing this.

    • @brunocen
      @brunocen  2 года назад

      please chek which line is giving you The error, and try checking the value of that variable list to sre what is happening, most probably is that the list is empty for some reason and that's why it does have any index and it returns the error of not found

  • @lauritslao5646
    @lauritslao5646 4 года назад +1

    I got a problem with the font apparently, cant quite seems to get it working but it doesn't matter. Great video man!

    • @brunocen
      @brunocen  3 года назад

      thank you, If you got an error with that font try using another one.

  • @spousalhat2721
    @spousalhat2721 4 года назад +1

    When I try to run the program it says zsh: abort. Why does this happen?

    • @brunocen
      @brunocen  4 года назад

      zsh is your console comande line seems like you have something wrong with that, try running some simpler commands and see if it still works

    • @spousalhat2721
      @spousalhat2721 4 года назад +1

      @@brunocen I fixed it. The problem was that Visual Studio Code did not have access to my camera and would not request for it. So I had to run it from my terminal "sudo code" and the run the program.

    • @brunocen
      @brunocen  4 года назад

      @@spousalhat2721 Awesome I hope that everything is working now smothly

    • @brunocen
      @brunocen  4 года назад

      @@spousalhat2721 awesome!!

  • @kheir-eddineferhat8420
    @kheir-eddineferhat8420 3 года назад

    Hello Sir, when I try to run the code : I get an error message saying : IdentationError : unindent does not match any outer identation level, any solutions ?

    • @brunocen
      @brunocen  3 года назад +1

      check your spaces, remember that python uses 4 spaces or a TAB, you can change this for 2 spaces, but make sure they are all the same. The error should have a line error, go to that line and check the number of blank spaces that are there

    • @kheir-eddineferhat8420
      @kheir-eddineferhat8420 3 года назад +1

      @@brunocen Actually It was en error about the spaces, and I had to reinstall dlib library again and it worked, thanks for the help

    • @brunocen
      @brunocen  3 года назад

      @@kheir-eddineferhat8420 Awesome!! I'm glad it worked

  • @urbankonda9574
    @urbankonda9574 4 года назад +1

    this code would place all know and unknown faces in red box, you should make only known faces in green box and unknown in red..and if i am not mistaken u hardcoded your name. The code sould read the name from the photo and displayed it in the box...but other than that nice one

    • @brunocen
      @brunocen  4 года назад

      You are right, i ddint want to make it more complex than that, but those are good improvements to add, nice catch!! 🙌

  • @anne-wr9zq
    @anne-wr9zq 2 года назад

    Do I have to download libraries for this project?

    • @brunocen
      @brunocen  2 года назад

      Hello Anne, yes on the video I download the libraries that you need, using the command "pip install" and the names of the libraries check the video for more detail

  • @orcohen410
    @orcohen410 2 года назад

    vscode keep telling it cant find the module face_recognition, i tired everything, installing cmake,dlib and more stuff online, im on a mac bytheway, someone can help?

    • @brunocen
      @brunocen  2 года назад

      that's why its important to install the virtual environment so you can work on an entire new and separated enverioment, but even if you are not working on a venv you should be able to see the python modules installed with "pip list" if you don't see the module then use "pip install"+ the module " then do "pip list" again and you should see the new installed module, if you don't see it then you might be using a different path or a different python to install and run the modules

  • @CompaxMax
    @CompaxMax 4 года назад

    @Bruno Centeno
    if i do: pip3 install face_recognition, it keeps loading on running setup.py install for dlib, how do i fix this?

    • @gradinaruhidrogen1061
      @gradinaruhidrogen1061 4 года назад

      same

    • @brunocen
      @brunocen  4 года назад

      Seems like you dont have dlib installed try installing it learnopencv.com/install-dlib-on-windows/

    • @ShivamKumar-vv2op
      @ShivamKumar-vv2op 4 года назад

      wait for some time. it may take 10-15 minutes. first install cmake - pip install cmake and then install face_recogntion : ignore if you already have cmake. or you can uninstall cmake and then reinstall cmake and face_recognition. hope this helps;)

  • @roko6033
    @roko6033 3 года назад

    Hello Mr. Centeno! I keep gettign an error saying: "ModuleNotFoundError: No module named 'numpy'". I searched this problem up on stack overflow and across the internet and everyoen says to uninstall and reinstall numpy. I tried this multiple times and then restarted my VS code. Do u have any solution to this issue?

    • @brunocen
      @brunocen  3 года назад

      please run "pip list" it will show you a list of your packages, if you dont see numpy in the list then you need to install it "pip install numpy", also make sure you are using the right environment, I use a new virtual environment for each project. Create a new one and install the packages that you need for that project only.

    • @roko6033
      @roko6033 3 года назад +1

      @@brunocen Thank you SOOO much it works now!

    • @brunocen
      @brunocen  3 года назад

      @@roko6033 excellent!! good work!!

  • @hilldavidire
    @hilldavidire 3 года назад

    Anyone keep getting the error "ModuleNotFoundError: No module named "face_recognition" and if so, how can this be corrected?

    • @brunocen
      @brunocen  3 года назад

      Hi seems like you didn't install the module, remember to follow the steps of "pip install face_recognition" and all the other pip installs that I used in the first part of the video

  • @mohamedcherifsaaied5840
    @mohamedcherifsaaied5840 4 года назад +2

    hi bruno nice one ! please how to add other faces to your program , i tried but it didn't work :(

    • @brunocen
      @brunocen  4 года назад

      So we have to add more pictures on the arrays and pass the other face_encodings of the pictures containing the faces

  • @circuittricks5144
    @circuittricks5144 3 года назад +1

    Great tutorial sir 👌. Can you tell me which IDE you use for coding.

    • @brunocen
      @brunocen  3 года назад

      Sure i am using VS Code

  • @luigiegaston3161
    @luigiegaston3161 3 года назад

    Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App
    Execution Aliases... how to solve this bro

    • @brunocen
      @brunocen  3 года назад

      Seems like either you havent installed python or you are using a wrong folder to call phyton

  • @AJ-fb7mo
    @AJ-fb7mo 4 года назад +1

    Did you use an external webcam or the built-in camera ?

    • @brunocen
      @brunocen  4 года назад +1

      I used the build-in camera, if you want to use an external camera you can just select the default camera to be the external and then you would be able to use that one. And actually any camera could be the source of your video, just check that the script is taking the frame from that video

  • @Decceu
    @Decceu 3 года назад

    I get an error in like 8: Index-error list index out of range

    • @brunocen
      @brunocen  3 года назад

      out of index happens when you are accessing an array and the index you are using is greater than the array top index. In the code this might be because you are missing a [0]. Most arrays come inside another one with a smaller index number. Check your code for a missing [0]

  • @yourfriend7736
    @yourfriend7736 3 года назад

    That was mind blowing sir!! And if I want to make that like if it detects unrecognised face It should raise an alert message!! Any suggestions from you sir?

    • @brunocen
      @brunocen  3 года назад

      well just use a the lib request to send a POST to any endpoint in another system, its an API call, it can have any information on the body, like who else is in the picture with the unknown face

  • @dishantisrani2609
    @dishantisrani2609 3 года назад

    Hi @Bruno Centeno I was using pip to install face-recognition and I am not able to download it. I am currently using python 3.9 is there any other way I can do it. please help!

    • @brunocen
      @brunocen  3 года назад

      why you can't use pip? is it the dlib error?

    • @dishantisrani2609
      @dishantisrani2609 3 года назад

      @@brunocen I am working on visual studio code ? Will it work there? Or I have to download visual studio ?

    • @brunocen
      @brunocen  3 года назад

      @@dishantisrani2609 You can do it there, the code editor is not a problem, you can use anyone you prefer, pycharm, atom, sublime2 or any other you like

    • @dishantisrani2609
      @dishantisrani2609 3 года назад

      I have been trying it from a while but the face_recognition module doesn't gets installed

    • @dishantisrani2609
      @dishantisrani2609 3 года назад

      It always gives me a dlib error if there is someway I can contact you I can share you the error
      Thanks!

  • @dietodo21
    @dietodo21 4 года назад +1

    where did you code

    • @brunocen
      @brunocen  4 года назад

      The code editor is Visual Studio Code, the script was run in my local

  • @tvboxxiaomi283
    @tvboxxiaomi283 3 года назад

    Can python do, face identification via ip camera?

    • @brunocen
      @brunocen  3 года назад

      yes, its the same code, but instead of grabing the frame from the computer camera you would need to set up the ip camera feed to grab the frame from there

  • @ahmedalday3029
    @ahmedalday3029 3 года назад

    hi mr bruno how can i change the video window size

    • @brunocen
      @brunocen  3 года назад

      Hi, here's an example of how to create a window with the size that you want and then populate it with the image that you want
      answers.opencv.org/question/84985/resizing-the-output-window-of-imshow-function/

  • @treywitter6487
    @treywitter6487 3 года назад

    had problems with installing the face_recognition

    • @brunocen
      @brunocen  3 года назад

      what was the problem? pip install normally works fine

    • @treywitter6487
      @treywitter6487 3 года назад

      @@brunocen it didnt work for me i ended up using tesseract and opencv and that worked

  • @abishekn8150
    @abishekn8150 3 года назад

    Bro..It shows same name for different faces.. What problem plzz expalin..

    • @brunocen
      @brunocen  3 года назад

      the algorithm is not perfect it was trained over thousands of faces and its retrained on your photo, but you can also change the settings to be more strict if you need it, there is a threshold of the match that you can change. Like match only if they are really similar, or match if they kind of look alike.

  • @bhagvadsanatani6224
    @bhagvadsanatani6224 3 года назад

    rgb_frame = frame[:, :, ::-1] TypeError: 'NoneType' object is not subscriptable how do i fix this

    • @brunocen
      @brunocen  3 года назад

      seems like you have a typo, check the code. The typo is creating an non suscriptable object

  • @mohammedMusabKhan
    @mohammedMusabKhan 3 года назад

    Love You Bro..

  • @marc19count
    @marc19count 3 года назад

    it kept crashing as the webcam starts.

  • @cracyprogramer5046
    @cracyprogramer5046 3 года назад +1

    very very thanks for this video can you update it by recognizing many people can you pls make it .

    • @brunocen
      @brunocen  3 года назад +1

      Yes, I will do it, cause a lot of people is asking for it, so I will upload a new one with more faces

  • @MrEri299
    @MrEri299 2 года назад +1

    thank you

  • @juanchin15
    @juanchin15 3 года назад

    hi, thank a lot for the video, is there a way to make this on colab?

    • @brunocen
      @brunocen  3 года назад

      I think yes, First you need to give permissions for the browser to use the camera, Second install dependencies (pip install) Third I think you can upload the picture (bruno.jpg) into the colab folder, but if not, you can pass a link from a google drive

  • @abdullahtalent
    @abdullahtalent 2 года назад

    thank you so much ...

  • @themiemir944
    @themiemir944 4 года назад

    how can i test it with dataset of images

    • @brunocen
      @brunocen  4 года назад

      The same way I did it, i explained where you can pass more faces and more people, if you want to do it with more images just do a loop on those images

    • @Majesthc_
      @Majesthc_ 4 года назад

      How i can do a for loop for that?Can u write please

    • @Majesthc_
      @Majesthc_ 4 года назад

      Did u make it?Can u show me if u did it

    • @sakshamkumar3864
      @sakshamkumar3864 4 года назад

      I need it too, I cant figure out what to do here

    • @brunocen
      @brunocen  4 года назад

      @@Majesthc_ well for example you can create an array with the names of the images that you want to pass and then do a for loop to extract each image something like
      assuming files is an array of names of the images
      for file in files:
      #here is the code for open the image and append it to the array of known faces (same as the video)

  • @sitidewinurilahi3891
    @sitidewinurilahi3891 3 года назад +1

    Thank you so much

  • @dj_jamfu91
    @dj_jamfu91 4 года назад +1

    Thanks for this tutorial, it works..i had some trouble increasing the fps though even after adding the code. Did anyone figure it out

    • @brunocen
      @brunocen  4 года назад

      For now its the best it can get, cause it needs to analyze the frame fro the faces and match them, and then grab another frame, so that's why it looks slow, but for now I dont know how to improve that, sorry about that

    • @brunocen
      @brunocen  4 года назад

      decrising the size of the image can make it a little faster but you loose quality of recognition so its a trade off

  • @tejusrushti3675
    @tejusrushti3675 4 года назад +1

    Can I get algorithm for this code sir...plz

    • @brunocen
      @brunocen  4 года назад

      face_recognition library is open source and it's on github, github.com/brunocenteno/face_recognition

    • @tejusrushti3675
      @tejusrushti3675 4 года назад +1

      Thank u... sir

  • @proud.94
    @proud.94 4 года назад +2

    a very lot thanks bro

    • @brunocen
      @brunocen  4 года назад

      I'm glad it was usefull for you

  • @raphaelschafer2620
    @raphaelschafer2620 4 года назад

    I have an error that says "dlib has no attribute get_frontal_face_detector" in line.
    PS: I like your viedeos

    • @brunocen
      @brunocen  4 года назад

      I have never seen that error, where is it calling that get_frontal_face_detector ?

    • @middle_class_traveller
      @middle_class_traveller 4 года назад

      Stop that and install the dlib in system
      Pip install dlib
      then install the wheel also

  • @dietodo21
    @dietodo21 4 года назад

    put video about your openeditors steup and face recognition steup

    • @brunocen
      @brunocen  4 года назад

      you can use any code editor you want, if you dont have visual code you can use "sublime text 2" is much more simple to use, and the face_recognition module is installed via pip, its explained on the video

  • @Abdullahkhan-fz5ko
    @Abdullahkhan-fz5ko 3 года назад +1

    The video was OK, but u kept on making mistakes bro(in the code), u gotta improve.

    • @brunocen
      @brunocen  3 года назад

      Well it's not always perfect, but I will try to get better, thanks for the support

  • @ymanolmartinezcastillo1283
    @ymanolmartinezcastillo1283 4 года назад

    It says zsh: abort when I run the code

    • @brunocen
      @brunocen  4 года назад

      zsh is the terminal, you probably have an error in your computer, try running a simple script to see if you have any error

    • @brunocen
      @brunocen  3 года назад

      seems like a recent deploy of vscode is not asking permission to use the camera and it get stuck so thats why it aborts. Try running it from the macbook shell

  • @padmavathynarasareddygari1213
    @padmavathynarasareddygari1213 4 года назад +1

    Please install `face_recognition_models` with this command before using `face_recognition`:
    pip install git+github.com/ageitgey/face_recognition_models
    Process finished with exit code 0
    Pls Help Me I am getting this when I run your code. I installed the models but it is still saying the same thing pls help. Other than that I loved the video...

  • @JaydenLOL
    @JaydenLOL 4 года назад

    Face recognition attendance project check it out
    @pKgA

  • @flatbreadsub
    @flatbreadsub 4 года назад +1

    rgb_frame = frame[:, :, ::-1] non-scriptable

    • @brunocen
      @brunocen  4 года назад +1

      a python object is not subscriptable if its a container of other object, make sure you grab the frame correctly with the "ret, frame = " stackoverflow.com/questions/216972/what-does-it-mean-if-a-python-object-is-subscriptable-or-not

    • @flatbreadsub
      @flatbreadsub 4 года назад +1

      Bruno Centeno ok I will look at it again, thanks for the reply

    • @flatbreadsub
      @flatbreadsub 4 года назад +1

      @@brunocen I already had that and I still get the error

    • @siddheshkhadapkar3071
      @siddheshkhadapkar3071 4 года назад

      video_capture = cv2.VideoCapture(1)
      change the (0) to (1) as shown above
      sometimes if the default value of camera gets' changed in the laptop mostly
      so if you are a laptop user this must work

    • @geert_hoo
      @geert_hoo 4 года назад +1

      also check if your webcam is not in use by another app, turn this app off and it will work

  • @Majesthc_
    @Majesthc_ 4 года назад +1

    How can i do a for loop for multiply images?

    • @brunocen
      @brunocen  4 года назад +1

      first create an array of the names of the photos
      then do a loop for the photos
      for photo in photos:
      load image
      face encoding
      add to known faces array
      after that you will have a bigger array of known faces

    • @Majesthc_
      @Majesthc_ 4 года назад

      @@brunocen
      photos = ["Berke.jpg","Furkan.jpg","Hamit.jpg","Seval.jpg"]
      fr.load_image_file()
      berke_image = fr.load_image_file("Berke.jpg")
      hamit_image = fr.load_image_file("Hamit.jpg")
      seval_image = fr.load_image_file("Seval.jpg")
      furkan_image = fr.load_image_file("Furkan.jpg")
      for photo in photos:

      berke_face_encoding = fr.face_encodings(berke_image)
      hamit_face_encoding = fr.face_encodings(hamit_image)
      seval_face_encoding = fr.face_encodings(seval_image)
      furkan_face_encoding = fr.face_encodings(furkan_image)
      known_face_encondings = [berke_face_encoding,hamit_face_encoding,seval_face_encoding,furkan_face_encoding]
      known_face_names = ["Berke", "Furkan", "Hamit", "Seval"]
      I did like that but it gives me this error:
      File "C:/Users/BERKE/Desktop/PYTHONKLASÖR/FaceDetection/main.py", line 8, in
      fr.load_image_file()
      TypeError: load_image_file() missing 1 required positional argument: 'file'
      [ WARN:0] global C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-k8sx3e60\opencv\modules\videoio\src\cap_msmf.cpp (435) `anonymous-namespace'::SourceReaderCB::~SourceReaderCB terminating async callback

    • @brunocen
      @brunocen  4 года назад

      @@Majesthc_ Seems like your error is on the load image, are you passing the name of the file correctly? verify that the image file is in the same folder, or pass the absolut path to the file