Spaces:
Running on Zero
Running on Zero
| 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/ |