← back to projects
Ongoing · Passion Project

The Perfect Squat

View The Perfect Squat repository on GitHub

Developing a computer vision program that detects the bar path of your squat.

Computer VisionMachine Learning

Overview

The Perfect Squat is a passion project that Mats Leis and I started second semester of our second year. This came about when we were discussing a LinkedIn post we both saw exploring MediaPipe's pose model detection. It got us thinking about how we could utilize these tools in our everyday lives.

That's when 'The Perfect Squat' came alive.

A computer vision system that analyzes barbell trajectory during a squat using the YOLOv8 pose model and OpenCV to process videos.

The Beginning

Right when Google's MediaPipe framework was growing immense traction back in November of 2025, it got Mats and I thinking about all the possibilites that could be possible with this technology.

The main problem was that we were unfamiliar and inexperience.

We had no idea where to start.

That's when we started to fall in the hole of tutorial hell.

Figuring out the tech stack

We knew from the get go that we wanted to track the linearity of a bar path but in order to do this, we needed to think about the: model, framework, data, libraries, and the gpu.

First, we needed to choose a model to train. For this, we decided to choose Ultralytics YOLOv8-pose model due to its fast but precise performance. It is a smaller model than the YOLO11, however, for our task, the YOLOv8 was enough.

Next, is a dataset fit for the size of our model. Thanks to Roboflow Universe, they had a set of annotated images that we were able to use to train our model.

Since the primary programming language is Python, the many libraries that are used to track, analyze and visualize data include: OpenCV, PyTorch, NumPy and Matplotlib.

Finally, due to limited access to a powerful gpu, Google Colab is used to train, test and validate the model.

Current stage

Updated: March 27 2026

Currently, we have a working MVP. Being able to detect and track keypoints of a barbell and visualize this data to display the linearity of its path via video and graph.

We demoed our project at the Canadian Tech Summit and Alchemy.

Hanjing Lin

The Perfect Squat · Project update

in

We locked in and it actually worked.

A working computer vision pipeline that detects the barbell, tracks its movement, and turns a squat video into a measurable bar path. We presented the project, demonstrated the MVP, and shared what we learned while building it.

The Perfect Squat team presenting their project posterView the original post on LinkedIn

Tools & Skills

OpenCVPythonYOLOv8PyTorchNumPyRoboFlowGoogle Colab