Inspiration
We were inspired and motivated by the lack of consensus between traditional body-fat percentage calculators and the truth. In order to create a more accurate method that didn't rely on dual x-ray absorptiometry (DEXA scans), we turned to machine learning methods to take easily measurable data (e.g. arm circumference, age) and calculate a body fat percentage. In addition to this calculator, we also wanted to create a hub of resources and information regarding body-fat percentage so that users can interpret what their percentage means and what actions, if any, they should take.
What it does
Our website asks for 13 parameters including body part measurements, weight, and age. These numerical values are then converted to centimeters and fed into a Random Forest Regression model with a mean absolute error of ~0.038 (body-fat percentage divided by 100). This given back to the user with flappypotato lives ranging from 3 to 13 depending on how healthy the user is (in terms of body-fat percentage)
How we built it
The website and flappypotato game was built using JavaScript. The website connects to a flask api hosted on pythonanywhere.com that runs our Random Forest model (created in scikit-learn and trained on 252 examples) given the respective input parameters.
Challenges we ran into
When attempting to connect our website to the api, we ran into a Cross-Origin Resource Sharing (CORS) error implemented in recent years. In order to allow our website to comminicate with the api, we has to change the flask app to bypass the error by importing and initializing a specific library (flask_cors). In order to create the best machine learning model, we tried various machine learning regression and classification models but ultimately found out that a regression-based Random Forest model was the best through 10 fold cross validation on 202 training examples.
Accomplishments that we're proud of
Our biggest accomplishment the we are proud of is the beautiful implementation of a game (flappypotato) into the website. We are also proud of the website in general, the model api, and the logo and graphics.
What we learned
In the process of creating the website, we learned how to show custom images on websites, the CORS error and how to bypass it, and how to set up an api using flask.
What's next for FatGenie
While we are incredibly proud of all the progress we have made in the last day, we have great ideas on how to continue the project including LiDAR scans for measurements, increasingly personalized diet and exercise schedules, and an updated design for the website.
Built With
- amazon-web-services
- api
- css
- css3
- flask
- html
- html5
- javascript
- machine-learning
- python
- pythonanywhere.com
- scikit-learn



Log in or sign up for Devpost to join the conversation.