How magnusinst84-sudo/food-sightai works
FoodSight AI lets people recognize Indian dishes from uploaded or camera-captured images, inspect nutrition, and track meals and health goals. The main path runs from the web interface to Flask prediction, LiteRT inference, and nutrition enrichment, then into meal tracking. Other documented capabilities include dish search, category/region browsing, accounts, profiles, and dietary indicators. The README also describes ESP32-CAM capture; its device implementation is not in this tree. Backend routes and some client wiring are only partially sampled, so uncertain links are omitted.
Main entry points: app.py Flask API · app.js Recognition interface · index.html FoodSight dashboard · profile.html Profile page
Components 16
Web experience
- FoodSight dashboard
templates/index.html - Profile page
templates/profile.html - Recognition interface
static/js/app.js - Meal tracker
static/js/auth_tracker.js - Auth tracking
static/js/auth_tracker.js - Browser local storage
Application API
- Flask API
app.py
Food intelligence
- Food classifier
foodsight_v6.tflite - Image preprocessing
app.py - Dish taxonomy
dataset_config.py - Nutrition engine
nutrition_data.py
Accounts and tracking
- Account and profile
app.py - Scan history
app.py - Application database
app.py
Other components
- Person
- ESP32-CAM
Connections 23
- Person → FoodSight dashboard: uses
- FoodSight dashboard → Recognition interface: loads interface
- Person → Recognition interface: uploads image
- ESP32-CAM → Flask API: posts capture
- Recognition interface → Flask API: requests prediction
- Flask API → Image preprocessing: prepares image
- Image preprocessing → Food classifier: feeds tensor
- Flask API → Nutrition engine: looks up dish
- Flask API → Dish taxonomy: reads mappings
- Flask API → Recognition interface: returns results
- Recognition interface → Flask API: requests nutrition
- Person → Recognition interface: searches dishes
- Recognition interface → Flask API: requests browse or search
- Recognition interface → Meal tracker: logs scan
- Meal tracker → Browser local storage: reads and writes logs
- Person → Auth tracking: signs in
- Auth tracking → Flask API: requests authentication
- Person → Profile page: views profile
- Profile page → Flask API: requests profile
- Flask API → Account and profile: handles account routes
- Account and profile → Application database: reads and writes users
- Flask API → Scan history: handles history routes
- Scan history → Application database: stores scan records