MedicineToken / Medical-SAM-Adapter

Adapting Segment Anything Model for Medical Image Segmentation
GNU General Public License v3.0
1.02k stars 90 forks source link

Support multi-class segmentation for REFUGE dataset #97

Closed LJQCN101 closed 8 months ago

LJQCN101 commented 8 months ago

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.