med-air / 3DSAM-adapter

Holistic Adaptation of SAM from 2D to 3D for Promptable Medical Image Segmentation
134 stars 12 forks source link

Can we use spacing for test data? #31

Open wefwefWEF2 opened 7 months ago

wefwefWEF2 commented 7 months ago

Thanks a lot for your work. I noticed that spacing was not used for the test data set. I would like to ask if it can be used for the test dataset. Generally, spacing seems to improve some dice scores.

if self.split != "test":
            seg = (
                F.interpolate(
                    input=rearrange(seg_tensor, f"d c h w -> 1 c d h w"),
                    scale_factor=(img_spacing[0] / self.target_spacing[0], 1, 1),
                    mode="nearest",
                )
                .squeeze(0)
                .numpy()
            )