linyq2117/CLIP-ES

How can I convert pseudo mask into annotations?

a-F1 opened this issue · 1 comments

a-F1 commented

Your work is so great! I definitely appreciate it!

I meet some troubles trapping me for a long time:
After using "eval_cam_with_crf.py", I get pseudo mask, whose form is png.
But how can I use png to train the model?
I mean, is there a certain method, which can transfer the pseudo mask into voc annotation or coco annotation?
Thanks!

Thanks for your interest in our work!

The generated pseudo mask (png) is exactly the annotation for semantic segmentation because it provides pixel-level labels. This form is consistent with PASCAL VOC for the segmentation task. The segmentation annotation format used in COCO is json and it can be easily converted to png (vice versa). However, it is unnecessary to do this conversion since all annotations are finally in 2D/3D tensor format that indicates the category of each pixel when training a segmentation model. Note that both VOC and COCO are designed to perform multiple tasks and the annotations are various (e.g., xml in VOC are annotations for classification and object detection tasks). Our approach focuses on WSSS so the generated png is enough to train the final semantic segmentation model.