USE THE func_binary.py ONLY!!
An image is comprised of pixels. A slice of a medical image is usually a single channel greyscale image and the information is stored within a 0-255 range. I have presumed that the image dealt with follows the same image format, hence, the pixel-averaging technique is applied on a grayscale single channel image. The idea of this technique is to divide the image is multiple sets of 4 pixels at multiple levels and calculating the average grey from each set. Assuming each set of 4 pixels yield an average, the final result of this averaging will be another greyscale image where its pixels are all average greys of 4-pixel sets of a bigger and higher resolution image.
If the pixels of the original image are assumed to be the test set to be predicted, we can generate 4 pixels from each single pixel of the original image. This will scale up the original image 2 times (2X zoom) and this procedure could be applied to the generated images as many times as required by taking the generated image as the test set for prediction of the new upscaled image and so on.