how to change "counts" to "points" in segment labels
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’?
@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):
Currently, our tool supports two types of segmentation formats:
-
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] } -
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.