Skeleton Fall Detection — Analysis and Retraining
Two existing skeleton-sequence classifiers from 0dina/Live-Fall-Detection-GCN, packaged with an architecture audit, weight diagnostics, reproducible input definitions and numerical export checks. Original checkpoints are preserved. A separate improved model has now been retrained and evaluated on real Le2i videos; see the fresh results below.
Original project attribution: Sejik Park, Seoyoung Choi, Nahyun Park.
Source snapshot: 1dc9d998b415.
Interactive model analysis and local-in-browser inference
Fresh retraining — 2026-11-30
We recovered the Le2i video data, trained new models, and compared every checkpoint on the same 319 test clips.
The two original checkpoints are preserved. The selected new model is available separately in retrained/.
Of 130 downloaded videos, three lacked complete event annotations. The remaining 127 were split into 62 training, 15 validation, and 50 test videos.
Test recording sessions were held out from new training and validation. No synthetic inputs were used for training or test metrics.
| Model | F1 | Fall recall | False-positive rate | False positives | Missed falls |
|---|---|---|---|---|---|
| Original baseline | 0.819 | 91.2% | 6.9% | 18/262 | 5/57 |
| Original enhanced | 0.462 | 73.7% | 31.7% | 83/262 | 15/57 |
| Retrained original architecture | 0.862 | 82.5% | 1.9% | 5/262 | 10/57 |
| Retrained improved model | 0.846 | 77.2% | 1.1% | 3/262 | 13/57 |
Models and thresholds were selected using validation data only. The original checkpoints may have seen the test videos during their historical training. Subject IDs are unavailable, so the split cannot be certified as subject-disjoint. These metrics describe selected 30-frame clips. They do not measure false alarms per hour or deployment performance.
Common threshold 0.5 (predefined secondary comparison)
| Model | F1 | Fall recall | False-positive rate |
|---|---|---|---|
| Original baseline | 0.822 | 77.2% | 2.3% |
| Original enhanced | 0.667 | 57.9% | 3.4% |
| Retrained original architecture | 0.758 | 63.2% | 0.8% |
| Retrained improved model | 0.919 | 89.5% | 1.1% |
Threshold transfer remains unresolved. The new model misses 13 falls at its validation-selected threshold, compared with six at the predefined threshold of 0.5. With validation-selected thresholds, the retrained original architecture has a slightly higher F1 than the new model. The new architecture does not win at every operating point. Weights, selection rules, and thresholds were not adjusted after inspecting test results. Choosing an operational threshold requires independent validation data with normal activities from new environments.
New model: 200,450 parameters; six graph/temporal stages, half-width channels, GroupNorm, dropout 0.15, clip-wise torso scale normalization with actual image aspect ratio, and x-reflection logit averaging. It was trained from random initialization with three seeds; the old-architecture retraining control used one seed. No post-hoc score clamping or synthetic-data fitting was used.
Full results, confidence intervals and seed comparison · Frozen protocol · Reproduce

Run the retrained model
import torch
from safetensors.torch import load_file
from retraining.improved_model import ImprovedSTGCN
model = ImprovedSTGCN().eval()
model.load_state_dict(load_file("retrained/model.safetensors"))
# skeleton: float32 [B, 3, 30, 18], original hip-centered image coordinates.
# Supply actual source width/height; do NOT externally torso-normalize again.
aspect = torch.full((skeleton.shape[0], 1, 1, 1), image_width / image_height)
with torch.inference_mode():
scores = model(skeleton, aspect).softmax(1)
retrained/model.onnx takes two inputs: skeleton and aspect_ratio (float32 [B,1,1,1]).
Use the validation-selected threshold in retrained/config.json. Softmax scores are not calibrated probabilities.
Export parity was checked on all 319 real test clips; export and perturbation checks.
Data provider metadata lists CC BY-NC-SA 3.0; original project code/model terms remain unspecified. Raw videos and pose caches are not published.
Original checkpoints: what the weights and code implement
- Baseline: the source class is called
STGCN, but itsgraph_edgesmember is never used inforward. Four convolutions with joint-axis kernel width 1 process each joint independently until the final fully connected layer. It is therefore described here as a temporal CNN, not an adjacency-based graph network. - Enhanced: six blocks mix joints using the fixed normalized adjacency matrix, then apply temporal convolution, batch normalization, a projected residual connection, ReLU and dropout (0.5 during training). Blocks 3 and 5 downsample time; temporal lengths are 30 → 30 → 15 → 15 → 8 → 8.
- Both average over time while retaining the 18 joint positions and return two logits. Temporal receptive fields above describe the deepest convolutional path before global temporal pooling; the final classifier receives pooled features from the full clip.
- The enhanced checkpoint does not serialize its adjacency matrix. This package reconstructs it from the source edge list, registers it as a nonpersistent device-aware buffer, and verifies outputs against the original definition.
| Baseline | Enhanced |
|---|---|
Measured checkpoint properties
| Measured property | Baseline temporal CNN | Enhanced ST-GCN |
|---|---|---|
| Trainable parameters | 75,586 | 785,922 |
| Safetensors size | 300.4 KiB | 3092.2 KiB |
| ONNX size | 293.9 KiB | 3072.8 KiB |
| Adjacency-based graph mixing | No | Yes, 6 blocks |
| Temporal receptive field before pooling | 5 frames | 23 frames |
| Conv/linear MACs per clip | 37,709,568 | 148,999,680 |
| Additional adjacency-mixing MACs | 0 | 3,181,032 |
| CPU inference median / p95 | 2.80 / 4.13 ms | 11.34 / 14.34 ms |
| Max logit error vs original Python class | 0.0e+00 | 0.0e+00 |
| Max logit error, PyTorch vs ONNX | 3.81e-06 | 7.63e-06 |
Latency was measured on this Windows CPU environment with one PyTorch thread, batch 1, 20 warmups and 100 timed runs.
It excludes pose extraction, video decoding and browser overhead. It is not a hardware-independent speed claim.
Environment: Python 3.12.10, PyTorch 2.15.0+cpu,
ONNX Runtime 1.32.0; processor identifier: Intel64 Family 6 Model 186 Stepping 3, GenuineIntel.
MAC counts cover convolutions, the classifier and separately adjacency matrix multiplication; they exclude normalization,
activation, pooling, memory operations and pose extraction. One MAC is counted as one multiply-accumulate.
Original checkpoint input and preprocessing contract
Input: float32 [B, 3, 30, 18], ordered as batch, coordinate (x,y,z), time and joint.
These models accept skeleton coordinates, not raw image/video pixels.
- Obtain MediaPipe image-normalized pose landmarks (not world coordinates).
- Define the hip reference as
(left_hip + right_hip) / 2and the neck as the shoulder midpoint. - Subtract the hip reference from all 18 joints, including the neck. Keep the source x/y/z units; do not add scale normalization.
- Select 30 consecutive frames. The original clip generation preserves source FPS, so 30 frames is not always one second.
- Missing landmarks or frames are zero-filled by the training loader. The demo separately checks coverage and can abstain.
- Apply softmax only after inference: index 0 = no_fall, index 1 = fall. The score is not calibrated as the real-world probability of a fall.
Joint order:
Nose, Neck, Right Shoulder, Right Elbow, Right Wrist, Left Shoulder, Left Elbow, Left Wrist, Right Hip, Right Knee, Right Ankle, Left Hip, Left Knee, Left Ankle, Right Eye, Left Eye, Right Ear, Left Ear
Optional accuracy or visibility columns (0–1) are used for coverage; a value below 0.5 marks a joint as poorly observed. input_diagnostics() checks the hip and neck coordinate identities without silently changing the data. load_training_clip() preserves frame IDs when preparing future training clips.
The CSV format is frame,landmark,x,y,z, with zero-based frame numbers and the exact joint names above.
preprocessing.py validates this format. Synthetic rotation CSV
is generated solely for interface and numerical testing; it is not a real person or a labeled fall example.
Historical training evidence — not a fresh benchmark
| Recorded notebook output | Baseline | Enhanced |
|---|---|---|
| Printed test accuracy | 97.37% | 74.07% |
| Training epochs | 20 | 10 |
| Batch size | 16 | 16 |
| Optimizer / learning rate | Adam / 0.001 | Adam / 0.001 |
| Loss | Cross entropy | Cross entropy |
Sources: baseline training notebook, enhanced training notebook. The printed accuracies are retained as historical evidence, not attributed as independently verified scores for these exact files. No split manifest, held-out prediction table or raw dataset is included in the source snapshot. This table does not establish that either architecture generalizes better.

The baseline log decreases to 0.0461 mean batch loss over 20 epochs; the enhanced log ends at 0.5742 after 10 epochs. Different epoch counts, potentially different prepared samples and different CSV loaders prevent a controlled comparison. The enhanced loader derives frame count from row count, so missing detections can truncate later frame indices; the baseline explicitly reads frame IDs 0 through 29. This is an additional reproduction caveat.
Evaluation and deployment limits
- The source uses
train_test_split(..., test_size=0.2, random_state=42)on clips, with no subject/video grouping or stratification. - Fall and nonfall clips can be extracted from the same original video. A clip split can therefore place related clips on both sides. This is a leakage risk from the code design, not proof that specific leaked clips were present.
- Nonfall clip sampling uses unseeded Python
random; CSV enumeration is not sorted. The exact historical split is not reproducible from the seed alone. - The historical notebooks report accuracy without sufficient missed-fall or false-alarm evidence. Fresh precision, recall, F1, confusion matrices and source-session-held-out results are provided above; operational calibration and real deployment validation remain unresolved.
- The web demo's MediaPipe Tasks front end is not the exact original Python MediaPipe Solutions runtime; coordinate extraction parity has not been established. Model parity checks start at the skeleton tensor.
- Intended for model inspection and research demonstrations. It is not a validated medical or emergency alert system. The demo sends no alerts and treats insufficient pose coverage as an unavailable result.
Weight diagnostics
All serialized tensors are finite; all BatchNorm running variances are nonnegative. The safetensors exports preserve every serialized tensor exactly, including integer BatchNorm counters. Five synthetic probe batches verify the portable definitions and ONNX exports; these checks do not measure fall-detection accuracy.
Follow-up: high scores on upright-shaped inputs
The original synthetic fixture was not a valid normal-person reference. Its height was 118% of the image, its neck differed from the shoulder midpoint, and its first window already contained some rotation. The example generator and demo input checks have been corrected. The old file is retained for reproduction.
The enhanced checkpoint still shows strong size and orientation sensitivity: a corrected static planar pose scores
29.03% at 60% image height, 90.43% at 80%, and 3.69% when that 80% pose is reflected in x.
These are raw class scores on synthetic coordinates, not real-video error rates. This earlier diagnostic preserved the original weights; the separate retrained model is documented above.
Read the controlled investigation, layer trace and fixes, or reproduce it with python diagnose.py.

Historical synthetic behavior probes
The recorded probes also show why a confident softmax score should not be treated as validated performance:
| Hand-constructed input | Baseline fall score | Enhanced fall score |
|---|---|---|
| All-zero coordinates | 0.121913 | 0.072137 |
| Legacy partly rotating oversized coordinates | 0.000000114 | 0.999814 |
| Rotated synthetic coordinates | 0.999999762 | 1.000000 |
These are out-of-distribution diagnostics without real-video ground truth, not accuracy tests.
The strong disagreement on a synthetic pose is documented rather than interpreted as a verified success or failure on people.
Exact historical values and export errors are available in numerical_checks.csv; they use examples/legacy_synthetic_rotation.csv. The corrected examples are separate diagnostics, not evidence that the model is fixed.


The second plot measures L2 magnitude of final classifier weights grouped by joint. It is a parameter diagnostic, not causal importance, saliency or evidence that the model relies on a particular body part.

Run the models
Download this repository, install requirements.txt, and run from the repository directory:
import torch
from modeling_fall import load_model
from preprocessing import read_skeleton_csv, model_input
sequence, observed = read_skeleton_csv("examples/synthetic_rotation.csv")
model = load_model("baseline") # or "enhanced"
with torch.inference_mode():
logits = model(torch.from_numpy(model_input(sequence[:30])))
print(logits.softmax(dim=1)) # [no_fall score, fall score]
For ONNX use baseline/model.onnx or enhanced/model.onnx, input name skeleton, output name logits.
Batch size is dynamic; channels, time and joints are fixed to 3 × 30 × 18. ONNX opset is 17.
Files and reproducibility
baseline/,enhanced/: configs, safetensors and ONNX exports.modeling_fall.py,preprocessing.py: portable model definitions and input validation.analysis.json: measured properties, environment and source provenance.tensor_statistics.csv: shape, dtype, mean, standard deviation, range and zero fraction for every tensor.layer_shapes.csv: actual forward-pass shapes and operation estimates.numerical_checks.csv: original-class and ONNX output differences on synthetic probes.source.json: original checkpoint URLs, Git blob identifiers and SHA256 hashes.verify.py: rerun artifact hash, original-definition and ONNX parity checks withpython verify.py.audit/: archived notebook source definitions and the measured environment.
For the verification script, install requirements-analysis.txt. The historical training notebooks are archived as source;
verification parses only the model definitions and does not execute their training loops.
No original training videos or source dataset are redistributed. The original README refers to the Le2i/IMVIA fall dataset mirror. The source project has no selected code/model license in the inspected snapshot, so this package does not assign a new license or imply unrestricted reuse. Original attribution is retained; dataset and dependency terms remain separate.
Summary
The original baseline is a 75,586-parameter temporal CNN; the original enhanced model is a 785,922-parameter ST-GCN. Despite its source name, the baseline does not use joint adjacency in its forward pass. The original weights were preserved and audited. A separate improved model was trained from scratch on real Le2i videos. The historical notebook accuracies of 97.37% and 74.07% are not fresh evaluation results. The fresh evaluation above separates source videos and recording sessions and reports missed falls and false positives. Subject-disjoint and deployment performance remain unverified.