Inspiration

For as long as we can remember, our parents have told us to sit straight and stop slouching. Yet, as high school students constantly working on our computers, our backs might as well resemble shrimps 🦐. Slouching is the reason for agonizing and infuriating pain in the back and neck of over 80% of Americans. Additionally, during our study sessions, we are also often sidetracked by Instagram, Discord, and other social media without even realizing it! With Hack Your Habits, we wanted to target these two bad habits to hack some healthy and educated students!

What it does

Hack Your Habits monitors your posture and focus. Through our web application, you will receive notifications to remind you whenever you are slouching or distracted. There is also a point system, where you try to work as long as possible without slouching or getting distracted. This acts as an incentive to have good work habits and encourages you to beat your high score. There are also customization features enabling users to stop the camera at any time, use the webpage without notifications, or only track one feature such as focus or posture.

How we built it

Training our model: We used Teachable Machine to train our machine learning model quickly and efficiently. We used two separate models: one for posture and another for focus. We trained the models by capturing images of ourselves with good and bad postures and distracted and focused positions with respective labels. In total, we captured over 2000 images, before exporting the model to be used in our webpage through Tensorflow.

Displaying our webpage: We loaded our trained models using Teachable Machine. After setting up the webcams, we used loops to update the footage while constantly remaking predictions. If the user is not focused or slouching, notifications are triggered. A timed scoring system is used and based on time the user has good posture and remains focused. The page uses CSS for formatting and contains user interaction (with buttons and if notifications are clicked).

Challenges we ran into

Training an effective AI model was one challenge that we faced. We trained over ten different teachable machine models and took over 10,000 images before optimizing our top two models. We originally tried to make Hack Your Habits a Chrome Extension before realizing that it couldn’t access the camera.

Another issue we overcame was the webpage not running if the user entered another tab. We tried various ways to fix this problem, such as potentially implementing a progressive web app. However, after some debugging, we fixed the code so that notifications would appear no matter which tab the user is on by using a different method when analyzing the webcam.

Accomplishments that we're proud of

For all of us, one aspect of this project (either TeachableMachines or web development) was completely new to us. We combined our unique skills to make a project that we feel is very successful considering our previous knowledge and time frame. Overall, we are thrilled with being able to train an AI model that works with incredible accuracy.

We’re also proud of our extremely great work habits during this hackathon. To avoid the constant notifications while testing our program, we all had amazing posture and focus while working.

What we learned

We learned how to collaborate with multiple people using GitHub and how to integrate machine learning models into web pages. Additionally, we learned how to use CSS containers to make our web pages more organized and neat. After testing the app while we were working, we also learned that we slouch and get side tracked a lot more than we’d expect or notice!!

What's next for Hack Your Habits

We aim make Hack Your Habits, an all in one productivity tool with more features such as reminders to take breaks and drink water. Additionally, to improve accuracy, we would like to train the model on a greater and more diverse dataset. We would also like to integrate a PWA (Progressive Web App) that could potentially be more convenient for some people. If we had the resources, we would also implement our project with hardware so that it would not require the user to be using a computer to be assessed. They could still receive sound reminders when they are doing homework on paper.

Built With

Share this project:

Updates