HumanSignal / label-studio

Label Studio is a multi-type data labeling and annotation tool with standardized output format
https://labelstud.io
Apache License 2.0
19.04k stars 2.37k forks source link

Export Keypoints in COCO format #2851

Open tlpss opened 2 years ago

tlpss commented 2 years ago

Describe the solution you'd like It would be very useful if we could export keypoint annotations using the COCO keypoints format. At the moment, only segmentation and detection of COCO are supported afaik.

The additional "visibility" flag could be configured during setup of the project:

  1. define the keypoint set(s)
  2. define visibility behavior: E.g. consider missing entries as not-labeled (flag=0) and add a tick box to indicate that labeled instances are invisible (flag=1) with default flag=2 for each labeled keypoint.
makseq commented 2 years ago

@tlpss could you please show examples about visibility flag?

tlpss commented 2 years ago

@makseq in COCO, keypoints have, next to their u,v coordinates, an additional visibility flag that can have 3 values:

If you would want to export keypoints to the COCO format we need:

  1. a way to define the object categories and their respective keypoints in the labeling configuration.
  2. for every instance (defined by a bounding box or segmentation mask), a way to label all the keypoints belonging to that category including their visibility flag using an attribute for each keypoint (possibly through the meta information)

This way one can easily add the keypoints field to each annotation in the coco export.

Does this answer your question?

makseq commented 1 year ago

@tlpss https://github.com/heartexlabs/label-studio-converter/pull/197 - could you switch to this branch of converter and check how keypoint coco export works there?

Just install that converter version from the PR and try to export KeypointsLabels to COCO format.

RiccardoMaistri commented 1 year ago

does it work?