Spaces:
Running
Running
Update README.md
#1
by
munals - opened
README.md
CHANGED
|
@@ -89,7 +89,7 @@ The pipeline runs five agents in order each frame. Each agent is implemented in
|
|
| 89 |
|
| 90 |
### 4.2 RiskAgent (`risk_agent.py`)
|
| 91 |
|
| 92 |
-
- **Role:** Maintain a sliding window (
|
| 93 |
- **Design pattern:** Sliding window + multi-path weighted scoring. Window size, thresholds, and weights are in `config.py`.
|
| 94 |
- **Input:** `FrameResult`. **Output:** `RiskResult` (frame_id, risk_score, risk_level, trend, level_changed, window_avg, window_max, density_ema, density_pct).
|
| 95 |
|
|
|
|
| 89 |
|
| 90 |
### 4.2 RiskAgent (`risk_agent.py`)
|
| 91 |
|
| 92 |
+
- **Role:** Maintain a sliding window (14 frames) of recent `FrameResult`s and compute a scalar risk score in [0, 1] and a discrete risk level (LOW / MEDIUM / HIGH), plus trend (rising / stable / falling). Final score is the maximum of four paths: (1) Fruin smooth β EMA of current person count normalized to `RISK_HIGH_COUNT` (50), with spacing and trend weights; (2) instant floor β if current count β₯ HIGH_COUNT, score floor 0.70; (3) pre-emptive ROC β 5-frame growth and EMA thresholds; (4) spatial clustering β if any 3Γ3 grid cell has β₯ `GRID_CELL_HIGH` persons (from FrameResult), floor 0.70. Score is clamped to [0, 1] (GR3).
|
| 93 |
- **Design pattern:** Sliding window + multi-path weighted scoring. Window size, thresholds, and weights are in `config.py`.
|
| 94 |
- **Input:** `FrameResult`. **Output:** `RiskResult` (frame_id, risk_score, risk_level, trend, level_changed, window_avg, window_max, density_ema, density_pct).
|
| 95 |
|