Computer Vision News - August 2020

7 Impact This can be of a great impact in real datasets. As an example, let’s load an X-Ray from a COVID-19 patient using the Kaggle COVID-19 dataset: covid_xray = Image.open('/home/wizofe/kaggle-covid.jpeg') img = PILImage(PILImage.create(covid_xray).resize((944, 656))) img _,axs = plt.subplots(1,3,figsize=(20,20)) for ax,method in zip(axs.flatten(), [ResizeMethod.Squish, ResizeMethod.Pad, ResizeMethod.Crop]): rsz = Resize(256, method=method, pad_mode=PadMode.Zeros) show_image(rsz(img2, split_idx=1), ctx=ax, title=f'{method}, size=256'); One can see that the 'squish' resize method squishes the image on the horizontal axis. The whole image is visible; however, the ribcage has been constricted towards the center. The implications of this could mean that important features in the original image could either be erased or diluted. With 'crop' , the image is cropped from the center hence we lose image details from the edges. The implications of these choices really depend on the dataset, but they could have an detrimental effect if the wrong choice is chosen. This could again mean that vital features will be erased or diluted. Using the 'pad' resize, the full image is visible, but again it is compressed in one axis. fast.ai

RkJQdWJsaXNoZXIy NTc3NzU=