Abstract: Image quantization is used in several applications aiming in reducing the number of available colors in an image and therefore its size. De-quantization is the task of reversing the quantization effect and recovering the original multi-chromatic level image. Existing techniques achieve de-quantization by imposing suitable constraints on the ideal image in order to make the recovery problem feasible since it is otherwise ill-posed. Our goal in this work is to develop a de-quantization mechanism through a rigorous mathematical analysis which is based on the classical statistical estimation theory. In this effort we incorporate generative modeling of the ideal image as a suitable prior information. The resulting technique is simple and capable of de-quantizing successfully images that have experienced severe quantization effects. Interestingly, our method can recover images even if the quantization process is not exactly known and contains unknown parameters.
Introduction
Digital images are frequently quantized to reduce storage requirements or to accommodate specific hardware constraints. This process maps a continuous range of color intensities to a small, discrete set of values. However, reversing this process—de-quantization—is a classic ill-posed problem. Because multiple original images can map to the same quantized output, there is no unique inverse mapping.
Traditional de-quantization methods often rely on generic structural priors, such as Total Variation (smoothness) or sparsity. While mathematically convenient, these assumptions often fail to capture the intricate textures and semantic features of complex real-world objects, such as human faces. Furthermore, most existing algorithms require precise knowledge of the quantization parameters (e.g., thresholds or palettes). If these parameters are unknown or image-dependent, performance degrades significantly.
Methodology
The proposed framework addresses these challenges by combining generative modeling with a novel differentiable approximation of the quantization process. The approach is formulated as a Maximum A-Posteriori (MAP) estimation problem.
Generative Prior
Rather than optimizing individual pixels, the method represents the target image as the output of a pre-trained generative model $G(Z)$, where $Z$ is a low-dimensional latent code. By searching in the latent space of a model trained on high-quality images (e.g., a GAN), the reconstruction is naturally constrained to lie on the manifold of realistic images. This allows the model to "hallucinate" missing color and texture information based on its learned understanding of the image domain.
The Softmax Trick
A major technical hurdle in de-quantization is that the quantization function is a non-differentiable step function, which prevents the use of gradient-based optimization. To overcome this, the authors introduce a differentiable "softmax" approximation.
As shown in Figure 1, as the parameter $k$ increases, this smooth function converges to the actual discrete quantization steps. This differentiability allows for joint optimization of the latent code $Z$ and the quantization parameters $\alpha$ (such as thresholds) using standard backpropagation techniques. This "blind" de-quantization capability is a significant advancement, as it allows the model to estimate the quantization scheme on the fly during reconstruction.
Experimental Setup
The framework was evaluated using the CelebA dataset, which contains over 200,000 celebrity face images.
- Model: A Progressive GAN (ProGAN) was trained on 202,499 images to serve as the generative prior.
- Evaluation: Testing was performed on 100 images, cropped and resized to $64 \times 64$ pixels.
- Optimization: The latent code and quantization parameters were refined over 200,000 iterations per image.
Key Results
The proposed method, referred to as "Prop. Softmax," significantly outperformed baseline techniques in both quantitative metrics and qualitative visual quality.
As illustrated in Figure 2, the model demonstrates a remarkable ability to recover full-color RGB images from binary (black and white) versions. It does not merely smooth the edges; it correctly infers skin tones, hair colors, and background details. Quantitatively, for an 8-color quantization ($m=2$), the proposed method achieved a PSNR of 19.496, a substantial improvement over the 13.105 achieved by state-of-the-art baselines. While other methods often produce "ghosting" or blocky artifacts, this approach generates sharp, natural-looking faces.
Discussion and Conclusion
While highly effective, the method has certain limitations. It is domain-specific; a GAN trained on faces will not perform well on landscapes. Additionally, the high number of iterations required for optimization makes it computationally expensive compared to simple filtering.
Future work will focus on scaling the method to higher resolutions and exploring its application to other "blind" restoration tasks where the degradation process is partially unknown. By leveraging the rich priors of generative models and ensuring differentiability through the softmax trick, this framework provides a robust solution for recovering high-fidelity information from severely quantized data.
Summary updated