bowang-lab / MedSAM

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

Normalization for image dataset #338

Open Kudo510 opened 1 week ago

Kudo510 commented 1 week ago

Hi, I want to ask how did you normalize the pixels values of images from the given datset? because when I checked the values it includes some extreme small close to 0 s.t 1.101*e-125. I want to finetune the medsam on my custom dataset. Should I just divde the pixels values by 255.0 just to make sure it is in range of 0,1. is it enough then or I should also normalize the value s.t with mean and std ? Thank you so much in advance

JunMa11 commented 2 days ago

Hi @Kudo510 ,

Here are the related scripts https://github.com/bowang-lab/MedSAM/tree/main/utils