Building an AI-Powered Standing Hip Abduction Counter App with Pose Estimation Using QuickPose iOS SDK
Are you interested in developing an AI-powered Standing Hip Abduction counter for your fitness app? Standing Hip Abduction is a crucial exercise that primarily targets the gluteus medius, a key muscle in the hips responsible for stabilising the pelvis and supporting hip movement. This exercise also engages the gluteus minimus and the tensor fasciae latae, helping to improve balance, hip mobility, and lower body strength.
In this guide, you’ll learn how to create a Standing Hip Abduction counter app using pose estimation with the QuickPose iOS SDK. We’ll guide you through implementing real-time rep counting, ensuring accurate form tracking, and providing user-friendly feedback to enhance exercise performance. Whether you’re building a new fitness app or upgrading an existing one, this tutorial will help you harness AI and pose estimation technology to deliver a precise and engaging Standing Hip Abduction counter that stands out in the fitness app market.
Steps to integrate an AI Standing Hip Abduction Counter into your app:
Register an SDK Key with QuickPose
Get your free SDK key on https://dev.quickpose.ai, usage limits may apply. SDK Keys are linked to your bundle ID, please check Key before distributing to the App Store.
This is a quick look to integrate the Standing Hip Abduction counter using the QuickPose iOS SDK. You can see the full documentation here: QuickPose iOS SDK Standing Hip Abduction Counter installation.
Activate Standing Hip Abduction Feature
Note the feature name is hipAbductionStanding.
feature = .fitness(.hipAbductionStanding)
feature = .fitness(.hipAbductionStanding, style: customOrConditionalStyle)
Form Feedback
We recommend using the feature feedback to guide the user if an error occurs.
quickPose.start(features: [.fitness(.hipAbductionStanding)], onFrame: { status, image, features, feedback, landmarks in
switch status {
case .success:
overlayImage = image
if let result = features.values.first {
feedbackText = "Hip Abduction Standing: \(Int(result.value * 100))%"
} else if let feedback = feedback.values.first, feedback.isRequired {
feedbackText = feedback.displayString
} else {
feedbackText = nil
}
case .noPersonFound:
feedbackText = "Stand in view";
case .sdkValidationError:
feedbackText = "Be back soon";
}
})
Body position: "Stand facing camera"
.body(feedback: standFacing, isRequired: true)
Conditional Styling
To give user feedback consider using conditional styling so that when the user’s measurement goes above a threshold, here 0.8, a green highlight is shown.
let greenHighlightStyle = QuickPose.Style(conditionalColors: [QuickPose.Style.ConditionalColor(min: 0.8, max: nil, color: UIColor.green)])
quickPose.start(features: [.fitness(.hipAbductionStanding, style: customOrConditionalStyle)],
onFrame: { status, image, features, feedback, landmarks in ...
})
How to Count Standing Hip Abductions
Real-time standing hip abduction counting with AI
To count the Standing Hip Abductions declare a configurable threshold counter, which can be used to turn lots of our features into counts.
@State private var counter = QuickPoseThresholdCounter()
Then pass QuickPose’s Hip Abduction Standing result to the counter, and display in the feedback text declared above.
quickPose.start(features: [.fitness(.hipAbductionStanding)], onFrame: { status, image, features, feedback, landmarks in
switch status {
case .success:
overlayImage = image
if let result = features.values.first {
let counterState = counter.count(result.value)
feedbackText = "\(counterState.count) Hip Abduction Standing"
} else {
feedbackText = nil
}
case .noPersonFound:
feedbackText = "Stand in view";
case .sdkValidationError:
feedbackText = "Be back soon";
}
})
Standing Hip Abduction Timer
To time the Standing Hip Abductions declare a configurable threshold timer, which can be used to turn lots of our features into timers. For Standing Hip Abduction, we suggest modifying the default threshold, taking account of expected camera positioning and tilt.
@State private var timer = QuickPoseThresholdTimer(threshold: 0.2)
Then pass the result’s raw value to the timer, and display in the feedback text declared above.
quickPose.start(features: [.fitness(.hipAbductionStanding)], onFrame: { status, image, features, feedback, landmarks in
switch status {
case .success:
overlayImage = image
if let result = features.values.first {
let timerState = timer.time(result.value)
feedbackText = String(format: "%.1f", timerState.time) + "secs"
} else {
feedbackText = nil
}
case .noPersonFound:
feedbackText = "Stand in view";
case .sdkValidationError:
feedbackText = "Be back soon";
}
})