coco-viewer icon indicating copy to clipboard operation
coco-viewer copied to clipboard

JSON file question

Open ivand9 opened this issue 3 years ago • 1 comments

hi @trsvchn, does segmentation element in JSON file needs to be written in RLE format, polygon or it can be just pixel coordinates of my ground truth?

ivand9 avatar May 16 '22 14:05 ivand9

@ivand9, thank you for your question!

coco-viewer currently works only with coco format for "Object Detection" task with the following structure

Each object instance annotation contains a series of fields, including the category id and segmentation mask of the object. The segmentation format depends on whether the instance represents a single object (iscrowd=0 in which case polygons are used) or a collection of objects (iscrowd=1 in which case RLE is used). Note that a single object (iscrowd=0) may require multiple polygons, for example if occluded.

annotation {
  "id" : int,
  "image_id" : int,
  "category_id" : int,
  "segmentation" : RLE or [polygon],
  "area" : float,
  "bbox" : [x,y,width,height],
"iscrowd" : 0 or 1,
}

more on coco data format here Data format

so it's RLE or polygon or list of polygons

trsvchn avatar May 17 '22 13:05 trsvchn