Input Image Scaling - TobiasSchmidtDE/DeepL-MedicalImaging GitHub Wiki

Problem: the input images are of different size, even across a single view

Original input: og

Instead of cropping the images and losing important information, we implement a scaler with different interpolation methodsto scale the input to the same size. Scikit-Image resize: performs interpolation to up-size or down-size images documentation OpenCV resize: resizes image with interpolation documentation Although we have implemented the same functionality with the OpenCV framework we will only resize using Scikit-Image. The images are read as numpy arrays and Scikit-Image relies on Scipy and Numpy algorithms which are highly optimized for handling this kind of data. This will be especially important later when we deal with higher resolutions and more data.

Below are examples of how the different scalers resize the input image to 512x512: l_nn_512 l_li_512

l_quad_512 l_cubic_512

f_nn_512 f_li_512

f_quad_512 f_cubic_512

Usage

The module is implemented such that we can vary the size of the resized output. This paper suggests an output size of either 256x256 or 512x512. We can try out the different interpolation methods and compare, but for a start we can use only bilinear interpolation, as stated in the paper.