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

  Рет қаралды 46,710

Misbah Mohammed

Misbah Mohammed

Күн бұрын

Пікірлер: 145
@glebignites5278
@glebignites5278 3 жыл бұрын
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.
@JoshuaaCR
@JoshuaaCR 4 жыл бұрын
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 жыл бұрын
Most underrated channel on youTube.
@19daredevill
@19daredevill 4 жыл бұрын
Thank you for your kind words 🙂
@daniyalakhtar2204
@daniyalakhtar2204 2 жыл бұрын
Tell me software name on which you feed code
@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 жыл бұрын
Thank you for your hardwork Mr.Mohammed
@sakshatkumar6834
@sakshatkumar6834 2 жыл бұрын
it's showing RuntimeError: Unable to open shape_predictor_68_face_landmarks.dat what to do???????
@pavithra.p4499
@pavithra.p4499 Жыл бұрын
Same error
@pratikjugantmohapatra18
@pratikjugantmohapatra18 3 жыл бұрын
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.
@pratikjugantmohapatra18
@pratikjugantmohapatra18 3 жыл бұрын
Sir ...the packaages are not getting installed in sublime text .? please make a video on it
@elixpo
@elixpo 2 жыл бұрын
You are humorous and i loved the tutorial too
@ahr8974
@ahr8974 4 жыл бұрын
i want to choose this idea as my fyp
@sumeetsingh1909
@sumeetsingh1909 3 жыл бұрын
Hey I was thinking the same, can u share any contact info? Mail or such.
@saidoudaha1657
@saidoudaha1657 4 жыл бұрын
thank you so much, Mr. Mohamed
@sagardubey3800
@sagardubey3800 3 жыл бұрын
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
@sahiltaneja9021
@sahiltaneja9021 Жыл бұрын
Same here
@sajinas488
@sajinas488 3 жыл бұрын
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
@munibarahman3506
@munibarahman3506 2 жыл бұрын
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???
@sampathkumar2020
@sampathkumar2020 2 жыл бұрын
Have u did or not
@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 ??
@Dankman3
@Dankman3 3 жыл бұрын
@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!!!
@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
@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)?
@TauvicRitter
@TauvicRitter 3 жыл бұрын
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 жыл бұрын
Yes, you are right. Best we can do is tweak the threshold to get the optimum value
@quratulainmansoor3396
@quratulainmansoor3396 3 жыл бұрын
the problem with this code is with mask on(covid-19 requirement) its not detecting the face/eyes can you help?
@gauri425
@gauri425 2 жыл бұрын
Sir , Im getting this error ,"RuntimeError: Unable to open shape_predictor_68_face_landmarks.dat" i downloaded the file from github as well, still
@tandrastastytale
@tandrastastytale Жыл бұрын
Same here
@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?
@Abhisheksingh-yo4jq
@Abhisheksingh-yo4jq 3 жыл бұрын
how to sove this error AttributeError: module 'dlib' has no attribute 'get_frontal_face_detector' please reply
@LoremIpsum-yt
@LoremIpsum-yt Жыл бұрын
Will this work if there are multiple faces to detect drowsiness from??
@harshitajain8532
@harshitajain8532 3 жыл бұрын
get_frontal_face_detector is giving an error
@Dankman3
@Dankman3 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 жыл бұрын
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. kzbin.info/www/bejne/iXq9f5mVjsmjosk
@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.
@agungpatangai5152
@agungpatangai5152 3 жыл бұрын
why error code " from scipy.spatial import distance"??
@hanumanthuanil1788
@hanumanthuanil1788 3 жыл бұрын
U need to install scipy library
@tecxter2930
@tecxter2930 2 жыл бұрын
how can i use the drowsineess detector output to control a dc motor
@fypyfyp
@fypyfyp 2 жыл бұрын
thank you, Sir Mohamed :)
@kishangondaliya129
@kishangondaliya129 4 жыл бұрын
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
@ferozmohammad7721
@ferozmohammad7721 3 жыл бұрын
Could u please tell me the software & libararies that to be installed to make this code run
@sindhujadixit1532
@sindhujadixit1532 3 жыл бұрын
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 🙂
@bhargav3923
@bhargav3923 3 жыл бұрын
But how implement the code I mean what's the process can you tell?
@jardelvieira8742
@jardelvieira8742 Жыл бұрын
Do you use GPU? what is the FPS rate?
@hanumanthuanil1788
@hanumanthuanil1788 3 жыл бұрын
Sir which libraries we should install in pc for this ?
@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 ??
@leangerard342
@leangerard342 3 жыл бұрын
have u sorted this error
@niranjansharma1566
@niranjansharma1566 3 жыл бұрын
Hello sir, which device monitors the eye ?
@stylewithyamini
@stylewithyamini 3 жыл бұрын
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
@sajinas488
@sajinas488 3 жыл бұрын
how to view the content of 68shape predictor data set?it is a .dat file..how to open it ?
@andrewbola7494
@andrewbola7494 Жыл бұрын
How can i add a registration login page to your code please?
@umerusman7720
@umerusman7720 4 жыл бұрын
i am gonna subscribe this channel right now .you deserve to be subscribed......
@banupriya4852
@banupriya4852 4 жыл бұрын
Hi bro i have an doubt that. Where to run this python script. In python shell Or command prompt.
@19daredevill
@19daredevill 4 жыл бұрын
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 жыл бұрын
@@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 жыл бұрын
@@19daredevill tqq bro..
@subbuala9837
@subbuala9837 3 жыл бұрын
Is it camera work in night without light
@Rakshatheridiculous
@Rakshatheridiculous 3 жыл бұрын
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 3 жыл бұрын
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
@CONFUSEDBOND
@CONFUSEDBOND 3 жыл бұрын
how will u differentiate between blink and drowsiness
@rahulranjan5794
@rahulranjan5794 3 жыл бұрын
which algorithm is used in this model?
@banupriya4852
@banupriya4852 4 жыл бұрын
Whether this project comes under deep learning
@19daredevill
@19daredevill 4 жыл бұрын
Part of it does. Where you are using the face landmark detection. However it's on a pretrained dataset
@banupriya4852
@banupriya4852 4 жыл бұрын
What is the model we are using here..
@19daredevill
@19daredevill 4 жыл бұрын
@@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.
@ManojKumar-zb8ki
@ManojKumar-zb8ki 4 жыл бұрын
hello, could you share what is previous video i need to see which you mentioned in this video
@19daredevill
@19daredevill 4 жыл бұрын
Hi, this is the link, hope it helps 🙂 kzbin.info/www/bejne/iXq9f5mVjsmjosk
@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 :)
@sanghamitrajohri65
@sanghamitrajohri65 4 жыл бұрын
this is live detection. but how to do it for a video file???
@19daredevill
@19daredevill 4 жыл бұрын
You can replace videoCapture ("video file name") and it'll read the video file for you Hope it helps
@sanghamitrajohri65
@sanghamitrajohri65 4 жыл бұрын
@@19daredevill thank you so much for ur quick response!
@utkarshabarge6251
@utkarshabarge6251 4 жыл бұрын
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 4 жыл бұрын
@@19daredevill iam having problem installing dlib lib in pycham plz help
@selva81652
@selva81652 4 жыл бұрын
@@tushardas3928 try to install anaconda
@piyushprince8432
@piyushprince8432 3 жыл бұрын
@@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
@ashishkumardubey2254
@ashishkumardubey2254 4 жыл бұрын
Is there any alarm sound alert in this project??
@19daredevill
@19daredevill 4 жыл бұрын
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
@harshitajain1268
@harshitajain1268 3 жыл бұрын
in which software you are working?
@anamikaguleria5439
@anamikaguleria5439 4 жыл бұрын
what is the name of app that we need to download to apply code
@19daredevill
@19daredevill 4 жыл бұрын
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 🙂
@shantyshabu3099
@shantyshabu3099 4 жыл бұрын
Is this a beginner project?
@19daredevill
@19daredevill 4 жыл бұрын
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 🙂
@melihaltay2215
@melihaltay2215 4 жыл бұрын
Can you share article Mr.Mohammed?
@19daredevill
@19daredevill 4 жыл бұрын
Hi, yes, but which article are you looking for?
@pratyaypoddar3094
@pratyaypoddar3094 3 жыл бұрын
Sir which software do you use?
@19daredevill
@19daredevill 3 жыл бұрын
this was sublime . running on a linux machine
@sagarmehra2875
@sagarmehra2875 3 жыл бұрын
Hi sir, i am getting the error---- Unable to open shape_predictor_68_face_landmarks.dat, please help
@priyajoseph7108
@priyajoseph7108 3 жыл бұрын
Yaa...same error
@priyajoseph7108
@priyajoseph7108 3 жыл бұрын
Got the solution?
@sagarmehra2875
@sagarmehra2875 3 жыл бұрын
@@priyajoseph7108 yes,you have to download this file and put it in the same directory
@priyajoseph7108
@priyajoseph7108 3 жыл бұрын
@@sagarmehra2875 thanks
@leangerard342
@leangerard342 3 жыл бұрын
@@sagarmehra2875 hi same directory as the python files?
@ashokm7358
@ashokm7358 4 жыл бұрын
If he use sunglass whether it will identify
@19daredevill
@19daredevill 4 жыл бұрын
The eyes should be visible in order to detect the outline. Hope it helps
@shubhhamkumar6845
@shubhhamkumar6845 3 жыл бұрын
how to close cv frame window ?
@ahr8974
@ahr8974 4 жыл бұрын
AsslamuAlikum Brother! would you please share this project documentation
@19daredevill
@19daredevill 4 жыл бұрын
WalaikumasSalaam brother. I did not create any documentation for it. The video is my documentation 😁
@SHAHRIMMOHD
@SHAHRIMMOHD 3 жыл бұрын
assalamualaikum friend...im from malaysia and im intrested with this project...can you guide me doing this project...
@hanumanthuanil1788
@hanumanthuanil1788 3 жыл бұрын
I got error with this dataset
@aravindhp5612
@aravindhp5612 4 жыл бұрын
How to download driver Drowsiness detection dataset
@19daredevill
@19daredevill 4 жыл бұрын
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 жыл бұрын
@@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 жыл бұрын
@@19daredevill JazakAllah qhair brother. I downloaded the databset from the link given in the description box in the facial landmark detector video..
@priyaGupta-cq4sp
@priyaGupta-cq4sp 2 жыл бұрын
Hi Can you make video on radiation detection in python language please reply this comment
@19daredevill
@19daredevill 2 жыл бұрын
Radiation detection? What kind of radiations
@priyaGupta-cq4sp
@priyaGupta-cq4sp 2 жыл бұрын
Can you send me your email id ,
@VISHNUKUMAR-em1sl
@VISHNUKUMAR-em1sl 3 жыл бұрын
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")
@tanishqsirohi2385
@tanishqsirohi2385 3 жыл бұрын
Nice
@poojasanvi5924
@poojasanvi5924 3 жыл бұрын
Can u send me report and paper link plese
@sarvasaisrinath3403
@sarvasaisrinath3403 4 жыл бұрын
What if u blink your eyes
@19daredevill
@19daredevill 4 жыл бұрын
I believe there's a time delay to differentiate a blink and a drowsiness. Hope it helps 🙂
@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
@shashikamadushan3802
@shashikamadushan3802 2 жыл бұрын
Can someone send me the coding
@Shiftready
@Shiftready Ай бұрын
Oh my God replace your smoke detector batteries FFS!!!!
@pavithra.p4499
@pavithra.p4499 Жыл бұрын
Dlib. Shape_predictor('shape_predictor_68_face_landmarks.dat
🕊️Valera🕊️
00:34
DO$HIK
Рет қаралды 13 МЛН
"كان عليّ أكل بقايا الطعام قبل هذا اليوم 🥹"
00:40
Holly Wolly Bow Arabic
Рет қаралды 15 МЛН
小蚂蚁会选到什么呢!#火影忍者 #佐助 #家庭
00:47
火影忍者一家
Рет қаралды 122 МЛН
Real-time Drowsiness Detection Tutorial | Transfer Learning | TensorFlow | Python | OpenCV
1:06:29
Object Tracking with Opencv and Python
30:03
Pysource
Рет қаралды 618 М.
Dear Game Developers, Stop Messing This Up!
22:19
Jonas Tyroller
Рет қаралды 721 М.
Realtime Drowsiness and Yawn Detection using Python in Raspberry Pi or any other PC
27:15
SPARKLERS : We Are The Makers
Рет қаралды 61 М.