As an increasing number of people devote themselves to desk jobs, the problem of bad posture is rising with severity in today's society. More than 39% of Americans worked deskjobs in 2016, and the number still grows today. With this increasing number of people who sit in front of a desk or computer for countless hours on a regular basis, bad posture has affected the general health of people worldwide. Furthermore, the problem of bad posture made itself more apparent in the daily lives of students following the COVID-19 pandemic. We, as students, thought it beneficial to find a solution to a problem that is so deeply rooted in our lives. The conclusions to our research found that the key to good posture was in keeping the head and shoulders in the correct position, preventing the bones and muscles from bending unnaturally. But knowing whether the head and shoulders are in their correct place is a difficult feat for someone who is not trained in chiropractics. The way someone sits may look perfectly fine at first, but it could bring tremendous pain and an unsightly disfiguration if continued for a long time. For example, crossing one’s legs while sitting may seem harmless on the surface, but it can bring pain to the stomach and back if persisted for a long time because it puts uneven weight on the right and left side of the upper body. Our software has been developed so even people without a chiropractic background can easily figure out if they have good posture or not.

What it does

That’s why we created the webapp called Posture Guru. This is a website-extension that has one goal: “To help you to maintain your posture while working!” As soon as you click on the extension you see a setup button. Once you click it, it will open a preview of your webcam. This is where you get to decide “your correct posture”. So adjust your webcam till you become comfortable in your seat and make sure your body isn’t slouching because after a few seconds your image will be captured and that will be used as a reference frame for detecting bad posture.

How we built it

Our WebApp consists of 3 major components: First, the foundation of all our code - html css and javascript. Second, the use of chrome extensions api (to make it chrome browser accessible), and finally, the Bad Posture detection algorithm. The html css and js is the basis of all our major components as it allows for personalized creation of user interfaces. The chrome extension api plays a major role in making the user interface easily accessible for anyone just using it from their browser! The bad posture detection software, which is our most crucial component, was created with machine learning and head detection models. Conceptually, the way the algorithm works is that given a reference frame of “correct posture”, we would be able to use our head detection to see if you are in frame and in the posture you want to be in. Because of this, one of the first steps in entering the extension and getting the posture detector to work is to take a reference photo of you sitting in a good position. This will be used later on to generate a customizable(?) field of locations that will be deemed as ergonomically safe. This is done through OpenCV’s face detection, an online library with many resources, one of which allowed our head detection to work flawlessly. A square will be generated as your head, and as long as it is within the field of the reference picture, your posture will be deemed acceptable. Otherwise, a notification will be sent, alerting you of your incorrect posture.

Challenges we ran into

Some of the challenges we ran into included the usage of the head detection libraries. Because many of the machine learning models required a full body image to most accurately describe the upper body and shoulder areas, but we are using a bust profile to make it easier for the user to set up, it became very difficult for the algorithm to recognize the body parts. We had to put our heads together and think of alternate solutions to this problem, and work around the problems. There is not always only one solution and being able to figure out different paths to solving our problems was very important in our success. Another very difficult part of this project was our different expertises. Because we were all well versed in different languages one of the most vital parts was integrating all the parts we worked on and making the code run smoothly. Each of the parts worked when we were doing it on our own however when it comes to putting everything together it became a lot more difficult. It required a lot of team effort in order to accomplish this and we were faced with many challenges.

Accomplishments that we're proud of

As a segue into our accomplishment, one of the most important accomplishments we have learned is also the ability to work together and combine and implement different areas of code. Because people have different skills and different areas of expertise, a very vital part to allowing people to exhibit their skills to the best of their ability and create projects where everyone is able to give their all, we need the ability to have teamwork and put the different parts together. This part is very important in the success of our project and projects in the future as well. Another accomplishment that we are very proud of is the division of labor. Because we divided the work well, we were able to cover many areas, like the chrome extension, the website and the software. This will allow us to reach more audiences, and help them conduct ergonomically productive work, which is also the goal of this project: to help as many people as we can.

What we learned

We learned many things throughout the course of this hackathon. Since many on the team were beginners this was a great first experience of doing a hackathon.Learning to integrate different areas of code was a very important part of this hackathon, as well as learning how to use the different libraries. Throughout the development of this project we learned how to use OpenCV for a lot of the face and shoulder detection. As mentioned, this was quite a challenge and we had to think of many different ways to approach the problem. We learned to think outside of the box and use solutions not conventionally available, instead of hard debugging. Another part of this hackathon was learning how to use chrome extensions. Because we thought that chrome extensions would be the most user-friendly way for people to use our development we decided to step in and learn about chrome extensions. We also learned how to create apis and endpoints using Flask as well as deployments to Heroku. Overall, we tried a lot of new methods and things in order to further refine the usefulness and outreach of our program.

GitRepo For Code

What's next for Posture Guru

We plan to improve our software so that it recognizes the head and shoulders more accurately. Currently, our software has the limitation that the only thing it can do is pinpoint the approximate location of the head and shoulders. A further improvement may be to increase the detail of things it can recognize. For example, our software would be greatly improved if it were able to recognize the nose, mouth, and eyes on a face. If it recognizes which direction the eyes were looking, it could infer whether the neck is bent or straight. If it recognizes whether the mouth is open or closed, the use of our software wouldn’t only be limited to chiropractors but to orthodontics as well, because whether the mouth is open on a regular basis heavily influences how forward the chin protrudes. And chin posture heavily influences the whole facial structure. Another point to improve on is to use A.I. to model the bones and muscles of a person. With only the approximate location of the head and shoulders, there are limits to how accurate we can predict whether the muscle is strained, or a bone is unnaturally positioned. If we utilize the anatomical data of bones and muscles in the head and shoulder area, we would be able to determine whether a posture is harmful or not with greater accuracy. A third point of improvement is to implement a page in our software that displays the data of a user over time. Such data does not only include the change in posture over time, but also exercise amount and water drinking habits. These two factors greatly influence overall health along with having correct posture. This way, our software will not only extend itself to good posture, but to the general health of its user.

Built With

Share this project: