How mrdbourke/nutrify works
Nutrify combines food-photo collection, a browser-based food/nutrition prototype, and a FoodVision model-training and labeling workflow. The main user path is a photo upload to cloud storage with metadata recorded separately; the prototype retrieves nutrition data and accepts correctness feedback. The README also describes the broader image-data flywheel and USDA nutrition exploration. Some links reflect README documentation or the source index rather than fully sampled implementations, so uncertain connections are omitted.
Main entry points: wandb_utils.py Artifact helpers · train.py Model training · get_data.js Food data access · autocorrect_and_merge_labels.py Label correction
Components 25
Image collection
- Collector app
food_image_collector.py - Image upload helper
utils.py - Google Cloud Storage
- Metadata writer
save_to_gsheets.py - Google Sheets
Food lookup prototype
- Browser app
script.js - Food data access
get_data.js - Supabase client
supabaseClient.js - Nutrition database
- Food classifier
models/2022-01-13-nutrify_model_100_foods_v0.tflite
FoodVision modeling
- Model training
foodvision/train.py - Image data loader
foodvision/data_loader.py - Training engine
foodvision/engine.py - Model evaluation
foodvision/evaluate.py - Label correction
foodvision/autocorrect_and_merge_labels.py - Label Studio merge
foodvision/merge_labels_from_label_studio.py - Label fixes
foodvision/fix_labels.py - Training config
foodvision/configs/default_config.py - Cloud helpers
foodvision/utils/gcp_utils.py - Artifact helpers
foodvision/utils/wandb_utils.py - Weights & Biases
Nutrition data
- USDA data exploration
data_exploration/usda_food_data_exploration.ipynb - FoodData Central files
data_exploration/data
Other components
- Photo contributor
- Food lookup user
Connections 26
- Photo contributor → Collector app: uploads photo
README.md - Collector app → Image upload helper: calls upload
food_image_collector.py - Image upload helper → Google Cloud Storage: stores image
README.md - Collector app → Metadata writer: records metadata
food_image_collector.py - Metadata writer → Google Sheets: writes metadata
README.md - Food lookup user → Browser app: uses lookup
README.md - Browser app → Food data access: calls data access
script.js - Food data access → Supabase client: queries through
get_data.js - Supabase client → Nutrition database: connects to
supabaseClient.js - Food data access → Food lookup user: shows nutrition
get_data.js - Food classifier → Food data access: feeds food lookup
- Model training → Image data loader: loads datasets
foodvision/train.py - Model training → Training engine: runs training
foodvision/train.py - Model training → Artifact helpers: uses artifacts
foodvision/train.py - Model training → Cloud helpers: uses cloud helpers
foodvision/train.py - Model evaluation → Image data loader: loads datasets
foodvision/evaluate.py - Model evaluation → Artifact helpers: uses artifacts
foodvision/evaluate.py - Label correction → Training config: reads settings
foodvision/autocorrect_and_merge_labels.py - Label correction → Cloud helpers: uses cloud helpers
foodvision/autocorrect_and_merge_labels.py - Label correction → Artifact helpers: uses artifacts
foodvision/autocorrect_and_merge_labels.py - Label Studio merge → Training config: reads settings
foodvision/merge_labels_from_label_studio.py - Label Studio merge → Cloud helpers: uses cloud helpers
foodvision/merge_labels_from_label_studio.py - Label Studio merge → Artifact helpers: uses artifacts
foodvision/merge_labels_from_label_studio.py - Label fixes → Artifact helpers: uses artifacts
foodvision/fix_labels.py - Artifact helpers → Weights & Biases: loads and logs artifacts
foodvision/utils/wandb_utils.py - USDA data exploration → FoodData Central files: explores data
README.md