Face Landmark Detection using dlib - Python OpenCV

Поділитися
Вставка
  • Опубліковано 22 лип 2024
  • Code: github.com/misbah4064/faceLan...
    Data File: github.com/davisking/dlib-mod...
    Support me on Patreon
    / misbahmohammed
    Adrian's blog: www.pyimagesearch.com/2017/04...
    Support me on Patreon
    / misbahmohammed
    💻 General Tech
    Dell Tower - amzn.to/3gHXAVV
    Monitor -amzn.to/2R0Mqk7
    Keyboard - amzn.to/3u2hPRS
    ​Mouse - amzn.to/3gMc72G
    ​Portable SSD - amzn.to/3voO8us
    Headset - amzn.to/3gI6K4t
    Airpods - amzn.to/3gK96Qu
    📸 Camera Gear
    Main Camera - amzn.to/3uae8cI
    Main Lens - amzn.to/3sXim6b
    Tripod - amzn.to/3vtsRA1
    Jobi Tripod - amzn.to/3eEo6wu
    Memory Card - amzn.to/3vt2quj
    🎥Video Accessories
    Mic - amzn.to/3uaeIHq
    Mic Arm - amzn.to/3tSkSMp
    Writing Pad - amzn.to/3nuxG9w
    Green Screen - amzn.to/3gQjnui
    LED lights - amzn.to/3nrQbex
    👨‍💻Books I like on Personal Growth
    Compound Effect - amzn.to/3vm815s
    Rework - amzn.to/32TE3K4
    Four Hour Work Week - amzn.to/32SrOx5
    Tools of Titans - amzn.to/3eEtfVx
    The Last Lecture - amzn.to/3dWia31
    Sam Walton - amzn.to/3b1nOPB
    Originals - amzn.to/3eyfUOt
    Blink - amzn.to/3sU0KIp
    The Tipping Point - amzn.to/3vuBKJH
    Rich Dad Poor Dad - amzn.to/3eCPRpq
    👨‍💻Books I like on Investing
    One up on Wall Street - amzn.to/3aFWohF
    Intelligent Investor - amzn.to/3xtMD08
    Common Sense Investing - amzn.to/3vuCbDP
    DISCLOSURE: Some of the links on this page are affiliate links, meaning, at no additional cost to you, I may earn a commission if you click through and make a purchase. Affiliate commissions help fund videos like this one.
  • Наука та технологія

КОМЕНТАРІ • 63

  • @udithkrishna8322
    @udithkrishna8322 3 роки тому +4

    Both of your codes are perfect. Easy to execute. Thank you very much Misbah

    • @19daredevill
      @19daredevill  3 роки тому +1

      Thank you. I'm glad it worked for you.

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

    Unable to open shape_predictor_68_landmark.dat
    What should i do ? i have been frustrated for 1 week

  • @sefalumar
    @sefalumar 4 роки тому +2

    Thanks for the tutorial it ist great for a quik overview!!

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

    I would like to know about the get front face detector and shape predictor. what is the face detection tenique that get front face detector use? thank you!

  • @amysmith1024
    @amysmith1024 3 роки тому +3

    Im trying to use this code but i'm getting the following error, can you please tell me why? I think I might ned to use an older version of dlib?
    RuntimeError Traceback (most recent call last)
    in ()
    3 hog_face_detector = dlib.get_frontal_face_detector()
    4
    ----> 5 dlib_facelandmark = dlib.shape_predictor(shape_predictor_68_face_landmarks.dat)
    RuntimeError: Unexpected version found while deserializing dlib::shape_predictor.

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

    thank you so much for the video !
    but how can i run or open the . dat file ?

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

    Thank you for the video! What do you suggest for masked faces ? To detect and get the distance between them ?

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

      Hey , I'm working on the same thing. Did you figure out how to get distance between two points?

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

    unbelievably cool, worked perfectly first time. awesome!!!

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

      what to do with the dowloaded dat file?

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

      How do you do that? I already unzip the file but it doesn't works, also i tried give it a path, still it give me error

  • @tanmaybhikar391
    @tanmaybhikar391 3 роки тому

    I am getting error in hogtoch front face line
    Can you please help in that

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

    hey Misbah, thanks for your tutorial!!
    I'm running into an error of saying "module dlib has no attribute get_frontal_face_detector". I searched for solutions but still stuck. Any suggestion from your side?

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

      Download the file from my comment bellow and place it in the same forlder where the python file exit. Bcz that file is reffered in the code as well.

  • @pratikjugantmohapatra18
    @pratikjugantmohapatra18 3 роки тому

    the data set id=s not avalable in github.....please fix it

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

    use of .dat file what does it contain?

  • @RukmoddinPatel-bs2lq
    @RukmoddinPatel-bs2lq 10 місяців тому +1

    On which IDE u r running the code

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

    SIR ,,THE DATA FILE (.DAT) IS NOT OPENING IN WINDOWS .PLEASE HELP????????????????????????????????????????????

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

    cant we di this to images ?

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

    I want to classify face shape for a school project but no one in my team knows ml, can you please guide me?

  • @aryamehta007007
    @aryamehta007007 3 роки тому

    Can make a video on how i can use dlib in matlab ?

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

    Hi, I'm just starting to learn python, where to find the command line that you mentioned?

    • @prabhum4502
      @prabhum4502 3 роки тому

      Windows+R and type cmd then click ok command prompt will be opened

  • @pratyaypoddar3094
    @pratyaypoddar3094 3 роки тому

    Can you say which software do you use

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

    the data file is in binary we cant execute it..please send the raw file

  • @purnimayadav9509
    @purnimayadav9509 3 роки тому

    Hey Misbah! Great video, it really helped me a lot.
    Quick question: Im getting error in this line:
    gray_images = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
    it says
    error: OpenCV(4.1.2) /io/opencv/modules/imgproc/src/color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cvtColor'
    Can u help plz!? I'm using google colab and have uploaded the predictor file as well.

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

    i have issues with "unable to open shape_predictor_68_face_landmarks.dat". help me please

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

    Runtime error:- unable to open" shape_predictor_68_face_landmark.dat"... getting like this. Then wt shd I do??

    • @paramkhurana5578
      @paramkhurana5578 3 роки тому

      I am getting the same error issue? Were you able to resolve it? Thanks!

    • @youssefgamal1926
      @youssefgamal1926 3 роки тому

      download this file and source code from my channel ..this is work

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

    Really appreciable work !!
    I'm troubling with dataset extension and type of dataset... Could you help me with this?

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

      Sure, what's the error or issue

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

      @@19daredevill dlib_facelandmark = dlib.shape_predictor("/content/drive/MyDrive/Colab Notebooks/NN_dataset/shape_predictor_68_face_landmarks.dat")
      RuntimeError: Unexpected version found while deserializing dlib::shape_predictor.

    • @ArunKumar-zd4ue
      @ArunKumar-zd4ue 3 роки тому

      @@shivambansal3560 did u solve it? i have the same issue

    • @harjeetsinghgoldy1
      @harjeetsinghgoldy1 3 роки тому

      @@shivambansal3560 you forgot to unzip the zip file... enjoy :P

    • @harjeetsinghgoldy1
      @harjeetsinghgoldy1 3 роки тому

      Unzip the file first :)

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

    sir, first of all, thanks for the explanation. This video is helpful for me to understand the concept of the drowsiness detection system as well as the eye aspect ratio. But sir I got an error that unable to open shape_predictor_68_face_landmark.dat. what should I do sir?

    • @19daredevill
      @19daredevill  3 роки тому

      Hi, you may be missing the model file. See if you are missing any steps from the video. Let me know at what step you ran into that issue. thanks.

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

      @@19daredevill no sir, i am not missing any step from the video. But still i got error that unable to open 'shape_predictor_68_face_landmarks.dat'

    • @dosanimohsin2174
      @dosanimohsin2174 3 роки тому

      @@pritam6287 give path to your predictor.

    • @pritam6287
      @pritam6287 3 роки тому

      @@dosanimohsin2174 C:\Users\pritam pravin muli\Desktop\program\shape_predictor

    • @sreejithshr6525
      @sreejithshr6525 3 роки тому

      @@pritam6287 sir i too got the same problem does the path worked?

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

    Which IDE can be used?

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

    you saved me😃

  • @dosanimohsin2174
    @dosanimohsin2174 3 роки тому

    (, RuntimeError('Unexpected version found while deserializing dlib::shape_predictor.'), ) im getting this error

    • @19daredevill
      @19daredevill  3 роки тому

      Some library seems to be incompatible. Are you using the same setup as mine

    • @dosanimohsin2174
      @dosanimohsin2174 3 роки тому

      @@19daredevill yes sir

  • @saidoudaha1657
    @saidoudaha1657 3 роки тому

    thanks

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

    any one know how to draw lines between the dots

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

      did you find out how ? i really need this for my project

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

      @@manzuree9904 Nope i ended up changing my project sorry man

  • @bhushamjayalakshmi5507
    @bhushamjayalakshmi5507 3 роки тому

    Bro can you write code in matlab

    • @deekshagupta3786
      @deekshagupta3786 3 роки тому

      hey can u tell me where can i find the ppt on this becoj u said Matlab i got the online ppt in Matlab but since i m using his code so where can i found this?

  • @ferozmohammad7721
    @ferozmohammad7721 3 роки тому

    Landmark detection is not happening with all partss..only jaw line is happening