Real-time Drowsiness Detection Tutorial | Transfer Learning | TensorFlow | Python | OpenCV
HTML-код
- Опубликовано: 12 сен 2024
- This video contains step by step implementation of drowsiness detections using camera video/image.
1) Brainstorming, How to detect drowsiness using different methods (Face image, biosignal ) and features (eye status, yawning, nodding, etc.)
2)Transfer Learning concepts in Deep Learning
3) Line by line python code implementation for beginners
In case you are interested in our other videos tutorials, please have a look
1) Real-time Face Emotion Recognition | Python | OpenCV | Step by Step Tutorial for beginners
• Realtime Face Emotion ...
2) Deep Learning - Image Classification Tutorial step by step (for Beginners) (python / TensorFlow)
• Deep Learning - Image ...
Very helpful and easy understanding.But Sir,there is a problem in your code.When we seperate the features and labels,we should let the X divides 255.0 before we save our features into the file named X.pickle .
Where can we get my_model_Drowsiness.h5 model sir?
Any idea ??
wow... Explained very well. Advanced research topics these days. It is really amazing
final_ouput = layers.Activation ('sigmoid') ( final_output)
the final_ouput is right? or typing mistake ?
you are amazing .i wonder why dont u have million subscriber till now. gratitudes sir
Why haar cascade stop seeing eye when it's closed?
Very helpful video. I am going to implement this.
Is it possible to get the confusion matrix and prescision score? If yes, can you please tell me which parameters/variables to consider from this code?
@DeepLearning_by_PhDScholar Thank you for your suggestion. We are finding it hard to create folders of open_eyes and Closed_eyes because main dateset contains both of them in each folder. Is it possible for you to share just the open_eyes and closed_eyes dataset.
Sir in which algorithm we have use on this project. ???
Can you please tell how you create my_model_Drowsiness.h5 model sir?
Very helpful and easy understanding. I just want to know if there are any challenges to implement same in R programming ?
Thank you so much for your interest and sorry for being late in replying. Actually , honestly , my expertise are only in python, c/c++, MATLAB and many others but I did not touch R programming yet as we do have alternative solutions in python. In case you can load the model of tensorFlow in R programming ,then you can do it, just like in opencv , people can upload tensorflow model.. I am not sure about R programming. But deep learning can be performed in Tensorlfow (by google), pytorch(py facebook), CNTK(Microsoft) and many others. I am not sure that you can load trained models which are built and trained in frameworks (Tensorflow etc) and load in programming language such as R programming. I am again sorry that I could not help in this regard. Stay blessed.
@@deeplearning_by_phdscholar6925 Thank you for your suggestion. I am following your video and trying to do in R. We are finding it hard to create folders of open_eyes and Closed_eyes because main dateset contains both of them in each folder. Is it possible for you to share just the open_eyes and closed_eyes dataset.
amazing sir,, but i am facing error while doing >model.fit()< any solution
Sir what are the hardware's used in this project thanks and god bless
How many epochs we have to train to get high accuracy?
Thank you for your interest, and sorry for being late in replying, it depends, as in deep learning weights are always initialized randomly, , however here, we have followed transfer learning, so must be few epochs. in case your accuracy is not increase by increasing epoch, you must stop (early stopping). In order to increase your accuracy try changing learning rate(reduce it by half or so), this is one of the method for fine tuning, I hope your accuracy will be increased. In video it was enough for robust testing, Stay blessed
From where we can find this model??
Very helpful .we need more videos sir
It would have been great if you had created a link for the segregated dataset which you created.
It's very fruitful research study for future-protection of traffic accidents.
in ehich language your name is Shown or Written
Will this work if there are multiple faces to detect drowsiness from??
Sir Your explanation was awesome. Please increase the font-size from next time.
please provide the link of the dataset
Hey sir, I have watched the entire video and I'm now finding it really hectic to type the entire project, could you please link the source code?
bro how did you divide the data set bro
Sir Your explanation was awesome..for practice please upload code
@DeepLearning_by_PhDScholar Hello sir, I appreciate your work. Your explanation is great, but the issue we are getting is that we are getting some errors and somehow we solved it, but the main issue we are facing is that we are getting only closed eyes or only open eyes throughout the real-time test. So if you are reading this comment, please share the trained model with us because we don't have such a system to train 37000 images. Thank you Hope you will share the trained model soon once again thank you, sir.
I have the same issue. Did you find any solution to the issue?
i also have same issue..are you resolve
@@madihafarman5587 Hi, you can download the final model using the provided link,
drive.google.com/file/d/1TpTjvjIVirEC_CA_pZSYVVv12XMFdM0l/view?usp=sharing
However, as weights are always initialized randomly, so your final training model may differ from mine, Thank you for supporting the channel. Good luck.
@@sashinkakumarage4739 Hi, you can download the final model using the provided link,
drive.google.com/file/d/1TpTjvjIVirEC_CA_pZSYVVv12XMFdM0l/view?usp=sharing
However, as weights are always initialized randomly, so your final training model may differ from mine, Thank you for supporting the channel. Good luck.
Hi, you can download the final model using the provided link,
drive.google.com/file/d/1TpTjvjIVirEC_CA_pZSYVVv12XMFdM0l/view?usp=sharing
However, as weights are always initialized randomly, so your final training model may differ from mine, Thank you for supporting the channel. Good luck.
sir, I upload ur model new_model=tf.keras.models.load_model('my_model.h5') but all predictions say that my img is positive even if is closed eyes imagen. can you shared the correct model ?please?
@DeepLearning_by_PhDScholar
Sir plz can you tell me how do you seperate the closed eyes and open eyes folder it will be helpful sir
sir while doing this i had an issue regarding to the MobileNet() downloading process. It has thrown an error that 'String' object has no attribute 'decode'. What shall i do sir ??? Please help me sir .....
hello sir if i have a large datadet how to work in it in jupiter without download it in my computer
what if there is no light, i mean it's night or raining and it's dark around then how will you detect?
What to do in anaconda prompt.. after copying the path of the folder im not able to run the commands in anaconda prompt?? can you please explain
Thank you so much for your interest, it seems like you might not have run it as administrator. Secondly , once you copy the path, it must be in same drive as well. your question is too generalize, thats what I could predict based on your provided information. Please elaborate the exact problem , I hope we will try to solve your issue. please visit the first part of video and repeat the steps, I hope it will solve your issue, Stay blessed.
@@deeplearning_by_phdscholar6925 at least reply to our queries sir
Hello sir please tell me if I want to connect and run this project under cctv camera through opencv ?how can it be done? Please reply sir
Thank you for your interest in our videos,
the tutorial is about usb based camera which could be any like webcam or CCTV. so as long as its usb based camera( CCTV) or webcam of your laptop, this code is valid.
However, for "ip" based cameras , you need to use "socket programming " for which you have to define the ip: socket address for accessing your camera . once camera is accessed, rest of the code will be same.
Summary , this code is valid for any usb based camera no matter, cctv, webcam, surveillance, webcam in your latptop. in case of ip based camera , you need to slightly modify first few lines for accessing the camera video.(e.g socket programming)
I hope I have answered your questions, please keep supporting us like this and
keep sharing our video if possible.
@@deeplearning_by_phdscholar6925 where can I change or add my ip address for cctv in this code and also about for webcam how can I add in this code. I implemented it and working fine for my laptop camera I want to implement in cctv as well as webcam simultaneously
Can you share me your what's app number or telegram so that I can share my implementation codes and thoughts over there please
@@akshaymbhat9144 can you please help me in implementing this code?
Can you please help how we use this as a driver drowsiness detection and what are the hardware requirements.
Thank you so much for your interest. Well this implementation is based on a simple PC. however, code is dynamic, if you want to deploy it for driver in dash board or anywhere, you should use an embedded system. this code is valid for jetson nano and raspberry pi 3b or any other hardware as long as it supports python and opencv.
Follow the instructions, after training the model in computer , later for live webcame demo part, please copy code and model in raspberry pi or jetson nano or any other hardware which supports the specs mentioned in video.
Keep supporting us like this , Stay blessed.
@@deeplearning_by_phdscholar6925 thanks
sir how can i use this project for pi camera
@DeepLearning_by_PhDScholar how we detect drowsiness using body movement ??
Sur can you provide the drive link of this file my_model_Drowsiness.h5
The file you are sharing is my_model.h5
Thank you!
Can you kindly send me the source code?
its great!!
good!
why don't you use pytorch~?
Thanks for your valuable feedback, I will definitely come up with PyTorch implementation next time. Please keep supporting me like this
@@deeplearning_by_phdscholar6925 okay, i see.
Anyway how's your life in the lab?
Super
Can u please tell the complexity of this project?
how can i get this code sir?
Hi sir, could you please share the My_Model_Drowsiness.h5 file please. The drive file that you are sharing is the my_model.h5 file. Thanks
Hi, below is the link to the model,
drive.google.com/file/d/1TpTjvjIVirEC_CA_pZSYVVv12XMFdM0l/view?usp=sharing
Can you please share the code
@@deeplearning_by_phdscholar6925 The model gives me always positive value
@@deeplearning_by_phdscholar6925 sir it is still not working
can anyone say how many layers did we use in this model?
Where can i run this code???
please, can you make the letters size smaller than that !!?
Hi sir,where can i get the source code?
Can u share the jupyter notebook
great!
Why camera is not opening in my pc i have done correct coding no error
How to train for yawn sir
Do you have the data set
ValueError Traceback (most recent call last)
in
35
36 Predictions = new_model.predict(final_image)
---> 37 if Predictions>0:
38 status="Open Eyes"
39 else:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
Anyone able to get the correct model? I am not getting -ve values as output in closed eye case, please help, very urgent
same here
everything is correct but still, it's not showing -ve values
have you fixed it?
can i do project in colab?
Its showing open eyes for all images.Can anybody please help me
Sir it's showing me backtorgb is not defined ??
How to resolve this problem
I trained my model for 10, 40, 200 epochs but I didn't have any negative values. I saw 'active' on screen but I didn't see anything when I closed my eyes. Please help me. I'm trying for my thesis.
Same bro, did you find any solution
Hlo
Hello sir, I went through the entire code, its running, but I guess the code is getting too heavy, as its not responding coming while capturing :')
Can you provide me with a solution for that.
Please?
Can you please share the code link
Can u please please send the source code for ur wonderful project? I would definitely love to try it out.
Brother I need source code ? please send me
Sir Will you please provide a code
Sir please share the code
Code file plz.....
not detect close eyes.after completion of project
Hi, you can download the final model using the provided link,
drive.google.com/file/d/1TpTjvjIVirEC_CA_pZSYVVv12XMFdM0l/view?usp=sharing
However, as weights are always initialized randomly, so your final training model may differ from mine, Thank you for supporting the channel. Good luck.
Can you please share the link of code
ppt please
Can you please provide My_Model_Drowsiness.H5 file
Hi, below is the link to the model,
drive.google.com/file/d/1TpTjvjIVirEC_CA_pZSYVVv12XMFdM0l/view?usp=sharing
Please provide My_Model_Drowsiness.H5 file
sir please share My_Model_Drowsiness.h5
it not predict right. In closed eyes it give positive result.
exactly, Is your model working buddy?
Amazing work Sir! But I have some troubles with normalization process. When I do it on whole dataset i got memoryError. It cannot allocate 95gb. Can you help with this?
delete some photos from closed eyes/open eyes folders...I had the same problem
@@barbugeorge1470 Were you able to complete this project? I trained my model but its not returning negative values for closed eyes. Can you share your model file? it would be a huge help.
Did you solve your problem?
@@avinashgedam5794 yes. I used Google Cloud Platform to train model and it worled smoothly 😁
Why was it not showing negative values previously?
Hi, great video!
Can you provide the source code for the project?
Thanks. :)
Thank you for your interest. In case you follow the complete video, you will have the source code at the end, we did not share the source code for this video on purpose so that once can learn each line without directly executing the code. Thanks
@@deeplearning_by_phdscholar6925 Hey sir, I have watched the entire video and I'm now finding it really hectic to type the entire project, could you please link the source code?
@@deeplearning_by_phdscholar6925 Sir, we at least need the my_model_drowsiness.h5 as our laptop is not capable enough to train on various epochs.
@DeepLearning_by_PhDScholar
Sir plz can you tell me how do you seperate the closed eyes and open eyes folder it will be helpful sir
How to create 'my_model_drowsiness.h5'??
Is there anyone whose code worked perfectly??
If you got code please let me know i am also looking for same code
even me , please share the code bro
@DeepLearning_by_PhDScholar Thank you for your suggestion. We are finding it hard to create folders of open_eyes and Closed_eyes because main dateset contains both of them in each folder. Is it possible for you to share just the open_eyes and closed_eyes dataset.
Hey sir, I have watched the entire video and I'm now finding it really hectic to type the entire project, could you please link the source code?