Тёмный

Deep Drowsiness Detection using YOLO, Pytorch and Python 

Nicholas Renotte
Подписаться 269 тыс.
Просмотров 244 тыс.
50% 1

Want to leverage YOLO object detection for safety?
One great implementation is using it to determine when drivers might be feeling a little drowsy. In this video we’re going to do exactly that using a fine tuned, customer object detection model powered by YOLO and PyTorch!
In this video you'll learn how to:
1. Instal Ultralytics YOLOv5
2. Detect Objects from Images
3. Detect Objects from Pre-Recorded Videos
4. Detect Objects in Real Time Using OpenCV
5. Fine Tuning a Drowsiness Model using YOLOv5 and PyTorch
6. Perform Real Time Drowsiness Detection
Get the code:
GitHub: github.com/nicknochnack/YOLO-...
Links
Ultralytics YOLOv5: github.com/ultralytics/yolov5
PyTorch Installation: pytorch.org/get-started/locally/
COCO Classes: gist.github.com/AruniRC/7b3da...
LabelImg: github.com/tzutalin/labelImg
Chapters
0:00 - Start
0:48 - Introduction
1:18 - Gameplan
2:23 - How it Works
3:05 - Tutorial Start
4:12 - 1. Install and Import Dependencies
10:51 - 2. Load Model
13:44 - 3. Make Detections using Images
21:05 - 4. Real Time Detections and Object Detection using Videos
30:05 - 5. Train a Custom YOLO Model
1:10:28 - 6. Detecting Drowsiness
1:17:58 - Ending
Oh, and don't forget to connect with me!
LinkedIn: bit.ly/324Epgo
Facebook: bit.ly/3mB1sZD
GitHub: bit.ly/3mDJllD
Patreon: bit.ly/2OCn3UW
Join the Discussion on Discord: bit.ly/3dQiZsV
Happy coding!
Nick
P.s. Let me know how you go and drop a comment if you need a hand!

Наука

Опубликовано:

 

11 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 462   
@superchargedhelium956
@superchargedhelium956 2 года назад
This is one of the best tutorials I have followed. Not only for drowsiness detection but also just the fundamentals of data capture, labeling, custom model training. Thanks!
@MrZhAlex
@MrZhAlex 2 года назад
No, it's the best!
@SustyVerse
@SustyVerse Год назад
hello, are you open to collaborating on a pilot project together?
@abimanyuvijay3222
@abimanyuvijay3222 2 года назад
Hands down the best yolo tutorial there is out there. Extremely clear, straightforward and fun to watch. Really helped me out with my internship project. It would've been even better if you had included some sort of a warning beep when it detects you to be drowsy.
@Thephonkgod
@Thephonkgod 7 месяцев назад
Why don't you add it yourself? That is the power of being a developer! Just do it!
@kuark5290
@kuark5290 Год назад
Whenever i need to learn something new about ML, i always come to this channel. I rarely comment to videos but this guy is just awesome.
@ethelyulianatejadarojas363
@ethelyulianatejadarojas363 4 месяца назад
It was your tutorial that allow me to do my first experiments with YoloV5, I liked the clarity and the transparency, many other tutorials kind of hide things but you were coding, correcting/ adjusting your code and showing your environment which is priceless. Thank you
@mikeb5556
@mikeb5556 2 года назад
Recommended. Nice video all round. Pitched at the right level, clearly explained and kept it interesting. Nick goes through intro of using the model and then the framework of custom training and tests on that trained model. Thank you.
@NicholasRenotte
@NicholasRenotte 2 года назад
Glad you liked it!
@reubenthomas1033
@reubenthomas1033 2 года назад
This was soo epic! Please upload more! I was glued to my laptop as I tried this out. You're a great teacher! :D
@muhammadbustomi097
@muhammadbustomi097 Год назад
I'm from Indonesia and really like all your content. All of your content is learning that can't be paid for cheaply. Thank you sir.👏
@shoyaaa14
@shoyaaa14 Год назад
Samaaa
@fbagas_50
@fbagas_50 Год назад
halo bang, boleh sharing sharing perihal yolo ga? boleh lewat tele atau line?
@grzegorzkozinski2308
@grzegorzkozinski2308 3 года назад
That's exactly what I was looking for, for past few weeks. Thanks!
@josephenchill7968
@josephenchill7968 3 года назад
You saved me again. This channel is sooooo underrated!!!
@pragyamishra9576
@pragyamishra9576 Год назад
What an amazing tutorial I came across. Explained in such an efficient way. Thank you.
@satoshinakamoto5710
@satoshinakamoto5710 2 года назад
Wow, so many amazing projects! Thank you Nicholas.
@YoungZ10
@YoungZ10 Год назад
Thanks for the excellent tutorial. I followed all your steps in the video and got a great result! I already left my like!
@ravind_98
@ravind_98 Год назад
This is one of the best tutorials I have followed.
@henkhbit5748
@henkhbit5748 2 года назад
I am always awake when i watch your video Nick. Nice example with yolo!😃
@NicholasRenotte
@NicholasRenotte 2 года назад
Hahahah yes! Thanks for checking it out Henk!
@user-ke8rb9kk1l
@user-ke8rb9kk1l 6 месяцев назад
Thanks for enlightening everyone with your knowledge. Appreciate that!
@AnimeManiaa
@AnimeManiaa 2 года назад
Really cool and amazing , the way you explain is completely perfect .thank you for doing this.keep up the good work bud..✌💯
@adityanjsg99
@adityanjsg99 2 года назад
Thanks is too small a word!! With this tutorial I solved a major industry requirement.
@mansoorbaig9232
@mansoorbaig9232 2 года назад
Again a great video from Nick on a pretty useful topic. Learnt a lot.
@satoshinakamoto5710
@satoshinakamoto5710 2 года назад
This looks way more convenient and easy to implement compared to tensorflow using protocol buffers.
@vinayakdumbre2828
@vinayakdumbre2828 Год назад
amazing man, my all the doubts got cleared after this one. thank you man
@tamtam8420
@tamtam8420 7 месяцев назад
Wow what a great tutorial, it is interesting if to add to this closed eyes detection and yawn, then this would be an ideal fatigue detection app. Thank you for sharing this project with us.
@rafaelparzeller2974
@rafaelparzeller2974 2 года назад
You are amazing ! I learn so much from you about data science, big thanks !
@muna4840
@muna4840 6 месяцев назад
I'm about to work with this new knowledge to build my MSc. Data Science & Analytics thesis project.... Thanks!
@aliciahock9651
@aliciahock9651 2 месяца назад
I just tried this and it works! Thank you so much!
@iguyblr
@iguyblr 2 года назад
Thanks Nicholas , Your. hardwork is seen in the Video , Keep up he good work
@necatikirilmis3812
@necatikirilmis3812 2 года назад
That was great video to understand object detection. Thank you a lot :)
@uditagarwal6435
@uditagarwal6435 2 года назад
Really helpful video keep going man, love the way you explain
@hemachandiran3984
@hemachandiran3984 3 года назад
Thanks for sharing the knowledge NIck
@thanhatnguyen8016
@thanhatnguyen8016 3 года назад
It's another great tutorial Mr.Nick. Hope to see video with MobileNetV3 !
@yangyangwen1158
@yangyangwen1158 10 месяцев назад
👏Amazing tutorial about YOLO!!🤯
@jaygadhavi6786
@jaygadhavi6786 3 года назад
Amazing video, thank you so much.
@user-ib1ry9pu7p
@user-ib1ry9pu7p 2 года назад
Great Tutorial ! Thanks Nicholas!!
@rajaardin2894
@rajaardin2894 3 года назад
Woaaahhhh im waiting for this, thanks for make this video ❤️😇
@imdadood5705
@imdadood5705 3 года назад
Good to see Michael Scofield is into Deep Learning after breaking out from the prison. P.s. I love your contents!
@NicholasRenotte
@NicholasRenotte 3 года назад
😂 really...Michael Scofield?! 😂😂
@midyajahantabi
@midyajahantabi 2 года назад
thank you you rock I really like your energy and creativity😍
@THE8SFN
@THE8SFN 9 месяцев назад
This video is gem for people who want to learn
@cb213
@cb213 2 года назад
That is very great,thank you!!!
@fabriciot4166
@fabriciot4166 3 года назад
Excelente! Gracias hombre
@xyliusdominicibayan6215
@xyliusdominicibayan6215 3 года назад
You really are something! That's why I'll appeal again for the face recognition in the mobile application using tensorflow and React Native. Hoping to seee it soon :((
@NicholasRenotte
@NicholasRenotte 3 года назад
Yah, gotta get back to that! On my list!
@mostafakh209
@mostafakh209 Год назад
nice tutorials Nicholas , you are awesome
@won20529jun
@won20529jun 2 года назад
Thanks for such an amazing video, wow
@Frostbyte-Game-Studio
@Frostbyte-Game-Studio Год назад
you're the fucking best these tutorials are soooo easy to follow and understand keep up the good work ... cause we need it
@mri3884
@mri3884 2 года назад
Hey Nick! loved the video, thank you so much for the tutorial. Is there any way to improve the FPS on the detection section?
@jwk7317
@jwk7317 Год назад
Thank you for useful lecture!
@karthikeyanr7717
@karthikeyanr7717 Год назад
Very informative Nicholas . I was wondering if this would work with a different dataset , specifically fire. Is the procedure the same or can you make a different code for flame detection using machine learning? Your help will be appreciated .
@mohammadghanatian114
@mohammadghanatian114 2 года назад
Thanks for your great video. I have a comment. At 25:11 when you used the webcam video, the images were in BGR format (you used opencv) and you didn't convert them to RGB before giving them to the model. Considering the fact that the model was trained on RGB images, by converting the images to RGB we may get better results.
@dannyrodin1151
@dannyrodin1151 2 года назад
Thank you for the video!
@omarabubakr6524
@omarabubakr6524 2 года назад
you are really a great RU-vidr!!
@nikhilranka9660
@nikhilranka9660 2 года назад
Thanks for the detailed tutorial, Nicholas! Would this help in identifying lists in document images? Assuming it should. Or there are other better ways to accomplish list identification?
@vikashchand.
@vikashchand. 3 года назад
Love the long detailed tutorials man! Super amazing as always! 🔥🔥 Btw Nic, heard of YOLOR? Its 'apparently' faster ..thoughts? 🤔
@NicholasRenotte
@NicholasRenotte 3 года назад
My guy Vik!! Congrats on the job btw!! Mannn, I heard about it recently. Need to do some digging into it. Been taking a little easier the last couple of weeks, a little burned out so cooling off before I kick off some big stuff again soon.
@vikashchand.
@vikashchand. 3 года назад
Hey thanks my man! 🙏 And yeah bro, avoid the burn outs. It's always good to kick back and enjoy a few beers before getting back to the code again 🍺🤘😂
@cgpotato
@cgpotato 2 года назад
Hi, thanks for the tutorial!
@mattc7885
@mattc7885 2 года назад
Hi Nicholas, I appreciate your videos! Question, if I wanted to detect if a specific class from the base yolo model is present and say for example use the print function to display a boolean expression if the class is present how would I get started? I thought I might be able to index a class from the results but its not subscriptable.
@danielleivy8180
@danielleivy8180 Год назад
How does this guy not have more subscribers?
@birdyellow4330
@birdyellow4330 2 года назад
That's great! thank you
@busello
@busello 2 года назад
Hi Nick, thank you for your valuable work! I would really appreciate a tutorial on how embed computer vision in an app, e.g. this drowsiness reconition camera+model in an app.
@GauravSingh-tq5vm
@GauravSingh-tq5vm 3 года назад
Amezing To much helpfull...!
@peanuts675
@peanuts675 3 года назад
Thanks mate !!🙏🙏
@WJ-zq3xo
@WJ-zq3xo 2 года назад
Hey Nick! loved the video, thank you so much for the tutorial. Will you be recording any video about Transfer Learning ? Cheers!
@interlightstudio1645
@interlightstudio1645 2 года назад
Gd stuff! Thank you for this
@wintermute3658
@wintermute3658 Год назад
This was awesome!
@sharankalyan7
@sharankalyan7 3 года назад
Great one! 👌🏻👌🏻
@ciberola285
@ciberola285 2 года назад
Hi Nick, great tutorial as always! I wonder if one line should not be corrected "!cd yolov5 & pip install -r requirements.txt" , should not be two && in there?
@gangaramyadav6104
@gangaramyadav6104 7 месяцев назад
Amazing... Outstanding.. 👍
@quixzotic
@quixzotic 3 года назад
Nice video! 🔥
@user-ok5tl9pb8q
@user-ok5tl9pb8q 5 месяцев назад
loved the video
@amaalanoos838
@amaalanoos838 Год назад
Hey Nich, got a question. How do I print the class/classed that was detected on an image along with their confidence score?
@gonzaloguaimas1272
@gonzaloguaimas1272 10 месяцев назад
sos una bestia 🔥
@atnguyen836
@atnguyen836 2 года назад
this is amzing
@winniepooh2533
@winniepooh2533 3 года назад
Great!! I LIKE IT 🙃🙃
@mtalhakhalid1679
@mtalhakhalid1679 Год назад
Wonderful teacher 😍😍
@ersamatskefski1948
@ersamatskefski1948 Год назад
Thank you!🥰
@samet7892
@samet7892 Год назад
u are the best man
@phonvanna2918
@phonvanna2918 Год назад
Would you consider doing object tracking with yolov5 custom dataset + deepsort? Like object counting and so on.
@hibom2741
@hibom2741 3 года назад
Really excited, Another video!
@ryanevans3778
@ryanevans3778 2 года назад
Hey Nicholas, random question. I am trying to leverage your tutorial on YOLO to develop a detection model to detect if my clothes are on my washing line so that I can delay my automated sprinkler system and not wet my clothes. Do you think I should have two custom objects, an empty line and one with clothes on it or just have one with clothes on it or vice versa? Thanks
@NicholasRenotte
@NicholasRenotte 2 года назад
This is a sweet use case, I would just do a single class (line with clothes) and set the threshold high so it only detects when clothes are on!
@Athens1992
@Athens1992 Год назад
very informative thanks for the video!!!, on this could freeze the first layers and unfreeze the lastest layers for training for your custom dataset?
@jerichoalbertcruz2560
@jerichoalbertcruz2560 2 года назад
Hello, Nice tutorial! btw I'm trying to use my own dataset that I collected throughout google for yolov5 and my question is, do I need to use the same picture size for the images that I will train? Thank you!
@joelbhaskarnadar7391
@joelbhaskarnadar7391 2 года назад
USEFUL VIDEOS
@gabrielfreireluna2933
@gabrielfreireluna2933 2 года назад
Hi Nick great work! I have one question, do I need a GPU to run the code? I've tried to run the script without success using a CPU...
@moses5407
@moses5407 2 года назад
Would love to see a video combining yolo-r and eulerian video magnification for heart rate detection on moving objects; yolor to auto select the moving region of interest ... Eliminating that noise and allowing clean eulerian video magnification
@l3lxf
@l3lxf Год назад
Thanks for sharing the tutorial. I wanted to know which mic you are using in this video ?
@aboudezoa
@aboudezoa 3 года назад
Awesome tutorial Nick , are you going to make video on Detectron2 ? Object segmentation
@NicholasRenotte
@NicholasRenotte 3 года назад
Yep, dealing with GPU issues rn, but definitely planned. +
@kevinhadi6928
@kevinhadi6928 10 месяцев назад
This video is such a great help, but i do wonder though after you make the custom weights, it doesn't detect the other stuff on the background like it used to. Is it possible to merge the original Yolo with the custom ones?
@singgihbekti969
@singgihbekti969 2 года назад
Hi Nic, I have some confusion, how to develop data logging to the detected object to CSV or XLSX format? So I can obtain the number of detected object based on the specific classes. thank you
@VivekSingh-in6rq
@VivekSingh-in6rq 3 года назад
hey nick, how is this different from instance segmentation you did using mask rcnn ?? great video as usual
@NicholasRenotte
@NicholasRenotte 3 года назад
Very, this is only performing OD instance segmentation can adapt to any polygon!
@gshoanganh
@gshoanganh 2 года назад
I would like to know if it is possible to integrate a model (.pt) created using Yolov5 into a react project. i am preparing a landing page for a product that uses object recognition as one of the features and I would like to know how can I make the link in between the created model and react. Any help on the deployment of a model is also very welcome since I have never deployed one yet.
@chenvinh9232
@chenvinh9232 3 года назад
Every AI tutorial presented in your channel is well elaborated. I really appreciate that! Folks who watch your AI tutorials, would obviously give you a LIKE and SUBSCRIBE Nick. By the way, I am wondering whether you have any plan to launch a full course of Data Science on your channel along with AI lessons on the horizon.
@NicholasRenotte
@NicholasRenotte 3 года назад
Definitely in the works!!
@menakask6050
@menakask6050 2 месяца назад
the dataset.yaml is not available in the repo I am getting some errors related to that. is there any good repo for YOLO model available?
@user-it5mz9ex4b
@user-it5mz9ex4b Год назад
loved your tutorial! you know if i can filtering the detection to detect just people without the rest, and how?
@sriramsvk
@sriramsvk 2 года назад
Thanks Nicholas for detailed walk through. I see that you are running code in local system . Can you confirm h/w specs that you are using ? Also clarify the following 1) Yolov5 documentation ask us to pass Image Width where as you did not pass it during the training step. Is this optional ? 2) On Metrics, can you also details using the tensor board metrics ? 3) Also can you comments on if yolov5 is better that SSD Mobile net in terms of accuracy of detection?
@shaikabrarulhaq
@shaikabrarulhaq 8 месяцев назад
A gentle remainder ! The first coommand to install Pytorch is about 3GB+ so wait for some time...
@martinmahianyundegwa1635
@martinmahianyundegwa1635 2 года назад
Its a truly informative tutorial, could you do one for fire detection using yolov5.Thanks!
@ananthojaishwarya7687
@ananthojaishwarya7687 Год назад
After I load the custom model, it is not predicting whether the input image is awake or drowsy. It is like no predictions. Please let me know what might be the issue
@andrewhenderson593
@andrewhenderson593 9 месяцев назад
I have same issue. Were you able to solve?
@abhishek_maity
@abhishek_maity 2 года назад
Hi Nick!! Thanks for this Amazing tutorial on YOLOv5. I have implemented this in many usecases (PPE detection, Mobile Screen crack detection, Vechicle detection(4 classes) ongoing..). I was wondering how to implement object tracking using deep sort in yolov5? As there are no tutorials when someone showed in detail implementation of Object Tracking (Deep Sort). any plans for object tracking please
@NicholasRenotte
@NicholasRenotte 2 года назад
Sure are, will probs do it as a big project!
@abhishek_maity
@abhishek_maity 2 года назад
Yeah! That will be very interesting nick ... Tracking, counting with object detections in YOLO :) Thankyou for all your efforts :)
@sichi_mulenga
@sichi_mulenga 7 месяцев назад
Hey awesome project. But each time i try to render(@16:23 in the tutorial)the image the kernel keeps dying and restarts
@sadabrahman7636
@sadabrahman7636 4 месяца назад
Use this "import cv2 from matplotlib import pyplot as plt # Assuming results.render() returns a NumPy array representing the image image = np.squeeze(results.render()) # Display the image using OpenCV cv2.imshow('Image', image) cv2.waitKey(0) cv2.destroyAllWindows()" instead of "%matplotlib inline plt.imshow(np.squeeze(results.render())) plt.show()"
@hyeyoungeom2759
@hyeyoungeom2759 2 года назад
Thank you so much for this great video, got yolov5 up and running. For your next video on yolov5 , could you expand and show how to get yolov5 running on android?
@NicholasRenotte
@NicholasRenotte 2 года назад
Will plan something out!
@RahulRajesh1
@RahulRajesh1 3 года назад
Finally yolo 🤩
@NicholasRenotte
@NicholasRenotte 3 года назад
I know, been wanting to test it out for a while!
@yongkangping5050
@yongkangping5050 Год назад
pretty good, nice job, dude!
@barkatmessaouda3611
@barkatmessaouda3611 3 года назад
amazing tutorail i have a question what is better tensorflow object detection , yolo
@NicholasRenotte
@NicholasRenotte 3 года назад
Tbh I like TF for full stack, this implementation is pretty quick to spin up though!
@sivasathvikpaturi209
@sivasathvikpaturi209 2 года назад
Hi Nick is there any problem that using this yolo will crash web cam? No issues right?
Далее
Почему худеют от Оземпик?
00:37
Просмотров 35 тыс.
Object Detection in 10 minutes with YOLOv5 & Python!
10:45
How I’d learn ML in 2024 (if I could start over)
7:05
Has Generative AI Already Peaked? - Computerphile
12:48
Build a Deep CNN Image Classifier with ANY Images
1:25:05
Сравнили apple и xiaomi!
0:21
Просмотров 52 тыс.
Я УКРАЛ ТЕЛЕФОН В МИЛАНЕ
9:18
Просмотров 24 тыс.