Engineering Dad "Aquaman" Makes Meal-Tracking Easier with Raspberry Pi AI Scales
Using a TensorFlow Lite model to recognize ingredients and load cells to weigh them, these scales make calorie counting a breeze.
Pseudonymous maker "Aquaman," of the YouTube duo Engineering Dads, is adding a little artificial intelligence to his diet — with an AI-packing, Raspberry Pi-powered smart scale for the connected kitchen.
"I'd say there's a fair few of us who find reading food labels and using fancy apps fairly time-consuming, myself included," Aquaman explains," and with the fitness community always growing there's no better time to solve this problem — and I'm going to do that by eliminating as many barriers between the kitchen scale to that final food log."
The idea behind Aquaman's project: a smart scale that doesn't just measure weight but can log macro-nutrition values automatically — powered by a Raspberry Pi Zero 2 W single-board computer. This is linked to an HX711 amplifier, which is in turn connected to load cells in a custom-designed 3D-printed enclosure — weighing whatever is placed on top and transferring that information to the Raspberry Pi.
That's enough for a technically-smart scale, but it's one that would need to be told exactly what is being weighed before the information could be used in a food diary. The fix: a camera, pointing down at the weighing platform and live-feeding into a machine learning model capable of making at least a best-guess attempt to identify what food is currently resting on the scale.
The custom-trained TensorFlow Lite food-recognition model runs on a more powerful Raspberry Pi 4 Model B, acting as a server to the scale client. Testing shows considerable promise for speeding up the logging of meal prep sessions: Aquaman shows the model correctly identifying ingredients including rice, pasta, chicken, and red meat, logging their weights and automatically filling in the nutritional information.
"Just like that, I have made macro tracking the most user-friendly automated process in the world," Aquaman says in celebration, "because — don't lie — unless you're one of the these 0.1 per cent of people who wake up at 4:23AM in the morning to go and do 27 sets of 600 kilos on the Smith machine bench press and then come home and scan 46 different barcodes just to post it on My Fitness Pal and say 'it all starts today' — if you're not one of those people then you probably couldn't be bothered scanning all of your foods and entering all the details into your food diary yourself."
The project is shown in full in the video embedded above and on the Engineering Dads YouTube channel.