uni-medical / SAM-Med3D

SAM-Med3D: An Efficient General-purpose Promptable Segmentation Model for 3D Volumetric Medical Image
Apache License 2.0
525 stars 68 forks source link

Muti-class segmentation #91

Open 1774537072 opened 2 weeks ago

1774537072 commented 2 weeks ago

Thank you for sharing your great work!

Have you tried using SAM-Med3D for multi-class segmentation, such as multi-organ segmentation or something like it?

I'm trying to do it using BraT20 dataset for Brain Tumor Segentation, but it seems like SAM-Med3D is easily influenced by the background class. Specifically, the first class of the mask tokens in the mask-decoder is significantly large.

Do you have any clue about this problem?

blueyo0 commented 1 week ago

Hi, since SAM-Med3D doesn't actually support multi-class seg. Plz clarify your setting. For example, do you use it multiple times with different prompt points to get different output the multiple organs?

BTW, since BraTS is tumor seg dataset, where the target is relatively small, it's reasonable that it is refluenced by the background class.

1774537072 commented 5 days ago

I only use one point in your source code as the input of the Prompt Encoder, and modify four MLPs. Specifically, I replace the output_hypernetworks_mlps in the Mask Decoder with new MLPs, so that the four masks output by the Mask Decoder correspond to the masks of four different classes.