Skip to content

About

An AI-powered focus tracking system that monitors user attention using computer vision, eye tracking, face detection, and head pose estimation, with a Streamlit analytics dashboard for real-time productivity insights.

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

🎯 FocusTrack AI

Real-time computer-vision system for analyzing visual attention and turning behavioral signals into focus and productivity insights.

Python OpenCV MediaPipe YOLOv8 SQLite CI

Overview

FocusTrack AI uses a laptop camera and computer-vision components to estimate visual-attention signals in real time. Those signals are combined into a focus score and stored for analytics.

Features

  • Face detection and face mesh
  • Eye tracking
  • Blink detection
  • Sleep/fatigue signal detection
  • Head-pose estimation
  • Mobile-phone detection with YOLOv8
  • Focus score calculation
  • SQLite analytics storage
  • Interactive Streamlit dashboard

Computer Vision Pipeline

Laptop Camera
      ↓
Face / Eye / Head Detection
      ↓
Behavioral Signals
      ↓
Focus & Fatigue Analysis
      ↓
Focus Score
      ↓
SQLite Analytics
      ↓
Dashboard

Repository Structure

FocusTrackAI/
├── .github/workflows/     # CI automation
├── dashboard/             # Streamlit dashboard
├── database/              # SQLite persistence
├── src/                   # Computer-vision and analysis modules
│   ├── analytics.py
│   ├── camera.py
│   ├── eye_tracker.py
│   ├── face_detector.py
│   ├── face_mesh.py
│   ├── focus_analyzer.py
│   ├── head_pose.py
│   └── phone_detector.py
├── main.py                # Application entry point
├── requirements.txt
├── test_analytics.py
├── test_database.py
└── yolov8n.pt              # YOLO model weights

Tech Stack

Area Technology
Language Python
Computer vision OpenCV
Face landmarks MediaPipe
Object detection YOLOv8
Dashboard Streamlit
Database SQLite
Visualization Plotly
CI GitHub Actions

Quick Start

git clone https://github.com/aizaz512/FocusTrackAI.git
cd FocusTrackAI
python -m venv .venv

Windows PowerShell:

.venv\Scripts\Activate.ps1
pip install -r requirements.txt
python main.py

Dashboard:

streamlit run dashboard/dashboard.py

Camera access is required for the real-time computer-vision workflow.

Portfolio Value

This project demonstrates practical computer vision, real-time signal processing, multi-model integration, persistence, testing, CI, and user-facing analytics in one end-to-end application.

Status

Active portfolio project. The core real-time pipeline and analytics workflow are implemented. Future work focuses on performance, calibration, stronger fatigue estimation, privacy controls, automated testing, and production deployment.

Roadmap

  • Face/eye/head tracking
  • Blink and fatigue signals
  • Phone detection
  • Focus scoring
  • SQLite analytics
  • Dashboard
  • Basic tests
  • GitHub Actions CI
  • Improved calibration
  • Expanded automated tests
  • Privacy controls and documentation
  • Production deployment

Author

Sahibzada Aizaz Ur Rahman
Python Developer | AI/ML Engineer

License

MIT

About

An AI-powered focus tracking system that monitors user attention using computer vision, eye tracking, face detection, and head pose estimation, with a Streamlit analytics dashboard for real-time productivity insights.

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages