Skip to content

Am I drowsy enough to not drive? Take some glasses of water!

License

Notifications You must be signed in to change notification settings

Curovearth/Are-you-Drowsy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚗 Are you Drowsy? 💤

In fiscal year 2019, the road transport passengers amounted to around 22.6 trillion passengers per kilometer accross India. The fact that this number is so huge where we can’t rely on other driving passenger for our safety leads us to at least contribute to develop a system which can be used in the mobile vehicles to monitor the drivers at each and every moment.

This project is a drowsiness detection system. It uses a camera to monitor the EAR (eye aspect ratio) of the driver. After it reaches a certain value, an alarm is played to wake the driver and make him focus on the road. If you are travelling in a group, this could be a good time switching drivers.

"40% of the on road accidents occur due to Sleep deprivation"

The following project is an implementation of @akshaybahadur21: Drowsiness Detection System, with additional improvements to give users more detailed information. Below I have mentioned the changes,

  • Graphical Output
  • Drowsy Count displayed on the screen
  • Twilio API integration to send 'sms' to emergency contact number
  • Displaying real time data over thingspeak


To know about Algorithm and Code Dependencies I highly recommend you to visit @akshaybahadur21: Drowsiness Detection System

Results 💯


To view, video file

Whenever the screen displays "Drowsiness Detected", SMS is sent to the verified
emergency contact number using Twilio API.
TWILIO

Below, these were the frames which were captured at the time of drowsiness Not a really "good acting" from my end

Execution 🔧

  • You need to run the main_drowsy.py for execution
C:\Users\iwill\Desktop\github\11-Are you Drowsy\Are-you-Drowsy> python main_drowsy.py
  • The frames captured via execution of the project will update automatically via this line and will be saved in the Drowsy-Clicks folder
cv2.imwrite('Drowsy-Clicks/drowsy%d.jpg' % drowsy_count,frame)		#extracts that particular frame
  • For Twilio API to work uncomment the below line which is commented out by default
  • For Twilio Documentation, see
client.api.account.messages.create(to="emergency_number",from_="+19403267422",body=body)

Contribution 🤝

This project has a room for lots of improvement which can be done together to add new features or displaying the data in a more beautiful manner. I hope you can connect with me via my Discord


I hope you like the project
~ Swarup Tripathy ⏳