Case Study — Financial Services

Optimizing Online Learning Outcomes through Intelligent Attention and Motion Tracking

  • Computer Vision
  • Attention Tracking
  • Cheating Detection
  • Real-Time Edge Inference
Overview of the Client

Who we built this for

The client is an ed-tech platform offering digital learning content and online assessments. With the shift to remote learning, the platform faced challenges in ensuring student engagement and preventing cheating during online exams. The client sought a real-time attention-tracking solution to improve academic integrity and optimize content delivery.

What Client Needed

What the client needed to achieve

Monitoring and quantifying student attention during digital content consumption and assessments.

Preventing cheating by detecting suspicious behaviors in real time.

Providing actionable insights for content creators to optimize educational materials.

Ensuring scalability, user privacy, and minimal system resource usage for seamless integration into the existing platform.

Key Business Challenges

Where this build got difficult

The client faced several challenges that impacted the efficacy of their online learning platform

Lack of Student Focus

Students struggled to maintain attention during prolonged exposure to digital learning content, such as video lectures and interactive modules, leading to reduced knowledge retention and poor academic performance.

Academic Dishonesty in Online Exams

Students struggled to maintain attention during prolonged exposure to digital learning content, such as video lectures and interactive modules, leading to reduced knowledge retention and poor academic performance.

Ineffective Content Delivery

Without insights into student engagement, content creators struggled to optimize videos and training materials, resulting in lower course completion rates.

Scalability and Real-Time Monitoring

The platform required a solution that could scale to monitor thousands of users simultaneously while providing real-time feedback without significant latency.

What We Built?

What we actually built

The implemented solution uses computer vision and machine learning to track student engagement via their webcam.

1

Head Pose Estimation

  • MediaPipe Face Mesh (by Google) is used to detect 468 facial landmarks, enabling precise head pose estimation.
  • OpenCV processes the video feed and applies geometric transformations to compute: Pitch (nodding up/down), Yaw (turning left/right), Roll (tilting head sideways)
  • A 3D head model is fitted to the detected landmarks, and Perspective-n-Point (PnP) algorithm calculates the head’s orientation relative to the camera.
2

Eye Gaze Tracking

  • dlib’s facial landmark detector identifies 68 key facial points, with specific points around the eyes (e.g., eyelids, pupils).
  • Eye Aspect Ratio (EAR) is calculated to detect blinks: If EAR < threshold for a few consecutive frames → Blink detected.
  • Gaze direction is estimated by tracking the iris position relative to eye corners. Using a pre-trained CNN (Convolutional Neural Network) to predict gaze vectors.
3

Real-Time Monitoring (30 FPS Processing)

  • TensorFlow Lite (TFLite) is used for optimized ML inference on edge devices (e.g., student laptops).
  • Multi-threading in Python ensures one thread captures webcam frames and another thread processes them via OpenCV + MediaPipe/dlib.
  • Frame skipping (if processing is slow) ensures real-time performance.
4

Attention Scoring

  • A time-weighted scoring algorithm computes Focus % = (Time looking at screen) / (Total session time).
  • Distraction events are logged when Head yaw/pitch exceeds a threshold (e.g., >30° away from screen). Eyes are detected looking off-screen for >2 seconds.
  • Session summary includes average attention span and distraction frequency.
5

Cheating Detection

  • Multiple faces (indicating impersonation).
  • Frequent head turns (suggesting looking at notes).
  • Unusual eye movements (e.g., rapid shifts, prolonged off-screen gaze).
  • Keyboard/mouse inactivity (possible use of another device).
Tools & Technologies

Core tech stacks we implemented

Computer Vision & ML

OpenCV MediaPipe Dlib TensorFlow Lite Scikit-learn

Backend

Python (Flask) FastAPI

Data & Storage

PostgreSQL Firebase

Streaming

WebRTC
Business Impact

What the system changed

Reduced Cheating Incidents

40% decrease in suspicious activities during online exams.

Improved Engagement Metrics

25% increase in average attention span per session.

Automated Proctoring

Eliminated the need for manual invigilation, saving costs.

Data-Driven Content Optimization

Instructors refined videos based on attention heatmaps.

Turning Tech Challenges into Solutions!

The implementation of a webcam-based attention and motion tracking system significantly improved student engagement and academic integrity on the EdTech platform. By providing real-time monitoring and actionable analytics, the solution empowered educators to identify disengaged students, deter cheating, and refine digital content for maximum impact. The privacy-first, browser-based design ensured user trust while delivering robust, scalable monitoring capabilities for a modern digital learning environment.

Free 30-minute consultation NDA on request CMMI-certified delivery