Spaces:
Running
Running
Update README.md (#1)
Browse files- Update README.md (5b156916d70693d8768bc9d733beacb20a416f13)
Co-authored-by: Munirah <munals@users.noreply.huggingface.co>
README.md
CHANGED
|
@@ -99,7 +99,7 @@ The pipeline runs five agents in order each frame. Each agent is implemented in
|
|
| 99 |
|
| 100 |
### 4.2 RiskAgent (`risk_agent.py`)
|
| 101 |
|
| 102 |
-
- **Role:** Maintain a sliding window (
|
| 103 |
- **Design pattern:** Sliding window + multi-path weighted scoring. Window size, thresholds, and weights are in `config.py`.
|
| 104 |
- **Input:** `FrameResult`. **Output:** `RiskResult` (frame_id, risk_score, risk_level, trend, level_changed, window_avg, window_max, density_ema, density_pct).
|
| 105 |
|
|
|
|
| 99 |
|
| 100 |
### 4.2 RiskAgent (`risk_agent.py`)
|
| 101 |
|
| 102 |
+
- **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).
|
| 103 |
- **Design pattern:** Sliding window + multi-path weighted scoring. Window size, thresholds, and weights are in `config.py`.
|
| 104 |
- **Input:** `FrameResult`. **Output:** `RiskResult` (frame_id, risk_score, risk_level, trend, level_changed, window_avg, window_max, density_ema, density_pct).
|
| 105 |
|