This report presents BicepTrainer, an innovative computer vision system that automates workout analysis through real-time pose detection and motion tracking. Using MediaPipe and OpenCV, our system provides accurate bicep curl counting, form analysis, and performance metrics, demonstrating practical applications of computer vision in fitness and healthcare domains.
The fitness industry has long sought automated solutions for tracking workout performance and ensuring proper form. Traditional methods rely heavily on manual observation or basic motion sensors, which often lack precision and real-time feedback capabilities. Computer vision, particularly pose detection, offers a promising solution to these limitations.
Using MediaPipe for pose detection, OpenCV for video processing, and Python for integration, this project exemplifies how AI can enhance fitness routines by combining technical sophistication with real-world utility.
The system tracks arm movement, measures joint angles, and counts repetitions—all while visualizing progress dynamically on-screen.
Maintaining proper form during workouts is crucial for preventing injuries and maximizing efficiency. Traditional methods rely heavily on human trainers, making them inaccessible to many. This project addresses this gap by delivering an automated, cost-effective, and scalable fitness solution using computer vision.
The BicepTrainer is structured into modular components, ensuring scalability, maintainability, and clarity. The primary modules include:
Pose Detection Module
Motion Analysis Engine Module
Curl Detection Logic Module
Visualization Module
Pose detection is achieved through MediaPipe’s pre-trained models, which deliver high-accuracy results even in low-light conditions. The detected pose landmarks are indexed for further computations:
left_elbow = landmarks[mp_pose.PoseLandmark.LEFT_ELBOW.value] left_shoulder = landmarks[mp_pose.PoseLandmark.LEFT_SHOULDER.value] left_wrist = landmarks[mp_pose.PoseLandmark.LEFT_WRIST.value]
The system employs trigonometric calculations for precise motion tracking by calculating the angle between three points:
def calculate_angle(a, b, c): a = np.array(a) # First point b = np.array(b) # Middle point c = np.array(c) # End point radians = np.arctan2(c[1]-b[1], c[0]-b[0]) - np.arctan2(a[1]-b[1], a[0]-b[0]) angle = np.abs(radians*180.0/np.pi) if angle > 180.0: angle = 360-angle return angle
The system detects a complete bicep curl by monitoring the angle trajectory:
The count is incremented when both phases are completed:
if angle > 160: stage = "down" elif angle < 30 and stage == "down": stage = "up" counter += 1
BicepCurlDetection/
├── data/ # Test videos and images
├── src/
│ ├── BicepCurlTrainer.py # Main application logic
│ ├── CurlCounter.py # Repetition counting logic
│ └── utils.py # Utility functions
└── requirements.txt # Dependencies
Fitness and Personal Training
Rehabilitation
Sports Analytics
This project democratizes access to fitness tools by providing a cost-effective and scalable solution that can be used at home, in gyms, or in rehabilitation centers.
Enhanced Form Feedback
Multi-Exercise Support
Integration with Wearables
git clone https://github.com/titoausten/bicep-curl-detection.git
cd bicep-curl-detection
pip install -r requirements.txt
python src/CurlCounter.py
When prompted, enter:
The Bicep Curl Detection System demonstrates the transformative potential of computer vision in fitness and rehabilitation. By automating workout tracking and ensuring accurate form, this project paves the way for smarter, more accessible fitness solutions. Its modular design and real-time capabilities make it a strong candidate for further development and deployment in various health and wellness domains.
GitHub: Bicep Curl Detection System
Video Implementation: LinkedIn post
There are no datasets linked
There are no datasets linked