A style transfer method for converting a landscape photo into a style of Chinese landscape painting

By improving the CycleGAN model, combining U-Net and RRDB modules, and training it with the LMS-SSIM loss function and a specific dataset, the artifact and vignetting problems in the transfer from landscape photos to Chinese landscape paintings are solved, generating higher-quality images in the style of Chinese landscape paintings.

CN115908602BActive Publication Date: 2026-03-17NORTHWEST UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-29
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

The existing technology for transferring landscape photographs to Chinese landscape paintings has room for improvement in terms of image quality. It lacks systematicity and completeness and suffers from artifacts and light spots.

Method used

Based on the CycleGAN model, a U-Net network with spectral normalization is added as the discriminator, and the generator is a VGG network with added reflection filling layer and RRDB module. The LMS-SSIM loss function is introduced, and the model is trained using unpaired landscape photos and landscape paintings dataset SCAPE, with specific loss function and learning rate strategy.

Benefits of technology

The generated images have richer textures, reduced noise, stabilized training dynamics, improved image quality and style transfer effects, preserved edges and details, and conform to human visual perception.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115908602B_ABST
    Figure CN115908602B_ABST
Patent Text Reader

Abstract

The application provides a style migration method for converting a landscape photo into a Chinese landscape painting style. MS‑SSIM The loss function retains high-frequency information such as edges and details, and optimizes the brightness and color of the generated image. The loss function constrains the image after style migration from the aspects of brightness, contrast and structure, so that the generated image in the style conversion can be more consistent with human visual perception.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer vision technology and relates to style transfer, specifically a style transfer method for converting landscape photographs into Chinese landscape paintings. Background Technology

[0002] In recent years, with the development of artificial intelligence, deep learning has made style transfer between different images possible. However, current research on style transfer in paintings mainly focuses on Western oil paintings, with very little research on traditional Chinese paintings. Chinese painting is the most profound embodiment of Chinese sentiment, with landscape painting being the most prominent, representing the pinnacle of Chinese traditional culture and art. The integration of traditional Chinese painting with modern style transfer technology represents the inheritance and development of traditional Chinese culture.

[0003] Generative Adversarial Networks (GANs), proposed by Goodfellow et al., are an effective method for image style transfer. They possess stronger fitting capabilities, can generate higher-quality image results, and have gradually become the mainstream method for image style transfer. GANs are powerful and have many practical applications, such as generating images from text and converting images from one style to another. Many widely popular GAN-based architectures have emerged, such as NICEGAN, U-GAT-IT, and DualGAN.

[0004] While these methods can be applied to style conversion from landscape photographs to traditional Chinese landscape paintings, some unique problems remain to be solved. Utilizing artificial intelligence to imitate traditional Chinese paintings and create works with a Chinese landscape painting style is a worthwhile research direction. However, there are relatively few scholars researching artificial intelligence in art, and there is a general lack of systematic and comprehensive reliability research, making the research environment largely untapped. Summary of the Invention

[0005] In view of the shortcomings of the existing technology, the purpose of this invention is to provide a style transfer method for converting landscape photos into Chinese landscape paintings, so as to solve the technical problem that the image effect of transferring landscape photos into landscape paintings needs to be further improved in the existing technology.

[0006] To solve the above problems, the technical solution adopted by the present invention includes:

[0007] A style transfer method for converting landscape photographs into Chinese landscape paintings includes:

[0008] Based on the CycleGAN model, the discriminator is a U-Net network with added spectral normalization, and the generator is a VGG network with added reflection filling layer and RRDB module. An Lo value is added to the total loss function. MS-SSIM Network model with loss function.

[0009] Optional, specifically including: using the SCAPE image dataset consisting of unpaired landscape photos and landscape paintings, training the discriminator and generator from scratch; keeping the learning rate constant for the first 100 training epochs, and then gradually reducing the learning rate to zero in a linear decay manner for the next 100 epochs; introducing an L-factor in addition to the generative adversarial loss function, the cycle consistency loss function, and the identity mapping loss function into the training of the generator. MS-SSIM Loss function.

[0010] Optionally, the adversarial loss function is:

[0011] For the mapping function G and its discriminator D Y The expression is as follows:

[0012]

[0013] Here, G attempts to generate an image G(x) similar to the image in the domain Y, while D Y The goal is to distinguish between the translated sample G(x) and the real sample y; Let represent the probability density distribution function of y belonging to the real image. This represents the distribution function of x conforming to a certain probability density;

[0014] Similarly, for the mapping function F and its generator G, the expression is L GAN (F,D X (,Y,X).

[0015] Optionally, the cycle consistency loss function is expressed as:

[0016]

[0017] ||G(F(y))-y||1 represents taking the L1 norm of G(F(y))-y, which is the sum of the absolute values ​​of the elements in the vector.

[0018] Optionally, the identity mapping loss function is expressed as:

[0019]

[0020] Optionally, the L MS-SSIM The loss function is:

[0021]

[0022] Weight α.

[0023] Optionally, the overall objective loss function of the model is:

[0024]

[0025] In Equation 12:

[0026] L(G,F,D X D Y ) represents the overall objective loss function of the model; λ1, λ2, and λ3 control the generative adversarial loss function, the cycle consistency loss function, the identity mapping loss function, and L. MS-SSIM The relative weights of the four loss functions.

[0027] Preferably, the training dataset includes:

[0028] The dataset contains 4281 images, including 2175 landscape photos as the source domain and 2106 landscape paintings as the target domain. 1669 landscape photos were used for training and 501 for testing, while 1545 landscape paintings were used for training and 561 for testing. All images were resized to 256x256 during training.

[0029] The experimental platform used during training consisted of an Ubuntu 21.10 system paired with a GTX 3090 graphics card with 24GB of video memory. The entire experimental code was implemented based on the PyTorch and TensorFlow frameworks, using CUDA version 11.4 and CuDNN version 8.4.0.

[0030] Optionally, the generator:

[0031] The residual module in the original network is replaced by the RRDB module, and a reflection padding layer is added after the first convolutional layer and before the last convolutional layer. The final network structure contains 3 convolutional modules, 9 RRDB modules, two transposed convolutional layers, one convolutional layer that maps features to RGB, and two reflection padding layers. All non-residual convolutional layers are followed by spatial batch normalization layers and ReLU nonlinear activation function layers. In the generator, fully connected layers use ReLU as the activation function, while the output layer uses Tanh as the activation function. The output layer uses scaled Tanh to ensure that the output image has pixels in the range of [0,255]. Except for the first and last layers which use 9×9 kernels, all convolutional layers use 3×3 kernels

[21] .

[0032] Optionally, the discriminator is an improved version of the PatchGAN discriminator in CycleGAN, which is a U-Net network with skip connections; and a spectral normalization layer is used to mitigate the bright spots and artifacts introduced during network training.

[0033] Compared with the traditional CycleGAN method in the prior art, the present invention has the following technical advantages:

[0034] 1) To address the lack of landscape painting datasets in existing style transfer research, we created our own image dataset, SCAPE, consisting of unpaired landscape photographs and landscape paintings. The dataset contains a total of 4281 images, including 2175 landscape photographs and 2106 ink paintings. The dataset includes common painting elements such as mountains, water, trees, and people.

[0035] 2) To address artifacts and light spots that exist during the migration process, the RRDB module with a reflection filling layer is used as the network model for the generator.

[0036] 3) Employing the U-Net discriminator model with spectral normalization can generate richer image textures, reduce noise, produce cleaner images, and improve the overall performance of the generative model. Furthermore, it can improve discriminator performance and stabilize training dynamics.

[0037] A loss function is used to preserve high-frequency information such as edges and details, and the brightness and color of the generated image are optimized. The loss function allows the model to constrain the style-transferred image in terms of brightness, contrast, and structure, so that the image generated during style transfer is more in line with human visual perception. Attached Figure Description

[0038] The accompanying drawings are provided to further illustrate this disclosure and form part of the specification. They are used in conjunction with the following detailed description and are disclosed in connection with the invention, but do not constitute a limitation thereof. In the drawings:

[0039] Figure 1 This is a schematic diagram of the overall process of the SN-CycleGAN network model;

[0040] Figure 2 This is a diagram of the generator structure of the SN-CycleGAN network;

[0041] Figure 3 This is the RRDB module diagram in the generator;

[0042] Figure 4 This is a dense block structure diagram that makes up the RRDB module;

[0043] Figure 5 This is a diagram of the discriminator structure of the SN-CycleGAN network;

[0044] Figure 6 This is a comparison chart of the NIMA scores of images generated by different methods.

[0045] Figure 7 This is a comparison chart of the migration results produced by different style transfer methods;

[0046] Figure 8 This is a comparison chart of ablation test results;

[0047] Figure 9 These are comparison images showing the effects of adding a reflection fill layer to the network structure.

[0048] The specific content of the present invention will be further explained in detail below with reference to the embodiments. Detailed Implementation

[0049] In this invention, the landscape painting referred to is Chinese landscape painting.

[0050] CycleGAN refers to an image style transfer framework.

[0051] SN-CycleGAN, based on the CycleGAN model, uses a U-Net network with added spectral normalization for the discriminator and a VGG network with added reflection filling layer and RRDB module for the generator. An L-type loss function is added to the overall loss function. MS-SSIM The network model with the loss function is the same model described in this invention for transforming landscape photos into the style of Chinese landscape paintings during style transfer.

[0052] RRDB stands for Residual-in-Residual Dense Block.

[0053] MS-SSIM, or Multi-Scale Structural Similarity Index, refers to multi-scale structural similarity.

[0054] NICEGAN refers to an unsupervised image cross-domain transformation model built on the basis of CycleGAN by proposing to replace the previous encoder part with the first few layers of the discriminator.

[0055] DualGAN refers to an unsupervised learning network model that incorporates the concept of dual learning into the basic GAN framework.

[0056] U-GAT-IT refers to an end-to-end weakly supervised image cross-domain translation model built on CycleGAN by proposing a new attention mechanism and combining it with a new regularization method.

[0057] NIMA refers to a technology based on state-of-the-art deep object recognition neural networks that can predict the distribution of human evaluations of images based on both direct sensory perception (technical perspective) and attractiveness (aesthetic perspective). NIMA can generate a rating histogram for any image—that is, rate the image on a scale of 1 to 10—and compare it with images on the same subject.

[0058] SSIM stands for Structural Similarity, a metric for measuring the similarity between two images. It evaluates image similarity based on three aspects: brightness, contrast, and structure. A higher SSIM value indicates a greater similarity between the two images.

[0059] PSNR refers to Peak Signal-to-Noise Ratio, which is the ratio of peak signal energy to average noise energy. The idea is to evaluate image quality by comparing the differences between the denoised image and the original image contours, i.e., by assessing the visibility of errors.

[0060] IS stands for Inception Score, which takes into account the sharpness and diversity of the generated images. The higher the value, the better the generated model.

[0061] U-GAT-IT is quoted from Kim, J., et al., U-GAT-IT: Unsupervised GenerativeAttentional Networks with Adaptive Layer-Instance Normalization for Image-to-Image Translation. 2019.

[0062] DualGAN is quoted from Yi Z, Zhang H, Tan P, et al. DualGAN: Unsupervised DualLearning for Image-to-Image Translation[J]. IEEE Computer Society, 2017.

[0063] NICEGAN is quoted from Chen, R., et al. "Reusing Discriminators for EncodingTowards Unsupervised Image-to-Image Translation." 2020IEEE / CVF Conference on Computer Vision and Pattern Recognition (CVPR) IEEE, 2020.

[0064] Following the above technical solutions, specific embodiments of the present invention are given below. It should be noted that the present invention is not limited to the following specific embodiments, and all equivalent modifications made based on the technical solutions of this application fall within the protection scope of the present invention.

[0065] Example:

[0066] This embodiment provides a style transfer method for converting landscape photographs into landscape paintings, such as... Figure 1 As shown, the style transfer model is constructed based on the CycleGAN model; the style transfer construction method includes the following steps:

[0067] Step 1 uses the SCAPE image dataset, which consists of unpaired landscape photos and landscape paintings. The dataset contains 4281 images in total, including 2175 landscape photos (source domain) and 2106 landscape paintings (target domain). 1669 landscape photos and 501 landscape paintings are used for training and testing, respectively, while 1545 landscape paintings and 561 landscape paintings are used for training and testing, respectively. The dataset includes common painting elements such as mountains, water, trees, and people. During training, all images are resized to 256x256.

[0068] Step two: The experimental platform used during training consisted of an Ubuntu 21.10 system paired with a GTX 3090 graphics card with 24GB of video memory. The entire experimental code was implemented based on the PyTorch and TensorFlow frameworks, using CUDA version 11.4 and CuDNN version 8.4.0.

[0069] Step 3: Without using a pre-trained model for fine-tuning, train the model directly from scratch using the Adam optimizer with a learning rate of 0.0002. It is worth emphasizing that we keep the learning rate fixed for the first 100 epochs of training, and then gradually reduce the learning rate to zero in a linear decay manner in the last 100 epochs.

[0070] Step four introduces an L-factor into the generator training process, in addition to the generative adversarial loss function, the cycle consistency loss function, and the identity mapping loss function. MS-SSIM Loss function.

[0071] Generative adversarial loss functions can make the generated images more closely resemble the target image in distribution. For one of the mapping functions G and its discriminator D... Y The expression is as follows:

[0072]

[0073] Here, G attempts to generate an image G(x) similar to the image in the domain Y, while D Y The purpose is to distinguish between the translated sample G(x) and the real sample y. Let represent the probability density distribution function of y belonging to the real image. This represents the distribution function of x following a certain probability density. Similarly, for the inverse process F of G, there is a similar expression L. GAN (F,D X (,Y,X).

[0074] The mapping function G aims to counteract the optimization of decreasing items by optimizing the items that increase items by optimizing the mapping function F, and the opposite process is similar. These two mutually symmetrical structures are represented by formulas (2) and (3):

[0075]

[0076]

[0077] The cycle consistency loss function can learn mappings G and F during adversarial training and generate outputs with a distribution similar to the target domain Y. To further reduce the potential space size of the function mapping, we believe the learned function should possess cycle consistency. For each image x in the source domain X, during cyclic translation, it should be able to return to the origin of the translation, and vice versa; that is, forward and backward cycle consistency. In other words:

[0078] x→G(x)→F(G(x))≈x (4);

[0079] y→F(y)→G(F(y))≈y (5);

[0080] Therefore, the cycle consistency loss function can be expressed as:

[0081]

[0082] ||G(F(y))-y||1 represents taking the L1 norm of G(F(y))-y, which is the sum of the absolute values ​​of the elements in the vector.

[0083] The identity mapping loss function helps preserve the consistency of input and output colors. Without the identity mapping loss function, generators G and F could arbitrarily change the hue of the input image when unnecessary.

[0084] It can be represented as:

[0085]

[0086] The structural similarity (SSIM) of pixel P is defined as follows:

[0087]

[0088] Multi-scale SSIM (MS-SSIM) is used to represent structural similarity. MS-SSIM is a metric for measuring the similarity between two images, essentially considering the results of images at different resolutions. Given an M-layer binary pyramid, MS-SSIM is defined as:

[0089]

[0090] In Equation 9, we set α = βj = 1, j = {1, ..., M}.

[0091] p represents the center pixel of block P. The loss function of block P is approximated by the loss function at its center pixel p, as shown in Equation 10.

[0092]

[0093] Neither MS-SSIM nor SSIM is particularly sensitive to uniformity deviations, which can lead to a darker appearance or color. However, L... MS-SSIM The contrast in the high-frequency region is better than other loss functions in the experiment.

[0094] L MS-SSIM It often causes changes in brightness and color deviation, but it preserves high-frequency information of edges and details. L1 preserves the color and brightness of the image with the same error weights, regardless of the local structure.

[0095] To capture the optimal characteristics of the two loss functions, making the transferred image more stylistically natural and able to incorporate image details from multiple scales at different resolutions, we employ a weight α to balance L MS-SSIM The advantages of L1 and L1 are discussed. Experiments show that α = 0.16 achieves the best results.

[0096]

[0097] The overall objective loss function of the model is given by Equation 12:

[0098]

[0099] In Equation 12:

[0100] L(G,F,D X D Y ) represents the overall objective loss function of the model;

[0101] λ1, λ2, and λ3 control the generative adversarial loss function, the cycle consistency loss function, the identity mapping loss function, and L... MS-SSIM The relative weights of the four loss functions.

[0102] Step 5: Replace the residual modules in the original network with RRDB modules, and add reflection padding layers after the first convolutional layer and before the last convolutional layer. The final network structure contains 3 convolutional modules, 9 RRDB modules, two transposed convolutional layers, one convolutional layer that maps features to RGB, and two reflection padding layers. All non-residual convolutional layers are followed by spatial batch normalization layers and ReLU non-linear activation function layers.

[0103] In the generator, ReLU is used as the activation function for all fully connected layers, while Tanh is used as the activation function for the output layer. The output layer uses scaled Tanh to ensure that the output image has pixels in the range of [0, 255]. Except for the first and last layers which use 9×9 kernels, all convolutional layers use 3×3 kernels

[21] .

[0104] Figure 2 This is a generator structure diagram of the network model SN-CycleGAN of the present invention; Figure 3 Here is a diagram of the RRDB module structure used in the generator; Figure 4 This is a structural diagram of the dense blocks that make up the RRDB module.

[0105] Step six involves introducing a U-Net network with spectral normalization into the discriminator network to improve model performance. We modify the PatchGAN discriminator in CycleGAN to a U-Net network with skip connections. Furthermore, a spectral normalization layer is used to mitigate bright spots and artifacts introduced during network training. Figure 5 The discriminator structure diagram of the invented network model SN-CycleGAN.

[0106] Effect test:

[0107] First, this invention can solve the problems of artifacts and bright spots in the process of landscape painting image migration, and can stabilize the training dynamics while improving texture recovery, reducing noise generation, generating cleaner images, and improving the overall performance of the generative model.

[0108] Using the same evaluation dataset and metrics, this invention qualitatively and quantitatively compares our method with several other style transfer methods.

[0109] The method of this invention was compared with several classic image style transfer models, including the NICEGAN model, the DualGAN model, and the U-GAT-IT model. The training parameter settings for these three models are the same as those of the original authors.

[0110] from Figure 7The comparison results show that the NICEGAN method produces images with more severe problems such as structural deformation and content loss; the U-GAT-IT method produces images with content loss, blurring, and color loss; the DualGAN method has some effect on content preservation, but poor effect on image texture style transfer; the CycleGAN method does not have the problem of missing content structure, but poor effect on maintaining color diversity. It can be seen that from the third row onwards, the method of this invention can better learn the details and edges of mountains, and from the fourth row onwards, the method of this invention can better learn the texture details of horses and people.

[0111] Clearly, the three methods used in the comparison struggle to learn the stylistic information of the target image while preserving its content. In contrast, the method of this invention retains the semantic information of the original image and exhibits excellent transfer performance.

[0112] The output images of the test set were quantitatively evaluated using four metrics: SSIM, PSNR, IS, and NIMA. Several classic experimental methods were used to transfer landscape photos to landscape paintings. Table 1 clearly shows that, compared to other methods, the method of this invention achieved the highest scores in SSIM and IS. Experimental results show that PSNR scores do not perfectly match the visual quality of the human eye; images with higher PSNR values ​​may have a worse visual effect than images with lower PSNR values. The U-GAT-IT method achieved the highest score in the PSNR metric, and our method achieved the second highest. The U-GAT-IT method focuses on preserving the differences between the generated and real image pixels, but the images it produces during image transfer have relatively poor structure, diversity, and sharpness. However, overall, the method of this invention performs better.

[0113] Table 1 Comparison results of different image transfer methods

[0114] Methods CycleGAN NICEGAN DualGAN U-GAT-IT Ours SSIM 0.733 0.645 0.670 0.685 0.749 PSNR 9.359 9.006 8.889 13.105 9.482 IS 3.724 3.415 3.751 3.632 3.969 NIMA 4.732 4.563 4.740 4.697 4.887

[0115] Second, in order to evaluate the artistry of the generated landscape paintings, this invention introduces the aesthetic evaluation index NIMA to evaluate the performance of the method from an artistic perspective.

[0116] NIMA can predict human evaluations of images based on direct perception and attractiveness, possessing advantages similar to human subjective scoring; therefore, this invention chooses it as an image quality evaluation metric. NIMA generates a score histogram for any image. Images are scored from 1 to 10, and images on the same subject are directly compared. This design is consistent in form with histograms generated by human rating systems, and the evaluation results are closer to human evaluations.

[0117] Figure 6The images shown are NIMA scores of some migration images generated by the method of this invention. Higher scores indicate better generation quality. It can be seen that images with higher scores do indeed better conform to human aesthetic standards.

[0118] Third, to further analyze the effectiveness of the method of this invention, ablation experiments were conducted. The results showed that the three improvements proposed in this invention played a key role. Figure 8 The ablation experiments show that adding a multi-scale structural similarity loss function can improve the color contrast, saturation, and richness of the generated images. Introducing the RRDB module and adding a reflection fill layer to avoid artifacts and highlights further enhances the structural information of the generated images, preserving more details and improving image quality. While using U-Net can improve local details, it introduces unnatural textures and increases training instability. Using a U-Net discriminator with spectral normalization can stabilize training dynamics while improving texture recovery. This results in richer image textures, reduced noise, cleaner images, and improved overall generative model performance.

[0119] Table 2 compares the scores of CycleGAN networks with different added modules on four metrics: SSIM, PSNR, IS, and NIMA. Red and blue text indicate the first and second best results, respectively. It can be seen that this invention achieves the best results on all three metrics: SSIM, IS, and NIMA.

[0120] Based on the model of this invention, without using the RRDB module, the PSNR metric achieved the best results when comparing the migration results. PSNR represents the average difference between pixel values ​​at each location in two images and is the most commonly used and widely used objective measurement method.

[0121] from Figure 8As can be seen, the PSNR value in the fifth column (the model of this invention without the RRDB module) is the highest, but artifacts and bright spots still exist. Experimental results show that the PSNR score does not perfectly match the visual quality, and a higher PSNR may appear worse than a lower PSNR. The PSNR value in the fourth column (CycleGAN model with MS-SSIM loss added) is the second highest, but the images in the first and second rows are red, which is inconsistent with human visual perception, and the clouds in the third row are too dark. The transformation effect is visually dissimilar to the style of the original image. Many experimental results show that the PSNR score cannot completely match the visual quality perceived by the human eye; it is possible that an image with a higher PSNR may appear worse than one with a lower PSNR. This is because the sensitivity of human vision to errors is not absolute, and its perception is affected by many factors and changes. Experimental results also show that adding MS-SSIM loss can reduce the degree of pixel difference between the two images, maintaining the similarity between the transferred image and the original image in terms of brightness and contrast.

[0122] Furthermore, each of our improvements impacts network performance, and the combination of any two improvements yields better results than a single improvement.

[0123] Table 2 compares the results of using different modules within the CycleGAN algorithm framework.

[0124]

[0125] Fourth, to verify whether the RRDB module with added reflection fill layer can indeed eliminate spotlights and artifacts, we conducted a comparative experiment on another set of images. Figure 9 As can be seen, our improvements significantly enhance the quality of the output images, almost completely eliminating light spots and artifacts.

[0126] Although the present invention has been described in detail above with general descriptions and specific embodiments, modifications or improvements can be made to it, which will be obvious to those skilled in the art. Therefore, all such modifications or improvements made without departing from the spirit of the present invention fall within the scope of protection claimed by the present invention.

Claims

1. A style transfer method for converting a landscape photo into a style of Chinese landscape painting, characterized in that, Comprise: On the basis of CycleGAN model, the image dataset SCAPE composed of unpaired landscape photos and landscape paintings is used to train the discriminator and the generator from scratch; the discriminator is a U-Net network with spectral normalization, the generator is a VGG network with reflection padding layer and RRDB module, and the total loss function is added the network model of the loss function, a multi-scale structural similarity loss function; The generator: replace the residual module in the original network with the RRDB module, and add a reflection padding layer after the first layer of convolution layer and before the last layer of convolution layer; the final structure of the network contains 3 convolution modules, 9 RRDB modules, two transpose convolution layers, one convolution layer for mapping features to RGB, and two reflection padding layers; all non-residual convolution layers are followed by a spatial batch normalization layer and a ReLU nonlinear activation function layer; in the generator, ReLU is used as the activation function for all fully connected layers, while Tanh is used as the activation function for the output layer; the output layer uses scaled Tanh to ensure that the output image has pixels in the range of [0, 255]; all convolution layers use 3x3 kernels except the first and last layers which use 9x9 kernels; The discriminator: improve the PatchGAN discriminator in CycleGAN to a U-Net network with skip connections; and use spectral normalization layer to reduce the bright spots and artifacts introduced by network training. 2.The landscape photo to Chinese landscape painting style transfer method of claim 1, wherein, Specifically comprising: The fixed learning rate does not change in the first 100 cycles of training, and the learning rate is gradually reduced to zero in the next 100 cycles according to the linear decay mode; in the training of the generator, in addition to introducing the generative adversarial loss function, the cycle consistency loss function and the identity mapping loss function, the loss function is also introduced.

3. The style transfer method of converting a landscape photo into a style of Chinese landscape painting according to claim 2, wherein, The adversarial loss function is: For the mapping function G and its discriminator D Y has the following expression: (1); wherein, G attempting to generate images similar to images of a domain Y G(x) while D Y The aim is to distinguish between translated samples G(x) and real samples y ; denotes y a probability density distribution function belonging to a real picture, denotes x a distribution function that fits a certain probability density.​ By analogy, for the mapping function F and its generator G the expression is L GAN (F,D X ,Y,X) ; X represents source domain, x for each picture in the source domain X for each picture in the source domain.

4. The style transfer method of converting a landscape photo into a style of Chinese landscape painting according to claim 3, wherein, The cycle consistency loss function is represented as: (6); denotes the sum over L 1-norm, that is, the sum over the absolute values of the elements in a vector.​ 5. The style transfer method of converting a landscape photo into a style of Chinese landscape painting according to claim 2 or 3, characterized in that, The identity mapping loss function is represented as: (7); denotes the sum over denotes the sum over L 1-norm, i.e. the sum over the absolute values of the elements of a vector, denotes the sum over y is a probability density distribution function belonging to a real picture, denotes the sum over x is a distribution function that fits a certain probability density, F is the inverse process of G is the inverse process of 6. The style transfer method of converting a landscape photo into a style of Chinese landscape painting according to claim 2 or 3, characterized in that, The The loss function is: (11); weights , MS-SSIM represents multi-scale structural similarity, is an absolute loss function, mapping function F and its generator G , X represents the source domain, x is each picture in the source domain X ; domain Y of real samples y .

7. The style transfer method of converting a landscape photo into a style of Chinese landscape painting according to claim 6, wherein, The overall objective loss function of the model is: (12); In equation 12: The total objective loss function of the model is: , , The relative weights of the four loss functions of the generative adversarial loss function, the cycle consistency loss function, the identity mapping loss function and the loss function are controlled.

8. The style transfer method of converting a landscape photo into a style of Chinese landscape painting according to claim 1, 2 or 3, characterized in that, The training data set includes: 4281 pictures, including 2175 landscape photos as the source domain and 2106 landscape paintings as the target domain; the data for training and testing of landscape photos are 1669 and 501 respectively, and the data for training and testing of landscape paintings are 1545 and 561 respectively; all images will be adjusted to 256x256 size during training; The experimental platform used during training is a GTX3090 graphics card with 24G of video memory based on an Ubuntu21.10 system, the entire experimental code is implemented based on the Pytorch and TensorFlow frameworks, the CUDA version used is 11.4, and the CuDNN version is 8.4.0.