How surajkrawat/fall-detection-yolo26-pose works
This repository is a video-based human activity and fall-detection application. Its main workflow takes a video through pose inference, per-person tracking, activity classification, and temporal fall-state detection, then produces annotated video and fall-event logs. It also documents a model-training and annotation workflow, including a CVAT-to-YOLO-pose converter. The runtime orchestration is only partially excerpted; edges use the shown source references and README-described behavior, and unsampled implementation details are not inferred.
Main entry points: fall_detection.py Inference CLI · pose_detector.py Pose detection · visualization.py Frame visualization · coco_keypoints_to_yolo_pose.py Pose label converter
Components 15
Video inference
- Inference CLI
fall_detection.py - Pose detection
src/pose_detector.py
Person and state analysis
- Person tracking
src/tracker.py - Activity classification
src/activity_classifier.py - Fall state machine
src/fall_detector.py
Results and events
- Frame visualization
src/visualization.py - Annotated video
- Fall event logging
fall_detection.py - CSV and JSON events
Model preparation
- Annotation workflow
docs/ANNOTATION_GUIDE.md - Pose label converter
tools/coco_keypoints_to_yolo_pose.py - Model training
docs/TRAINING_GUIDE.md
Other components
- Input video
- YOLO pose model
- Trained pose model
Connections 14
- Input video → Inference CLI: provides frames
README.md - Inference CLI → Pose detection: runs inference
fall_detection.py - Pose detection → YOLO pose model: invokes model
src/pose_detector.py - Trained pose model → Pose detection: loads weights
src/pose_detector.py - Inference CLI → Person tracking: updates tracks
fall_detection.py - Inference CLI → Activity classification: classifies tracks
fall_detection.py - Inference CLI → Fall state machine: checks fall state
fall_detection.py - Inference CLI → Frame visualization: draws frames
README.md - Frame visualization → Annotated video: renders output
README.md - Inference CLI → Fall event logging: records events
fall_detection.py - Fall event logging → CSV and JSON events: writes logs
fall_detection.py - Annotation workflow → Pose label converter: documents conversion
tools/coco_keypoints_to_yolo_pose.py - Pose label converter → Model training: prepares labels
tools/coco_keypoints_to_yolo_pose.py - Model training → Trained pose model: trains model
README.md