Skip to content

This python program uses Mediapipe's facial landmarks detection model to count and record the times of blinking/yawning. Commentary has been provided throughout the entirety of this file to guide the reader throughout the workings of the code.

Notifications You must be signed in to change notification settings

LouisCaerts/HCAI_final_louiscaerts

Repository files navigation

Root directory

  • The .py file contains the full code with comments explaining pretty much the entire process.
  • I provided two test videos to run the code on, selecting the other is done by changing the 'videoName' variable in the code.
  • face_landmarker_v2_with_blendshapes.task is needed to run the code. This is a Mediapipe file.
  • mediapipe_face_landmark_fullsize.png is a vidual representation of all the facial landmarks Mediapipe produces.

'example outputs' directory

  • The videos in this directory are recordings of what running the code on the test videos should look like.
  • The files ending in plot.csv contain the eye/mouth openness ratios of that run.
  • The files ending in timecodes.csv contain the start & end of each blink/yawn detected.

About

This python program uses Mediapipe's facial landmarks detection model to count and record the times of blinking/yawning. Commentary has been provided throughout the entirety of this file to guide the reader throughout the workings of the code.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages