med-air / 3DSAM-adapter

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

data set preprocessing #40

Open huyue132 opened 1 day ago

huyue132 commented 1 day ago

Hello, I would like to try other parts segmentation. Is there any public data preprocessing script? Can you share it? Thank you

peterant330 commented 13 hours ago

Hi,

The major part of the data preprocessing is included in the dataloader. Please refer to 3DSAM-adapter/dataset/base_dataset.py and 3DSAM-adapter/dataset/datasets.py. The input to the dataloader is actually the original nii.gz file without preprocessing. The only process is to arrange the files into a folder.

While you may need to calculate the intensity_range, global_mean and global_std, they are calculated as the 99.5 and 0.5 percentile, mean and std of the foreground pixels across the training data. You may also use other values such as the windows provided by the clinicians.