macromate-exact-fix

Patch MacroMate's Django pipeline to extract nested nutrition_data and load EfficientNetV2-M.

Updated Dec 18, 2025
One-click install
npx skills add https://github.com/renish7606/MacroMate --skill macromate-exact-fix
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: macromate-exact-fix
Source: https://github.com/renish7606/MacroMate/tree/main/.antigravity/skills/macromate-nutrition-fix
Command: npx skills add https://github.com/renish7606/MacroMate --skill macromate-exact-fix

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

MacroMate's nutrition predictor sometimes returns 0 kcal or misleading values because nutrition data is nested under nutrition_data and the model loader uses the wrong architecture, causing dependency on CLIP fallback. This skill provides targeted patches to correct the nutrition extractor, switch the model loader to EfficientNetV2-M, adjust preprocessing, and enable startup verification for reliable nutrition data.

Core Features & Use Cases

  • Nutrition data corrected: read from nutrition_data and normalize calories, protein, carbohydrates, fat, fiber, sugar, vitamins, calcium, and iron.
  • Model loading accuracy: load EfficientNetV2-M with 351 classes and 480x480 input, ensuring predictions are not delegated to CLIP.
  • Startup validation: verify label_nutrition_mapping.json entries at startup and log known foods.

Quick Start

Apply the exact fixes to the MacroMate nutrition predictor to ensure correct nutrition extraction and proper EfficientNetV2-M model loading.

Frequently Asked Questions about macromate-exact-fix

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does my nutrition prediction model return 0 kcal in Django?

Nutrition prediction returns 0 kcal when the extractor fails to read nested nutrition_data fields correctly. Fixing the Django extractor to normalize calories, protein, and carbohydrates ensures accurate values instead of defaulting to zero.

How do I load EfficientNetV2-M in PyTorch for nutrition prediction?

Loading EfficientNetV2-M in PyTorch for nutrition prediction requires configuring the model loader for 351 classes and 480x480 input dimensions. This stops predictions from incorrectly falling back to CLIP.

How do I fix the CLIP fallback issue in my food recognition pipeline?

Fixing the CLIP fallback issue involves switching the model loader to the correct EfficientNetV2-M architecture with 351 classes. This ensures the primary model handles predictions directly instead of delegating to CLIP.

Do I need a specific nutrition mapping JSON file for EfficientNetV2-M?

Yes, EfficientNetV2-M requires a label_nutrition_mapping.json file containing 351 entries. Startup validation verifies these entries match the model classes and logs known foods to keep results reliable.

What dependencies are required for a Django nutrition prediction pipeline?

A Django nutrition prediction pipeline requires PyTorch and torchvision to load EfficientNetV2-M and handle 480x480 input preprocessing. A 351-entry nutrition mapping JSON is also required for startup validation.

How do I validate a nutrition map at Django startup?

Validating a nutrition map at Django startup involves verifying the entries in label_nutrition_mapping.json against the 351 expected classes. This process logs known foods to ensure the pipeline remains reliable.