-
Notifications
You must be signed in to change notification settings - Fork 79
Open
Description
Thanks for sharing this great work. I'm just wondering about the reasons behind resize the image per channel and not resizing it as 3 channels array. I'm referring to this piece of code in the file resize.py.
def resize_single_channel(x_np, output_size):
s1, s2 = output_size
img = Image.fromarray(x_np.astype(np.float32), mode='F')
img = img.resize(output_size, resample=Image.Resampling.BICUBIC)
return np.asarray(img).clip(0, 255).reshape(s2, s1, 1)
def resize_channels(x, new_size):
x = [resize_single_channel(x[:, :, idx], new_size) for idx in range(3)]
x = np.concatenate(x, axis=2).astype(np.uint8)
return x
I hope this is the way to ask questions here since It's my first time to ask a question on Issues instead of submitting an issue.
Thanks for your understanding.
Metadata
Metadata
Assignees
Labels
No labels