fall / README.md
minhy112's picture
Upload project files excluding raw data folder
ae419ed verified
|
Raw
History Blame Contribute Delete
2.07 kB
# 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.