According to a national poll, over one-third of American drivers have admitted to driving when drowsy. The National Highway Traffic Safety Administration conservatively estimates that 100,000 police-reported crashes are the direct result of driver fatigue each year. This results in an estimated 1,550 deaths, 71,000 injuries, and $12.5 billion in monetary losses. Anti-Snoozer is a project powered by Intel Edison and Intel RealSense that is geared to prevent accidents that occur as a result of falling asleep behind the wheel.
Back StoryMy uncle was driving drowsy one night and gotten into an accident that has left my aunt permanently disabled for rest of her life. In 2015 AT&T Developer Summit, we came up with the idea and built the initial prototype, which won the Grand Prize that year.
We kept improving the project. We were able to give demos at SXSW 2015, China-US Young Maker 2015 and Intel IDF San Francisco 2015. As well, it was featured as part of the keynote for Intel IDF and made it to Intel's top 10 technology from IDF.
In June 2016 Anti-Snoozer was invited to China-US People to People exchange by China-US Young Maker, giving a demo to then Secretary of State John Kerry and Chinese Vice Premier Liu YangDong.
The work has since then open sourced, and was featured on many articles such as Vice's motherboard and Fast Company.
How Does It Work?Through applying RealSense’s advanced facial recognition technology, we’ve programmed the RealSense camera to detect four distinct characteristics of drowsiness: rapid blinking, closed eyes, yawning, and shifting of the pupils away from the direction of the road. The camera’s detection of these facial movements will concurrently employ Intel Edison to send out signals that are intended to alert and attempt to awaken the driver. These signals take action in the form of a buzzer, a wearable vibrator and crystal LED, the last of which emits red LED lights that both visually alert the sleepy driver to wake up and remain focused on the road, as well as warn surrounding drivers of an app-identified drowsy driver in their vicinity. The hope is that Anti-Snoozer will substantially reduce the number of sleep-related car accidents and generally promote safe driving.
- Intel® Edison board with the Arduino* breakout board
- Seeed Grove* – Starter Kit Plus - Intel® IoT Edition
- 4th generation (or later) Intel® Core™ processor
- 8GB free hard disk space on your computer
- USB 3.0
- Intel® RealSense™ 3D Camera F200 (system-integrated or peripheral version)
- Computer with a 4th generation Intel Core processor or later
- Windows 8.1
We need to install both RealSense SDK and Arduino SDK on your PC. RealSense SDK can be downloaded at https://software.intel.com/en-us/intel-realsense-sdk.
Visual Studio is needed for modifying the software: https://www.visualstudio.com/.
Arduino IDE for Intel Edison https://software.intel.com/en-us/iot/downloads.
After installing RealSense SDK we will modify the sample code for facial recognition; we’ll be using “COM16” port to connect Edison.
The code is open sourced and can be downloaded at https://github.com/Nyceane/AntiSnoozer-Open-Source/tree/master/DF_FaceTracking.cs
Face TrackingIn this step, we have modified the sample SDK code DF_FaceTracking from Intel RealSense SDK, and setup the timer for monitoring eye closing as well as mouth opening. The eye closing is used to detect blinking and falling asleep, the open mouth is used to detect yawning. Looking around is also being detected, but might be a little more difficult for a demo environment.
We've used Intel RealSense's voice synthesis to give robotic alarm once drowsy driving is detected. Additionally, we've added code from Hand Gesture recognition for the detection of spread 5 fingers, this is used to force stopping the alarm once user is awake.
The code also includes sending signal to Edison via COM16 port, which we will be explaining from our next step.
Use the Windows* Device Manager to find which serial port the Intel® Edison board is using. From the screenshot above we can see it is “COM16” in this case. Windows automatically detects the board and assigns the port when we connect the board to our PC.
After that, open up Arduino IDE and set the device to be Intel Edison and port would be COM16. On the Grove extension board, please plug Crystal LCD to I2C, Buzzer to D6 and Vibrator to D5.
After that is done, please input the following code in your Arduino IDE. This is the Edison portion. To test it you can type 1 and 0 in your console and test it out.
Try out different facial movements: blink, close your eyes, or open your mouth to feign a yawn. These motions should subsequently set off the Edison buzzer alarm. If you still don't get it, check out this article for a detailed explanation on how to connect RealSense with Edison https://software.intel.com/en-us/articles/using-intel-realsense-technology-in-combination-with-the-intel-edison-development-platform.
The project is already open sourced, feel free to improve it and try to get it to auto manufactures.
Comments