FoodIntel
Intelligent food recognition & nutrition API

System status

Backend Online
Database Connected
ML Model Loaded
Environment development

Model details

Loaded
True
Version
mobilenet_v3_small-best
Food classes
27
Confidence threshold
55%
Margin threshold
12%

Retraining status

Job status
Waiting
Running
No
Retraining runs automatically every day at midnight UTC on approved feedback. Visit the Admin Panel at http://localhost:3000/admin-access to review & approve feedback and trigger manual retraining.

Architecture

FrontendNext.js 16 · TypeScript · Tailwind CSS 4 · shadcn/ui · Framer Motion
BackendFastAPI · Motor (async MongoDB) · Pydantic v2 · Python-JOSE
ML ModelPyTorch · MobileNetV3 / EfficientNet-B0 transfer learning
DatabaseMongoDB — users, foods, meal_logs, prediction_feedback
StorageLocal uploads by default · Cloudinary optional
TranslationMicrosoft Azure Cognitive Services Translator (server-side proxy)
DeploymentRender / Railway / Fly.io / Docker · Frontend on Vercel
ImagesCloudinary unsigned direct upload from browser

API endpoints

POST/api/v1/auth/register
POST/api/v1/auth/login
GET/api/v1/auth/me
PATCH/api/v1/users/me
GET/api/v1/foods
POST/api/v1/predictions/image
POST/api/v1/predictions/image-url
POST/api/v1/predictions/feedback
GET/api/v1/predictions/supported-foods
GET/api/v1/meals?limit=500&date=YYYY-MM-DD
GET/api/v1/meals/{id}
DELETE/api/v1/meals/{id}
GET/api/v1/reports/weekly?start_date=&end_date=

Supported foods — 27 classes

Current model coverage. If an image is unclear or outside this list the API returns a structured 422 — never a wrong answer. More Nigerian and African meals will be added as reviewed images are collected through the feedback pipeline.

Abacha
Afang Soup
Akara
Amala
Asaro
Banga Soup
Beans
Boli
Chin Chin
Edikaikong Soup
Egusi Soup
Ewedu Soup
Jollof Rice Nigeria
Masa
Meat Pie
Moi Moi
Nkwobi
Ogbono Soup
Oha Soup
Okro Soup
Pepper Soup
Plantain
Puff Puff
Rice And Stew
Suya
Vegetable Soup
Yam

Run locally

  1. Copy .env.example.env and fill in SECRET_KEY, MONGODB_URL, and MODEL_PATH.
  2. Create a virtualenv: python -m venv venv && source venv/bin/activate
  3. Install dependencies: pip install -r requirements.txt
  4. Start MongoDB locally or point MONGODB_URL at Atlas.
  5. Run the API: uvicorn app.main:app --reload --port 8000
  6. Open /docs and seed food data via POST /api/v1/foods/seed.
  7. To train the model: python ml/train.py --data-dir ./ml/data/merged_dataset --epochs 30

Ethical notice

Nutritional values and health scores produced by FoodIntel are estimates for educational and personal tracking purposes only. They are computed from average per-100g reference values and scaled to the user's declared serving size. They are not medical advice and must not be used to diagnose, treat, or manage any health condition or nutrient deficiency. Always consult a registered dietitian or physician for personalised nutritional guidance.