Steps - Using the dlib library to get the 68 facial landmarks. Calculating the absolute difference of the upper lip and lower lip landmarks. if it increases by more than 25 that means,the person is yawning.