YouTuber Kevin McAleer decided the nouveau Christmas tradition Elf on the Shelf shouldn’t be reserved for kids and that he should be able to get in on the fun. He could not, however, be arsed to think of 24 unique ways to pose the elf around the house and wait for people to find it, so he enlisted a robot to track the mischievous stripy-tights-clad toy for him.
The robot itself is a Viam Rover, an off-the shelf purchase featuring a 720p webcam with an integrated microphone, a 3D accelerometer, and two integrated motor encoders to drive its wheels. It’s designed to be powered by a Raspberry Pi 4, purchased separately.
Kevin used Rover’s onboard webcam to take photos of the elf from different positions, then used these to train a machine learning model. Later, while the robot is driving around, that same camera detects the elves it taught itself to spot.
The machine learning model
The machine learning model used in this project, like the robot itself, is by Viam. Kevin likes it for its ease of use and the fact that you can train it to recognise objects in just a few minutes. The software runs on the robot’s onboard Raspberry Pi 4.
The project write-up walks you through the process of signing up for Viam’s machine learning model, adding a new robot, and uploading all your photos reading for the training to start.
Follow-along build video
Kevin hosts live code-along sessions on his YouTube channel every Sunday evening, and this Elf on the Shelf project was last weekend’s. You can watch the video below for a walk-through if you want to make you own elf detector. Or just sit back and enjoy a festively techy telly experience. Maybe even devise a drinking game to watch along to. Take a sip of Baileys everytime Kevin says “elf” [insert disclaimer here].