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

Creating semantic or panoptic masks instead of instances masks #679

Open
bertinma opened this issue Feb 24, 2022 · 1 comment
Open

Creating semantic or panoptic masks instead of instances masks #679

bertinma opened this issue Feb 24, 2022 · 1 comment

Comments

@bertinma
Copy link

Hi,

I tried to create semantic masks (or at least panoptic masks) for a segmentation task. I used CVAT to annotate and I tried multiple export formats.

I achieve to create masks only with COCO format but it not matters.
I follow the following steps :

!datum create -o ./coco_project
!datum import -p ./coco_project -f coco ./dataset_coco
!datum transform -t polygons_to_masks -p ./coco_project/ --overwrite source-1

As said in the documentation, it produces instances masks, I tried to use the following command to extract masks by class (if I understand well the doc)

!datum transform -t merge_instance_segments -p ./coco_project/ --overwrite source-1 --include-polygons

But it didn't change anything ..

Is it the right way to create semantic masks ? Is it possible with datumaro ?

Thanks for your help !!

PS : Using datumaro==0.3

@zhiltsov-max
Copy link
Contributor

zhiltsov-max commented Mar 4, 2022

Hi, I'm not sure I understood well the result you're trying to achieve. The actions above should be enough to produce panoptic masks in the COCO format, they're going to be in the annotations/panoptic/ directory.

As said in the documentation, it produces instances masks, I tried to use the following command to extract masks by class (if I understand well the doc)

COCO panoptic format contains .png masks with special encoding. Please check the VOC segmentation format, which contains "normal" 3-channel colored masks. To convert from your project, call

datum export -p coco_project -o source-1-voc -f voc source-1 -- --save-images

https://github.com/openvinotoolkit/datumaro/tree/develop/tests/assets/voc_dataset/voc_dataset1/SegmentationClass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants