Descanning: From Scanned to the Original Images with a Color Correction Diffusion Model

Junghun Cha, Ali Haider, Seoyun Yang, Hoeyeong Jin, Subin Yang, A. F. M. Shahab Uddin, Jaehyoung Kim, Soo Ye Kim, Sung-Ho Bae

TL;DR

This paper introduces Descanning, a new image restoration task aimed at reverting scanned documents and photos back to their original digital versions. The authors provide DESCAN-18K, the first large-scale dataset for this problem, and propose DescanDiffusion, a two-stage model combining global color correction with a conditional diffusion process that outperforms both state-of-the-art restoration models and popular commercial scanning apps.

What Problem Does This Paper Address?

While we digitize massive amounts of analog information through scanning, the resulting digital files are often poor imitations of the originals. The physical journey from a digital file to a printed page, through years of storage, and finally through a scanner introduces a "cocktail" of complex degradations.

Standard image restoration tasks usually focus on single issues like noise or blur. However, scanned images suffer from a unique mixture of:

  • Color-related degradations (CD): Fading, saturation shifts, and global color transitions.
  • Non-color-related degradations (NCD): Physical texture/wrinkles, "bleed-through" (seeing the back of the page), internal scanner laser patterns, and the ubiquitous "halftone" dots from the printing process.

Existing models struggle with this specific mixture, and until now, there has been no public, large-scale dataset to train models specifically for this "descanning" task.

Methods

The authors propose a two-stage architecture called DescanDiffusion to handle the global and local aspects of descanning separately.

  1. Global Color Correction: A ResNet-34 based color encoder predicts the color distribution (means and standard deviations of RGB channels) of the original image based on the scanned input. This is used to re-normalize the scanned image, creating a "color-corrected" version ($I_c$). This provides a much cleaner starting point for the next stage.
  2. Local Generative Refinement: The model uses a Conditional Denoising Diffusion Probabilistic Model (DDPM). Unlike vanilla DDPMs that start from pure noise, this model is conditioned on two things: the color-corrected image ($I_c$) and the predicted color correction vector ($v_c$). This dual conditioning guides the diffusion process to remove local NCDs (like halftone patterns and noise) while preventing the color drift common in generative models.
Overview of the DescanDiffusion architecture, showing the color encoder and the conditional DDPM process.

To further boost performance, the authors designed a synthetic data generation scheme that mathematically simulates the six primary scan degradations, allowing the model to generalize better to hardware it hasn't seen during training.

Datasets

The core of this work is DESCAN-18K, a new benchmark containing 18,360 pairs of high-resolution (1024 × 1024) original digital images and their real-world scanned counterparts.

  • Source: 11 types of magazines spanning seven years of preservation.
  • Hardware: Scanned using four different popular scanner models.
  • Diversity: Contains a mix of text, natural scenes, and complex layouts.
  • Generalization Test: The test set uses scanners entirely different from those in the training set to ensure the model isn't just "memorizing" a specific scanner's artifacts.

Key Insights and Ideas

  • Divide and Conquer: Separating global color shifts from local structural degradations is essential. Trying to fix both simultaneously in a single network often leads to sub-optimal results.
  • Color Guidance is Crucial: Diffusion models are powerful generators but can easily "hallucinate" incorrect colors. Explicitly conditioning the DDPM on predicted color statistics ($v_c$) acts as a vital guardrail.
  • The "Halftone" Challenge: The paper highlights that halftone patterns (the tiny dots used in printing) are a dominant and difficult degradation in scans that standard denoisers often fail to remove completely.
  • Synthetic Augmentation: Even with 18K real pairs, simulating physical degradations (like bleed-through and laser lines) significantly improves the model's ability to handle "unseen" scanners.

Key Results

DescanDiffusion (and its augmented version, DescanDiffusion+) consistently outperformed all baselines across quantitative metrics like PSNR, SSIM, and LPIPS.

  • Quantitative: On the DESCAN-18K test set, DescanDiffusion+ achieved a PSNR of 23.43 dB and an SSIM of 0.8736, significantly higher than commercial products like Adobe Scan (PSNR 15.80) and Microsoft Lens (PSNR 20.48).
  • Qualitative: Visual results show the model is particularly effective at removing internal laser noise and halftone patterns that leave other models (like NAFNet or Restormer) looking "dirty" or textured.
Qualitative comparison showing DescanDiffusion successfully removing complex noise and halftone patterns where other methods fail.

Limitations and Future Work

The authors acknowledge a primary limitation: over-smoothing. In some cases, the model mistakenly identifies intentional artistic textures or fine details in the original image as "noise" and removes them, resulting in an unnaturally smooth appearance.

Future work will focus on collecting even more diverse real-world pairs and exploring architectures that can better distinguish between intentional image content and physical degradation. Applying these models to improve downstream tasks like Optical Character Recognition (OCR) is also a promising direction.

Summary updated

BibTeX
@inproceedings{cha2024descanning,
  author = {Junghun Cha and Ali Haider and Seoyun Yang and Hoeyeong Jin and Subin Yang and A. F. M. Shahab Uddin and Jaehyoung Kim and Soo Ye Kim and Sung-Ho Bae},
  title = {{Descanning: From Scanned to the Original Images with a Color Correction Diffusion Model}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2024},
  url = {https://openreview.net/forum?id=SZSK8PPxi1},
}
Figure