Spaces:
Sleeping
Sleeping
File size: 1,763 Bytes
bb85a16 869c97c bb85a16 869c97c bb85a16 869c97c bb85a16 869c97c bb85a16 869c97c | 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 | ---
title: Aegis-Safe-Work Fall Detector
colorFrom: yellow
colorTo: red
sdk: gradio
sdk_version: 5.23.3
app_file: app.py
pinned: false
license: cc-by-nc-nd-4.0
---
# Aegis-Safe-Work: Fall Detector
Fall detection over short video clips using EfficientNet-Lite0 combined with
a temporal attention mechanism (Attention MLP) and a binary classifier. This
Space loads the trained checkpoint from
[`beaunix/aegis-fall-detector`](https://huggingface.co/beaunix/aegis-fall-detector)
and runs it on ZeroGPU.
## How it works
1. The uploaded video (max 45 seconds) is opened and 16 frames are sampled
uniformly across its full duration (not a sliding window).
2. Each frame is letterboxed (aspect-ratio preserved, black padding) to
224x224 and normalized with ImageNet statistics, matching the training
ETL exactly.
3. All 16 frames are processed in a single GPU forward pass: EfficientNet-Lite0
extracts per-frame features, temporal attention weights and pools them,
and the MLP classifier outputs a single fall probability for the clip.
4. The report shows the per-frame attention weights as a bar chart, the
frame with peak attention overlaid with the verdict, and a metrics
summary table.
## Model performance (validation set)
| Metric | Value |
|-----------|--------|
| Accuracy | 0.9762 |
| F1 | 0.9730 |
| Precision | 0.9574 |
| Recall | 0.9890 |
| Threshold | 0.65 |
## Notes
- Videos longer than 45 seconds are rejected to protect ZeroGPU quota.
- This Space demonstrates the fall classifier in isolation, independent of
the other Safe-Work models (PPE detection, fire/smoke detection).
## License
CC BY-NC-ND 4.0 (Attribution - NonCommercial - NoDerivatives).
See https://creativecommons.org/licenses/by-nc-nd/4.0/ |