An end-to-end human action recognition pipeline that uses MediaPipe and YOLOv8 for keypoint extraction, and an LSTM model for temporal classification on the Penn Action Dataset.
- Dual Extraction: Supports keypoint extraction via MediaPipe and YOLOv8-pose.
- Temporal Smoothing: Implements Savitzky-Golay filtering to reduce jitter in pose sequences.
- PoseLSTM Model: A PyTorch-based LSTM architecture optimized with packed sequences for variable-length video data.
- Robust Training Loop: Features gradient norm clipping, early stopping, and an adaptive learning rate to ensure stable convergence.
- Visualization: Tools for overlaying predicted skeletons and exporting results as MP4.
- Validation Accuracy: ~96% with MediaPipe, ~98% with YOLOv8.
- High precision across sports and gym actions, including baseball, tennis, and weightlifting.
- Download the Penn Action Dataset.
- Run
yolo_extractor.pyormediapipe_extractor.pyto generate.npyfeatures. - Run
train.pyto train the model. - Use
visualize.pyto view results.