èƵ

Computer vision can estimate calorie content of food at a glance

A neural network fed with 300,000 photographs of meals and information from 70,000 recipes can now estimate the calorie content of food from a photo
meal being photographerd
A picture and clever software can reveal the calories on your plate
filadendron/Getty Images

You can now get an estimate of the calorie content of a meal from a photo of it.

Calorie counting is one of the ways many people try to control their weight, but manually entering nutritional information about products into apps is time consuming. Cooking meals muddles things further, making it difficult to ascertain accurate calorie counts.

Robin Ruede and his colleagues at the Karlsruhe Institute of Technology, Germany, might be able to help. They have harnessed a commonly used neural network, DenseNet, to cross-reference images of meals with a database of 308,000 photographs taken from 70,000 recipes on a German cooking website. A neural network is modelled on the architecture of a brain.

“We adapted the architecture and made it predict the macronutrients – the calories, fat and protein content – from the ingredients,” says Ruede. “We assume they cooked the recipe correctly, take the nutritional values and make the model learn the correlation between the nutritional information and that image.”

The model is far from perfect: on average, its estimate of calories is 32.6 per cent awry when confronted with a previously unseen image, though humans are also poor at estimating calorific content: a 2018 survey found our estimates can be hundreds of calories out. In contrast, the neural network model estimated a chocolate cake, which was 198kcal per 100 grams, as being 183kcal, and a 239kcal/100g loaf of bread at 229kcal.

“The whole paper is a big step forward in our ability to determine the nutritional value of food from pictures,” says Dane Bell, co-founder of Lum AI, a natural language processing company. “This data set directly bears on what we want to know: how much protein, carbs and fat this food has.”

The model falls down when confronted with items that aren’t in the list of recipes or when recipes use unusual ingredients or methods. But even so, says Ruede, “it’s pretty clear it can distinguish between categories of high-calorie and low-calorie foods”.

Reference:

Topics: Computing / Diet