Drowsiness Detector (Blink Detection) OpenCV Project Tutorial - Python and Dlib - with code

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

КОМЕНТАРІ • 144

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

    Very Interesting program. My 6 year old brother really liked it after we tweaked the thresholds and added the 'barely awake', 'alert', and 'Scared' cases.

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

    it's showing RuntimeError: Unable to open shape_predictor_68_face_landmarks.dat what to do???????

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

    Thank u so much Mr.Mohammed this was the explanation i needed. Not saying that the original article wasn't good enough but your explanations on a some what different approach made it easier to understand and I'm grateful

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

      You are most welcome and I'm glad it helped you 🙂
      See if this channel is helpful for you and consider subscribing. Take care

  • @rajansingh-sn2wg
    @rajansingh-sn2wg 4 роки тому +4

    Most underrated channel on youTube.

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

    beautiful explanation, left and right confusion just makes me remember from sunil Shetty's movie: "Aapka left ya mera left?"😂😂

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

    Thank you for your hardwork Mr.Mohammed

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

    You are humorous and i loved the tutorial too

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

    Sir ...the packaages are not getting installed in sublime text .? please make a video on it

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

    sir can you add an alarm in this code ...like if the driver is dwownsy ,then there will be an alarm to alert the driver.

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

    i was getting error will u please help me to resolve, i tried by installing dlib and cmake but still it showing dlib module not found

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

    get_frontal_face_detector is giving an error

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

    Traceback (most recent call last):
    File "C:/Users/HP/Documents/Muniba/Python/drowsiness detection 2.py", line 14, in
    dlib_facelandmark = dlib.shape_predictor("shape_predictor_68_face_landmarks.dat")
    RuntimeError: Unable to open shape_predictor_68_face_landmarks.dat
    what to do to solve this???

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

    Sir , Im getting this error ,"RuntimeError: Unable to open shape_predictor_68_face_landmarks.dat" i downloaded the file from github as well, still

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

    why error code "
    from scipy.spatial import distance"??

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

    Bro i am facing no module named imutils, cv2 , dlib in my project ..created venv and install all the libraries but still throwing ssme error how to fix it ??

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

    thank you so much, Mr. Mohamed

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

    hello..which IDE did you used for writing the code?i face problem in installing dlib in pycharm

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

      I was using Sublime on a Linux computer for this video. However, dlib was installed through command prompt on a virtual environment. I think I went over it in a video before this (Landmark detection). Let me know if you need help finding it.

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

      @@19daredevill but in window I tried a lot to install dlib but full of errors

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

      @@sajinas488 Bro did u get this error

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

    the windows is executing multiple times ,and when we close the window ,we are being asked to restart the kernal..could you resolve this issue

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

    @Misbah Mohammed yes thanks to your previous video I was able to do calculate the mouth aspect ratio. But now what. But how do combine both results in decision making?

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

      Hi Omar, you have done the major part by calculating the ratio. Now only use a simple function to calculate the ratio for you and then use a threshold level to define whether or not the mouth is open. Like we did for the eye blink detection. Hope it helps

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

      Where did you run this code?
      HELP!!!

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

    That A= distance.euclidean (eye 1, eye 5) should be 2 and 6 right? As the mention that (eye landmark 6 cordinate)?

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

    the problem with this code is with mask on(covid-19 requirement) its not detecting the face/eyes can you help?

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

    A fixed threshold of 0.26 depends on the person involved. Not everyone is the same so this approach is not very robust

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

      Yes, you are right. Best we can do is tweak the threshold to get the optimum value

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

    i want to choose this idea as my fyp

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

      Hey I was thinking the same, can u share any contact info? Mail or such.

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

    Tell me how to run this code on Google colab because it is a best platform for python code run without install dependencies or libraries for run this code like dlib , time?

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

    how can i use the drowsineess detector output to control a dc motor

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

    How can i add a registration login page to your code please?

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

    How to install all the packages.. I am not able to download dlib

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

      You can install it by pip install dlib. But what is the error you are getting

  • @LoremIpsum-yt
    @LoremIpsum-yt Рік тому

    Will this work if there are multiple faces to detect drowsiness from??

  • @kishangondaliya129
    @kishangondaliya129 4 роки тому +1

    In this project how can I add registration page I mean form for registration?? If possible help me out??

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

      Not sure if I understood your question. Where are you trying to add the registration page and for what purpose? Let me know if I'm missing anything

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

    Do this project use supervised or unsupervised learning ?

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

      We were not doing any machine learning for this project. The weights file were already trained 🙂

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

    how will u differentiate between blink and drowsiness

  • @Abhisheksingh-yo4jq
    @Abhisheksingh-yo4jq 3 роки тому

    how to sove this error AttributeError: module 'dlib' has no attribute 'get_frontal_face_detector' please reply

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

    Could u please tell me the software & libararies that to be installed to make this code run

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

    sir, i am Facing this type of error (RuntimeError: Unable to open C:\Users\Hp\Downloads\shape_predictor_68_face_landmarks\.dat
    ) what to do ??

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

    Do you use GPU?
    what is the FPS rate?

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

    which algorithm is used in this model?

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

    thank you, Sir Mohamed :)

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

    how to view the content of 68shape predictor data set?it is a .dat file..how to open it ?

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

    Sir which libraries we should install in pc for this ?

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

    i am gonna subscribe this channel right now .you deserve to be subscribed......

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

    Hello Misbah
    I am trying to add mouth aspect ratio to get a final result with EAR. Can you please give me an idea of how I can combine these two results.
    Thank You

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

      Hi Omar, previous to this project, I had gone over the face landmark detection, link below. You can look up the coordinates of the left-right side and top-bottom of the lips and then calculate the ratio accordingly. Hope it helps.
      ua-cam.com/video/SIZNf_Ydplg/v-deo.html

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

      @@19daredevill yes thanks to your video I was able to do that. But now what. I can MAR. But how do I use that in decision making.

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

    Traceback (most recent call last):
    File "D:/internshipython/day20,21/day20/code/exe42.py", line 27, in
    detector = dlib.get_frontal_face_detector()
    AttributeError: module 'dlib' has no attribute 'get_frontal_face_detector

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

      have u find the solution of that error?? actually I was also getting same I tried to resolve but unable to find whats the exact error is

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

      @@sagardubey3800 can you help me out for this

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

    Is it camera work in night without light

  • @ashishkumardubey2254
    @ashishkumardubey2254 4 роки тому +1

    Is there any alarm sound alert in this project??

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

      Hi, not in this project, but it's not too difficult to add. You'll have to simply play a media file once the user is detected to be drowsy. Hope it helps 🙂

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

      @@19daredevill this is what i came here for, thank you

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

    Hello sir, which device monitors the eye ?

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

    But how implement the code I mean what's the process can you tell?

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

    how to close cv frame window ?

  • @banupriya4852
    @banupriya4852 4 роки тому +1

    Hi bro i have an doubt that. Where to run this python script. In python shell Or command prompt.

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

      Hi, Running on python shell would be easier. However, if you have Python installed on your computer, you can use command prompt as well. hope it helps.

    • @banupriya4852
      @banupriya4852 4 роки тому

      @@19daredevill bro and this is the only code right fir this project and which kind of python shell is that you are using right now in that code session may I know that name please... For that is that shell can be installed in windows

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

      @@banupriya4852 I was on a linux computer for that project and was using the Linux Terminal for running the code. But you can do the same on the windows power-shell.
      I'll suggest you to watch the tutorial on face-landmark detection, which is the previous video on my channel. It'll explain some of the basics that you may need for this project. hope it helps.

    • @banupriya4852
      @banupriya4852 4 роки тому +1

      @@19daredevill tqq bro..

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

    this is live detection. but how to do it for a video file???

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

      You can replace videoCapture ("video file name") and it'll read the video file for you
      Hope it helps

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

      @@19daredevill thank you so much for ur quick response!

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

    If he use sunglass whether it will identify

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

      The eyes should be visible in order to detect the outline. Hope it helps

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

    what is the name of app that we need to download to apply code

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

      It's uses the dlib facial landmark detection. I believe I provided the link to the video for it in the description. If not let me know. Hope it helps 🙂

  • @ManojKumar-zb8ki
    @ManojKumar-zb8ki 4 роки тому +1

    hello, could you share what is previous video i need to see which you mentioned in this video

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

      Hi, this is the link, hope it helps 🙂
      ua-cam.com/video/SIZNf_Ydplg/v-deo.html

    • @ManojKumar-zb8ki
      @ManojKumar-zb8ki 4 роки тому

      hey, thanks for reply
      i am getting run time error: unable to open shape_predictor_68_face_landmarks.dat
      how to resolve this i googled it but din't got any suitable answer. i placed the file in .py file location only but error is not resolved
      Please help me with this
      Thanks in Advance

    • @ManojKumar-zb8ki
      @ManojKumar-zb8ki 4 роки тому

      this error is resolved, please explain _,frame what does it mean and i have another question .....according to ibig facial landmarks are from 0 to 68, why we took euclidean dist between eye[1],eye[5] etc why not eye[37],eye[41].
      Thanks in advance

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

      @@ManojKumar-zb8ki , sorry just got to see this. For some reason it didn't come up on my notifications. _, frame is just a flag to see whether frame has any image or not.

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

      @@ManojKumar-zb8ki I went over the Euclidean distance for the eyes in the video :) . It's based off of the research paper from those guys. Hope it helps you :)

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

    Sir which software do you use?

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

      this was sublime . running on a linux machine

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

    in which software you are working?

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

    I got error with this dataset

  • @melihaltay2215
    @melihaltay2215 4 роки тому +1

    Can you share article Mr.Mohammed?

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

      Hi, yes, but which article are you looking for?

  • @shantyshabu3099
    @shantyshabu3099 4 роки тому +1

    Is this a beginner project?

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

      I wouldn't say beginner's, but it's not too difficult either. As soon as you understand the math behind the blink detection, that's all you need to know. Hope it helps 🙂

  • @aravindhp5612
    @aravindhp5612 4 роки тому +1

    How to download driver Drowsiness detection dataset

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

      Hi, please correct me if I missed anything. But there's no Drowsiness dataset :) . It's being detected in real time and not through machine learning. Hope it helps 🙂

    • @barkathullanr
      @barkathullanr 4 роки тому +1

      @@19daredevill
      Assalamu alikum warahmatullahi wabarakathu.hope you are good brother..
      When I run your code I get error saying that"unable to open shape_predictor_68_face_landmarks.dat"
      I think there is some file or dataset missing

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

      @@barkathullanr WalaikumasSalaam brother, thank you for the detailed comment. Please find the link to download the file here github.com/davisking/dlib-models/blob/master/shape_predictor_68_face_landmarks.dat.bz2
      I actually went over it in the previous video of this series

    • @barkathullanr
      @barkathullanr 4 роки тому +1

      @@19daredevill
      JazakAllah qhair brother.
      I downloaded the databset from the link given in the description box in the facial landmark detector video..

  • @utkarshabarge6251
    @utkarshabarge6251 4 роки тому +1

    Sir, do you have a step by step tutorial for this project?

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

      Hi, I had tried to put most of it in this video. But if you are looking for any more information and have questions, please put it in the comments here. Hope it helps

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

      @@19daredevill iam having problem installing dlib lib in pycham plz help

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

      @@tushardas3928 try to install anaconda

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

      @@tushardas3928 for dlib you need to download VISUAL studio for c++ and later on in pycharm try to downloaD VERSION 18.0,rather than the latest version

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

      @@piyushprince8432 Bro can u plz tell me the process how to download & install the dlib library

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

    Hi sir, i am getting the error---- Unable to open shape_predictor_68_face_landmarks.dat, please help

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

    Whether this project comes under deep learning

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

      Part of it does. Where you are using the face landmark detection. However it's on a pretrained dataset

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

      What is the model we are using here..

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

      @@banupriya4852 it's been a while, I don't remember the project very well. But there's a link in the description which goes over the facial landmark project and describes it in more detail.

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

    AsslamuAlikum Brother! would you please share this project documentation

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

      WalaikumasSalaam brother. I did not create any documentation for it. The video is my documentation 😁

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

    Nice

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

    assalamualaikum friend...im from malaysia and im intrested with this project...can you guide me doing this project...

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

    Can u send me report and paper link plese

  • @VISHNUKUMAR-em1sl
    @VISHNUKUMAR-em1sl 3 роки тому +1

    Bro can u plz tell me how to add alert sound in this project?? It will helps me a lot

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

      search for an alert online. make sure its In mp3 or wave format. Install playsound library. So when the eyes are closed for a specified period of time, just make a thread and run this with playsound("audio.mp3/wav")

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

    What if u blink your eyes

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

      I believe there's a time delay to differentiate a blink and a drowsiness. Hope it helps 🙂

  • @priyaGupta-cq4sp
    @priyaGupta-cq4sp 2 роки тому

    Hi
    Can you make video on radiation detection in python language please reply this comment

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

    Can someone send me the coding

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

    Kya koi muje btaega iska code kese run hoga plss somebody tell me

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

      Kahan problem horahi hai

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

      @@19daredevill muje isko explain krna h ise kese run hoga ye or kese kya kya chhaiye Laptop m isko run krane k liye and how apna face kese ayega detection m ye b btao m

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

      what are the requirements we need in laptop in order to run this

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

      @@deekshagupta3786 I ran it on a regular laptop with no super hardware. Were you able to follow the tutorial?

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

      @@19daredevill sir I m asking about the compiler

  • @pavithra.p4499
    @pavithra.p4499 Рік тому

    Dlib. Shape_predictor('shape_predictor_68_face_landmarks.dat