Sumo Squat AI Counter Feature

Building an AI-Powered Sumo Squats Counter with QuickPose iOS SDK

Are you looking to develop an AI-powered Sumo Squats counter for your fitness app? The Sumo Squat is a powerful lower-body exercise that targets the glutes, quadriceps, hamstrings, and inner thighs, helping to build strength and improve mobility. With the QuickPose iOS SDK, you can seamlessly integrate a Sumo Squats counter into your app, providing users with real-time rep tracking and form feedback. This feature is perfect for fitness enthusiasts looking to monitor their progress, as well as for trainers who want to offer personalized workout guidance. In this guide, you’ll learn how to create an accurate and user-friendly Sumo Squats counter using AI and pose estimation technology.

GIF shows a man doing squats which are counted by AI

Steps to integrate an AI Sumo Squat 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 Sumo Squat counter using the QuickPose iOS SDK. You can see the full documentation here: QuickPose iOS SDK Sumo Squat Counter installation.

Activate Sumo Squat Feature

				
					feature = .fitness(.sumoSquats)
feature = .fitness(.sumoSquats, style: customOrConditionalStyle)
				
			

Form Feedback

We recommend using the feature feedback to guide the user if an error occurs.

				
					quickPose.start(features: [.fitness(.sumoSquats)], onFrame: { status, image, features, feedback, landmarks in
    switch status {
        case .success:
            overlayImage = image
            if let result = features.values.first  {
                feedbackText = "Sumo Squats: \(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) 
				
			

Joint Visibility:

"Move left arm into view" "Move right arm into view" "Move upper body into view"
"Move left leg into view" "Move right leg into view" "Move lower body into view"
"Move whole body into view"

				
					.group(action: .move, group:.arm(side: .left), direction:.intoView, isRequired: true) 
.group(action: .move, group:.arm(side: .right), direction:.intoView, isRequired: true) 
.group(action: .move, group:.upperBody, direction:.intoView, isRequired: true) 
.group(action: .move, group:.leg(side: .left), direction:.intoView, isRequired: true)
.group(action: .move, group:.leg(side: .right), direction:.intoView, isRequired: true)
.group(action: .move, group:.lowerBody, direction:.intoView, isRequired: true)
.group(action: .move, group:.wholeBody, direction:.intoView, 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(.sumoSquats, style: customOrConditionalStyle)], 
                onFrame: { status, image, features, feedback, landmarks in  ...
})
				
			

How to Count Sumo Squats

Real-time Sumo Squat counting with AI

To count the Sumo Squats 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 Sumo Squat result to the counter, and display in the feedback text declared above.

				
					quickPose.start(features: [.fitness(.sumoSquats)], 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) Sumo Squats"
            } else {
                feedbackText = nil
            }
            
        case .noPersonFound:
            feedbackText = "Stand in view";
        case .sdkValidationError:
            feedbackText = "Be back soon";
    }
})
				
			

Sumo Squat Timer

To time the Sumo Squats declare a configurable threshold timer, which can be used to turn lots of our features into timers. For Sumo Squats, 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(.sumoSquats)], 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";
    }
})
				
			

Need help building an AI project?

At QuickPose, our mission is to build smart Pose Estimation Solutions that elevate your product. Schedule a free consultation with us to discuss your project.