How PixNutri estimates nutrition
Exactly how PixNutri turns a food photo or barcode into calories and macros, how your daily calorie target is calculated, and where the estimates can go wrong.
By PixNutri Editorial Team · Last updated September 19, 2026
PixNutri gives you estimates, not lab measurements. This page explains exactly how those estimates are produced, so you can decide how much to rely on them. If anything here is unclear or wrong, write to .
In short
- Photo scans are analysed by a Google Gemini vision model, which identifies the food, estimates the portion and returns calories, protein, carbs, fat, fiber and sugar.
- Barcode scans use the nutrition facts published for that product in the Open Food Facts database, scaled to the amount you enter.
- Your daily calorie target comes from the Mifflin-St Jeor equation, an activity multiplier and your goal.
- Every value is editable. You can change the portion in one tap or type in your own numbers.
1. Photo scans (AI food recognition)
When you take or pick a photo, PixNutri sends the image to Google’s Gemini 3.1 Flash-Lite model through Google Firebase. In a single request the model:
- checks whether the photo actually shows food (a photo of a bicycle is rejected rather than given a made-up calorie count),
- names the dish and describes what it sees,
- estimates the serving size,
- returns calories, protein, carbohydrates, fat, fiber and sugar for that serving, plus a health score from 1 to 10 and a short explanation.
The response is returned as structured data (a fixed JSON schema), so the app always receives the same fields rather than free text.
What the health score means. The score is the model’s overall judgement of the meal’s nutritional quality: for example, vegetables and lean protein typically score 7 to 10, fried or sugary foods 3 to 6, and heavily processed foods 1 to 4. It is a quick orientation, not a medical rating.
Privacy note. While PixNutri uses Google’s free tier of the Gemini API, Google may use submitted photos and generated results to improve its products, and human reviewers may read them. Please don’t scan photos that include faces or documents. See our Privacy Policy.
2. Barcode scans
For packaged food, PixNutri reads the barcode (EAN-13, EAN-8, UPC-A or UPC-E) and looks the product up in Open Food Facts, a free, volunteer-maintained food database. Only the barcode number is sent.
- Nutrition values are taken per 100 g from the product page and multiplied by the amount you enter (the serving size is pre-filled when the product lists one).
- The health score is derived from the product’s Nutri-Score grade: A = 9, B = 7, C = 5, D = 3, E = 2. Products without a Nutri-Score get a neutral 5.
- Barcode scans don’t use AI and don’t count towards your daily AI scans.
Because Open Food Facts is crowd-sourced, some products are missing or incomplete. If a product isn’t found, PixNutri tells you instead of guessing.
3. Your daily calorie target
The short goal quiz asks for your sex, age, height, weight, activity level and goal. PixNutri then calculates:
Resting energy expenditure (Mifflin-St Jeor, 1990):
- Men: 10 × weight (kg) + 6.25 × height (cm) − 5 × age + 5
- Women: 10 × weight (kg) + 6.25 × height (cm) − 5 × age − 161
Daily energy needs = resting energy × an activity factor: 1.2 (sedentary), 1.375 (lightly active), 1.55 (moderately active) or 1.725 (very active).
Goal adjustment:
| Goal | Adjustment |
|---|---|
| Lose weight | −500 kcal per day, never below 1,200 kcal (women) or 1,500 kcal (men) |
| Maintain | no change |
| Gain | +300 kcal per day |
A 500 kcal daily deficit sits at the gentle end of the 500 to 1,000 kcal/day range that the US National Heart, Lung, and Blood Institute guidelines associate with losing about 1 to 2 lb (0.5 to 0.9 kg) per week. The result is rounded to the nearest 10 kcal.
Macro targets:
- Protein: 1.4 g per kg of body weight to maintain, 1.8 g/kg when losing or gaining. This matches the 1.4 to 2.0 g/kg/day range the International Society of Sports Nutrition considers sufficient for most exercising people.
- Fat: 27% of calories, inside the 20 to 35% range recommended by the Institute of Medicine.
- Carbohydrates: the calories that remain.
These targets are a starting point for healthy adults. They are not suitable for pregnancy, eating disorders, diabetes, kidney disease or other medical conditions. Please talk to a doctor or registered dietitian in those cases.
4. Editing and portions
AI estimates are most often off because of portion size and hidden ingredients. That’s why every result can be corrected:
- One-tap portions: ½, ¾, 1, 1¼, 1½ or 2 times the estimated serving. All values scale together.
- Manual edits: change the name, calories, protein, carbs or fat directly.
Edited values replace the AI estimate in your history and daily totals.
5. AI meal plans (Pro)
Meal plans are generated by the same Gemini model from your preferences: a calorie target between 1,200 and 3,500 kcal, a diet style (balanced, high protein, low carb, keto, vegetarian, vegan or Mediterranean), 3 to 6 meals per day, and any foods or allergens to avoid. Plans list ingredients, simple preparation steps and estimated macros per meal. They are suggestions, not prescriptions. Always check ingredients yourself if you have allergies.
What PixNutri does not do
- It does not diagnose, treat or prevent any disease.
- It does not measure the food. A photo cannot see oil absorbed during frying, sugar dissolved in a sauce or what is hidden under the top layer of a bowl.
- It does not replace a registered dietitian or doctor.
For the factors that affect accuracy and how to get better results, see How accurate is PixNutri?.
Sources
- Mifflin MD, St Jeor ST, et al. A new predictive equation for resting energy expenditure in healthy individuals. Am J Clin Nutr. 1990;51(2):241-247
- NHLBI. Clinical Guidelines on the Identification, Evaluation, and Treatment of Overweight and Obesity in Adults: Treatment Guidelines
- Jäger R, et al. International Society of Sports Nutrition Position Stand: protein and exercise. J Int Soc Sports Nutr. 2017;14:20
- Institute of Medicine. Dietary Reference Intakes for Energy, Carbohydrate, Fiber, Fat, Fatty Acids, Cholesterol, Protein, and Amino Acids (Macronutrients)
- Open Food Facts: Nutri-Score
- Santé publique France: Nutri-Score
- Google Gemini API Additional Terms of Service
Written by the PixNutri Editorial Team. PixNutri provides general information, not medical advice. Learn how we work: Methodology · Nutrition sources · Editorial policy
Spotted a factual error? Report it to our editorial team. We review every report and update the page if needed.