--- title: Aegis-Safe-Work Fall Detector colorFrom: yellow colorTo: red app_file: app.py pinned: false license: cc-by-nc-nd-4.0 language: - en pipeline_tag: video-classification --- # 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 | ## License CC BY-NC-ND 4.0 (Attribution - NonCommercial - NoDerivatives). See https://creativecommons.org/licenses/by-nc-nd/4.0/