← Back to Mira

Mira Methodology: Vision Pipeline, Energy Equations & Clinical Guardrails

How Mira estimates meal calories from photos on Nutrition5k (~70% accuracy vs. 59% dietitian visual average) and calculates adaptive calorie, macro, and fiber targets.

01 · Computer-Vision Pipeline & Nutrition5k Benchmark

Mira estimates meal energy and macronutrients from smartphone photos by combining food-component segmentation, portion-volume priors, and optional short text or label context. To evaluate visual meal estimation against an objective ground truth rather than self-reported diaries, we benchmark against the Google Research Nutrition5k dataset (Thames et al., CVPR 2021)—a laboratory-weighed dataset of 3,229 real cafeteria dishes captured with overhead and angled RGB-D cameras and gram-level ingredient weights.

Why Visual Estimation Beats Manual Database Search for Adherence

In real-world nutrition logging, two failure modes dominate: either users abandon manual gram-by-gram barcode and database entry within days, or they underestimate restaurant and mixed plates by 30–50%. On Nutrition5k weighed dishes, human visual estimation from dish photographs shows wide error margins—even among trained professionals:

Estimation MethodMean Absolute Error (kcal MAE)Directional Accuracy (`1 − MAE`)Primary Source of Variance
Mira Vision + Context Pipeline~30% (~29.9% MAE)~70% accuracyHidden cooking oils, emulsions & bowl depth
Trained Nutritionist Visual Estimate41.2% MAE~59% accuracyUnseen dressings, dense starches & portion depth
Non-Expert Human Visual Estimate53.0% MAE~47% accuracyPortion-size distortion & mixed-dish energy density

Three Practical Habits That Close the Remaining Gap

Because a camera sensor only captures surface geometry and visible ingredients, three quick habits substantially improve single-meal accuracy inside Mira:

  1. Frame the plate at a ~45° angle: Capturing both the top surface area and the side height of the plate or bowl gives Mira far better volume cues than a flat 90° overhead shot or a close-up crop.
  2. Add a 5-word note for invisible fats: One tablespoon (`14 g`) of olive oil or butter adds `~120 kcal` of pure fat without changing how roasted vegetables or pasta look. Adding *"cooked in 1 tbsp olive oil"* or *"creamy tahini dressing"* lets Mira adjust lipid density immediately.
  3. Scan packaged nutrition labels directly: When eating packaged skyr, protein bars, or ready meals, photographing the printed nutrition table triggers optical character recognition (OCR) per `100 g` or per serving instead of visual guesswork.

02 · Resting Energy Expenditure (Mifflin-St Jeor & Fat-Free Mass)

To translate meal logs into an actionable daily budget, Mira starts by estimating your Resting Energy Expenditure (`REE` / `BMR`)—the energy your body expends at complete rest to maintain organ function, thermoregulation, and cellular turnover.

Sex-Specific Mifflin-St Jeor Equation

In comparative validation studies by the American Dietetic Association (Frankenfield et al., 2005), the Mifflin-St Jeor equation (Mifflin et al., 1990) demonstrated the narrowest error distribution across healthy non-obese and obese adults:

  • Female baseline: `REE = (10 × weight_kg) + (6.25 × height_cm) − (5 × age_years) − 161`
  • Male baseline: `REE = (10 × weight_kg) + (6.25 × height_cm) − (5 × age_years) + 5`

Why Sex Affects the Intercept (and How Omission Works)

As demonstrated by Johnstone et al. (2005), more than `60%` of inter-individual variance in resting metabolic rate is explained by fat-free mass (`FFM`)—skeletal muscle, organs, and bone—rather than total scale weight. At an identical height and weight, adult men carry on average a higher proportion of metabolically active lean tissue than adult women, producing the `166 kcal/day` difference between `+5` and `−161`.

When you choose "Prefer not to say" in the Mira Calorie Calculator or in-app onboarding, Mira applies the exact mathematical midpoint intercept (`−78 kcal/day`) so you can calculate a realistic baseline without forced binary disclosure. A hard physiological floor of `800 kcal/day` is enforced on resting estimates.

03 · Total Daily Energy Expenditure (`TDEE`) & Activity Integration

Resting expenditure represents only `60–75%` of total daily energy burn. To estimate Total Daily Energy Expenditure (`TDEE`), Mira supports two distinct activity modes that prevent double-counting:

Activity Mode / ProfileMovement Addition (`PAL` Delta)Total Multiplier (`× REE`)Typical Daily Pattern
Mostly Seated (`low`)`+20%` of REE`1.20 × REE`Desk work, `< 4,000` steps/day, minimal planned exercise
Light Movement (`light`)`+35%` of REE`1.35 × REE``5,000–7,500` steps/day or `1–2` light sessions/week
Active Everyday (`moderate`)`+50%` of REE`1.50 × REE``8,000–10,000` steps/day or `3–4` structured workouts/week
Very Active (`high`)`+70%` of REE`1.70 × REE`Physical occupation, `> 11,000` steps/day, or daily training
Health Connect / Apple HealthLive whole-day active energyDynamic daily syncWearable TDEE replaces static multiplier (no double-counting)

Static multipliers align with FAO/WHO/UNU Human Energy Requirements. When you select Health Connect / Apple Health in the web calculator prior to pairing your phone, Mira previews your target using the conservative Light Movement (`+35%`) multiplier and switches to live wearable expenditure once synced inside the app.

04 · Deficit Dynamics, Lean-Mass Protection & Safety Guardrails

Sustainable Pace Defaults (`−500 kcal/day` Lose · `+300 kcal/day` Gain)

Classical energy-balance math (Wishnofsky, 1958) approximates `1 kg` of human adipose tissue at `~7,700 kcal`. However, dynamic human metabolism models by Hall et al. (The Lancet, 2011) show that as body mass decreases, both resting expenditure and the thermic cost of movement adapt downward.

To balance visible weekly progress with satiety, hormonal stability, and lean-mass retention, Mira defaults to:

  • Lose weight (`−500 kcal/day`): Approximates `~0.45 kg/week` (`~1 lb/week`) during initial weeks before adaptive thermogenesis, customizable between `100` and `1,000 kcal/day` in the Calorie Deficit Calculator.
  • Gain weight (`+300 kcal/day`): Supports lean tissue accretion (`~0.25–0.30 kg/week`) when paired with progressive resistance training while minimizing excess fat storage.

Hard Clinical Guardrails (`Age ≥ 19`, `BMI ≥ 18.5`, `1,200 kcal` Floor)

Mira is designed for general adult self-monitoring (`19–110 years`) and enforces three non-negotiable guardrails across both web and mobile:

  1. Adult-only scope (`Age ≥ 19`): Adolescents and children have elevated energy and micronutrient requirements for linear growth and bone mineralization that adult equations must not restrict.
  2. Underweight deficit protection (`BMI < 18.5 kg/m²`): In accordance with WHO adult BMI classifications, Mira blocks weight-loss deficit calculations whenever `weight_kg / (height_m²) < 18.5` and recommends maintenance or gentle surplus targets instead.
  3. Daily energy floor (`1,200 kcal/day`): Even if a selected deficit exceeds `TDEE − 1,200`, Mira clamps the daily calorie target at `1,200 kcal/day` (and discloses the adjustment) so essential protein, essential fatty acids, and micronutrients remain achievable without clinical supervision.

05 · Macronutrient Splits & Dynamic Fiber Scaling

Calories govern scale weight over time, but macronutrient composition and dietary fiber govern hunger, glycemic stability, and whether weight lost comes from fat or skeletal muscle (Morton et al., 2018).

Macro ProfileProtein (`4 kcal/g`)Carbohydrates (`4 kcal/g`)Fat (`9 kcal/g`)Best Suited For
Balanced (`30 / 45 / 25`)`30%` of kcal`45%` of kcal`25%` of kcalEveryday sustainability, mixed whole-food diets & endurance
High Protein (`40 / 35 / 25`)`40%` of kcal`35%` of kcal`25%` of kcalCalorie deficits, satiety & lean muscle preservation
Low Carb (`30 / 20 / 50`)`30%` of kcal`20%` of kcal`50%` of kcalLower glycemic load & higher dietary fat preference

Dynamic Fiber Formula (`max(25 g, round(kcal / 1000 × 14.6))`)

Rather than assigning a static fiber number across all body sizes, Mira combines the European Food Safety Authority (`EFSA`) adult adequacy threshold of `25 g/day` (EFSA NDA Panel, 2010) with the German Nutrition Society (`DGE`) energy-density reference of `14.6 g per 1,000 kcal` (DGE Reference Values):

  • At `1,200–1,700 kcal/day`, your target never drops below the `25 g/day` floor required for normal bowel laxation and microbiome fermentation.
  • Above `1,712 kcal/day`, your target scales proportionally (`14.6 g / 1,000 kcal`)—for example, `32 g/day` at `2,200 kcal` or `41 g/day` at `2,800 kcal`—which you can test directly in the Daily Fiber Calculator and Macro Calculator.

06 · Editorial Governance & Primary References

All equations, benchmarks, and nutrition guides on `seewithmira.com` are maintained by the Mira Team (Friction Ventures GmbH, Baar, Switzerland) against peer-reviewed literature and European dietary reference standards. Mira is a wellness and nutrition self-monitoring tool, not a medical device, and does not diagnose, treat, or manage clinical conditions or eating disorders.

  • Thames Q et al. *Nutrition5k: Towards Automatic Nutritional Understanding of Generic Food.* IEEE/CVF CVPR 2021. arXiv:2103.03375
  • Mifflin MD et al. *A new predictive equation for resting energy expenditure in healthy individuals.* Am J Clin Nutr. 1990;51(2):241–247. PubMed 2305711
  • Johnstone AM et al. *Factors influencing variation in basal metabolic rate include fat-free mass, fat mass, age, and circulating thyroxine but not sex, circulating leptin, or triiodothyronine.* Am J Clin Nutr. 2005;82(5):941–948. PubMed 16280423
  • Hall KD et al. *Quantification of the effect of energy imbalance on bodyweight.* The Lancet. 2011;378(9793):826–837. PubMed 21872751
  • Morton RW et al. *A systematic review, meta-analysis and meta-regression of the effect of protein supplementation on resistance training-induced gains in muscle mass and strength in healthy adults.* Br J Sports Med. 2018;52(6):376–384. PubMed 28698222
  • EFSA Panel on Dietetic Products, Nutrition, and Allergies (NDA). *Scientific Opinion on Dietary Reference Values for carbohydrates and dietary fibre.* EFSA Journal 2010;8(3):1462. efsa.europa.eu
  • FAO/WHO/UNU. *Human Energy Requirements: Report of a Joint FAO/WHO/UNU Expert Consultation.* Rome, 2004. fao.org