Skip to content

AnaghMiglani/CognitiveLens

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Real-Time Cognitive Analytics System for Online Classrooms

This project is a real-time cognitive analytics system designed for online classroom environments, where a teacher can monitor student engagement through visual cues captured via a webcam.

The system processes live video input and applies computer vision techniques using MediaPipe facial landmark detection to extract meaningful behavioral signals.

It consists of multiple independent modules that analyze different aspects of a student’s state, including:

  • Drowsiness
  • Attention
  • Stress
  • Confusion

Each module operates on the same video frame but computes distinct metrics based on facial features such as:

  • Eye Aspect Ratio (EAR)
  • Mouth Aspect Ratio (MAR)
  • Head pose
  • Eyebrow movement
  • Blink rate

System Modules

Drowsiness Detection Module

The drowsiness module detects signs of fatigue using a combination of:

  • Eye closure patterns
  • Yawning frequency

It outputs a binary score indicating whether the student is sleepy.


Attention Detection Module

The attention module tracks:

  • Head orientation
  • Movement stability
  • Frequency of looking away from the screen

These signals are converted into an attention score representing the student’s focus level.


Stress Detection Module

The stress module evaluates facial tension through:

  • Eyebrow compression
  • Lip tightening
  • Blink frequency

These indicators are combined to produce a stress score.


Confusion Detection Module

The confusion module analyzes subtle behavioral cues such as:

  • Eyebrow asymmetry
  • Inward brow movement
  • Slight squinting
  • Head tilt
  • Repeated side glances

These signals are used to estimate a confusion score.


Dashboard and Analytics

All modules are integrated into a unified dashboard that displays six synchronized video panels:

  1. Raw camera feed
  2. Facial landmarks
  3. Drowsiness detector output
  4. Attention detector output
  5. Stress detector output
  6. Confusion detector output

Alongside the visual interface, the system includes a separate analytics window built using:

  • PyQt
  • PyQtGraph

This analytics window plots real-time graphs of:

  • Drowsiness
  • Attention
  • Stress
  • Confusion

The graphs provide a continuous view of the student’s cognitive state, enabling instructors to observe trends and identify moments of disengagement or difficulty.


Architecture

The system follows a modular architecture where each detector:

  • Independently processes video frames
  • Returns annotated visuals
  • Produces numerical scores

These scores are aggregated and streamed into the analytics layer without interrupting the video processing pipeline.

The system is optimized for real-time performance and designed to be extensible, making it suitable for:

  • Scaling to multiple students
  • Integrating additional behavioral metrics

Conclusion

This project demonstrates how computer vision can enhance digital learning environments by providing actionable insights into student engagement and well-being.


Screenshots

Dashboard

Analytics Window

About

Computer vision based cognitive state estimation system that analyzes facial cues from video frames to infer student engagement, stress, and confusion during online learning.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors