File size: 618 Bytes
7b53d75
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# ui/

Live OpenCV demo and inference pipelines used by the app.

**Files:** `pipeline.py` (FaceMesh, MLP, XGBoost, Hybrid pipelines), `live_demo.py` (webcam window with mesh + focus label).

**Pipelines:** FaceMesh = rule-based head/eye; MLP = 10 features → PyTorch MLP (checkpoints/mlp_best.pt + scaler); XGBoost = same 10 features → xgboost_face_orientation_best.json. Hybrid combines ML/XGB with geometric scores.

**Run demo:**

```bash
python ui/live_demo.py
python ui/live_demo.py --xgb
```

`m` = cycle mesh, `p` = switch pipeline, `q` = quit. Same pipelines back the FastAPI WebSocket video in `main.py`.