Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export Keypoints in COCO format #2851

Open
tlpss opened this issue Aug 22, 2022 · 4 comments
Open

Export Keypoints in COCO format #2851

tlpss opened this issue Aug 22, 2022 · 4 comments
Assignees
Labels
export feature Feature request images Image annotation cases keypoints

Comments

@tlpss
Copy link

tlpss commented Aug 22, 2022

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
Copy link
Member

makseq commented Aug 26, 2022

@tlpss could you please show examples about visibility flag?

@makseq makseq added feature Feature request images Image annotation cases keypoints export labels Aug 26, 2022
@tlpss
Copy link
Author

tlpss commented Aug 29, 2022

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

  • 2: keypoint visible (the default I would say)
  • 1: keypoint is labeled but occluded in the image
  • 0: keypoint is not in the image, e.g. the human arm is not in the field of view. In this case x,y should be 0.0.

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
Copy link
Member

makseq commented Feb 8, 2023

@tlpss HumanSignal/label-studio-converter#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
Copy link

does it work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
export feature Feature request images Image annotation cases keypoints
Projects
None yet
Development

No branches or pull requests

3 participants