/ Модель

Характеристики

Библиотека
pytorch
Опубликована
30 ноя 2026

fall-detection-skeleton

Классификация видеоВидео → label
0скачиваний за 30 дней0лайковвеса обновлены30 ноя 2026

Описание модели

Составлено на русском по карточке модели и метаданным Hugging Face

Модель классифицирует последовательности скелетных поз в видеоклипах для обнаружения падений и предназначена для анализа и исследовательских демонстраций.

В репозитории представлены классификаторы последовательностей поз для обнаружения падений, разработанные на основе проекта Sejik Park, Seoyoung Choi и Nahyun Park. В комплект входят две сохранённые исходные модели и отдельная модель, переобученная с нуля на видеозаписях Le2i. Новая модель содержит 200 450 параметров и использует шесть графовых и временных этапов, GroupNorm, dropout, нормализацию масштаба туловища и усреднение результатов для исходного и отражённого по горизонтали скелета.

Модель принимает последовательности скелетных поз и классифицирует видеоклипы на предмет падения. Она предназначена для анализа и исследовательских демонстраций; новая версия экспортирована в ONNX и получает скелет и aspect ratio как два входа. В README для переобученной архитектуры указаны F1 0,862 и частота ложных срабатываний 1,9% на 319 тестовых клипах, однако результаты зависят от выбранного порога и не подтверждают готовность к эксплуатации.

Валидация на новых средах и разделение по людям не подтверждены, а исходные чекпойнты могли ранее обучаться на тестовых видео. Модель не является проверенной медицинской или аварийной системой оповещения. Для данных указан CC BY-NC-SA 3.0; условия лицензии исходного кода и весов не определены.

Сценарии применения

  • обнаружение падений на видеоклипах по скелетным позам
  • сравнение классификаторов падений на наборах видеозаписей
  • исследовательская оценка распознавания действий по последовательностям поз

Ограничения

Метрики рассчитаны на выбранных 30-кадровых клипах и не показывают частоту ложных тревог в час или качество работы в реальных условиях; порог требует независимой валидации. Разделение по людям и эквивалентность извлечения поз в веб-демо не подтверждены, поэтому модель не валидирована для медицинских или аварийных оповещений.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

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.

ModelF1Fall recallFalse-positive rateFalse positivesMissed falls
Original baseline0.81991.2%6.9%18/2625/57
Original enhanced0.46273.7%31.7%83/26215/57
Retrained original architecture0.86282.5%1.9%5/26210/57
Retrained improved model0.84677.2%1.1%3/26213/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)

ModelF1Fall recallFalse-positive rate
Original baseline0.82277.2%2.3%
Original enhanced0.66757.9%3.4%
Retrained original architecture0.75863.2%0.8%
Retrained improved model0.91989.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

Fresh common-set comparison

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 its graph_edges member is never used in forward. 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.
BaselineEnhanced
Baseline architectureEnhanced architecture

Measured checkpoint properties

Measured propertyBaseline temporal CNNEnhanced ST-GCN
Trainable parameters75,586785,922
Safetensors size300.4 KiB3092.2 KiB
ONNX size293.9 KiB3072.8 KiB
Adjacency-based graph mixingNoYes, 6 blocks
Temporal receptive field before pooling5 frames23 frames
Conv/linear MACs per clip37,709,568148,999,680
Additional adjacency-mixing MACs03,181,032
CPU inference median / p952.80 / 4.13 ms11.34 / 14.34 ms
Max logit error vs original Python class0.0e+000.0e+00
Max logit error, PyTorch vs ONNX3.81e-067.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.

  1. Obtain MediaPipe image-normalized pose landmarks (not world coordinates).
  2. Define the hip reference as (left_hip + right_hip) / 2 and the neck as the shoulder midpoint.
  3. Subtract the hip reference from all 18 joints, including the neck. Keep the source x/y/z units; do not add scale normalization.
  4. Select 30 consecutive frames. The original clip generation preserves source FPS, so 30 frames is not always one second.
  5. Missing landmarks or frames are zero-filled by the training loader. The demo separately checks coverage and can abstain.
  6. 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 outputBaselineEnhanced
Printed test accuracy97.37%74.07%
Training epochs2010
Batch size1616
Optimizer / learning rateAdam / 0.001Adam / 0.001
LossCross entropyCross 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.

Recorded training loss

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.

Synthetic size and orientation sensitivity

Historical synthetic behavior probes

The recorded probes also show why a confident softmax score should not be treated as validated performance:

Hand-constructed inputBaseline fall scoreEnhanced fall score
All-zero coordinates0.1219130.072137
Legacy partly rotating oversized coordinates0.0000001140.999814
Rotated synthetic coordinates0.9999997621.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.

Learned weight distributions

Classifier weights by joint

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.

Normalized graph adjacency

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 with python 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.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · pytorch · video-classification

Можно запустить

Подбираем GPU…

Ревизия весов
24600dc

0 моделей