This OAK-1 and Raspberry Pi-Powered Device Forces You to Perform Push-Ups to Unlock Your Desktop

Driven by a pose estimation network and a classifier, this smart camera setup forces you to work out every hour — or give up altogether.

ClearML developer Victor Sonck has come up with a novel way to fight the work-from-home weight-gain: a machine learning system that won't unlock his workstation until a certain number of push-ups have been performed.

"I'm getting fat, so I can't be bothered to go to the gym or do anything productive really," Sonck explains. "So, I'm going to make a machine learning model. The plan is to lock my computer every hour or so then have a camera active somewhere, detect my actions, see that I did five push-ups, then unlock my computer again. Simple, right?"

Designed to encourage fitness in a home office environment, this OAK-1-based device forces you to work out to work. (📹: Victor Sonck)

The project is split across three key pieces of hardware. The first is Sonck's workstation, which only needs changes in software to lock on a schedule then wait for a signal from the machine learning system once the push-ups have been completed. The second is a Raspberry Pi single-board computer, which performs inference on the incoming video stream to detect the push-ups.

The final piece of the puzzle is the camera which captures the video: An OAK-1 depth-sensing camera, which offers both a color video stream and additional depth data missing from a standard webcam while offering an on-board accelerator for machine learning workloads — taking some of the strain off the Raspberry Pi without bogging down the target workstation.

"I [could] just attach any old webcam to a Raspberry Pi and have it run both the BlazePose model and the smaller classification model," Sonck explains. "But the Raspberry Pi isn't that powerful and I think it might catch on fire if I try to run both models. The OAK-1 is basically a 4K camera, so the imagery will be near-perfect, and then in the back it has an Intel Myriad X accelerator chip […] so it will be able to run BlazePose at, like, 15 frames a second which is more than enough for what we want to do."

The system locks the PC completely until a pre-programmed push-up threshold is reached. (📷: Victor Sonck)

There's a final trick to the system, too, which prevents any cheating. "'But,' I hear you say, 'Victor, you know the lock screen password, don't you? If you don't want to do push-ups why don't you just push in the password?' I have a very, very smart solution for that," Sonck explains. "I basically spam backspace 20 times a second […] to remove anything I might try to fill in until I did my push-ups."

Full project details are available on Sonck's YouTube channel, while source code has been published to GitHub under an unspecified open-source license.

ghalfacree

Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire: freelance@halfacree.co.uk.

Latest Articles