How to create keypoints annotation in Python using Supervisely
Introduction
In this tutorial we will show you how to use sly.GraphNodes class to create data annotation for pose estimation / keypoints detection task. The tutorial illustrates basic upload-download scenario:
create project and dataset on server
upload image
programmatically create annotation and upload it to image
download image and annotation
βΉοΈ Everything you need to reproduce this tutorial is on GitHub: source code, Visual Studio Code configuration, and a shell script for creating virtual env.
How to debug this tutorial
Step 1. Prepare ~/supervisely.env file with credentials. Learn more here.
Now let's create annotation class using our keypoints template as a geometry config (unlike other supervisely geometry classes, sly.GraphNodes requires geometry config to be passed - it is necessary for object class initialization):
You can also go to Supervisely platform and check that class with shape "Keypoints" was successfully added to your project:
class_screen
Upload image:
Build keypoints graph:
Label the image:
You can check that keypoints annotation was successfully created in Annotation Tool: