August 2018
Intermediate to advanced
438 pages
12h 3m
English
Convolutional Neural Networks (CNNs) are amazing image classifiers. They do so by extracting location-invariant features. In this process, they tend to distort the input image.
In the case of image colorization, such a distortion would be disastrous. To this end, we use an encoder to transform our input grayscale image of H x W dimensions to H/8 x W/8. The encoder maintains the aspect ratio of the image through different layers by using zero padding. The following snippet shows the described encoder using Keras:
#Encoderenc_input = Input(shape=(DIM, DIM, 1,))enc_output = Conv2D(64, (3,3), activation='relu', padding='same', strides=2)(enc_input)enc_output = Conv2D(128, (3,3), activation='relu', padding='same')(enc_output)enc_output ...
Read now
Unlock full access