Collect and prepare data
Use a dataset of natural colour images, convert them to a canonical colour space (e.g. Lab) and split into train/validation sets while keeping diverse scenes.
Colourise grayscale images. Assess visual fidelity.
Image colourization predicts plausible colour channels for a grayscale input. Good practice includes choosing an evaluation metric that captures perceptual quality, preparing a validation set with natural colour images, and inspecting failure cases such as desaturated areas, incorrect hues on similar textures, and bleeding across semantic boundaries.
Learning concept · Not a validated service
Image colourization predicts plausible colour channels for a grayscale input. Good practice includes choosing an evaluation metric that captures perceptual quality, preparing a validation set with natural colour images, and inspecting failure cases such as desaturated areas, incorrect hues on similar textures, and bleeding across semantic boundaries.
A proposed application is a restoration tool for black-and-white photos that suggests colourisations for user review; a human should approve or correct outputs before publishing.
Use a dataset of natural colour images, convert them to a canonical colour space (e.g. Lab) and split into train/validation sets while keeping diverse scenes.
Train an encoder–decoder CNN (or a pretrained backbone with a colour head) to predict colour channels from the luminance input; consider perceptual or adversarial losses for realism.
Measure chrominance RMSE and include perceptual metrics and human inspection; save examples where the model produces plausible but incorrect hues.
Expose alternative colourisation candidates and an easy correction UI so a human reviewer can choose or edit outputs before release.
The supplied starter loads the sklearn digits dataset (8×8 grayscale images), trains a RandomForestClassifier to predict digit labels, prints a classification report and plots a confusion matrix. It does not implement an image colourization model, nor does it use colour images or a generative CNN.
digits = load_digits()
X_train, X_test, y_train, y_test = train_test_split(
digits.data,
digits.target,
test_size=0.25,
random_state=42,
stratify=digits.target,
)
model = RandomForestClassifier(n_estimators=300, random_state=42)
model.fit(X_train, y_train)The code trains a classifier on digit labels from a grayscale digits dataset; it uses no colour images, no encoder–decoder or generative model to predict colour channels, and therefore does not perform image colourization.
A proposed extension: train a UNet-style model on a dataset of historical photos converted to Lab colour space, and provide multiple colourisation hypotheses plus a simple editor for human correction.
This is a potential application pathway, not a delivered product. The supplied starter does not implement this service or validate it with real users.
Networkers Home runs this topic inside its AI Engineer Course, with placement support and hands-on labs.