bowang-lab / MedSAM

Segment Anything in Medical Images
https://www.nature.com/articles/s41467-024-44824-z
Apache License 2.0
2.95k stars 407 forks source link

what is mean of gt_data's length setting? #9

Closed danny0628 closed 1 year ago

danny0628 commented 1 year ago

Hello, Dr Ma and Dr Wang!

First of all, Thanks for share your code and paper! I have question about a specific part in line 60, pre_MR.py if np.sum(gt_data)>1000: why you setting 1000? Does it have any special meaning?

In my case, empty mask and disease mask are mixed in same nii.gz. so i'll change code to if np.sum(gt_data)>=0: it can be a problem?

Thank you,

JunMa11 commented 1 year ago

Hi @danny0628 ,

it should work as well.

why you setting 1000? Does it have any special meaning?

For a compact target (e.g., liver, brain tumor) with less than 1000 voxels, we may not need such a segmentation method since manually labeling it is not time-consuming.

Essentially, the key challenge for small targets (e.g., tumors) is detection rather than segmentation.

Hope the answer is useful:)

danny0628 commented 1 year ago

your answer is helpful ! thank you.