I was able to successfully:
PS: This module can also be integrated into several large-scale projects with small changes as per the requirements.
The major challenge was actually to have an accurate measure of the number of yawns and the frequency of these yawns which would help me differentiate between a normal yawn and a sleepy yawn.
This challenge was overcome with continuous trial and error of the yawn detection module on a group of people. The threshold value for each one of them was recorded and a cumulative measure suggested to me the value which should be finally taken for this module.
Discussion