mazurowski-lab / finetune-SAM

This is an official repo for fine-tuning SAM to customized medical images.
https://arxiv.org/abs/2404.09957
Apache License 2.0
114 stars 17 forks source link

About the resizing method of input images #12

Closed happyday521 closed 3 months ago

happyday521 commented 3 months ago

Hi,

I have noticed that in the preprocessing step, the input images are directly resized to 1024x1024, instead of using “ResizeLongestSide” to resize the longest side to 1024 and then padding to 1024x1024 as in the original SAM. What is the reason for doing this?

Thanks!

Guhanxue commented 3 months ago

Hi, tbh, when i wrote my dataset, i didn't think too seriously about this considering most of images i looked at have similar width and height thus i directly use transforms.Resize((self.args.image_size,self.args.image_size)). But i am curious to see if you have a less square like image and how different resize influences the performance.