# Task-Driven Real-World Super-Resolution of Document Scans
## 4 Experimental Validation
### Experimental Setup
#### 4.1.1 Datasets  
To evaluate our task-driven SISR framework, we constructed a dataset with real-world document scans acquired under different conditions (the dataset is available upon request). The dataset design was guided by our prior studies, and it is focused on the magnification factor of 4\(\times\). This offers a practical balance: while 2\(\times\) magnification may not sufficiently challenge the model to reconstruct fine details, higher ratios often lead to unstable optimization and a hallucinated content [31; 44]. Thus, the 4\(\times\) setting provides a meaningful and realistic benchmark for restoration quality. The dataset is composed of several parts, namely, _(i) University Bulletin_ (scans of a university bulletin), _(ii) Scientific Article_ (scans of a printed scientific article), and _(iii) COVID Test Leaflet_ (a scan of a medical leaflet), as well as _(iv)_ a publicly available _Old Books_ dataset [45]. Furthermore, we have exploited the MS COCO dataset [28] that contains natural images. The University Bulletin and Scientific Article scans were acquired using a Samsung SCX-3400 flatbed scanner--a widely available consumer-grade device. Each page was scanned sequentially at five resolution levels: 75, 150, 200, 300, and 600 dots per inch (DPIs). The scanning was automated via a custom script to maintain consistent acquisition conditions. After scanning at all DPI settings, each page was translated by a small amount and re-scanned, yielding nine spatial shifts per page. This resulted in a total of \(32\times 5\times 9=1440\) scanned images. The resulting multi-resolution, multi-shift dataset supports both single-image and multi-frame SR scenarios. For our study, we focus on resolution pairs with a scaling ratio of exactly 4\(\times\) (75-300 DPI and 150-600 DPI), ensuring both practical fidelity and alignment with our experimental goals. To ensure spatial alignment between the LR and HR image pairs, we applied global registration based on a rigid 2D translation. Each LR image was first upsampled using bicubic interpolation to match the resolution of its HR counterpart. To assess the alignment quality, we computed an absolute difference map, followed by the calculation of the MSE within a central crop region (excluding a 32-pixel margin). A stochastic grid search was then performed to identify the integer-pixel translation vector that minimized the MSE. To ensure the reliability of the estimated transformation, we validated the chosen shift across 20 randomly selected image pairs. The final translations (in pixels, px) were determined to be \([-5\,\mathrm{px},-1\,\mathrm{px}]\) for 75-300 DPI pairs and \([-6\,\mathrm{px},-7\,\mathrm{px}]\) for 150-600 DPI pairs. These displacements were subsequently applied to the LR images using affine transformation. The aligned image pairs were cropped into patch pairs of \(256\times 256\) pixels (LR) and \(1024\times 1024\) pixels (HR), preserving the 4\(\times\) ratio. The stride matched the LR patch size, and patches were clamped at image borders to avoid out-of-bound sampling. For each page, the zero-shift scan was incorporated into the test set for all DPI levels. The remaining eight shifted scans served as the training set. The COVID Test Leaflet dataset was captured using a consumer-grade Canon (Tokyo, Japan) imageFORMULA P-208 II linear scanner equipped with a contact image sensor. These scans pose significant challenges due to transport instabilities during scanning, which result in nonlinear geometric distortions such as local stretching and warping. Consequently, this dataset provides a robust benchmark for assessing the spatial resilience of SR models under realistic and uncontrolled acquisition conditions. Each scan was divided into overlapping tiles with \(512\times 512\) pixels. Local alignment was performed using phase correlation, and the registered tiles were reassembled into full images. Due to the non-rigid nature of distortions, all registration results were manually verified. These scans were incorporated into the test set.