zhang-haojie / wesam

[CVPR 2024] Code for "Improving the Generalization of Segmentation Foundation Model under Distribution Shift via Weakly Supervised Adaptation"
MIT License
105 stars 7 forks source link

The instance segmentation have class information? #16

Open ChunmengLiu1 opened 1 month ago

ChunmengLiu1 commented 1 month ago

Hi! Thank you for your great work!

I read the code of your method. I feel confused about the instance segmentation. As usual, the instance segmentation has class labels in each pixel. But I thought maybe there are just masks without class labels in your paper? Because for SAM, when we just have bounding boxes, you just can get the mask (without class information) and you use bounding boxes in SAM directly without any semantic information. When computing the mIoU, just the mask and binary ground truth without the specific class information?

Thank you for your help! I feel confused so much! I am looking forward to your reply!

zhang-haojie commented 1 month ago

Yes, because SAM is a class-agnostic segmentation model. As for multiple prompts, the order of the output masks is consistent with the order of prompts.