Sport 2 Scroll - S2S

Project overview

image
https://florian-boisset.itch.io/sport2scroll

Sport2Scroll is a gamified fitness mobile application project whose goal is to use body tracking to help users perform their exercises correctly. A second objective of the project is to help users control their screen time by unlocking “scroll time” through physical exercise. The user defines their initial fitness level, their goals, the exercises they wish to prioritise, and the maximum scroll time they allow themselves. Once their screen time limit is exceeded, the application takes over social media apps and prompts the user to exercise in order to unlock more scroll time.

Technical design

The application is developed in Unity 6 for Android.

Body detection with MediaPipe

Body detection relies on MediaPipe Pose Landmarker, an open-source library by Google specialised in real-time human posture analysis. For each frame captured by the front camera, MediaPipe analyses the video stream and returns the positions of 33 key points distributed across the body: shoulders, elbows, wrists, hips, knees, ankles, etc. Each point is provided with a confidence score indicating how certain MediaPipe is of its position.

image

Exercise definition

To define an exercise, a custom editor tool developed in Unity allows the user, in editor mode, to stand in front of the camera, perform the desired pose and capture it in one click. The tool records the angles of all joints at that moment. A description or instruction for the user is also added to guide them in adopting the pose.

An exercise is then defined by an ordered sequence of reference poses. For example, a push-up is described by two poses: arms extended on the floor, then arms bent (low position). During a session, the application asks the user to reproduce each pose in sequence; once all have been validated, one repetition is counted.

Currently available exercises:

image

Pose validation

For each camera frame, the application computes the joint angles (e.g. elbow angle = angle between the upper arm and forearm) and compares them to those recorded in the reference pose. Each joint contributes to a global score from 0 to 100, with a configurable weight according to its importance in the exercise: for example, elbows are heavily weighted for a push-up but barely relevant for a squat. As soon as the score exceeds a defined threshold, the pose is validated and the application moves on to the next one in the sequence. Real-time visual feedback indicates the quality of the pose: the colour transitions from red (incorrect pose) to green (pose achieved).

Exercise and monitored app settings

Exercises and monitored applications are presented as lists in the interface. Each item exposes its parameters directly via editable text fields in the list. For exercises, the user sets:

For monitored applications, the user configures the daily quota allocated to each one. Counters automatically reset to zero every day at midnight.

image image image image

Screen time management

Tracking the time spent on applications relies on two complementary mechanisms:

As soon as a monitored application is detected as open, a persistent notification appears and updates in real time with the remaining usage time for that application. As soon as the quota is exhausted, an overlay is displayed over the application, prompting the user to exercise in order to unlock more time.

image

image

Five Android permissions are required for the application to function: