From 54d721b30585eb2fcd928ec889a20a8df38f078c Mon Sep 17 00:00:00 2001 From: Ilia Date: Sat, 11 Nov 2023 21:20:25 +0200 Subject: [PATCH] fix comparison & readme --- README.md | 14 +++++++++++--- backend/yolo_model/comparison.py | 2 ++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d9c578b..ea29cd1 100644 --- a/README.md +++ b/README.md @@ -20,11 +20,19 @@ and the slot machine effect ([2]) further promotes harmful sedentary lifestyle. Weihua is social media of the new age. Combining many features of the apps young people enjoy, it is created with wellbeing of its users at the core. -Weihua is a fun -## Implementation +Weihua is a fun way to challenge yourself and your friends, while learning some moves to show off at a party later, +together with your friend group. Every day there are 5 new challenges of different difficulty, which you can try to complete. +You will see how well you managed to reproduce the dance, and compete against your friends and people in your country +(within your difficulty level). No users are able to see others' videos, only scores. + +Key features include -## References +- watching the dance challenge and recording your own attempt in the app +- scoring of how well your dance matches the dance in today's challenge +- leaderboard within your friend group for the current day + +## Implementation [1]: https://www.who.int/news/item/22-11-2019-new-who-led-study-says-majority-of-adolescents-worldwide-are-not-sufficiently-physically-active-putting-their-current-and-future-health-at-risk diff --git a/backend/yolo_model/comparison.py b/backend/yolo_model/comparison.py index 4d92099..a0c3ef0 100644 --- a/backend/yolo_model/comparison.py +++ b/backend/yolo_model/comparison.py @@ -17,6 +17,8 @@ def _frames_to_movements(frames): # all relative to upper left corner of the bounding box movements = [[] for _ in range(0, 17)] for frame in frames: + if not frame: + continue frame = frame[0] # first person in the frame for i in range(0, 17): x = frame['keypoints']['x'][i]