bowang-lab / MedSAM

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

2D or 3D when testing #109

Closed WuJuli closed 1 year ago

WuJuli commented 1 year ago

Hey! You guys really did an excellent and meaningful job! I've read your paper and am slightly confused about the data dimension. I wonder if you test the final result as 2D data or treat it as 3D data when using DSC and NSD methods? Thanks a lot! this can help me to understand your work better!

WuJuli commented 1 year ago

Sorry, I didn't make it clear. Of course, I am uncertain about the data dimension you use to quantity test the result when processing the CT, MR, or PET, these 3D image segmentation tasks.

JunMa11 commented 1 year ago

Hi @WuJuli ,

Thanks for your interest.

For 3D data, the inference was done in a slice-by-slice way (2D). However, the computation of DSC and NSD was in 3D. You can find more details in the inference script.

WuJuli commented 1 year ago

Thank you for your answer! I've read the code part! I have some other questions, do you have different values of spacing_mm for the different tasks when calling the function compute_surface distances(mask_gt, mask_pred, spacing_mm)? And can you share your training data?

JunMa11 commented 1 year ago

do you have different values of spacing_mm for the different tasks

They were set to (1,1,1) for all tasks. Since all the methods were compared under the same spacing, the comparison is still fair.

And can you share your training data?

All the datasets are publicly available and you can download them from the given data source. For most of the datasets, we don't have right to redistribute them.

WuJuli commented 1 year ago

Thank you for your detailed explanation! Appreciate that!