Resnet 50 as a backbone of Unet
When you import ResNet50 import in this way:

image_input=Input(shape=(512, 512, 3))
model = ResNet50(input_tensor=image_input, include_top=False)


After that, you can work with your desired image_size