AI Focus Monitor is a state-of-the-art cognitive optimization tool that leverages computer vision and real-time biometric telemetry to help you stay in the "Flow" state. It tracks iris movement, head pose, blink velocity, and posture to calculate a live focus score and provide instant feedback.
- Real-time Neural HUD: High-fidelity dashboard with live telemetry and focus scoring.
- Biometric Tracking: IRIS-based focus detection, blink rate analysis, and postural alignment monitoring.
- Frustration Detection: Identifies micro-expressions and behavioral patterns associated with cognitive fatigue.
- Neural Gamification: Level up your cognitive profile, earn badges, and track XP through focused work sessions.
- Automated Reporting: Generates detailed PDF and CSV reports with focus trends and distraction logs.
- Smart CPU Management: Integrated Thermal Manager for energy-efficient background monitoring.
- AI Core: MediaPipe, OpenCV, YOLOv8
- Backend: Python 3.12, Flask, Flask-SocketIO
- Frontend: HTML5, Vanilla CSS (Cyberpunk HUD style), JavaScript, Chart.js
- Persistence: SQLite, JSON
-
Clone the repository:
git clone https://github.com/arnavwarale27/ai-focus-monitor.git cd ai-focus-monitor -
Install dependencies:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install -r requirements.txt
-
Run the monitor:
python main.py
The monitor will open your camera and launch the Web HUD at
The project is configured for Vercel.
- Connect your Github repository to Vercel.
- The
vercel.jsonwill handle the routing todashboard.html.
The backend is production-ready via Gunicorn.
- Set the environment variable
PORTto dictate the listening port. - Use the
Procfileto deploy a high-performanceeventletworker.
Important
Hardware Note: Cloud environments do not have physical cameras. To use the deployed frontend with your local camera, run the backend on your laptop and set the FOCUS_BACKEND_URL in your browser's local storage to your local/tunneled address.
Author: Arnav Warale License: MIT