Abstract
Perceptual image compression has recently shifted toward generative approaches, such as GANs and Diffusion models, to maintain visual appeal at extremely low bitrates. However, these models often suffer from "hallucination" artifacts, which are particularly catastrophic for screen content where text must remain legible. We introduce PICD (Versatile Perceptual Image Compression with Diffusion Rendering), a framework that treats image reconstruction as a rendering task guided by lossless text metadata. By employing a three-tiered diffusion conditioning approach—incorporating domain-level fine-tuning, spatially-adaptive control, and instance-level guidance—PICD achieves state-of-the-art perceptual quality and perfect text readability. Our results demonstrate superior performance on both screen content benchmarks (SCI1K, SIQAD) and natural image datasets (Kodak, CLIC), effectively bridging the gap between generative sharpness and semantic accuracy.
1. Introduction
The goal of image compression is increasingly moving beyond minimizing Mean Squared Error (MSE) toward maximizing perceptual fidelity. While generative codecs excel at reconstructing natural textures like grass or water, they struggle with the rigid semantic requirements of screen content (UI, documents, and websites). In these contexts, a generative decoder might reconstruct a sharp but incorrect character—transforming an "a" into a "c"—rendering the document useless.
Existing screen-specific codecs typically rely on conservative, non-generative methods to avoid these hallucinations, but this often results in blurry outputs at low bitrates. PICD addresses this trade-off by losslessly encoding text information and using it to guide a powerful diffusion-based renderer, ensuring that text remains literal while the rest of the image benefits from high-fidelity generative reconstruction.
2. Methodology
PICD utilizes a hybrid encoding-decoding architecture that separates semantic text information from visual pixel data.
2.1 Hybrid Encoding
The encoder performs two parallel tasks:
- Text Extraction: Using Optical Character Recognition (OCR), the encoder identifies text strings and their precise coordinates. This metadata is compressed losslessly.
- Image Compression: The remaining visual information is processed through a standard neural codec (MLIC) to provide a base representation of the image layout and color.
2.2 Diffusion Rendering Pipeline
The decoder is built upon a pre-trained Stable Diffusion model, transformed into a high-performance renderer through a three-tiered conditioning strategy:
- Domain-Level Adaptation: The base model is fine-tuned using LoRA (Low-Rank Adaptation) on the WebUI dataset (400,000 screenshots). This allows the model to learn the specific priors of digital interfaces, such as clean lines and standard UI elements.
- Adaptor-Level Control: To ensure tight alignment between the generated pixels and the compressed background, PICD uses a custom hybrid adaptor. Unlike standard high-level controllers, this adaptor utilizes SPADE (Spatially-Adaptive Denormalization) layers to provide granular, pixel-level control over the reconstruction process.
- Instance-Level Guidance: During the iterative sampling process, mathematical guidance is applied at each step. This ensures the generated output strictly adheres to the OCR-provided text and maintains the original color palette, preventing the "color drift" common in diffusion models.
3. Theoretical Foundation
A key contribution of this work is the theoretical justification for treating text as metadata. The authors provide an optimality proof demonstrating that if a decoder can perfectly reconstruct text from a specific condition, encoding that text separately is bitrate-optimal. This justifies the overhead of OCR metadata by showing it significantly reduces the bitrate required for the pixel-based codec to represent high-frequency text details.
4. Experimental Results
4.1 Quantitative Performance
PICD was evaluated against leading perceptual codecs, including PerCo and MS-ILLM, across multiple benchmarks:
- Text Accuracy: On the SCI1K dataset, PICD achieved a Text Accuracy score of 0.4568, significantly outperforming PerCo (0.39) and MS-ILLM (0.40).
- Perceptual Quality: PICD achieved the lowest Frechet Inception Distance (FID) across both screen content and natural image datasets, indicating that its reconstructions are the most visually indistinguishable from the ground truth.
4.2 Versatility
While optimized for screen content, PICD remains a universal codec. By setting the text condition to "empty," the model functions as a high-performance perceptual codec for natural images. Evaluation on the Kodak and CLIC datasets confirms that PICD maintains competitive performance even when no text is present.
5. Limitations and Future Work
Despite its performance, PICD faces two primary challenges:
- Computational Complexity: The iterative nature of diffusion makes decoding slow. Currently, it takes approximately 30 seconds to decode a 512x512 image on an NVIDIA A100 GPU, which is roughly 3x slower than non-iterative generative codecs.
- OCR Dependency: The system's reliability is tied to the accuracy of the OCR engine. If the encoder fails to detect text—such as highly stylized logos or distorted fonts—the decoder cannot reconstruct it with perfect accuracy.
Future research will focus on integrating faster sampling techniques, such as consistency models or distillation, to move toward real-time decoding speeds.
6. Conclusion
PICD represents a significant step forward in perceptual image compression. By treating text as a first-class semantic citizen rather than mere pixel data, it solves the long-standing problem of garbled text in generative codecs. The result is a versatile, high-fidelity framework capable of handling both the complexity of natural scenes and the precision of digital interfaces.
Summary updated