Finetuning YOLOv8 pose estimation for padel player analysis using trainYOLO

June 1, 2023

In recent years, computer vision has made remarkable advancements, enabling the development of sophisticated applications in various domains. One such domain is sports analytics, where pose estimation plays a crucial role in analyzing player movements and enhancing performance. In this blog post, we will explore how to use the trainYOLO platform to fine-tune Ultralytics’ YOLOv8 pose estimation model specifically for player pose estimation in padel (tennis) games.

Although the YOLOv8 pose estimation model, trained on the COCO dataset, works quite well for most scenarios, the detection part of the (single shot) algorithm often requires some finetuning on the task at hand. For our use case of padel player pose estimation, we only want to detect the padel players. Without fine-tuning, the algorithm often (righteously) predicts false-positives in the audience, or in the reflections of the glass cage, surrounding the playfield. Also, it fails to predict players in more challenging poses, which are common in racket sports.

A false-positive detection of the player's reflection in the glass cage.

To label the data and finetune the YOLOv8 pose detection model, we are going to use the trainYOLO platform. If you have not yet an account, you can create an account here for free. For this use case, we are going to be using trainYOLO’s efficient model-assisted labeling tool, which will make labeling a breeze. Check out this post for more info on how trainYOLO can accelerate human pose labeling.

Step 1: Create a New Project

Begin by creating a new project on the trainYOLO platform. Sign in to your trainYOLO account or create a free account here if you don't have one. Click on the green 'plus' icon and set the project visibility to either Public or Private, depending on your preference. For this example, we name the project "padel-pose", set the annotation type Keypoints and choose the Human Pose option. This way, the keypoint categories are filled in and will match the categories of the YOLOv8 pose detection model.

Step 2: Upload Your Images

Navigate to the data tab within your project and click on the green 'plus' icon to upload your images. Select the images you want to use for training, we will upload images of Padel games and click upload.

Step 3: Label Your Images

Once your images are uploaded, proceed to label each image. By clicking on an image you enter the labeling editor. We will use model-assisted labeling to accelerate the labeling process. Therefore, we click on the magic wand, which will generate predictions on the image. Next, we can remove unwanted detections, modify the skeletons, and manually add the missed ones. To manually add missing detections, use the bounding box tool.

[video-to-gif output image]

Step 4: Finetune the YOLOv8 pose model

After labeling a sufficient number of images, it's time to finetune the YOLOv8 pose detection model. For simplicity, we will use the preconfigured Google Colab notebooks provided by trainYOLO. Therefore, go to the model's tab in your project and select the YOLOv8 notebook by clicking the green 'plus' icon. This notebook comes preconfigured with the necessary settings. Fill in your API key (available by clicking on your avatar) and project name. Leave the other parameters as default, then start the training session by clicking "Runtime" and selecting "Run all." The notebook will download your dataset, train the model, and upload the trained model to your project, providing you with a custom pose detection model in no time.

Step 5: Optimal Model-Assisted Labeling

Whenever a new model version is added to your project, it automatically becomes the new labeling assistant. This way, the predictions will become better and more accurate after each training session, leading to faster labeling iterations.

Latest posts

Get in touch.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
By clicking “Accept All Cookies”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. View our Privacy Policy for more information.