# Diffusion-Denoising Process with Gated U-Net for High-Quality Document Binarization
## 1 Introduction  
Document images play a crucial role in digital document analysis, encompassing tasks like optical character recognition, historical document restoration, and document classification [1]. However, real-world document images often suffer from degradation caused by a multitude of noise sources, including shadows, stains, ink smears, bleed-through, overwriting, and variable background intensity [2]. These instances of degraded document images significantly impede various aspects of digital document analysis. Therefore, to effectively perform digital document analysis, the preprocessing of degraded document images is essential. Document binarization stands out as a pivotal preprocessing task, aiming to produce pristine, binarized images by restoring text regions from degraded documents [3]. Document binarization goes beyond the removal of specific noise elements; it comprehensively addresses a variety of degradation factors [4]. As illustrated in Figure 1, document binarization plays a vital role in safeguarding the performance of document-related tasks such as optical character recognition against the detrimental impact of noise. However, converting a degraded document containing non-uniform noise into a clean, binarized document presents challenges that traditional binarization algorithms struggle to resolve, as shown in Figure 2. Furthermore, preserving intricate text strokes during this process comes with difficulties. Hence, research dedicated to the binarization of degraded document images is of paramount importance. Research into document binarization spans several decades. During this time, various image binarization algorithms [5; 6; 7] have emerged, significantly contributing to the binarization of standard, uniform images. Nevertheless, they face limitations when confronted with the task of distinguishing non-uniform and complex degradation while extracting detailed text regions in degraded document images [8]. To address these challenges, recent efforts have turned to deep learning techniques within the realm of computer vision for document binarization. Methods rooted in deep learning [9; 10; 11], including segmentation and deep neural networks, have gained prominence. For instance, in one model, document binarization was redefined as a pixel classification problem by applying an FCN (Fully Convolutional Network) [12]. Additionally, the performance of document binarization was enhanced by training an iterative neural network, combining existing binary algorithms with deep learning [8]. Variations of neural network structures have also been proposed for document binarization. [PERSON] et al. [13] performed document binarization by applying  
Figure 1: OCR performance improvement as a result of document binarization. (**a**) OCR results for a document without binarization. (**b**) OCR results for a document with binarization using the proposed model. Document binarization is effective in resolving performance degradation in various document tasks. Figure 2: Images highlighting the difficulties of preserving text strokes and addressing significant degradation. (**a**) Significantly degraded document images. (**b**) Ground-truth images. (**c**) Resulting images of the model in [5], a traditional binarization algorithm-based method. (**d**) Resulting images of the proposed model, a deep learning-based method. The proposed model is effective in preserving text strokes, even in the case of significant degradation. multi-resolutional attention to an encoder-decoder network. In [14], a U-Net architecture with global-local branches was employed, which utilized both the global and local features of degraded documents. However, these deep neural network models face a challenge in that they cannot effectively extract both global and local features when applying the same convolutional filter across the entire image. More recently, document binarization based on generative adversarial networks (GANs) has emerged.