Simple Face Detection in Python

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

КОМЕНТАРІ •

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

    thanks. now i have basic AI classifying everything in my immediate area as a face or not via my laptop camera. Love it!!!! 🔥🔥

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

    I actually use OpenCV all the time. these are interesting!

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

    Holy thank you so much my man !! There are a lot of face_detection guides on net and I can't find shit that I understand :3 thanks man

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

    Can you show what packages did you install for this tho? This tutorial is pretty incomplete also feels more like a speedrun than a tutorial.

  • @NapoleanBonaparte-bv2hz
    @NapoleanBonaparte-bv2hz Рік тому

    Thanks, G. That was really helpful.

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

    Love your videos man thank you

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

    Works on the first try, thank you!

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

      Traceback (most recent call last):
      File "C:\Users\pydis\PycharmProjects\eyedetection\main.py", line 12, in
      gray = cv2.cvtcolor(frame, cv2.COLOR_BGR2GRAY)
      AttributeError: module 'cv2' has no attribute 'cvtcolor'
      can somebody tell me what to do when i get this error

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

      @@pydisekhar Write 'gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)' instead.
      There is capital C in 'cvtColor'

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

      @Arnyoung thanks dear

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

    Thankyou so much for the great vid!

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

    great tutorial you made it very simple.

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

    I keep getting error:OpenCV(4.5.5) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor'
    For some reason my IDE is not lining the line gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)

    • @Omer.Ravid1
      @Omer.Ravid1 2 роки тому

      me too, you know how to solve it?

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

      i changed "COLOR_BGR2GRAY" to "COLOR_RGBA2GRAY" and it started working

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

    can we use other trained data for this ?

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

    Nice video. I was writing this code in Jupyter Notebook on my 2019 Macbook Pro and when I ran it and had it activate my laptop's camera to capture my face in live time, it worked, but I was wondering how you're supposed to get out of this. When I pressed "q" it freezes. I know q is the key that's supposed to break the loop and make things stop, but the only way I can seem to get out of this and get rid of that faces window is by restarting my kernel which seems inefficient. I was wondering if there was a better way to do this or if I'm just overlooking something simple. Thanks!

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

    do i need to install opencv in the python installation directory? or just in any location from the command line?

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

    Another great and informative video. Thank you. I'm curious if there are still plans for an Intermediate and Advanced C programming playlist. I was really looking forward to those.

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

    How can the image be stored in the database?
    And how to recover the associated data in the recognized image
    Could you please help me?

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

    Thanks bro for usefull and awasome tutorial

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

    Thank you very much sir for this video

  • @BOHICAMAN1
    @BOHICAMAN1 4 місяці тому +2

    Wrote your code exactly. Ran it for my camera video and it found my face. When I changed video feed to a properly installed video (mp4), I get error: "gray = cv2.cvtColor(frame, cv2.COLOR_GRAY)". Then it says: cv2.error: OpenCV(4.10.0) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\color.cpp:196: error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor'. Anyone have an idea what is wrong??

    • @gabrielbiacchi6169
      @gabrielbiacchi6169 4 місяці тому +1

      maybe that function doesn't exist in your installed library? Maybe install again? Different versions?

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

      @@gabrielbiacchi6169 I'll give it a try. Thanks!

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

    does it record the whole time you are using the facial recognition?

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

    Can you do a video series on using git?

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

    Hello, I dont undertsan ",_" of the line _, frame = camera.read()

    • @asm-f9u
      @asm-f9u Рік тому

      for which camera to use i think

  • @nbachalky3625
    @nbachalky3625 2 роки тому +8

    didnt understand a thing you were just firing on 😭

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

    how do I make it so that it makes the square filled

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

    bro tell me what are the interpreuter extensions i need

  • @costadope55
    @costadope55 16 днів тому

    fix for the error: (-215:Assertion failed) scn == 1 && dcn == 1 in function 'demosaicing'
    Change >>>>>>>>>>>> cv2.COLOR_BAYER_BG2GRAY to cv2.COLOR_BGR2GRAY.

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

    where is the code?

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

    please tell what to do it is constantly saying pip is not recognizes a command in command prompt please help

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

    how do we do the same thing but on pictures?

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

    Am facing problems, it is saying" Cannot find reference 'CASCADE_SCALE_IMAGE' in '__init__.py':19"

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

    what application did you use

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

    Someone help me, How do I install that harr file (the pretrained model)

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

    What exactly in code tells to find human faces here?

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

      Oh I see, haarcascade_frontalface
      Nice tutorial though👍

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

    which Ide are u using

  • @__money__mindset_..848
    @__money__mindset_..848 2 роки тому

    can somebody help i got this error:opencv-python\opencv\modules\core\src\persistence.cpp (505) cv::FileStorage::Impl::open Can't open file: 'D:\pythonProject1\venv\lib\site-packages\cv2\data\haarcascade_forntalface_default.xml' in read mode

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

    I want to ask how to install import CV2, bro? Please answer, sis 🙏

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

      pip install cv-3 write it in terminal

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

    Where is this code? 🙏🏽

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

    Great Video! But I am not able to install Opencv:

  • @g.s.3389
    @g.s.3389 2 роки тому

    suggestion: cvlib works better, why don't you make a video on it. :)

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

    Where is the code ? :/

    • @_xen_.
      @_xen_. Рік тому

      theres the code on his github

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

      @@_xen_.whats the name of this project on his github?

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

    i just want the script

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

    line 576,
    in _parse_args
    a = os.fspath(a)
    TypeError: expected str, bytes or os.PathLike object, not module
    how to fix???
    *in cascade_path = pathlib.Path(cv2, __file__).parent.absolute() / data/haarcascade_frontalface_default.xml"
    EDIT: FIXED, dot, not comma