arrow_backBack to Learning

How Does AI Food Tracking Work? From Meal to Macros

MyMacro Editorial Team|Published |Last updated

Quick answer

AI food tracking turns an input, such as a meal photo, a spoken sentence, a barcode or typed text, into a food log entry. Software identifies the foods, estimates how much you ate, matches each item to a food composition database and converts the nutrients into calories and macros. Identifying foods is the most reliable step; estimating portions and hidden ingredients is where most errors come from.

How Does AI Food Tracking Work? From Meal to Macros

Key takeaways

  • Every AI food tracker follows the same basic chain: capture, recognize, estimate the portion, look up a database, then calculate calories and macros.
  • Photo recognition mostly uses deep learning, and research reviews describe portion estimation from a flat image as one of the hardest steps.
  • The nutrition numbers come from databases such as USDA FoodData Central, Open Food Facts or an app's own entries, so database quality matters as much as the AI.
  • Barcode scanning skips recognition and portion guessing for packaged foods, which is why it is usually the most dependable input when a product is in the database.
  • Checking and correcting the AI's suggestion, especially for oils, sauces and drinks, is what turns a rough estimate into a useful log.

What is AI food tracking?

AI food tracking is any food logging where software does the work you used to do by hand: deciding what a food is, how much of it there is and what that amount contains. Instead of searching a list and typing grams, you give the app an input and it proposes a finished entry with calories, protein, carbohydrate and fat.

"AI" here usually means machine learning: models trained on large numbers of examples so they can recognize patterns, such as what a bowl of oatmeal looks like in a photo or which words in "two eggs and a slice of toast" are foods and which are amounts. The AI does not know the nutrition of your meal directly. It identifies foods and amounts, and the nutrition comes from a database.

What happens between your meal and the macro numbers?

Whatever the input, most AI trackers run the same chain of steps. A systematic review of image-based food recognition systems by Dalakleidi and colleagues describes the photo version as segmentation, classification and then estimation of volume, calories or nutrients. Voice, text and barcode logging follow a similar path with a different first step.

  1. Capture. You take a photo, speak a sentence, type a description or scan a barcode.
  2. Recognize. The software works out which foods are present. For photos this means finding each food on the plate and naming it. For voice and text it means pulling food names out of the sentence.
  3. Estimate the amount. The app decides how much you ate, either from the image, from the quantity you said or typed, or from the package serving size.
  4. Match to a database. Each item is linked to a food composition record, which lists nutrients per 100 g or per serving.
  5. Calculate. The app scales the record to your portion and adds everything up.
  6. Confirm. A good app shows you its guess so you can fix the food, the amount or anything it missed before saving.

The calculation itself is simple arithmetic. According to the FAO's report on food energy conversion factors, the widely used Atwater system counts about 4 kcal per gram of protein, 9 kcal per gram of fat, 4 kcal per gram of carbohydrate and 7 kcal per gram of alcohol. So a portion with 30 g protein, 20 g fat and 50 g carbohydrate works out to roughly 120 + 180 + 200 = 500 kcal. The hard part is getting the grams right in the first place.

How does an app recognize food in a photo?

Two jobs happen first. Segmentation means splitting the image into regions, so the rice, the chicken and the salad are treated as separate items. Classification means naming each region. Dalakleidi and colleagues reviewed 78 studies and found that 58% used deep learning, especially convolutional neural networks (CNNs), a type of model that learns visual features such as edges, textures and shapes directly from labeled images.

A 2024 scoping review by Chotwanvirat and colleagues traces how the field has changed. Systems built before 2015 relied on handcrafted algorithms for each step. Since 2015, deep learning has largely replaced them, and newer designs handle several steps in one model rather than one after another. More recently, general-purpose multimodal language models, the kind that can look at an image and answer questions about it, have also been tested for estimating nutrition from photos.

Recognition is the step these systems do best. Mixed dishes, foods that look alike and poor lighting still cause mistakes, but naming the foods is generally easier than measuring them.

Why is portion size the hardest part?

A photo is flat, but food has depth. To estimate how many grams of pasta are on a plate, software has to infer volume from a 2D image, then convert volume to weight using a density. Chotwanvirat and colleagues note that a single photo cannot show the back of an object, so hidden parts can lead to underestimated volume. Some research systems use depth cameras, multiple angles or a reference object of known size to help.

The same problem shows up in tests of general AI models. In a 2025 study by Fridolfsson and colleagues, three large language models estimated nutrition from 52 standardized food photos. The two best models had a mean absolute percentage error of about 36% for energy, and all three tended to underestimate, more so as portions got larger. Our article on AI photo calorie counting covers the research on photo accuracy in more detail.

How do voice and text logging work?

Voice logging adds one step at the front: speech recognition, which converts your spoken words into text. From there, voice and typed entries are handled the same way. Natural language processing (NLP), meaning software that interprets ordinary human language, picks out each food, its quantity, the unit and any preparation details. "A large bowl of porridge made with milk and a spoonful of honey" becomes three items with estimated amounts.

Because you state the amount yourself, voice and text can be more precise than a photo for portions, as long as you include quantities. They depend on you remembering everything, including the cooking oil and the drink. Our guide to voice food logging apps explains how to phrase entries so the parser gets them right.

How does barcode scanning fit in?

A barcode identifies a specific packaged product, so the app can skip recognition and portion guessing and pull the label values directly from a product database. You still have to enter how much you ate if it differs from the serving size.

The weak point is the database behind the scanner. In a Dutch study by Maringer and colleagues, researchers scanned 100 supermarket products with seven diet apps. Energy values were available for 99% of scanned products, and on average 79% were within 5% of the true value, but the share of correctly identified products ranged from 5% in one app to 96% in another. The authors noted that user-generated entries mean coverage can depend on the size of an app's user base.

Where do the nutrition numbers come from?

Every AI tracker eventually relies on a food composition database. The main types work quite differently:

DatabaseWhat it containsStrengthsLimitations
USDA FoodData Central: Foundation Foods and SR LegacyNutrient values for basic and lightly processed foodsValues from lab analyses, imputation and published literature; Foundation Foods include detailed sampling metadata; SR Legacy underpins many other databasesSR Legacy's final release was in 2018 and it will not be updated
USDA FoodData Central: Branded FoodsLabel data supplied by the food industryUpdated monthly through the APIValues come from food industry data providers, so they reflect the label rather than USDA lab analysis
Open Food FactsCrowdsourced product data from labels and photosOpen data covering more than 4 million products from 150 countriesEntries are added by volunteers, so completeness can vary between products
An app's own or user-created entriesFoods added by the app team or its usersCovers restaurant meals and local productsQuality depends on who entered them and how they are checked

The details above come from the USDA FoodData Central "About Us" page and the Open Food Facts project page. For packaged food, the original source is the label itself, and our guide on how to read nutrition labels explains what those numbers mean in the US, UK and EU.

Photo, voice, text or barcode: which input is best?

InputBest forMain source of errorEffort
PhotoPlated meals with clearly separate foodsPortion size, hidden oils and sauces, mixed dishesLowest
VoiceMeals you can describe in a sentence, logging on the goForgotten items, vague amounts, misheard wordsLow
TextDetailed or unusual meals, recipesVague amounts, database matchingMedium
BarcodePackaged foodsMissing or wrong database entries, portion eatenLow
Weighing plus database searchWhen precision matters mostChoosing the wrong database entryHighest

In practice, the best approach is to mix inputs: scan packaged foods, describe home-cooked meals with amounts, and use photos when speed matters more than precision.

How accurate is AI food tracking?

Accurate enough to be useful for many people, not accurate enough to treat as exact. A review of image-assisted dietary assessment by Höchsmann and Martin concluded that less burdensome methods tend to be less accurate and that fully automated food intake assessment with acceptable precision was not yet a reality at the time. The authors also point out that hidden ingredients, such as butter in mashed potatoes, and look-alike items, such as diet versus regular soda, often need input from the person eating.

For a full breakdown of where the error comes from, including label tolerances and database quality, see can AI calculate your macros accurately. For the ingredients cameras most often miss, see our guide to what AI calorie counters miss.

How can you get better results from an AI food tracker?

  1. Always review the suggestion. Check that every food is right and nothing is missing before you save.
  2. Add the invisible extras. Mention cooking oil, butter, dressings and sugar in drinks, because a camera often cannot see them.
  3. State amounts when you know them. "150 g chicken breast" beats "some chicken."
  4. Scan packaged foods rather than photographing them.
  5. Weigh calorie-dense foods now and then, such as nuts, oils, cheese and peanut butter, to recalibrate your eye.
  6. Log as you eat, not at the end of the day, so you do not forget snacks and drinks.
  7. Judge the log by your results. If your weight trend over two to three weeks does not match what your log predicts, adjust your target rather than chasing perfect entries.

MyMacro AI, which is not yet released, is being built around this mixed approach: OmniLogger is designed to turn a spoken sentence into a structured entry with macros, and Hunter Camera is designed to identify foods and portions from a photo, alongside barcode scanning and text entry. You can join the MyMacro waitlist to follow the launch.

Frequently asked questions

How does an app know what food is in my photo?

It uses a trained image model, usually a type of deep learning network, to separate the foods on the plate and name each one. It then estimates portions and looks up nutrition in a food database.

Where do AI calorie counters get their nutrition data?

From food composition databases such as USDA FoodData Central, crowdsourced databases such as Open Food Facts, product label data, or the app's own entries. The AI identifies the food and amount; the database supplies the nutrients.

What is the least accurate part of AI food tracking?

Estimating portion size from a photo, along with hidden ingredients such as cooking oil, dressings and sugar in drinks. Identifying the foods themselves is usually more reliable.

Is barcode scanning more accurate than a food photo?

For packaged foods it usually is, because the app reads the product's label data instead of guessing. Accuracy still depends on the product being in the app's database with correct values.

Do I still need to check what the AI logs?

Yes. Reviewing the suggested foods and amounts, and adding anything the app missed, is the simplest way to improve accuracy.

Sources

  1. Applying Image-Based Food-Recognition Systems on Dietary Assessment: A Systematic Review, Advances in Nutrition (Dalakleidi et al.) (2022)
  2. Advancements in Using AI for Dietary Assessment Based on Food Images: Scoping Review, Journal of Medical Internet Research (Chotwanvirat et al.) (2024)
  3. Review of the validity and feasibility of image-assisted methods for dietary assessment, International Journal of Obesity (Höchsmann and Martin) (2020)
  4. Performance Evaluation of 3 Large Language Models for Nutritional Content Estimation from Food Images, Current Developments in Nutrition (Fridolfsson et al.) (2025)
  5. Food energy: methods of analysis and conversion factors, Chapter 3: Calculation of the energy content of foods, Food and Agriculture Organization of the United Nations (2003)
  6. FoodData Central: About Us, U.S. Department of Agriculture, Agricultural Research Service (2026)
  7. Open Food Facts: Discover the project, Open Food Facts (2026)
  8. Food identification by barcode scanning in the Netherlands: a quality assessment of labelled food product databases underlying popular nutrition applications, Public Health Nutrition (Maringer et al.) (2019)

Not medical advice. This article is general information for healthy adults and is not a substitute for advice from a doctor or registered dietitian. Talk to a qualified professional before changing your diet, exercise or supplements, especially if you are pregnant, under 18, have a medical condition such as diabetes or kidney disease, take medication, or have a history of disordered eating. See our health disclaimer.

MyMacro AI is coming soon

An AI nutrition app built to log meals by voice or photo, sync your wearables and adjust targets to your cycle phase and context. It isn't released yet. Join the waitlist to hear when it opens.

Join the waitlist