May the Pump Be with You

Squat Wars gamifies exercise to transform you from a scruffy-looking nerf herder into a Jedi Knight.

Nick Bild
7 days agoMachine Learning & AI

Exercise is essential for maintaining good physical health. It helps to strengthen muscles and bones, improve cardiovascular health, and enhance overall fitness and stamina. Regular exercise also plays a crucial role in weight management by burning calories and increasing metabolism. This message has been spread far and wide, and yet, many people still do not get in the amount of physical activity that they should. There are lots of reasons for this, but one of the prime reasons is that many people simply do not find exercise to be appealing or engaging, so they lack the motivation to stick to a regular routine.

One idea that has been increasing in popularity in recent years is the gamification of tasks that people might otherwise find uninteresting. By leveraging elements such as challenges, rewards, competition, and progress tracking, gamification can make exercise more engaging, enjoyable, and motivating for individuals of all ages and fitness levels.

Traditional exercise routines can sometimes become monotonous and demotivating, leading to a lack of consistency. However, gamification introduces an element of fun and excitement, transforming exercise into a more immersive and entertaining experience. By setting goals, unlocking achievements, and earning rewards, individuals feel a sense of accomplishment and progress, which serves as a powerful incentive to continue exercising regularly.

Whether it is added motivation, a sense of competition and social interaction, or immediate feedback and progress tracking that captures one’s interest, gamification has been shown to work in many cases. For this reason, AI consulting firm Tryolabs developed an application that combines computer vision with squats and Star Wars to get your thighs burning and show you what you are made of — are you a Jedi or a Padawan?

The game runs on a Raspberry Pi 4 single board computer, with an optional Google Coral TPU to accelerate the machine learning algorithm. A camera is also needed to capture images of the player. They based their code on the TensorFlow Lite pose estimation example, which uses computer vision and a MoveNet Thunder pose estimation model to locate various keypoints on the body, like hands, arms, and legs.

To play the game, the user stands in front of the camera (optionally dressed as their favorite Star Wars character), and does as many squats as they can in 30 seconds. By tracking relevant body keypoints with the MoveNet Thunder pose estimation model, a Python script can determine when the player is standing or squatting, which is the primary information needed to count the number of squats one has completed.

The interface shows the camera’s view of the player, along with some boxes showing the body regions that have been detected. A countdown of the remaining time, and the number of squats completed are also shown. The bottom of the screen shows the player’s ranking to let them know how they are stacking up against previous sessions.

Download the source code to set up your own personal instance of Squat Wars so that you can feel the burn for yourself. Tryolabs notes that the current record stands at 44 squats in 30 seconds. Would you like to try to beat that record? No, try not. Do or do not, there is no try.

Nick Bild
R&D, creativity, and building the next big thing you never knew you wanted are my specialties.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles