As computer science majors, we know what it is like to sit at a keyboard all day with terrible posture, and we know what havoc it wreaks on our bodies. We were inspired by the thought that we could improve the (terrible) working habits of the millions of people, including ourselves, who have to sit at a computer typing all day.

What Our Program Does

Our Java application sends users a notification when it detects that they are slouching, after using an original calibration of them sitting up straight as a reference.

How It Works

We used Python to write a script that takes a picture using the computer's webcam repeatedly after a specified number of seconds, and saves this photo to a directory. We ask the user to sit straight for calibration, and use the first photo taken as an "ideal". We then used Google's Vision API to compare the "ideal" face with subsequent pictures taken, and if we determine that the user is slouching, we send them a notification.


We had trouble choosing which facial recognition API would be best for our purposes, as well as the simplest way to take photos periodically (we tried many routes before deciding on one). We also had some trouble compiling with Maven, which we have never used before. There is also an issue where Google's Vision does not allow us to send a large number of requests per minute, so we were forced to add a larger amount of time than we would have liked in between each picture taken and processed.


We are happy that we were able to bring this project this far, and are amazed by the resources that were available to us. The project seemed daunting at first (how do you determine someone is slouching using just a webcam?), but with Google's Vision API it suddenly became more doable. But most of all, we're happy that we were able to learn about these resources and how to use them, and look forward to doing more with them in the future!

Built With

Share this project: