def load_patch(imname): patch = [tiffread(f'{imname}_{band}.tif') for band in BANDS] patch = np.stack([bilinear_upsample(xx) for xx in patch]) return patch
def load_image(inpath): """ load input image """ img_bands = [imread(f"{inpath}_{band}.tif") for band in BANDS] img = np.stack([bilinear_upsample(img_band) for img_band in img_bands]) return img