# Rectification for Stitched Images with Deformable Meshes and Residual Networks
## 4 Results
### Quantitative Comparison of Image Rectification  
The algorithm proposed in this paper was primarily tested on 300 samples selected from the DIR-D dataset. The DIR-D dataset consists of 5839 samples for training and 519 samples for testing. The resolution of each image in the dataset is 512 \(\times\) 384, where each sample is a ternary consisting of a spliced image, a mask, and a rectangular label. The image content covers most of the scenes in human daily life with good generalization and usefulness, and, thus, serves as the experimental dataset for this paper. A quantitative comparison was performed against mainstream rectification methods, and the results are presented in Table 1. The term \"Initialization\" denotes the initial state of the freshly stitched image without image rectification processing. The quantification metrics include the average values of SSIM, PSNR, and FID within the samples for comparison [44, 45, 46]. It is evident that the proposed RIS-DMRN outperforms RPIW [26] and DRIS [21] in all metrics (Table 2). Additionally, it surpasses traditional seam carving and image completion. This superiority is attributed to the configurations in the loss functions of the deep learning rectification algorithm, which includes the design of content loss and mesh loss. These designs minimize the deformation of target content within the image during rectification, resulting in a more effective image rectification. Compared with the three loss terms of boundary, content, and grid adopted by DRIS, the global structure loss term and boundary loss term in RIS-DMRN better preserve global information. Preserving global information is crucial for the algorithm to better understand the contextual relationships of objects in the image. This understanding is vital for interpreting the relative positions, sizes, and interrelationships of objects. Additionally, global information contributes to maintaining consistency between different regions of the image, ensuring that the algorithm produces coherent output throughout the entire image, especially in tasks like image rectification [47, 48, 49]. Simultaneously, by performing comparisons with the method based on the image's minimum energy line and rectangular mesh division adopted by RPIW, it can be observed that using a hexagon as the initial mesh shape yields slightly better results than traditional rectangular meshes (Table 2). This improvement is attributed to hexagons having more rigid directional choices and better shape adjacency relationships. While hexagons may increase the computational time to some extent compared to rectangles, they often produce superior results. Consistent with the settings in [21], in this study, we also acknowledge that there may be differences in quantitative measurements when objects undergo slight positional variations in the generated rectangular results. Although the visual perception may still appear very natural in such cases, it could weaken the persuasiveness of quantitative experiments. Therefore, in this study, we also incorporate BIQUE [50] and NIQE [51] as \"no-reference\" evaluation metrics (Table 3). These two evaluation methods are no-reference image quality assessment metrics dedicated to quantifying the quality of images without the need for any additional reference data [52, 53]. It is noteworthy that RIS-DMRN \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Method** & **SSIM**\(\uparrow\) & **PSNR**\(\uparrow\) & **MSE**\(\downarrow\) & **FID**\(\downarrow\) \\ \hline Reference & 0.3354 & 11.42 & 3180.97 & 43.57 \\ RPIW [26] & 0.3805 & 15.03 & 2893.10 & 37.51 \\ DRIS [21] & 0.7173 & 21.57 & 1796.83 & 21.26 \\ Ours & 0.7234 & 22.65 & 1512.74 & 20.05 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Quantization comparison of image rectification on DIR-D. Structural Similarity Index (SSIM), Peak Signal-to-Noise Ratio (PSNR), Mean-Square Error (MSE), and Fréchet Inception Distance (FID) are employed to assess image quality from different perspectives.