## 3 Results
### Parameters of Proposed Models  
In our experiments, we use the three models with different loss functions and evalute them using CER and WER metrics. Experiment 1 In this experiment, we train the TextStyleBrush model [30]. The model consists of 7 layers, including 5 loss grids. The content encoder and style encoder are both ResNet34 backbones. Moreover, the text is not presented in the form of encoded letters but simply as a separate picture; it is printed on a white background using a standard font. Style mapping network--the mesh transforms the style encoder's output vector into many  
Figure 1: Example of handwritten text with their annotations: bounding boxes—coordinates of words, numbers—IDs of words. individual vectors. Then they are fed on different layers to the input of the generator as parameters in the AdaIN layers [31]. \[\text{AdaIN}(\text{z},\alpha,\beta)=\alpha\bigg{(}\frac{\text{z}-\mu(\text{z})}{ \sigma(\text{z})}\bigg{)}+\beta \tag{14}\]  
where \(\text{z}\in\text{F}\) (the combination of the calligraphic style attributes and the textual content information character-wise), \(\mu\) and \(\sigma\) are the channel-wise mean and standard deviations. The global content information is injected four times (\(p=4\)) during the generative process by the AdaIN layers. Their parameters \(\alpha\) and \(\beta\) are obtained by splitting fc into four pairs. \[\text{x}=\text{H}(\text{t},\text{X}_{\text{i}})=\text{G}(\text{C}(\text{t}), \text{S}(\text{X}_{\text{i}}))=\text{G}\big{(}g_{1}(\overline{\text{t}}),g_{2} (\overline{\text{t}}),\text{S}(\text{X}_{\text{i}})\big{)}, \tag{15}\]  
where \(\overline{\text{t}}=[\text{e}(\text{c});\forall\text{c}\in\text{t}]\) is the encoding of the string t. This allows the generator to better capture the style of the image at different levels. The generator is StyleGAN [32], which the authors of the article have modified in such a way that it accepts as input the results of two encoders: text and style. The output generator, in addition to the picture, predicts a text mask, which is then used in losses (there is no markup for masks; the grid itself learns to predict them). These masks help the architecture better separate text from background/style. The network architecture seems overly complicated, and if you need to fix something, you will have to tune the mesh to adjust for the large number of components inside. Due to its architecture, TextStyleBrush can only generate styles/handwriting of which there are already examples and cannot create completely new examples or some kind of \"averaging\" of existing ones. Only one picture as the input style and one picture as the output with the same style and new text. The input generator takes text as a picture printed in a simple font on a white background and then upscales it. Additionally, the classifier of standard printed fonts acts as one of the losses. This architecture is more suited to generating images with printed text than with handwritten text. _Experiment 2._ We further train neural networks with an architecture based on GanWriting [32]. The content encoder takes the text as a one-hot matrix (unlike the TextStyleBrush, which rendered the text in a standard font on a white background), then the encoder is divided into two heads, \(\text{g}_{1}\) and \(\text{g}_{2}\). The output of g1 is connected to the output of the style encoder, and such a combined tensor is already fed into the input of the generator, which then upscales it into the resulting image. The output content vectors of the \(\text{g}_{2}\) head are fed to the generator at its four levels in the AdaIN layers (whereas in the TextStyleBrush, the style was passed into the generator). _Experiment 3._ In this experiment, we use the architecture of the ScrabbleGAN [11]--a model that is simpler than the ones we have specified before. There is only a generator, discriminator, and OCR. A little about the architecture: one-hot text is multiplied by a random noise vector, passes through linear layers, and is then upscaled by a generator BigGAN model [33].