Preprocessing

The first step after obtaining/curating the required dataset is preprocessing. For this current task of image colorization, we need to perform the following preprocessing steps:

  • Rescaling: ImageNet is a diverse dataset with all kinds of images, in terms of classes and sizes (dimensions). For the purpose of this implementation, we rescale all images to a fixed size.
  • Utilize 24-bit RGB: Since the human eye can distinguish between 2 and 10 million colors only, we can utilize 24-bit RGB to approximate 16 million colors. Reducing the number of bits per channel would help us train our models faster with fewer resources. This can be achieved by simply dividing the pixel values by 255.
  • RGB to LAB: Since image colorization is easier to solve in LAB colorspace, we would utilize skimage to transform and extract LAB channels from RGB images.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.170.239