Get Started#

This guide walks you through installation, configuration, and first run of the Dine-In Order Accuracy system.


Prerequisites#

  • Docker 24.0+ with Compose V2

  • Intel GPU with drivers installed

  • 16 GB RAM minimum (32 GB recommended)

  • 50 GB free disk space

docker --version
docker compose version

Step 1: Configure Environment#

cd order-accuracy/dine-in

# Create .env from template
make init-env
# Edit .env if needed — defaults work for most setups

# Initialize git submodules (for benchmark tools)
make update-submodules

Step 2: Setup OVMS Model (First Time Only)#

The setup script reads model configuration (device, precision, model name) from dine-in/.env (created in Step 1), so complete Step 1 before running this step.

cd ../ovms-service
./setup_models.sh --app dine-in    # Downloads and exports model (~30-60 min first time)
cd ../dine-in

Note: If you previously ran setup for take-away, the model files are already shared and this step will detect them automatically — no re-download needed.

This downloads Qwen2.5-VL-7B-Instruct (~7 GB) and converts it to OpenVINO INT8 format. This is only needed once — the model files are shared with Take-Away.

Step 3: Prepare Test Data#

The images/ folder does not contain sample images. Add your own before testing:

  1. Place plate images in images/ (.jpg, .jpeg, or .png)

  2. Edit configs/orders.json — add entries with image_id matching your filenames

  3. Edit configs/inventory.json — define all possible menu items

Step 4: Build and Start#

# Pull images from registry (default)
make build && make up

# OR build locally from source
make build REGISTRY=false && make up

This starts 4 containers:

Container

Ports

Purpose

dinein_app

7861, 8083

Gradio UI + FastAPI

dinein_ovms_vlm

8002

VLM model server (OVMS)

dinein_semantic_service

8081, 9091

Semantic matching

metrics-collector

8084

System metrics


Verifying Installation#

# API health check
make test-api

# Or directly
curl http://localhost:8083/health

# Check OVMS model
curl http://localhost:8002/v1/config | jq .

Open http://localhost:7861 for the Gradio UI, or http://localhost:8083/docs for the REST API docs.


First Validation#

Via Gradio UI#

  1. Open http://localhost:7861

  2. Select a scenario from the dropdown

  3. Review the order manifest

  4. Click “Validate Plate”

  5. View accuracy score, matched/missing/extra items, and performance metrics

Via REST API#

The bundled MCD-1001.png image shows Filet-O-Fish and Cheesy Fries on the tray. Two test scenarios are provided:

Negative test case — order does not match tray (demonstrates mismatch detection):

curl -X POST "http://localhost:8083/api/validate" \
  -F "image=@images/MCD-1001.png" \
  -F 'order={"items":[{"name":"Cheeseburger","quantity":1},{"name":"French Fries","quantity":1}]}'
# Expected: order_complete=false, accuracy_score=0.0

Positive test case — order matches tray (demonstrates successful validation):

curl -X POST "http://localhost:8083/api/validate" \
  -F "image=@images/MCD-1001.png" \
  -F 'order={"items":[{"name":"Filet-O-Fish","quantity":1},{"name":"Cheesy Fries","quantity":1}]}'
# Expected: order_complete=true, accuracy_score=1.0

Via Make#

# Services must be running first
make benchmark-single IMAGE_ID=MCD-1001

Benchmarking#

Single Image Test#

make benchmark-single IMAGE_ID=MCD-1001

Full Benchmark#

make benchmark

Key variables:

Variable

Default

Description

BENCHMARK_WORKERS

1

Concurrent workers

BENCHMARK_DURATION

180

Duration (seconds)

BENCHMARK_TARGET_LATENCY_MS

25000

Latency threshold (ms)

TARGET_DEVICE

GPU

Device: CPU, GPU, NPU

Stream Density Test#

Finds the maximum number of concurrent image validations within the latency target:

make benchmark-stream-density

# With overrides
make benchmark-stream-density BENCHMARK_TARGET_LATENCY_MS=20000 BENCHMARK_INIT_DURATION=30

Metrics Processing#

make consolidate-metrics   # Consolidate results to CSV
make plot-metrics          # Generate visualisation plots

Changing Inference Device#

To switch between GPU, CPU, or NPU, update TARGET_DEVICE in .env and re-run model setup:

# In .env
TARGET_DEVICE=CPU

cd ../ovms-service && ./setup_models.sh && cd ../dine-in
make down && make up

Troubleshooting#

OVMS Not Starting#

docker logs dinein_ovms_vlm
ls -la ../ovms-service/models/

OVMS can take 2–5 minutes to load the model. Wait for "Server started" in the logs.

GPU Not Detected#

sudo usermod -aG render $USER
# Log out and back in, then restart services
make down && make up

No Scenarios in UI#

Ensure images are in images/ and configs/orders.json has entries with matching image_id values (filename without extension).


Quick Reference#

make up                              # Start services (registry image)
make up REGISTRY=false               # Start with locally built image
make down                            # Stop services
make logs                            # View logs
make test-api                        # Health check
make benchmark-single IMAGE_ID=...   # Quick test
make benchmark                       # Full benchmark
make benchmark-stream-density        # Stream density test
make help                            # All commands

Next Steps#