How many times have you fallen asleep while watching a movie? In that situation, one of two things happens: you don't remember where you stopped watching it or, when you do, you have to rewind the movie until you reach the same moment you were before. In both cases, Pause4Sleep solves the problem.
This application is available for Windows operating systems and can be used in offline media players and online platforms, like YouTube, Netflix, and HBO. The app was created as part of the final project of the Data Analytics course, at the Ironhack programming school, and was designed to pause a video when it detects that someone falls asleep in front of the screen.
While watching the video, the user's image is captured through the laptop's camera and their face and eyes are detected. At each instant, the eyes are evaluated by an artificial intelligence model that predicts whether they are open or closed. The program runs infinitely until it identifies a period in which the eyes are consistently closed (drowsiness indicator) or the user's face is not detected (absence indicator). At that moment, the video is paused and the application is closed.