A Matlab code is written to moniter the status of a person and sound an alarm in case of drowsiness. i have already trained the SVM classifier with Fatigue and Non Fatigue samples.
How to run??
1. Unzip and place the 'Sleep' folder in the path of Matlab.
2. Turn on your webcam, go to command window and type 'imaqtool' to find the supported adaptors.
3. Open main.m and go to line no. 17 and change the adaptor name to the supported one.
(Usually 'winvideo',1 is supported in all windows versions).
4. Now run main.m
5. Place yourself at a distance such that your face is visible in the window
6. Non Fatigue Status: The default status, appears when your eyes are wide open and mouth is closed
7. Fatigue Status: When eyes are closed and mouth is opened for several seconds, the alarm sounds a beep.
8. Make sure the room is well lit
Note: The model is not trained to work perfectly under dark or very low dim light conditions, I will upload a much better code once I get better results with an efficient set of features.
Cite the following if you are using my work:
 Manu, B. N. "Facial features monitoring for real time drowsiness detection." Innovations in Information Technology (IIT), 2016 12th International Conference on. IEEE, 2016.
Suggestions and comments are always welcome,
Thanks in advance,
Manu BN (2022). Drowsiness Detection using a Binary SVM Classifier (https://www.mathworks.com/matlabcentral/fileexchange/55152-drowsiness-detection-using-a-binary-svm-classifier), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!