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

how to change "counts" to "points" in segment labels #158

Open
isOreo opened this issue May 12, 2024 · 1 comment
Open

how to change "counts" to "points" in segment labels #158

isOreo opened this issue May 12, 2024 · 1 comment
Labels
confirming We are confirming this issue and will take further steps

Comments

@isOreo
Copy link

isOreo commented May 12, 2024

On the website, I labeled the segmentation dataset, I exported the coco format, and the polygon format of the target is:
{
"id": 7259,
"image_id": 109,
"category_id": 0,
"segmentation": {
"size": [
2275,
1279
],, "counts": "l], "size":[ 2275, 1279 "counts": "l] "
}

This makes me unable to train, what is the encoding of ‘counts’? How should I change ‘counts’ to ‘points’?

@xifanii
Copy link
Collaborator

xifanii commented May 13, 2024

@isOreo
For your question, here is an explanation of the annotation formats for segmentation based on the COCO dataset format (https://cocodataset.org/#format-data):
Pasted Graphic 1

Currently, our tool supports two types of segmentation formats:

  1. RLE Format: For more details, refer to: https://github.com/cocodataset/cocoapi/blob/master/PythonAPI/pycocotools/mask.py
    Corresponds to the 'Mask' tool in the annotation tool. Here’s an example of the format:

    "segmentation": {
        "counts": "]Wg;1mW1200N20000000000XhNLdW14ZhNOeW17O1O1O1O001O1N2O1O1N2O1O1N2O1O1N2N2O1N2N2N2O0O2N2O1O1O1O1O1O1O001O1O1N2O1POeNXkN]1eT1P1M4M3N2N2M3N2N2N2N2N2N2N1O2N2N2O1N2N2N2N2N2O1N2N2N2O1N1O2N2O1N2N1O2O1N2N2N101N2N2N2O1N1O2N2O1N2O0O2O1N2O1N101N2N2O1N101N2O1N2O1N101N2N2O1N2O0O2O1N2O1O1N101N2O1N2O0O2O1N2O1N101N2O1O0O2O1O001N2O1O001N2O1O0O2O1O001O1O1O001O1O1N101O1O001O1O00100O1O1O001O10O01O01N1O2M2O2N1O2N2M2O2M3M3N2N2M3N2M3N2M3M3M3N2M3M3M4L3M4M2M4L3M4L3M4L3M4L3M4L4L3K6K4M4K4M4L5J5L4L4I8H7J6J6J6K5J7G9F>Ahii<",
        "size": [862, 1280]
      }
  2. Polygon Format: This format is a collection of points in a two-dimensional array.
    Corresponds to the 'Polygon' field in the annotation tool. Here’s an example of the format:

    "segmentation": [
        [
          444.7457627118644, 55.55743879472696, 353.1450094161959,
          211.03766478342752, 407.38229755178907, 258.0433145009416,
          629.1525423728814, 101.35781544256123
        ]
      ]

These two annotation methods are different and currently cannot be converted into one another. Based on your requirement, it might be more appropriate to use the Polygon tool for annotations, as it directly provides a collection of points along the mask edges, which might better suit your needs. I hope this clarifies your question.

@xifanii xifanii added the confirming We are confirming this issue and will take further steps label May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirming We are confirming this issue and will take further steps
Projects
None yet
Development

No branches or pull requests

2 participants