File size: 1,518 Bytes
eb4abb8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# FocusGuard app and model config. Override with FOCUSGUARD_CONFIG env path if needed.

app:
  db_path: "focus_guard.db"
  inference_size: [640, 480]
  inference_workers: 4
  default_model: "mlp"
  calibration_verify_target: [0.5, 0.5]
  no_face_confidence_cap: 0.1

l2cs_boost:
  base_weight: 0.35
  l2cs_weight: 0.65
  veto_threshold: 0.38
  fused_threshold: 0.52

mlp:
  model_name: "face_orientation"
  epochs: 30
  batch_size: 32
  lr: 0.001
  seed: 42
  split_ratios: [0.7, 0.15, 0.15]
  hidden_sizes: [64, 32]

xgboost:
  n_estimators: 600
  max_depth: 8
  learning_rate: 0.1489
  subsample: 0.9625
  colsample_bytree: 0.9013
  reg_alpha: 1.1407
  reg_lambda: 2.4181
  eval_metric: "logloss"

data:
  split_ratios: [0.7, 0.15, 0.15]
  clip:
    yaw: [-45, 45]
    pitch: [-30, 30]
    roll: [-30, 30]
    ear: [0, 0.85]
    mar: [0, 1.0]
    gaze_offset: [0, 0.50]
    perclos: [0, 0.80]
    blink_rate: [0, 30.0]
    closure_duration: [0, 10.0]
    yawn_duration: [0, 10.0]

pipeline:
  geometric:
    max_angle: 22.0
    alpha: 0.7
    beta: 0.3
    threshold: 0.55
  smoother:
    alpha_up: 0.55
    alpha_down: 0.45
    grace_frames: 10
  hybrid_defaults:
    w_mlp: 0.3
    w_geo: 0.7
    threshold: 0.35
    geo_face_weight: 0.7
    geo_eye_weight: 0.3
  mlp_threshold: 0.23

evaluation:
  seed: 42
  mlp_sklearn:
    hidden_layer_sizes: [64, 32]
    max_iter: 200
    validation_fraction: 0.15
  geo_weights:
    face: 0.7
    eye: 0.3
  threshold_search:
    alphas: [0.2, 0.85]
    w_mlps: [0.3, 0.85]