What is Colorize image
We can color the black-white(grayscale) image by Caffe Model.
The colorize model consists of many convolutional layers. Let’s see the structure of colorize model.
Steps of colorizing image using OpenCV
Get the Caffe model by readNetFromCaffe.
Load cluster centers.
Populate cluster centers as 181 convolution kernel.
Convert image to LAB.
Get the L channel of image only.
Resize the image to network input size(224,224).
Subtract 50 for mean-centering.
Concatenate with original image L.