A learning-based approach for automatic image and video colorization

Raj Kumar Gupta, Alex Yong Sang Chia, Deepu Rajan, Zhiyong HuangarXiv 2017 · OpenReview

Abstract

In this paper, we present a color transfer algorithm to colorize a broad range of gray images without any user intervention. The algorithm uses a machine learning-based approach to automatically colorize grayscale images. The algorithm uses the superpixel representation of the reference color images to learn the relationship between different image features and their corresponding color values. We use this learned information to predict the color value of each grayscale image superpixel. As compared to processing individual image pixels, our use of superpixels helps us to achieve a much higher degree of spatial consistency as well as speeds up the colorization process. The predicted color values of the gray-scale image superpixels are used to provide a 'micro-scribble' at the centroid of the superpixels. These color scribbles are refined by using a voting based approach. To generate the final colorization result, we use an optimization-based approach to smoothly spread the color scribble across all pixels within a superpixel. Experimental results on a broad range of images and the comparison with existing state-of-the-art colorization methods demonstrate the greater effectiveness of the proposed algorithm.

Introduction

Colorizing grayscale imagery is an inherently ill-posed problem because a single intensity value can represent a multitude of colors in the physical world. Traditionally, this required significant manual effort, with artists placing "scribbles" of color across an image to guide the process. While interactive methods reduced this burden, they still required artistic skill. Early automatic methods, which relied on reference images, often struggled with spatial consistency, resulting in "noisy" outputs where neighboring pixels of the same object were assigned different colors.

Gupta et al. address these challenges by proposing a fully automatic framework that leverages machine learning to learn color mappings from reference images, ensuring high-quality, spatially consistent results without manual intervention.

Methodology

The proposed system moves away from pixel-level processing to a superpixel-based approach, which enhances both speed and local consistency. The pipeline is divided into four primary stages:

The proposed automatic colorization pipeline, illustrating the flow from reference and input images to the final colorized result.
  1. Superpixel Extraction: Pixels are grouped into uniform "superpixels" that respect object boundaries. This reduces the computational load and enforces local color uniformity.
  2. Feature Extraction: A 172-dimensional feature vector is calculated for each superpixel, incorporating intensity, Gabor features for texture, and Dense SIFT for local structure.
  3. Feature Learning via Random Forest: Using a reference color image, the system trains a Random Forest classifier. The reference image is decomposed into superpixels, and its colors are quantized into discrete labels. The classifier learns to map texture and intensity features to these labels.
  4. Refinement and Propagation: Initial predictions from the Random Forest are refined using a voting-based approach within larger segments (via Mean Shift segmentation). These refined predictions act as "micro-scribbles" at superpixel centroids, which are then propagated across the image using an optimization algorithm to ensure alignment with luminance boundaries.

Experimental Results

The algorithm was evaluated across diverse datasets, including the Pasadena Houses database for architectural scenes and a Portrait Dataset for human subjects.

Comparison of original grayscale images and the colorized results produced by the proposed algorithm for both portraits and architectural scenes.

The results demonstrate that the learning-based approach produces natural-looking skin tones and handles complex textures (like architectural details) with minimal artifacts. Compared to previous methods, this approach significantly reduces "color bleeding" and maintains better spatial consistency.

The framework also shows robustness in video colorization. Unlike traditional methods that rely on optical flow—which often fails during rapid movement—this learning-based method colorizes frames based on visual similarity to a reference, effectively handling large displacements and occlusions in historical footage like Charlie Chaplin films.

Discussion and Key Insights

A central insight of this work is the superiority of superpixels over individual pixels for colorization tasks. By treating the superpixel as the fundamental unit, the system avoids the "salt and pepper" noise typical of pixel-matching algorithms. Furthermore, the integration of Gabor and SIFT features allows the model to distinguish between objects with similar intensities but different textures, such as a gray garment versus a stone wall.

Conclusion and Future Work

While the proposed method offers a significant advancement in automatic colorization, some limitations remain. Superpixel boundaries can occasionally be imprecise for very thin structures, leading to minor color bleeding. Additionally, independent frame processing in videos can sometimes result in temporal flickering. Future research may focus on incorporating temporal constraints to improve the stability of video colorization and refining segmentation for complex object boundaries.

Summary updated

BibTeX
@misc{gupta2017learning,
  author = {Raj Kumar Gupta and Alex Yong Sang Chia and Deepu Rajan and Zhiyong Huang},
  title = {{A learning-based approach for automatic image and video colorization}},
  year = {2017},
  eprint = {1704.04610},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1704.04610},
}
Figure