cvat-opencv
cvat-opencv copied to clipboard
datumaro export missing stuff and things flag
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?
@zhiltsov-max, @yasakova-anastasia
Could you please comment on that?
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:
- Annotate a task with polygons in CVAT
- Export annotations in Datumaro format, unzip
- 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.
Hi, @hannes09, Is this issue still relevant for you?
Should be supported in #4543