Real-time 3D pose estimation system for MMA strike analysis. Currently focused on Jab and Cross biomechanical analysis using MediaPipe Pose for 3D keypoint extraction.
- MediaPipe Pose for accurate 3D landmark detection
- 12 relevant joint extraction (shoulders, elbows, wrists, hips, knees)
- Real-time Strike Detection (Jab vs Cross)
- Audio Feedback (High/Low beeps)
- CSV export for offline analysis
- 30+ FPS performance on CPU
- Skeleton overlay visualization
- Auto-named recording files
- Resizable window with Fullscreen toggle
- Python 3.11
- Webcam
- Navigate to pose estimation directory:
cd pose_estimation- Install dependencies:
pip install -r requirements.txtDependencies:
- mediapipe
- opencv-python
- numpy
cd pose_estimation
python pose_demo.py- R: Start/Stop recording
- S: Toggle Strike Detection (ON/OFF)
- F: Toggle Fullscreen
- Q: Quit application
- Launch pose_demo.py
- Position yourself in frame (skeleton should appear)
- Press S to enable strike detection (optional)
- Press R to start recording
- Perform strikes (jabs, crosses)
- Press R to stop recording
- Files automatically saved to data/recordings/
Location: data/recordings/videos/
Format: pose_YYYYMMDD_HHMMSS.mp4
- Annotated video with skeleton overlay
- 30 FPS
Location: data/recordings/keypoints/
Format: pose_YYYYMMDD_HHMMSS.csv
CSV Structure:
timestamp,frame,joint,x,y,z,visibility
0.033,1,L_Shoulder,0.45,-0.12,0.85,0.99
0.033,1,R_Shoulder,0.55,-0.10,0.82,0.99Columns:
- timestamp: Seconds since recording start
- frame: Frame number
- joint: Joint name (L_Shoulder, R_Elbow, etc.)
- x, y, z: 3D world coordinates (origin at hips)
- visibility: Landmark confidence (0-1)
12 relevant joints for Jab/Cross analysis:
| Joint | Biomechanical Relevance |
|---|---|
| L_Shoulder, R_Shoulder | Rotation, power generation |
| L_Elbow, R_Elbow | Extension angle |
| L_Wrist, R_Wrist | Fist trajectory, speed |
| L_Hip, R_Hip | Hip rotation, weight transfer |
| L_Knee, R_Knee | Stance stability |
| Nose | Head movement |
| Neck | Spine alignment |
StrikeSense/
├── pose_estimation/ # Current MVP
│ ├── pose_demo.py # Main application
│ ├── strike_detector.py # Strike logic & Stance detection
│ ├── audio_feedback.py # Audio feedback module
│ ├── keypoint_logger.py # CSV export module
│ └── requirements.txt # Dependencies
│
├── data/
│ └── recordings/
│ ├── videos/ # Annotated MP4 files
│ └── keypoints/ # CSV keypoint data
│
└── archive/ # Archived (SMPL & Metric experiments)
├── mediapipe_demo.py
├── metric_demo.py
└── smpl_demo.py
MediaPipe provides world coordinates with origin at hip center:
- X-axis: Right (positive) / Left (negative)
- Y-axis: Up (positive) / Down (negative)
- Z-axis: Forward (positive) / Backward (negative)
- Model: MediaPipe Pose (BlazePose GHUM)
- Complexity: 1 (balanced speed/accuracy)
- Landmarks: 33 total (12 exported)
- SMPL mesh integration was explored but removed for simplicity
- Current focus is on keypoint extraction for analytics
- MediaPipe chosen over YOLOv8/MMPose for 3D support
- MediaPipe pose extraction + keypoint CSV export
- Rule-based Jab/Cross detection
- ML strike classifier (Jab, Cross, Hook, Uppercut) — LSTM/1D CNN
- Biomechanical form scorer (per-limb quality scoring)
- LLM coaching feedback pipeline (API TBD)
- Text-to-speech output
- iPhone port via CoreML + MediaPipe iOS SDK
- MIT