Abstract
Image colorization is a fundamentally ill-posed problem due to the "one-to-many" nature of mapping grayscale luminance to plausible chrominance values. This paper investigates two distinct deep learning paradigms for automatic colorization: a classification-based Convolutional Neural Network (CNN) and a Conditional Generative Adversarial Network (cGAN). Evaluated on the CIFAR-10 dataset, our findings demonstrate that adversarial learning significantly outperforms discrete classification in both quantitative metrics and human-perceived realism, effectively overcoming the desaturation issues common in traditional regression-based approaches.
Introduction
Image colorization involves hallucinating color for a single-channel grayscale image. Because a single object (e.g., a car or a shirt) can realistically be many different colors, traditional Mean Squared Error (MSE) regression often fails. These models tend to predict the mean of all possible colors, resulting in desaturated, grayish outputs. To address this, researchers have proposed treating colorization as either a classification task—forcing the model to choose between discrete color bins—or a generative task, where a discriminator network pushes a generator toward producing realistic distributions.
Methodology
We implemented and compared two primary architectures to evaluate their effectiveness in colorization tasks.
Classification-based Model
Following the approach of Zhang et al., this model maps the input lightness channel ($L$) to a probability distribution over 313 quantized color pairs ($ab$ channels) in the CIE Lab color space. The architecture utilizes a U-Net-style framework with dilated convolutions to maintain spatial resolution while capturing broad context.
GAN-based Model (C-DCGAN)
Our Conditional GAN implementation employs a modified U-Net as the Generator to predict $ab$ channels. A specialized encoder serves as the Discriminator, critiquing the generated images against ground truth photos. The loss function integrates adversarial loss with $L1$ regularization to ensure the generated colors remain structurally consistent with the input image.
Experimental Setup
Both models were trained on the CIFAR-10 dataset, consisting of 60,000 32x32 images across 10 classes. We utilized 50,000 images for training and 10,000 for testing. Images were converted to the CIE Lab color space to isolate the luminance channel ($L$) as the model input.
Results and Discussion
The GAN-based approach demonstrated a clear superiority over the classification model across all metrics. Quantitatively, the GAN achieved a pixel-wise accuracy of ~57.5% (at a 5% error threshold), whereas the classification model struggled significantly.
Qualitatively, as seen in the figure above, the GAN produces more vibrant and semantically appropriate colors. In a user study involving 16 participants, the GAN-colorized images were mistaken for original photographs 40.69% of the time, compared to only 4.80% for the classification model. Interestingly, both models showed a deficiency in accurately reproducing red hues, suggesting that red features in the CIFAR-10 dataset may be more difficult for these architectures to map.
| Model | Pixel-Acc ($\epsilon=5\%$) | PSNR (dB) | User Study (Fooled %) |
|---|---|---|---|
| Classification | 5.828% | 21.848 | 4.80% |
| GAN (Ours) | 57.510% | 24.608 | 40.69% |
| Ground Truth | N/A | N/A | 54.91% |
Conclusion and Future Work
Adversarial learning provides a robust framework for image colorization, producing results that are significantly more realistic than discrete classification methods. However, the low resolution of CIFAR-10 remains a limitation, as semantic details are often lost. Future research will focus on scaling these models to higher-resolution datasets like ImageNet and exploring more modern backbones such as ResNet to improve feature extraction and color diversity.
Summary updated