LeeJunHyun / Image_Segmentation

Pytorch implementation of U-Net, R2U-Net, Attention U-Net, and Attention R2U-Net.
2.68k stars 595 forks source link

If I input size is 512x512? #19

Closed zhaoxuyan closed 5 years ago

zhaoxuyan commented 5 years ago

I download the ISIC 2018 training dataset, and the size of images is 4288x2848 but in your code the image_size=224. Why? If my original custom data's size is 512x512, should I resize it to 224x224?

How could I change the data_loader.py? I think I should change the following lines:

# image_size=224
ResizeRange = random.randint(300,320)
CropRange = random.randint(250,270)
Transform.append(T.Resize((int(256*aspect_ratio)-int(256*aspect_ratio)%16,256)))

And should I also change the model architecture in the network.py after I change the input size?

Thanks in advance!!!

LeeJunHyun commented 5 years ago

Hi, @zhaoxuyan , I manually set the parameter of resize (or crop range) in data_loader.py, but you can fix them properly if your image have different size. I will clean up my codes ASAP :( plz ignore the code image_size=224 in preprocessing.

And you don't have to change the code of network.py, because it is fully convolutional network.

Thank you for your interest and issue :)

zhaoxuyan commented 5 years ago

Thanks for your reply!

micklexqg commented 5 years ago

is a odd inputsize such as 317x423 ok?