## 2 Proposed Paint-CUT Model
### General Introduction of Paint-CUT  
Due to the unsatisfactory performance of basic CUT in generating landscape paintings, the Paint-CUT is proposed to ensure that the generated landscape paintings are consistent with the content of photos and the style of target landscape paintings. The code is available at [[https://github.com/haoyuelee/Paint-CUT.git](https://github.com/haoyuelee/Paint-CUT.git)]([https://github.com/haoyuelee/Paint-CUT.git](https://github.com/haoyuelee/Paint-CUT.git)), accessed on 2 February 2024.  
The structure of the constructed Paint-CUT is shown in Figure 1. The main improvements are as follows: (1) Chinese landscape painting emphasizes layout and composition. In order to solve the problem of detail loss and maintain the texture details of the scenery, shuffle attention (SA) [23] is added to the residual blocks of the CUT generator. And then, the SA-ResBlock is constructed, which can better capture the main features of landscape photos and effectively extract the detailed features of photos. (2) In order to solve the problem of poor style transfer and ensure a generated landscape painting with a similar style to the target landscape painting, the pre-trained VGG is used to extract the content and style features to calculate the perceptual loss. (3) In order to solve the problem of blurred outlines, the Canny edge detection is used to generate edge maps. And then, the edge loss is calculated to constrain the model to generate landscape paintings with clear outlines and modeling. Finally, the landscape paintings generated by Paint-CUT have clear outlines and structure, rich details, and realistic style.  
Specifically, the Paint-CUT consists of a generator \(G\) and a discriminator \(D\), which generate landscape paintings from photos through unsupervised training. The model structure is shown in Figure 1. The input landscape photo is in Domain \(X\) and the landscape painting is in Domain \(Y\). The generator \(G\) is used to generate landscape paintings \(\hat{y}\) from photos \(x\), i.e., \(\hat{y}=G(x)\). The discriminator \(D\) is used to distinguish between the generated landscape paintings \(\hat{y}\) and real landscape paintings. Both the generator \(G\) and discriminator \(D\) need to be trained simultaneously to convert the images in Domain \(X\) to Domain \(Y\).  
The generator consists of an encoder and a decoder. When images in Domain \(X\) are input, the convolutional encoder extracts deep features. And the SA-ResBlocks are used to extend the encoder structure and further accelerate model convergence. Then, the decoder generates fake images in Domain \(Y\). Specifically, the landscape photo \(x\) is input into the encoder and is encoded as a feature map through three downsampling convolution blocks. The feature map contains the content and structure features of photos. Since the SA can use spatial and channel attention in parallel and combine the two types of attention, the SA is introduced into the residual blocks of the CUT generator to construct the SA-ResBlock. Then, nine SA-ResBlocks are adopted to better extract the main scene information and deeper features in landscape photos. Finally, the feature map with more complex features is input into two upsampling transpose convolution blocks and a convolution block to generate the landscape painting \(\hat{y}\). The discriminator uses the 70 \(\times\) 70 PatchGAN, which crops the image into 70 \(\times\) 70 patches. For each patch, it predicts the true or false values and, finally, takes the average of all patch predictions to obtain the prediction value for the entire image. In this way, the generated landscape painting is judged as true or false. The details of each module are described below.