AntiDrift banner

AntiDrift

5 devlogs
4h 35m 31s

AntiDrift is a web app that uses your webcam to track facial landmarks and estimate drowsiness with Eye Aspect Ratio (EAR). When drowsiness is detected, it plays an alert tone at 50Hz.

This project uses AI

Github Copilot for some code generation and explanation
Gemini deep research to determine methods to use (EAR)
Name idea and logo from ChatGPT

Demo Repository

Loading README...

Efe

Shipped this project!

I built this to stay awake concentrated. It tracks your Eye Aspect Ratio. If it is too low, which means you are not really concentrated, it plays a 50Hz tone for 10 seconds. Believe me after listening to that you WILL BE AWAKE.

Efe

Wrote the README file (I hope “configurability” is a real word) and created a logo with ChatGPT.

Attachment
Attachment
0
Efe

Refactor distance calculations

Introduced 3D distance calculations to mitigate the effects of turning your head. Also now, turning your head away doesn’t cause false positives.

Settings

Added a simple settings menu and SettingsItem component

Attachment
Attachment
0
Efe

I created a simple setup to adjust EAR values for the person. It is not perfect yet but it works.
And now, a 50Hz noise is played when drowsiness is detected. This is to wake the person up.

0
Efe

UI update

Added a simple modal for displaying information.

Other

I actually tried to make a setup process to personalize the EAR thresholds but I gave up a bit to fast.

Attachment
0
Efe

Initial setup

I implemented a basic face mesh with MediaPipe in React.
Currently it only calculates your Eye aspect ratio, averages it over 5 seconds and alerts if it is lower than 0.5 (currently this is rather an arbitrary value, I will make it adapt to the user).

0