# Cascaded Dual-Inpainting Network for Scene Text
## 2 Related Work
### Image Inpainting
This approach enhanced the efficiency and quality of image inpainting. [PERSON] et al. [21] proposed two key innovations: the Prompt-Aware Introverted Attention layer to alleviate the prompt neglect issues of background and nearby object dominance, and the Reweighting Attention Score Guidance strategy to prevent out-of-distribution shifts. Their training-free approach enhanced Stable Diffusion for text-guided high-resolution image inpainting. [PERSON] et al. [22] proposed a mask refinement mechanism to train on masks of different shapes. The approach first predicted precise masks based on contextual cues and then performed inpainting with the refined masks. This paradigm significantly improved the model's performance in complex masking scenarios. Additionally, contextual guidance enhanced the naturalness and coherence of inpainting results. [PERSON] et al. [23]introduced the cyclic merging of forward-background and reverse-damaged regions via iterative refinement, achieving coherent image inpainting with the source image. This iterative refinement achieved information fusion between missing and intact areas, producing restorations with superior visual coherence and structural consistency with the original images. Global structural information is critical for image inpainting. [PERSON] et al. [24] introduced null-text inversion optimization, utilizing base and high-weight text conditions to steer sampling paths for enhanced control. This approach achieved a harmonious balance between reconstruction precision and visual naturalness by enhancing the guidance impact and preserving structural integrity in background regions. DDPMs have achieved remarkable progress in image inpainting, expanding into domains such as multimodal restoration, contextual guidance, and global structural refinement. From DDPMs to recent global-local optimization approaches, the diverse guidance mechanisms have enhanced generation quality. However, DDPMs still face challenges, including a slow generation speed and high computational costs. Transformer architectures have evolved from initial global modeling to multi-level modeling that integrates both local and global contexts in image inpainting. The efficient contextual modeling provided by self-attention mechanisms provides a robust theoretical foundation for image inpainting. With the development of shifted-window transformers, axial attention, and mask-aware transformers, these architectures progressively address computational complexity challenges while enhancing their modeling capabilities for corrupted regions. [PERSON] et al. [25] proposed the Continuous-Mask-Aware Transformer and developed a novel mask update scheme for image inpainting. This improvement enhanced the scoring mechanism of the mask-aware transformer, significantly reducing errors. [PERSON] et al. [26] proposed SwinIR, which is based on the Swin Transformer, for image restoration. By utilizing multiple cascaded Swin Transformer blocks to extract both shallow and deep features, this approach achieved high-quality image reconstruction. The integration of multi-level features effectively enhanced both detailed representations and the global consistency of restored images. [PERSON] et al. [27] proposed a token-mixing network, WavePaint, based on the WaveMix architecture, which used a 2D discrete wavelet transform for spatial token-mixing. The presence of spatial token-mixing enabled faster receptive field expansion in the model. It had fewer parameters, faster training and inference speeds, and required no adversarial training. Although the transformer has made progress in image inpainting, it still has many problems, including sensitivity to input dimensions, high demand for computational resources, a long training time, and poor interpretability.