# User Guide This guide walks a non-technical user (e.g. a school inspector) through using the NutriVision AI dashboard. ## 1. Start the system Ask your administrator to start the two services (see [INSTALLATION.md](INSTALLATION.md)): ```bash uvicorn api.main:app --port 8000 # backend streamlit run dashboard/app.py # dashboard ``` Then open the dashboard in your browser (usually ). ## 2. Set the meal context (sidebar) 1. Confirm the **Backend URL** shows *"Backend online"*. 2. Enter the **School name** and **District**. 3. Choose the **Compliance standard**: - *Primary (Class I–V)* → 450 kcal, 12 g protein - *Upper Primary (Class VI–VIII)* → 700 kcal, 20 g protein ## 3. Analyze a meal — "🔍 Analyze Meal" tab 1. Click **Browse** and select a clear, top-down photo of the served plate. Good lighting and all items visible give the best results. 2. (Optional) toggle **Assess freshness** and **Generate PDF report**. 3. Click **Analyze Meal**. You will see: - The **annotated image** with detected items boxed and labelled. - A **Compliance** badge (green = compliant, amber = partial, red = non-compliant) with calorie and protein percentages. - A table of **detected items** (confidence, portion, calories, protein, freshness). - Charts: **calorie sources** (protein/carbs/fat) and **% of daily value**. - **Recommendations** to improve the meal. - A **⬇️ Download PDF Report** button. ### Tips for good photos - Take the photo straight down over the plate. - Ensure each food item is separated and visible. - Avoid shadows and glare. ## 4. Monitor trends — "📊 Monitoring" tab - KPI cards: total analyses, compliance rate, average calories/protein. - **Compliance breakdown** pie chart. - **Most detected foods** bar chart. - **School-wise performance** table (analyses, average calories, compliance %). ## 5. Review past analyses — "🕓 History" tab - Browse all stored analyses (most recent first). - Select an ID to view full details and download (or generate) its PDF report. ## 6. Reference — "📖 Nutrition DB" tab View the nutrition values (per 100 g) used by the system for each food item. ## Understanding the results - **Portion size** is estimated from how much of the plate each item occupies; it is an approximation. - **Freshness** is a supporting visual signal ("Fresh" / "Moderate" / "Potential Spoilage"), **not** a food-safety guarantee — always follow standard hygiene inspection procedures. - **Compliance** compares the meal's total calories and protein against the official Mid-Day Meal norm for the selected category. ## Frequently asked questions **No items were detected — why?** The photo may be blurry/dark, or a custom model has not been trained yet. Try a clearer photo, or ask your administrator to train the model on real images. **Can it work offline?** Yes — everything runs locally. Only the initial model download needs internet. **Where are reports saved?** Under `outputs/reports/` on the server, and downloadable from the dashboard.