Get Started#
Prerequisites#
Ubuntu 24.04 or newer (Linux recommended), Desktop edition (or Server edition with GUI installed)
Docker 24.0+
Docker Compose V2+
Make (
sudo apt install make)Intel hardware (CPU, iGPU, dGPU)
Intel drivers:
Sufficient disk space for models, videos, and results (50GB minimum)
Note
First-time setup downloads AI models (~7GB) and Docker images - this may take 30-60 minutes depending on your internet connection.
Note
KV Cache on iGPU / low-RAM systems: 16 GB RAM is sufficient for inference.
For first-time model export, a higher-memory host (48–64 GB) is recommended.
On iGPU platforms, the KV cache is allocated from system RAM. Set export CACHE_SIZE=2
before running setup_models.sh to reduce KV cache to 2 GB (default is 4 GB).
See ovms-service/README.md — Tuning the KV Cache Size for a full per-platform guide.
Choose Your Application#
Criteria |
Dine-In Order Accuracy |
Take-Away Order Accuracy |
|---|---|---|
Purpose |
Validate food plates at serving stations before delivery to tables |
Real-time order validation for drive-through and counter service |
Use When |
You need image-based validation for restaurant table service |
You need continuous video stream validation at multiple stations |
Input |
Static images of food trays/plates |
RTSP video streams |
Features |
Gradio web interface, REST API for POS integration |
Multi-station parallel processing, VLM request batching |
What You Will See When Working#
Dine-In Results |
Take-Away Results |
|
|---|---|---|
Visual |
Gradio UI displays detected items with confidence scores |
Real-time frame processing with item detection |
Validation |
Order match/mismatch status with detailed comparison |
Continuous order validation against POS data |
Logging |
Detection results and semantic matching scores |
Frames and results stored in MinIO buckets |
Expected Performance#
Startup Time: 2-5 minutes (first run includes model loading)
Processing: Sub-15-second validation latency (Dine-In), real-time stream processing (Take-Away)
Results: JSON files appear in
results/directory
Step-by-Step Instructions#
Clone the Repository
git clone -b main --single-branch https://github.com/intel-retail/order-accuracy.git cd order-accuracy/dine-in
Configure the Environment
# 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
Setup OVMS Models (First Time Only)
The setup script reads model configuration (device, precision, model name) from
dine-in/.env(created in Step 2), so complete Step 2 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
This downloads MiniCPM-V-4.5 and converts it to OpenVINO™ INT4 format. This is only needed once — the model files are shared with Take-Away.
Prepare Test Data Before running the application, you must prepare your test data:
Add Images: Place your food tray images in the
images/folderSupported formats:
.jpg,.jpegor.pngImages should clearly show the food items on the tray
Update Orders: Edit
configs/orders.jsonwith your test ordersEach order should have an
items_orderedentry, each withitemandquantityimage_idshould match your image filenames in theimages/folder
Update Inventory: Edit
configs/inventory.jsonto match your menu itemsDefine all possible food items that can appear in orders
Include item names, categories, and any relevant metadata
Build and Start Services
# 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_app7861, 8083
Gradio UI + FastAPI
dinein_ovms_vlm8002
VLM model server (OVMS)
dinein_semantic_service8081, 9091
Semantic matching
metrics-collector9000
System metrics
Access the Application
Gradio UI:
http://localhost:7861REST API Docs:
http://localhost:8083/docs
Clone the Repository
git clone -b main --single-branch https://github.com/intel-retail/order-accuracy.git cd order-accuracy/take-away
Configure the Environment
# 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
Edit the generated
.envfile as needed. See Configuration in the dedicated Take-Away guide.Setup OVMS Models (First Time Only)
Set
TARGET_DEVICEin your.envbefore running this step. The script reads that value to export the model in the correct format for the target device.cd ../ovms-service ./setup_models.sh --app take-away # Downloads and exports model (~30-60 min first time) cd ../take-away
This downloads and exports:
MiniCPM-V-4_5 INT4 (OpenVINO™ format)
YOLOv11 model (INT8 OpenVINO™)
EasyOCR detection and recognition models
Note
Re-run this step any time you change
TARGET_DEVICEin.env.Build and Start Services
# Pull images from registry (default) make build make up # OR build locally from source make build REGISTRY=false make up
Access the Application
Gradio UI:
http://localhost:7860MinIO Console:
http://localhost:9001(minioadmin/minioadmin)
Verify the 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.
Health Check
make test-apiThis checks both the order accuracy API (
localhost:8000) and OVMS (localhost:8001).Service URLs
Service
URL
Order Accuracy API
http://localhost:8000OVMS VLM
http://localhost:8001Gradio UI
http://localhost:7860MinIO Console
http://localhost:9001Semantic Service
http://localhost:8080Service Status
make status
First Order Validation#
Via Gradio UI#
Open
http://localhost:7861Select a scenario from the dropdown
Review the order manifest
Click “Validate Plate”
View accuracy score, matched/missing/extra items, and performance metrics
Open
http://localhost:7860Upload a test video or enter an RTSP URL
Click “Upload and Start Processing”
View results showing matched, missing, and extra items
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
# Upload video and validate
curl -X POST http://localhost:8000/upload-video \
-F "file=@storage/videos/test.mp4" \
-F "video_id=test_001"
# Check results
curl http://localhost:8000/results/test_001
Via Make Target#
# Services must be running first
make benchmark-single IMAGE_ID=MCD-1001
Note
Prerequisite: Ensure storage/videos/test.mp4 exists. Run make download-sample-video if needed.
make benchmark
Stop the Services#
# Stop all services
make down
# Stop and remove volumes (clean restart)
make clean
Quick Start Reference#
Configuration |
Command |
Description |
|---|---|---|
Start Services |
|
Start all Dine-In services |
Build Locally |
|
Build images from source |
View Logs |
|
View service logs |
Stop Services |
|
Stop all services |
Configuration |
Command |
Description |
|---|---|---|
Single Mode |
|
Start in single worker mode (development) |
Parallel Mode |
|
Start with 4 parallel workers (production) |
Build Locally |
|
Build images from source |
View Logs |
|
View service logs |
Note
Single Mode is best for development and testing. Parallel Mode is recommended for production with multiple camera stations.
Advanced Settings#
See the Advanced Settings guide for detailed configuration options, including environment variables, service modes, and troubleshooting tips.