Skip to content

The model will predict if a student is attentive or not through facial parameter received through the student's webcam using Face Detection, Drowsiness Detection, and Head Pose Estimation

Johann-Pinto/Predicting-Student-Attentiveness-using-OpenCV

Repository files navigation

Predicting-Student-Attentiveness-using-OpenCV

The model will predict if a student is attentive or not through facial parameter received through the student's webcam using Face Detection, Drowsiness Detection, and Head Pose Estimation

Libraries Used (To be installed to execute program)

  1. cv2
  2. dlib
  3. numpy
  4. mediapipe
  5. imutils
  6. scipy
  7. glob

Information :

  1. data : The data folder contains test images for cam_calibration.py and a '.dat' file used for placing landmarks on the face using dlib library.

  2. face detectors : This folder contains two face detector models that were used to implement Drowsiness Detection and Head Pose Estimation.

  3. helpermod : This folder contains two helper modules used for implementing Head Pose Estimation.

  4. Drowsiness_Detection.py : The main program for implementing Drowsiness Detection to predict Student Attentiveness.

  5. cam_calibration.py : This program is to be run before running headposedlib.py to implement Head Pose Estimation correctly.

  6. headposedlib.py : This contains the main program for implementing Head Pose Estimation to predict Student Attentiveness.

Steps to run the Program :

  1. Install all the required library packages in your python environment.
  2. Drowsiness_Detection.py can then be run. A new window will popup with the webcamera turning on and the video will displayed on this window. The program will detect face and check if the eyes are opened or closed to predict if the student is attentive or not attentive. To exit the program , press the ESC key.
  3. Run cam_calibration.py, this will give the approximate focal length as output. This focal length has to be modified in the headposedlib.py for correct implementation.
  4. In headposedlib.py, modify the focal length 'f' to the nearest intger value received as output of the cam_calibration.py program.

image

  1. After updating the focal length 'f', run headposedlib.py. A new window will popup with the webcamera turning on and the video will displayed on this window.The program will estimate the position of the head to predict if the student is attentive or not attentive. To exit the program, press the ESC key.
Note : The face detector models used to run Drowsiness_Detection.py and headposedlib.py are given for reference.

Both these programs can be run after the required libraries are installed. Both these programs will open a new window with your video capture through the webcam and will detect the face on the video. To exit these programs, press the ESC key.

Project Done By

Johann Kyle Pinto
Reg No. : 20BKT0009

About

The model will predict if a student is attentive or not through facial parameter received through the student's webcam using Face Detection, Drowsiness Detection, and Head Pose Estimation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages