Qsingle / LearnablePromptSAM

Try to use the SAM-ViT as the backbone to create the learnable prompt for semantic segmentation
Apache License 2.0
77 stars 13 forks source link

environment configuration #6

Open yao-yu1999 opened 1 year ago

yao-yu1999 commented 1 year ago

Hello. I ran your code, but I always encountered the problem of version mismatch. What is your environment configuration? 捕获

Qsingle commented 1 year ago

这个问题是由于标签中的类别ID的最大值大于设定的输出类别值(num_classes),很可能就是跑的数据集里标签出现了255这种,建议检查一下标签,最后抱歉没有及时回复。

Qsingle commented 1 year ago

This issue is caused by the label file containing a value greater than the num_classes you set. You can check it by printing the maximum value of the label file. If you do the task that classifies the pixel to 0 or 1, then 0 or 255 may as the pixel value in your label image to make the label can be seen by humans. You can use the option divide in this situation, or you need to convert the value of pixels in the label file to class id by one label map script.