This is for supporting two-class segmentation for REFUGE dataset. But in theory, without modifying the SAM pretrained checkpoint, a maximum of 4 classes can be supported by enabling multimask_output to output 4 masks (instead of 3 originally) in the MaskDecoder class.
Then in Dataset class, we need to stack the mask labels to form multiple masks as well.
This is for supporting two-class segmentation for REFUGE dataset. But in theory, without modifying the SAM pretrained checkpoint, a maximum of 4 classes can be supported by enabling multimask_output to output 4 masks (instead of 3 originally) in the MaskDecoder class.
Then in Dataset class, we need to stack the mask labels to form multiple masks as well.