Machine learning helps you get in shape during a desk job

Humans are not made to sit in front of a computer all day, but for many of us, we spend a large part of our lives that way. Sure, we all know it’s important to get up and move every once in a while to stretch our muscles and get our blood flowing, but it’s easy to forget when you’re working toward a deadline. [Victor Sonck] thought he needed some reminders — as well as some not-so-gentle nudges — to get into the habit of doing a quick workout a few times a day.

To this end, he designed a piece of software that would lock his computer’s screen and unlock it only when he performed five push-ups. Locking the screen of his Linux box was as easy as sending a command over the network, but recognizing pushups was a more difficult task that [Victor] decided to use machine learning. A Raspberry Pi with a webcam attached would do the trick, but the limited processing power of the Pi’s CPU could be insufficient to handle a lot of raw image data.

[Victor] so decided to use a Luxonis OAK-1, which is a 4K camera with a built-in machine learning processor. It can perform several types of image recognition systems, including Blazepose, a pre-trained model that can recognize a person’s pose from an image. The OAK-1 uses this to send a series of coordinates describing the position of a person’s head, torso and limbs to the Raspberry Pi via a USB interface. A second machine learning model running on the Pi then analyzes this dataset to spot pushups.

[Victor]’s video (embedded below) is an entertaining introduction to the world of video processing machine learning systems, as well as a good practice example of a project resulting in a useful resource. If you want to learn more about machine learning on small platforms, check out this 2020 Remoticon lecture on machine learning on microcontrollers, or this 2019 Supercon lecture on implementing machine vision on a Raspberry Pi.

This post Machine learning helps you get in shape during a desk job

was original published at “”