Spaces:
Sleeping
Sleeping
# config.yaml | |
# ----------------------------------------------------------------------------- | |
# Main configuration file for the Drive Paddy application. | |
# ----------------------------------------------------------------------------- | |
# -- Detection Strategy -- | |
# Sets the active drowsiness detection method. | |
# Options: "geometric", "cnn_model", "hybrid" | |
detection_strategy: "geometric" | |
# -- Geometric Strategy Settings -- | |
# Parameters for the facial landmark-based detection methods. | |
geometric_settings: | |
downsize_factor: 0.5 | |
skip_frames: 1 | |
low_light_thresh: 60 | |
eye_ar_thresh: 0.24 # Increased: Catches squinting | |
eye_ar_consec_frames: 5 # Decreased: Faster eye closure detection | |
yawn_mar_thresh: 0.5 # Decreased: Catches smaller yawns | |
yawn_consec_frames: 5 # Decreased: Faster yawn detection | |
head_nod_thresh: 15.0 # Decreased: Catches smaller nods | |
head_look_away_thresh: 18.0 # Decreased: Catches smaller head turns | |
head_pose_consec_frames: 5 # Decreased: Faster head pose detection | |
indicator_weights: | |
eye_closure: 1 | |
yawning: 1 | |
head_nod: 1 | |
looking_away: 1 | |
drowsiness_levels: | |
slightly_drowsy_threshold: 1 # Unchanged, as it's the minimum | |
very_drowsy_threshold: 2 # Could be left at 2, or lowered to 1.5 if using fractional weights | |
# -- CNN Model Settings (Not used in 'geometric' mode) -- | |
cnn_model_settings: | |
model_path: "models/best_model_efficientnet_b7.pth" | |
confidence_thresh: 0.8 | |
# -- Hybrid Strategy Settings (Not used in 'geometric' mode) -- | |
hybrid_settings: | |
alert_threshold: 1.0 | |
# CORRECTED: Each weight is now on its own line. | |
weights: | |
eye_closure: 0.45 | |
yawning: 0.30 | |
head_nod: 0.55 | |
looking_away: 0.25 | |
cnn_prediction: 0.60 | |
# -- Alerting System -- | |
alerting: | |
alert_sound_path: "assets/alert.wav" | |
alert_cooldown_seconds: 5 # Increased cooldown to prevent alert fatigue | |
# -- Gemini API (Optional) -- | |
gemini_api: | |
enabled: true | |