NutriOne

nutrition tracking · computer vision

Overview

Full-stack nutrition tracker where the camera is the input device: point it at a plate, get recognized foods and logged macros. No public deployment — this page is the architecture write-up.

Architecture

 .––––––––––––.      .–––––––––––––––.      .––––––––––––––.
 |  react     |      |  fastapi      |      |  postgresql  |
 |  frontend  | –––→ |  backend      | –––→ |              |
 |  + camera  |      |  auth · meals |      |  users       |
 '–––––––––––-'      |  macro calc   |      |  meal logs   |
       |             '–––––––––––––––'      |  food db     |
       ↓                                    '––––––––––––––'
 .––––––––––––.
 |  yolov8    |   on-device inference —
 |  (custom)  |   frames never leave the phone
 '–––––––––––-'
    

Design notes

  • The recognition model runs on device, not the server — food photos are personal data, and inference at the edge means the backend only ever sees food labels and portions.
  • Trained a custom YOLOv8 on ~101k food images; ~90% accuracy on common foods. The long tail is handled by falling back to manual search rather than pretending the model knows.
  • Macro calculation lives server-side against a canonical food table so logged history stays consistent when nutrition data gets corrected.

Specs

  • modelYOLOv8, custom-trained, ~101k food images
  • accuracy~90% on common foods, on-device inference
  • backendFastAPI — auth, meal logging, macro calculation
  • storagePostgreSQL
  • frontendReact with camera integration