## 3 Methodology
### The Proposed Model
In the decoding stage, the branch performs a series of upsampling and convolution operations to gradually reconstruct the spatial resolution of \(\mathcal{F}_{\text{backbone}}\). The decoding process consists of four stages of transposed convolutions (stride = 2), each followed by feature fusion via concatenation with corresponding encoder layers. This hierarchical design enables progressive spatial resolution recovery from \(16\times 16\) to \(512\times 512\). To preserve the structural integrity of characters during reconstruction, we introduce a multi-scale feature fusion mechanism. At each upsampling stage, the decoder combines the current feature maps with intermediate features from the corresponding resolution levels of the backbone, integrating high-level semantics with low-level details. The fused features are then refined through a standard sequence of convolution, normalization, and activation operations, specifically using a \(3\times 3\) convolution layer, batch normalization, and ReLU activation. This combination, commonly adopted in dense prediction architectures such as U-Net [14] and FPN [15], has been shown to enhance the spatial coherence of feature representations and suppress artifacts introduced during feature fusion. The final output is a prediction map that matches the size of the original image. The overall restoration process can be summarized as the following function:  
\[\mathcal{F}_{\text{restored}}=f_{\text{restore}}(\mathcal{F}_{\text{backbone} };\theta_{d}) \tag{1}\]  
where \(f_{\text{restore}}(\cdot)\) denotes the sequence of upsampling, fusion, and convolutional operations in the restoration module, and \(\theta_{d}\) represents the learnable parameters. The final output \(\mathcal{F}_{\text{restored}}\) is a character-level segmentation map that indicates the spatial distribution of character foreground regions in the input image. Meanwhile, the upsampled features are further processed through a downsampling path, where features at different scales are fused and passed to the text detection and recognition branch for subsequent processing. In the text detection module, we adopt a polygon-based regression approach to achieve the flexible and accurate localization of text regions. The core idea of the detector is to generate multiple feature maps from polygon annotations, which are used for both text region confidence prediction and geometric parameter regression. These outputs jointly provide information about the position and shape of the text. The objective of text region segmentation is to determine which pixels in the image belong to text. We represent the probability of text presence using a binarized region mask, where a foreground probability map indicates the confidence score for each pixel that is part of a text region. The segmentation module applies convolutional layers to the fused features and outputs a probability map of size \(H\times W\), representing the spatial distribution of text likelihood across the image. For the geometric regression part, to better model text regions with inclined angles or irregular shapes, we introduce a quadrilateral-based regression strategy. This strategy predicts the relative offsets between each pixel and the four corner points of the corresponding text region, enabling the flexible modeling of text boundaries. Specifically, for each pixel \((x,y)\), we compute the offset \((d_{xi},d_{yi})\) to each of the four vertices \(P_{i}=(x_{i},y_{i})\), and encode this information into the geometric feature map \(\mathcal{G}(x,y)\). \[P_{i}=\big{(}x+d_{xi},\;y+d_{yi}\big{)},\quad i=1,2,3,4 \tag{2}\]  
In practice, the detection branch first applies two convolutional layers to extract intermediate features from the fused representation. These features are then passed through two parallel \(1\times 1\) convolutions to generate a score map and a geometry map. The score map indicates the probability of each pixel belonging to a text region and is normalized to the range \([0,1]\) using a sigmoid function.