How arsh720/athena works
This is an offline, single-video running-gait analysis service. A user uploads a side-on video through the API; the pipeline extracts frames and pose landmarks, conditions signals and builds features, detects gait events, maps them to ALTIS phases, then computes and aggregates biomechanics metrics for a structured JSON response. The geometric detector is the documented default; ML detection is an optional, checkpoint-dependent alternative. Edges reflect the README and SOURCE INDEX references; unsampled implementation details are not inferred.
Main entry points: pipeline.py Pipeline orchestrator · builder.py Feature builder · main.py Analysis API · detector.py Detector dispatch
Components 19
API interface
- Analysis API
api/main.py - Response schemas
api/schemas.py
Analysis orchestration
- Pipeline orchestrator
pipeline.py - Pipeline configuration
config.py - Video ingestion
ingestion/video_loader.py
Pose and features
- Pose extraction
pose/extractor.py - Landmark data
pose/landmarks.py - Confidence handling
signal_processing/confidence.py - Temporal filters
signal_processing/filters.py - Feature builder
features/builder.py - Joint angles
features/angles.py - Kinematics
features/kinematics.py
Gait events
- Detector dispatch
gait_events/detector.py - Geometric detector
gait_events/geometric_detector.py - ML detector
gait_events/ml_detector.py
Phases and metrics
- ALTIS phase mapping
metrics/phase_mapper.py - Stride metrics
metrics/calculator.py - Metric aggregation
metrics/aggregator.py
Other components
- Video uploader
Connections 19
- Video uploader → Analysis API: uploads video
README.md - Analysis API → Pipeline orchestrator: runs analysis
api/main.py - Analysis API → Response schemas: validates response
api/main.py - Pipeline orchestrator → Pipeline configuration: loads settings
pipeline.py - Pipeline orchestrator → Video ingestion: extracts frames
pipeline.py - Pipeline orchestrator → Pose extraction: processes frames
pipeline.py - Pose extraction → Landmark data: builds records
pose/extractor.py - Pipeline orchestrator → Feature builder: builds features
pipeline.py - Feature builder → Confidence handling: handles confidence
features/builder.py - Feature builder → Temporal filters: smooths signals
features/builder.py - Feature builder → Joint angles: computes angles
features/builder.py - Feature builder → Kinematics: computes kinematics
features/builder.py - Pipeline orchestrator → Detector dispatch: dispatches detection
pipeline.py - Detector dispatch → Geometric detector: selects detector
gait_events/detector.py - Detector dispatch → ML detector: selects detector
gait_events/detector.py - Pipeline orchestrator → ALTIS phase mapping: maps events
pipeline.py - Pipeline orchestrator → Stride metrics: computes strides
pipeline.py - Stride metrics → ALTIS phase mapping: uses phase timing
metrics/calculator.py - Pipeline orchestrator → Metric aggregation: aggregates metrics
pipeline.py