# Cascaded Dual-Inpainting Network for Scene Text
## 4 Experiments and Discussion
### Ablation Experiments  
Ablation studies were conducted to systematically evaluate the impact of individual components within the proposed framework. To ensure evaluation consistency, all models  
Figure 2: Comparative scene text inpainting results. Red characters indicate recognition errors. (**a**) Corrupted images; (**b**) ground truth structure; (**c**) TWINST inpainting results; (**d**) GSDM-SPM inpainting results; (**e**) CDINST inpainting results.  
were trained on the TII-ST80k training set and tested on the TII-ST20k test set. To quantify component contributions, the word-level recognition accuracy metric (\(A_{w}\)) was adopted, combined with PSNR and SSIM. Performance comparisons of framework components are presented in Tables 4 and 5.  
loss \(L_{1}\) and \(L_{bce}\) in CDINST-SRM: L1 loss \(L_{1}\) balances accuracy and clarity in the generated results by directly minimizing pixel-level discrepancies. The binary cross-entropy loss \(L_{bce}\) ensures global structural consistency between the inpainted structure and the ground truth structure through direct constraints on absolute pixel space differences. As foundational components in image inpainting, these two losses jointly serve as baselines for evaluating the performance of individual components in the proposed model.  
sem-loss \(L_{sem}\) in CDINST-SRM: As shown in Table 4, when \(L_{sem}\) is removed, the model's scene text reconstruction capability is reduced. The word-level recognition accuracy drops by 2.56%. The semantic loss quantifies the discrepancy between the generated output and the ground truth through deep semantic feature comparisons. This loss function promotes semantic space alignment between the generated results and the ground truth instead of focusing solely on pixel-level similarity, thus improving the semantic coherence of reconstructed scene text.  
style-loss \(L_{style}\) in CDINST-SRM: The style loss \(L_{style}\) critically governs texture preservation in the proposed framework. Its removal degrades word-level recognition accuracy by 1.32% (Table 4), primarily due to misaligned feature statistics between inpainted regions and the ground truth. By enforcing Gram matrix consistency across convolutional layers, \(L_{style}\) ensures the coherent integration of color, texture, and structural patterns.  
SRM in CDINST: The pivotal component in CDINST performs both local detail restoration and global structural reconstruction in character-missing regions. As evidenced in Table 5, the ablation of the SRM results in performance deterioration, manifesting as an 18.81% decrease in character recognition accuracy.  
SGM in CDINST: The SGM guides the SRM to improve reconstruction fidelity. Removing the SGM from the framework diminishes structural guidance for text restoration, thereby degrading the system's text inpainting and recognition performance. As shown in Table 5, the SGM's lack of structural guidance reduces word-level recognition accuracy by 1.46%.  
Computational complexity: To evaluate the performance of the proposed models, Table 6 presents their computational performance, including parameter count, GFLOPs, and inference time.  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline \(L_{1}+L_{bce}\) & \(L_{style}\) & \(L_{sem}\) & **Accuracy** & **PSNR** & **SSIM** \\ \hline ✓ & & & 61.00 & 16.28 & 0.8393 \\ ✓ & & ✓ & 60.80 & 16.01 & 0.8289 \\ ✓ & ✓ & & 59.56 & 16.43 & 0.8414 \\ ✓ & ✓ & ✓ & **62.12** & **16.52** & **0.8432** \\ \hline \hline \end{tabular}
\end{table}
Table 4: Performance comparison of different loss functions in the proposed method.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Model** & **Accuracy** & **PSNR** & **SSIM** \\ \hline SGM & 43.31 & 12.74 & 0.6650 \\ SRM & 60.66 & 16.39 & 0.8388 \\ CDINST & **62.12** & **16.52** & **0.8432** \\ \hline \hline \end{tabular}
\end{table}
Table 5: Performance comparison of modules used in the proposed method.