Inspiration

In countries like Sweden and across the Nordic region, alcohol-related incidents remain a persistent concern despite strict regulations. Nearly a quarter of fatal road accidents are linked to alcohol impairment, not because of a lack of laws, but due to the absence of real-time, preventive detection systems.

This project was inspired by a simple yet powerful question: “What if technology could recognize impairment before it becomes danger?”

The idea was to move from reactive enforcement to proactive prevention using accessible AI.

What it does

The Facial Intoxication Detection System is a machine learning–based solution that analyzes facial features from images to estimate whether a person shows signs of intoxication.

Detects facial landmarks using Mediapipe Extracts physiological indicators such as: Eye Aspect Ratio (EAR) Cheek redness intensity Mouth opening (slack jaw) Eye circularity Lip curvature Uses a Random Forest classifier to predict whether a person is sober or intoxicated

The system is designed to be non-intrusive, requiring only a camera input instead of physical testing devices.

How we built it

We built the system as a feature-based machine learning pipeline:

Face Detection & Landmark Extraction Using Mediapipe, we extract 468 facial landmarks from the input image.

Feature Engineering Key features are computed mathematically Dataset Preparation Combined sober face datasets (CelebA, LFW, etc.) Used curated intoxication datasets and simulated variations Ensured anonymization and privacy compliance Model Training Used Random Forest Classifier for interpretability and robustness Trained on extracted feature vectors instead of raw images Prediction Pipeline Input image → Feature extraction → Model inference → Output (Drunk / Sober) Challenges we ran into Subtle visual differences: Alcohol effects are not always clearly visible in static images Lighting variability: Redness detection is sensitive to illumination conditions Dataset limitations: Lack of large, paired sober–drunk datasets False positives: Fatigue or illness can mimic intoxication features Ethical considerations: Ensuring privacy and responsible use of facial data Accomplishments that we're proud of Built a complete end-to-end ML pipeline from scratch Designed interpretable features instead of relying on black-box models Implemented a privacy-first approach with anonymized datasets Introduced a personalized baseline concept for improved accuracy Successfully demonstrated real-time prediction capability

What we learned

The importance of feature engineering in classical machine learning Trade-offs between accuracy and interpretability Challenges of working with real-world, imperfect data The role of ethics and privacy in AI systems How to design systems that are not just functional, but responsible and scalable

What's next for Facial Intoxication Detection System

🔄 Integrate voice-based detection for a multimodal approach 🎥 Extend to real-time video analysis (blink rate, behavioral drift) 🚗 Explore smart vehicle integration for preventive safety systems 📊 Improve robustness using larger and more diverse datasets 🧠 Incorporate Explainable AI (XAI) to show feature-level decision insights 🌍 Adapt the system for real-world deployment while maintaining strict privacy standards

Built With

Share this project:

Updates