File size: 2,065 Bytes
ae419ed | 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 54 55 56 57 58 59 | # DynaFall experiments
This repository implements the experiment plan in `PLAN.md` for skeleton-based fall detection.
## Structure
```text
data/raw/ Raw videos: data/raw/URFD and data/raw/MCFD
data/poses/ Extracted YOLO pose files
data/processed/ Video-level splits and 32-frame clips
configs/default.yaml Main experiment config
src/dynafall/ Dataset, features, models, training, evaluation
scripts/ Entry-point scripts
results/ Metrics, checkpoints, tables
```
## Quick smoke test
```bash
python scripts/make_synthetic_dataset.py --dataset Synthetic --videos 24
python scripts/prepare_clips.py --dataset Synthetic
python scripts/train.py --dataset Synthetic --method dynafall --epochs 2
python scripts/evaluate.py --dataset Synthetic --method dynafall
```
## Real data workflow
Place videos under:
```text
data/raw/URFD/fall/*.avi
data/raw/URFD/nonfall/*.avi
data/raw/MCFD/fall/*.avi
data/raw/MCFD/nonfall/*.avi
```
Any common video extension is accepted. Labels are inferred from the parent directory name:
`fall`, `falls`, `1`, `positive` map to fall; all other directory names map to non-fall.
Then run:
```bash
python scripts/extract_pose.py --dataset URFD
python scripts/prepare_clips.py --dataset URFD
python scripts/run_experiments.py --dataset URFD --methods lstm stgcn agcn ctrgcn posec3d tcnte dynafall
python scripts/robustness.py --dataset URFD --methods stgcn agcn ctrgcn posec3d tcnte dynafall
python scripts/aggregate_results.py
```
Repeat for `MCFD`. Cross-dataset evaluation:
```bash
python scripts/evaluate.py --dataset MCFD --method dynafall --checkpoint results/URFD/dynafall/best.pt --tag trainURFD_testMCFD
```
## Notes
The graph baselines are compact reimplementations designed for small fall datasets and a COCO-17 pose layout. They preserve the paper-level comparison categories: LSTM, ST-GCN-style graph temporal model, two-stream adaptive GCN, CTR-GCN-style channel topology refinement, PoseC3D-style heatmap volume, TCN+Transformer, and DynaFall-GCN.
|