← Back to Project Vault

DCDC PROJECT HUB

AI-Based Student Engagement Detection in Online Classes

4TH YEARAI/MLHARD

Problem statement

During online classes, instructors often cannot reliably judge whether students are attentive or distracted. This reduces the effectiveness of teaching and makes it difficult to adapt pace or style. There is a need for a non-intrusive system that can estimate engagement level using available signals like facial expressions, gaze direction and activity patterns.

Abstract

This project develops a student engagement detection system using AI techniques. The system processes webcam feeds and optional interaction logs (e.g., keyboard/mouse activity, question response time) to infer engagement levels such as attentive, distracted, or drowsy. Facial cues like eye openness, gaze towards the screen, head pose and expression are analyzed using computer vision models. A classifier or regression model combines these features to generate an engagement score over time. Results can be shown to instructors in aggregated form, helping them adjust teaching strategies.

Components required

  • Laptop/PC with webcam
  • Python with OpenCV and Mediapipe / Dlib
  • Deep learning models for face, gaze and emotion (TensorFlow/PyTorch)
  • Optional logging of keyboard/mouse activity
  • Backend + dashboard (Flask/Django + simple frontend)

Block diagram

Webcam & Interaction Data
Face, Eye & Gaze Detection
Feature Extraction (Expressions, Gaze, Activity)
Engagement Classification / Scoring Model
Per-Student or Class-Level Engagement Dashboard

Working

For each student, the system periodically captures frames from the webcam and detects the face, eyes and head orientation. It checks whether the eyes are open, whether the gaze is towards the screen, and analyzes facial expressions for boredom or interest. Optionally, data like how frequently the student interacts with the platform (answering polls, asking questions, typing) is recorded. These features are fed into a classifier or regression model trained to output an engagement score. The system then plots engagement over time and can provide the instructor with insights such as when attention was highest or lowest during the session.

Applications

  • Online learning platforms and virtual classrooms
  • Corporate training and webinars
  • Research on human–computer interaction in education
  • Smart classrooms that adapt teaching content based on engagement