Computer Vision News - August 2020

6 Using an image size of 5, it is easier to observe how it is affected by Resize. All the 4 different colors in each corner show that there’s not much of a difference between squish and crop. With pad however the image is being resized so the shorter dimension (in this case the height 380hx500w) is matched to the image size of 256 and then padded with zeros. _,axs = plt.subplots(1,3,figsize=(20,20)) for ax,method in zip(axs.flatten(), [ResizeMethod.Squish, ResizeMethod.Pad, ResizeMethod.Crop]): rsz = Resize(5, method=method, pad_mode=PadMode.Zeros) show_image(rsz(img, split_idx=1), ctx=ax, title=f'{method}, size=5'); _,axs = plt.subplots(1,3,figsize=(20,20)) for ax,method in zip(axs.flatten(), [ResizeMethod.Squish, ResizeMethod.Pad, ResizeMethod.Crop]): rsz = Resize(15, method=method, pad_mode=PadMode.Zeros) show_image(rsz(img, split_idx=1), ctx=ax, title=f'{method}, size=15'); At image size 15, both 'squish' and 'pad' include all the colors in the corners but when using 'crop' it is noticeable that the colors in each corner are beginning to fade, while the image is being cropped from the center. Deep Learning Tool

RkJQdWJsaXNoZXIy NTc3NzU=