Inspiration

In Switzerland, 1 adult on 4 doesn't do enough weekly sport, according to the Federal Office of Statistics[1]. Sadly, it has also been shown that there is a clear correlation between one's education/socio-economic level, with the amount of sport one does. People that are already marginalized or from a lower socio-economic level are shown to do less sport. [1]

1. What it does

It connects people who wish to motivate less sporty people, with couch-potatoes. With the money incentive, everyone can earn money by doing sport.

As shown in the demo images:

  • user is welcomed by the homepage with sign-in promotion if not completed already.
  • dashboard lists all the possible exercises with user activity data.
  • bounty page, as the name suggests, shows

2. How we built it

The GetHealthy web app is powered by the Flask framework and is implemented with posnet, opencv and tensorflow.js for motion detection.

.
├── README.md
├── benchmark.py
├── flaskr                  // main Flask project
│   ├── __init__.py
│   ├── __pycache__
│   ├── db.py
│   ├── posenet.  // posnet for motion detection
│   ├── static       // static files 
│   ├── templates   // web pages
├── get_test_images.py
├── main.py
├── setup.py
└── venv    // virtual env 

3. Challenges we ran into

3.1. How to provide smooth-less UX

One of the major problems we ran into is how to render the exercise videos without any hindering. Because to ensure a great user experience, the exercise video must be presented in real time with motion detection enabled. Due to the natural computing power constraint of the web application, after the investigation of possible solutions, we chose to go with posenet, a pure Python implementation of Google's tensorflow.js because it is relatively light-weighted, easy to implement, and are more compatible with Flask framework.

3.2. How to optimize the performance

This part is closely tied to eliminating redundant codebase and minimizing memory usage. It is obvious that available memory should be large enough to support the smooth video rendering. And this is also one of the reasons that we choose Flask so that we can utilize the templates content and static files without getting any duplicates. Also, the cache folder does not hold history files for too long before they are removed from the system. Obviously, there are still some techniques like directly embedding a pure C++ port within to process the data, an JS engine for transfer, and having a better CPU for demo(or support wider hardware frameworks) to optimize the app performance, but our exception has been reached due to the limited time.

4. Accomplishments that we're proud of

4.1. Responsive design for better UX

Some of our team members are not really familiar with web UI and Flask framework before the hackathon but we are proud to say that we made a decent demo in such short period of time, and we are excited to try new tools and tech stack. Apart from the basic functionalities, we added responsive UI so the user can have a better time experiencing the product and it's a rewarding experience to see our product from UX designers' view.

4.2. Real-time motion detection with Posenet

We embedded Posenet, a pure Python implementation (multi-pose only) of the Google's TensorFlow.js. After it is enabled, we can show the webcam runs inference on an input folder of images and outputs those images with the key points and skeleton overlay.

4.3. Teamwork

This year HackZurich has been an unforgettable challenge. Not just because the amazing challenges we get to solve, but also because it's happening during this unprecedented time(special thanks to the HackZurich team!). Our members come from three different time zones and two are joining onsite while the other three are joining virtually. We are proud of what our collaboration project can accomplish and how teamwork made all this possible.

5. What we learned

  1. How to work in a diverse team;
  2. How to work under deadline;
  3. How to learn new technologies and implement them to meet the user need;
  4. How to connect technology with business need.
  5. How to better communicate;

6. What's next for getHealthy

We will thrive to make sure we could bring great exercise experience for our users, help those in need, connect people from different communities and bring the world closer together. We are a platform that greatly values the data privacy of our users and will never betray your trust to violate their privacy. We hope to reach a wider audience group and bring in more financial resources for funding.

Sources: [1] https://www.bfs.admin.ch/bfs/fr/home/statistiques/sante/determinants/activite-physique.assetdetail.9546739.htm

[2] https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2743027/

[3] https://github.com/rwightman/posenet-python

[4] https://opencv.org/

Share this project:

Updates