Hildegard
By Rosie Hattersley. Posted
You might know her by another name, but most of us would relish working with a colleague such as Hildegard. She is a fancier and somewhat sassier version of Peeper Pam, a fictional but oh-so-useful defence against the most heinous of office threats: the busybody who just craves gossip, intrigue and signs of corporate dissent and just doesn’t take a hint that you have stuff to do. (Perhaps we’re externalising a bit here.) In any case, Hildegard makes good use of the Raspberry Pi AI HAT+ 2 to issue just-in-time warnings that a distracting presence is heading your way, giving you just enough time to avoid an unsolicited catch-up…
Ask an Engineer – exclusive advice from the brains behind Raspberry Pi
Time to overshare
Intrigued, we asked VEEB’s Vanessa Bradley and Martin Spendiff how Hildegard came about.
Spend time in an office environment and you’ll soon notice some familiar phrases. Corporate bingo lingo rejoice! ‘A quick chat’ is a dead cert on just such a bingo card, and is usually uttered by someone intent on ruining your day as well as your productivity. A mug of tea held aloft as they approach is a common calling card. This helpful clue was the starting point for both VEEB’s popular Peeper Pam project (rpimag.co/peeper-pam) and this year’s AI-exalting Hildegard – firm, unapologetic, mildly intimidating, and definitely someone to keep onside. “The moment someone with a mug approaches, Hildegard lets you know: your territory is about to be invaded.”
Vanessa and Martin describe Hildegard as “an antisocial desk guardian”. Their blog garlands this title with clapping hands emojis. The setup is fairly simple: a camera attached to a Raspberry Pi 5 on the lookout for a specific scenario. When the criteria are met – in this case a colleague with a mug of tea in his hand – diversionary tactics are employed. Think instantly launching video work meetings so you can’t catch the mug-bearer’s eye.

The Raspberry Pi 5–based setup analyses each frame to detect people and mugs, then uses simple logic to decide whether to trigger a response. “If a relevant combination is detected, it warns the user via an analogue gauge, LEDs, and sound,” says Vanessa. While Peeper Pam did something similar, she felt rather incomplete.
“This project is a direct evolution of an earlier build based on the first AI HAT+ that detected approaching people.” Hildegard specifically looks for people carrying mugs – “the universal signal of an incoming ‘quick chat’ that never is.” Hildegard, however, has a proper 3D-printed enclosure based on one by Georg Mierau (rpimag.co/creepy-clock). She has a clearer analogue needle display than Pam as well as those alerts. As well as running on Raspberry Pi 5 with the AI HAT+ 2, which means she runs faster and detects objects in real time using a YOLO model, she’s got “a more expressive and informative light system”.
The code has been updated from shell scripts to neater MicroPython for Raspberry Pi Pico W and Python for Raspberry Pi 5. The more powerful hardware meant the project came in at around £250.
Don’t be a mug!
Raspberry Pi 5 is powerful enough, and the AI HAT+ 2 provides enough inference, for Hildegard’s creators to keep everything local. “Nothing needs to be offloaded to the cloud. That combination strikes a good balance between capability and simplicity.” This also minimises latency, Vanessa explains, with images processed at around 30 frames per second and very few false positive results. They are “pretty rare and usually related to light levels.”

Detecting mugs and people is all very straightforward to the AI HAT+ 2–touting Hildegard, which presents all the objects it detects in a frame and sends the results over a WebSocket connection to Pico W, which then ranks them by priority. Amusingly, a person holding a mug is assigned the strongest response, a person not brandishing a mug is listed as a ‘moderate’ response, a mug on its own is shown as a ‘lower’ response – but not necessarily no threat at all. Presumably, a person currently without a mug plus a mug not currently being used or held could easily come together and become a high priority threat to the ambushee’s equilibrium!
Vanessa says they have always liked “slightly impractical uses of interesting technology that make for more practical use cases”. We feel like this sits firmly in that category.
Subscribe to Raspberry Pi Official Magazine
Save up to 37% off the cover price and get a FREE Raspberry Pi Pico 2 W with a subscription to Raspberry Pi Official Magazine.
More articles
ChessCoreXY
Check this next level of chess
Read more →
Cardputer Zero review
Adorable and powerful handheld terminal powered by Compute Module Zero
Read more →
Ask an Engineer in Raspberry Pi Official Magazine issue 172
It’s not just our engineers who are building things: Kat Shann, documentation specialist at Raspberry Pi, has built an intriguing way to commune with the spirit world via a Raspberry Pi-controlled ouija board. Inspired by the cyber-pet craze of the 1990s, Tara Carter has built her own, using a Raspberry Pi Zero 2 W to […]
Read more →