Given a grayscale image, using convolutional neural network, it is possible to apply colour to the image. Given enough data, the CNN model can learn to predict the coloured version of the image bsaed on the content in the image.
In this project, the model is trained to colour grayscale images of the following category:
- People's faces
- Coast
- Buildings
- Mountains
- Forests
- Open country
- Street
- City Center
- The dataset containing people's face iamges: CelebA dataset
- The dataset for rest of the other categories: Computational Visual Cognition Laboratory
The processed data used for training and testing can be found here
The model follows an encoder-decoder architecture, with skip connections from encoder fed to the decoder (U-Net). The skip connection helps to preserve the local information of the input image which is used for reconstruction in the decoder. The model consists of 7 blocks of encoder followed by 7 blocks of decoder. Each encoder block has a Convolutional layer, LeakyReLU layer followed by a BatchNormalization layer and Dropout layer. Each decoder block has an Addition layer to add skip connections, ConvolutionalTranspose layer, LeakyReLU layer and BatchNormalization layer. The model takes input image of size 256X256X1 and outputs the coloured version of the image of size 256X256X3.
Architecture of the model:
You can download the trained model from this link