June 15, 2023

Counting Exercise Reps: MediaPipe in iOS with Swift

Image shows a fitness app user doing exercise with an app and their reps are automatically counted.

Counting exercise reps is foundational for any person’s journey in fitness. With the advances of AI tools such as as MediaPipe and QuickPose, You can now add fitness rep counters in your iOS apps natively in Swift easily. Accurately counting exercise repetition adds an engaging, feature-rich dimension to your fitness app, especially as integration with QuickPose means access to the biggest library of AI Fitness rep counters on the internet. QuickPose, an iOS-friendly SDK, makes this task easier than ever before by leveraging the power of Google’s MediaPipe and BlazePose machine learning models.

Use QuickPose to integrate MediaPipe into iOS apps

QuickPose acts as a bridge between Swift, the language of iOS, and the sophisticated machine learning capabilities of MediaPipe and BlazePose. It simplifies the process of integrating advanced pose estimation functionalities into your app, making it possible to track and count exercise reps, such as lunges, with ease.

The SDK provides a variety of features like overlay support for different body parts, range of motion calculations for various joints, exercise detection, and counting. You can access these features through easy-to-use Swift classes and methods, all while maintaining high performance and efficiency.

By integrating QuickPose into your Swift project, you can create engaging, interactive fitness experiences that can accurately track and count exercises like lunges, squats, push-ups, and more. You can see the full list here.

How to integrate AI Pose Estimation into your fitness app with QuickPose

  1. Install the SDK: The first step is to download and install the QuickPose SDK in your development environment.
  2. Register for a Free SDK Key: Visit the QuickPose website and register for a free SDK Key. This key will allow you to use QuickPose’s features in your app.
  3. Find Bundle ID: Identify the Bundle ID of your iOS application. This is a unique identifier for your app, and it’s needed for the SDK setup.
  4. Integrate with SwiftUI: Next, integrate QuickPose into your SwiftUI views. This involves setting up the camera permissions and attaching the QuickPose SDK to your SwiftUI views.
  5. Choose Features: QuickPose offers a range of features from body part detection to exercise counting. Choose the features that best fit the requirements of your fitness app. For instance, you may opt for the “Left Leg Lunge Counter” and “Right Leg Lunge Counter” for a lunge tracking feature.
  6. Create Custom Feedback: Finally, personalise the user experience by creating custom feedback prompts. This involves extending the PoseFeedback to provide custom strings for messages, thereby enhancing user interaction and engagement.

You can see the full documentation to integrate QuickPose into your iOS apps here: https://docs.quickpose.ai/docs/MobileSDK