Engineered for my friend Dave to bring clarity, precision, and complete privacy to his personal nutrition journey. NutriScan AI scans your plate with Google Gemma 2, grounds every gram deterministically against USDA FoodData Central, and uses Prior Labs' TabPFN in-context learning to calculate your real dynamic metabolic expenditure and 28-day weight trajectory — 100% sovereign, private, and open source.
A seamless visual perception → deterministic nutrition → tabular metabolic forecasting pipeline that eliminates AI hallucinations and population-average formulas.
Vision models alone hallucinate calorie totals based on generic training patterns. NutriScan AI uses Google Gemma 2 to identify food items and estimate spatial gram volume, then immediately cross-references verified USDA FoodData Central density tables.
Multi-Angle Visual Parsing — Gemma analyzes plate geometry, portion ratios, and cooking methods (grilled, fried, steamed).
USDA Deterministic Lookup — Food codes resolve to verified macronutrient profiles with zero LLM guesswork.
Fiber & Satiety Scoring — Highlights micronutrient density, glycemic impact, and protein concentration.
Static formulas (Mifflin-St Jeor) assume a human is a fixed math equation. In reality, non-exercise activity (NEAT), sleep, and metabolic adaptation fluctuate weekly. Prior Labs' TabPFN ingests your rolling personal log and discovers your true dynamic TDEE.
Historical Telemetry Ingestion — Loads past daily calories, macro ratios, step counts, and weigh-ins.
Dynamic TDEE Calculation — Solves true energy balance (E_in - E_out = ΔW × 7700 kcal) without guesswork.
28-Day Trajectory Simulation — Interactively simulates future scale weights with upper and lower confidence intervals.
I built this ledger so my friend Dave always has complete transparency into his meals. NutriScan AI binds every visual food item directly to verified USDA FoodData Central records with zero stochastic guesswork.
Most calorie apps treat the human body like an inert furnace — prescribing crash 1,000 kcal deficits that shut down thyroid hormone (T3/T4), surge cortisol, cannibalize muscle tissue, and cause aggressive weight rebound.
Inspired by clinical metabolic wards, NutriScan AI enforces non-negotiable biological guardrails. Prior Labs TabPFN continuously evaluates endocrine strain and dynamically adjusts calorie targets to keep your metabolism functioning at peak capacity.
Strict floor of 1,500 kcal/day (men) and 1,200 kcal/day (women). The active deficit is mathematically clamped at a maximum 25% of your TabPFN dynamic TDEE to prevent metabolic shutdown.
When weekly weight loss exceeds 1.0% body weight or rolling NEAT drops by >15%, the system schedules a 48-hour isocaloric maintenance refeed to restore leptin and glycogen.
Enforces a strict minimum of 1.8g to 2.2g of protein per kg of lean mass during deficit phases, eliminating muscle catabolism and preserving resting metabolic rate.
Grounds potassium, magnesium, and dietary fiber ratios to safeguard cardiac rhythm, neuromuscular transmission, and gut microbiome diversity during caloric restriction.
I promised my friend Dave that his metabolic intelligence would be dependable, explainable, and private. NutriScan AI is architected around three foundational principles that guarantee clinical precision and data sovereignty.
Vision models (Google Gemma 2) identify food items and estimate spatial gram volume, but are strictly quarantined from generating caloric numbers. Only verified USDA FoodData Central database lookups assign final macros.
Zero model retraining or catastrophic forgetting. Your rolling 30-day check-in history is fed directly into Prior Labs' TabPFN tabular transformer in a 12ms forward pass, discovering your true dynamic TDEE.
Your meal photographs, body weight logs, and metabolic rate history remain 100% private. Run locally on your own machine or inside your private Docker container with zero third-party cloud data mining.
How NutriScan AI replaces conventional tracking dilemmas with modern in-context foundation models and sovereign architecture tailored for Dave.
| Dave's Core Need | The Conventional Dilemma | How NutriScan AI Solves It for Dave |
|---|---|---|
| Accessible & Open Health Tools | Cost barriers & feature restrictions | 100% Free & Open-Source (MIT License) |
| Biological Data Sovereignty | Meal photos & weights sent to remote clouds | Sovereign & On-Device (Local Processing) |
| Adaptive Metabolic Forecasting | Static textbook formula (ignoring metabolic adaptation) | Prior Labs TabPFN Dynamic In-Context Learning |
| Deterministic Calorie Verification | Unchecked generative AI calorie guessing | Verified USDA FoodData Central Grounding |
| Daily Coaching & Motivation | Passive numeric screens easily overlooked | ElevenLabs Neural Voice Daily Debrief |
| Engineering Transparency | Opaque, unverifiable calculation pipelines | Sentry Instrumented Spans & Open API Specs |
Learn how NutriScan AI combines computer vision, tabular foundation models, and clinical safety guardrails.
docker build -t opencal-ai . and docker run -p 8000:8000 opencal-ai. The FastAPI backend, static assets, USDA sample database, and TabPFN engine will launch locally.
Every inference request emits Sentry spans measuring vision latency, USDA table lookup times, TabPFN forward pass durations, and voice streaming buffers.
{
"friend_name": "Dave",
"current_weight_kg": 78.8,
"target_weight_kg": 75.0,
"insights": {
"dynamic_tdee_kcal": 2480.0,
"static_formula_tdee_kcal": 2220.0,
"metabolic_efficiency_percent": 111.7,
"metabolic_status": "Optimal Steady-State Fat Loss",
"projected_days_to_goal": 22,
"recommended_protein_g": 173.0
},
"model_name": "Prior Labs TabPFN (Tabular In-Context Transformer)",
"inference_time_ms": 14.2
}