cvat-opencv icon indicating copy to clipboard operation
cvat-opencv copied to clipboard

datumaro export missing stuff and things flag

Open hannes09 opened this issue 2 years ago • 3 comments

Hi,

currently to export a custom dataset for panoptic segementation the recommended way is to export a datumaro dataset and

convert the dataset with datumaro to coco. (https://github.com/openvinotoolkit/cvat/issues/4408)

However I have found no way to distinguish between stuff and things classes.

Things classes are countable and stuff classes are not countable. So my understanding is that they are handled in diffrent ways during panoptic segementation and instance segmenation.

Should I edit the coco dataset manual or is there another solution?

hannes09 avatar Aug 07 '22 10:08 hannes09

@zhiltsov-max, @yasakova-anastasia

Could you please comment on that?

bsekachev avatar Aug 25 '22 07:08 bsekachev

Hi, currently, this category flag is not supported in Datumaro and CVAT, so you'll need to manually adjust category declarations. The annotations in these cases are encoded the same way, so no annotation changes are needed. You need to export the dataset with Datumaro to coco_panoptic format.

Please follow the instruction from the linked issue:

  1. Annotate a task with polygons in CVAT
  2. Export annotations in Datumaro format, unzip
  3. Install Datumaro with pip install datumaro[default]

4.a. Use a python script with the following contents:

import datumaro as dm
dataset = dm.Dataset.import_from('path/', 'coco')
dataset.transform('polygons_to_masks')
dataset.export('new_path/', 'coco_panoptic', save_images=True)

OR 4.b.1. Run datum transform -t polygons_to_masks --overwrite <path/to/unzipped/dir>:datumaro 4.b.2. Run datum convert -if datumaro -i <path/to/unzipped/dir> -o <output/dir/> -f coco -- --save-images

The first way is going to work a bit faster, depending on the dataset size.

zhiltsov-max avatar Aug 25 '22 09:08 zhiltsov-max

Hi, @hannes09, Is this issue still relevant for you?

sizov-kirill avatar Oct 01 '22 15:10 sizov-kirill

Should be supported in #4543

zhiltsov-max avatar Oct 21 '22 09:10 zhiltsov-max