Colorization : A Machine Learning Model for Colorizing Black and White Images
This is an introduction to「Colorization」, a machine learning model that can be used with ailia SDK. You can easily use this model to create AI applications using ailia SDK as well as many other ready-to-use ailia MODELS.
Overview
Colorization is a machine learning model released in March of 2016 that takes a black and white image as input and outputs a colorized version of it. The machine learning model performs colorization based on these semantic meanings, such as grass is green, the sky is blue, and ladybugs are red.
Architecture
Colorization works in the Lab
color space. It takes the lightness L
, and estimates colors a
and b
. It adds L
to the computed ab
and returns it to RGB space.
The model architecture is based on VGG.
The paper introduces an optimal error function for Colorization. The usual method of minimizing the L2 error of pixel values often converges to average values, resulting in an image with low saturation.
The proposed method solves this problem by using the distribution of ab values as the error function. The training quantizes the ab-values and learn to bring the distribution of ab-values closer together.
Usage
You can run the Colorization model in ailia SDK with the following command.
python3 colorization.py --input input.jpg --savepath output.jpg
ax Inc. has developed ailia SDK, which enables cross-platform, GPU-based rapid inference.
ax Inc. provides a wide range of services from consulting and model creation, to the development of AI-based applications and SDKs. Feel free to contact us for any inquiry.