microsoft/satclip

Question about 13th band

PlekhanovaElena opened this issue · 2 comments

Hi there,

I've noticed that there is in the code of transforms.py in the get_pretrained_s2_train_transform function there is an imput of 0s-filled B10 band:

B10 = np.zeros((1, *image.shape[1:]), dtype=image.dtype)
image = np.concatenate([image[:10], B10, image[10:]], axis=0)

I'm just curious - why do you do this?

Kind regards,
Elena

The SSL4EO vision encoders we use are pretrained on 13 channels (https://torchgeo.readthedocs.io/en/stable/api/models.html#sentinel-2), but our S2-100K inputs are just 12 channels so we zero-pad one channel.

Aha, got it, thank you for the explanation!