AI-powered rowing technique analysis with real-time pose detection and force synchronization
This system provides comprehensive biomechanical analysis of rowing technique by combining:
- 🎥 Video capture with embedded timestamps
- 💪 PM5 force data capture and synchronization
- 🤖 AI pose estimation using YOLO11 with advanced smoothing
- 📊 Synchronized overlay videos with animated force curves and body angles
- 📈 Comprehensive reports with force-angle correlations
- Real-time pose detection with smooth, stable skeleton overlay
- Perfect synchronization between video, force data, and body angles
- Professional visualization with color-coded joint angle badges
- Comprehensive analysis including stroke-by-stroke breakdowns
- Export capabilities for further analysis in Excel, R, Python, or MATLAB
- Overlay-accurate force curves in reports (default mapping reproduces PM5 overlay)
- High-fidelity PM5 persistence (
pm5_combined_strokes.jsonsaved into analysis output) - Per-stroke coaching metrics table embedded in comprehensive images
# Clone the repository
git clone https://github.com/yourusername/rowingIA.git
cd rowingIA
# Install dependencies
pip install -r requirements.txt
# Install FFmpeg (required for video processing)
# macOS: brew install ffmpeg
# Ubuntu: sudo apt install ffmpeg- Connect your Concept2 PM5 via USB and start a workout
- Capture data:
sudo python py3row_usb_video_capture.py - Row for 2-5 minutes then stop capture
- Analyze (auto-saves combined PM5 JSON; overlay mapping by default):
python create_complete_kinematics_overlay.py --session-dir py3rowcap_YYYYMMDD_HHMMSS
- (Optional) Generate comprehensive images with the metrics table and overlay-mapped force curve:
python comprehensive_stroke_analysis.py analysis_py3rowcap_YYYYMMDD_HHMMSS
- Review results in the generated overlay video, images, and report
- 🟢 Smoothed skeleton overlay - Stable, professional pose detection
- 🎯 Joint angle badges - Real-time elbow, knee, hip, and ankle angles
- 📈 Animated force curves - Shows force throughout each stroke
- ⏱️ Perfect synchronization - Video and force data perfectly aligned
- Stroke-by-stroke breakdown - Duration, peak force, power, stroke rate
- Body angle statistics - Mean, standard deviation, min, max, range
- Force-angle correlations - How body position relates to force output
- Coaching metrics per stroke - Finish, Catch, and Sequence metrics shown in tables on images and summarized in report
- Detailed CSV data - For further analysis in your preferred tools
- YOLO11 pose estimation - State-of-the-art pose detection
- Advanced smoothing algorithms - Eliminates jitter and bouncing
- Confidence-based filtering - Only uses high-quality detections
- Outlier rejection - Removes obviously incorrect poses
- Temporal smoothing - Averages keypoints over multiple frames
- Gaussian filtering - Reduces high-frequency noise
- Force curve analysis - Combines Drive + Dwelling phases
- Overlay mapping - Force curves in plots match the PM5 overlay exactly (drive-only, recovery zero)
- High-fidelity persistence - Saves
pm5_combined_strokes.jsonand copies raw PM5 CSV into analysis folder
rowingIA/
├── py3row_usb_video_capture.py # Main capture script
├── create_complete_kinematics_overlay.py # Main analysis script
├── requirements.txt # Python dependencies
├── SETUP.md # Complete setup guide
├── py3rowcap_YYYYMMDD_HHMMSS/ # Capture session directory
└── analysis_py3rowcap_YYYYMMDD_HHMMSS/ # Analysis output directory
Adjust pose smoothing for different stability/responsiveness:
# More stable (slower response)
PoseSmoother(window_size=7, confidence_threshold=0.6, outlier_threshold=2.5)
# More responsive (less stable)
PoseSmoother(window_size=3, confidence_threshold=0.4, outlier_threshold=1.5)Choose between different YOLO11 models:
- yolo11n-pose.pt - Nano (fastest, good accuracy)
- yolo11m-pose.pt - Medium (better accuracy, slower)
- yolo11l-pose.pt - Large (highest accuracy, slowest)
- Concept2 PM5 rowing machine
- Computer with USB port
- Camera (webcam or external camera)
- USB cable to connect PM5 to computer
- Python 3.8+
- FFmpeg for video processing
- See
requirements.txtfor Python dependencies
- No force data: Ensure PM5 is in workout mode, check USB connection
- Poor pose detection: Improve lighting, position camera for side view
- Permission denied: Run capture script with
sudofor USB access
- Faster processing: Use shorter video segments (2-5 minutes)
- Better accuracy: Ensure good lighting and camera positioning
- Stable results: Use consistent rowing pace
- Complete Setup Guide - Detailed installation and usage instructions
- Requirements - Python dependencies
- Analysis Examples - Sample output files
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Ultralytics for YOLO11 pose estimation models
- Concept2 for PM5 rowing machine communication
- OpenCV for computer vision capabilities
- Py3Row for PM5 data capture
Ready to analyze your rowing technique? 🚣♂️