Landscape painting line enhanced super-resolution reconstruction method based on space attention
By constructing a generative adversarial network containing line attention units, and combining spatial attention mechanisms with residual structures, the problem of depicting texture details and line variations in landscape paintings was solved, achieving high-quality super-resolution reconstruction of landscape paintings and improving line clarity and brushstroke integrity.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-29
- Publication Date
- 2026-04-03
AI Technical Summary
Existing super-resolution methods are unable to effectively depict the texture details and line variations of landscape paintings, and lack robustness under complex degradation conditions, resulting in blurred lines or distorted details, which affects the digital display effect and research value.
A generative adversarial network containing line attention units is constructed, and the Real-ESRGAN model is used for degradation processing. By combining spatial attention mechanism and residual structure, the generator and discriminator are optimized through multi-objective loss function to enhance the key lines and brushstroke features of landscape painting.
It improves the accuracy of restoring the lines and structure of landscape paintings and the stability of texture details. The generated results have clear lines and complete brushstrokes, making them suitable for digital restoration and super-resolution reconstruction under complex degradation conditions.
Smart Images

Figure CN121788352A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of computer vision and digital image processing technology, and specifically relates to super-resolution reconstruction and digital restoration of landscape painting images. Background Technology
[0002] Landscape painting, as an important form of Chinese painting art, holds significant value in artistic aesthetics, cultural inheritance, and historical research. Landscape painting primarily employs line drawing, ink layering, and brushstroke rhythm as its expressive means. Its image structure is complex and rich in detail, possessing a distinctive artistic style and profound cultural connotations. However, due to factors such as the aging of painting materials, the influence of preservation environments, and the limited resolution of early imaging and scanning equipment, many landscape paintings suffer from insufficient resolution, blurred lines, and missing details during the digitization process, severely impacting their digital display effects and subsequent research value.
[0003] With the rapid development of computer vision and artificial intelligence technologies, super-resolution reconstruction of images using deep learning methods has gradually become a research hotspot in academia and industry. Compared with traditional methods based on interpolation or model priors, super-resolution reconstruction methods based on deep neural networks can automatically learn the high- and low-resolution mapping relationships of images from a large number of samples, demonstrating a stronger ability to restore image details and overall structure. These methods have made significant progress in fields such as natural images, remote sensing images, and medical images, providing a new technical path for image quality improvement.
[0004] In recent years, with the development of generative adversarial networks and attention mechanisms, image super-resolution technology has continuously improved in terms of reconstruction accuracy and visual quality. By introducing adversarial learning and feature attention mechanisms, models can pay more attention to key structural regions in images, thereby enhancing the ability to recover texture details. However, most existing super-resolution methods are mainly designed for natural images, and still face many challenges when directly applied to landscape paintings.
[0005] On the one hand, landscape paintings, with their core structure based on lines and brushstrokes, exhibit significantly different texture distributions compared to natural images. General super-resolution models struggle to effectively depict texture details and line variations, easily leading to problems such as blurred lines or distorted details. On the other hand, landscape paintings often undergo various complex degradation processes during preservation and digitization, such as blurring, noise, and compression distortion. Existing methods lack robustness in the face of complex degradation conditions, making it difficult to simultaneously preserve structure and enhance detail. Therefore, how to introduce effective attention mechanisms tailored to the image features of landscape paintings and construct datasets that better reflect the actual degradation process has become a crucial technical challenge that urgently needs to be addressed in the field of landscape painting super-resolution reconstruction. Summary of the Invention
[0006] The technical problem to be solved by the present invention is to overcome the shortcomings of the prior art and provide a spatial attention-based super-resolution reconstruction method for enhancing lines and brushstroke details while maintaining overall stylistic consistency.
[0007] The technical solution adopted to solve the above technical problems consists of the following steps:
[0008] (1) Constructing a landscape painting dataset
[0009] Collect landscape painting images, process them into images with a pixel size of 256×256, and use the image format of jpg to obtain a high-resolution landscape painting dataset.
[0010] (2) Constructing low-resolution images
[0011] The second-order degradation method in the Real-ESRGAN model is used to degrade high-resolution landscape painting images to generate corresponding low-resolution landscape painting images, thus obtaining a low-resolution degradation dataset.
[0012] (3) Divide the training set and the test set
[0013] The high-resolution landscape painting dataset was merged with the low-resolution degraded dataset and divided into training and testing sets in a 9:1 ratio.
[0014] (4) Constructing a super-resolution reconstruction network
[0015] The super-resolution reconstruction network consists of a generator and a discriminator connected in series.
[0016] The generator consists of a shallow feature extraction module, a deep feature extraction module, and a reconstruction module connected together. One output of the shallow feature extraction module is connected to the deep feature extraction module, and the other output is connected to the reconstruction module.
[0017] The shallow feature extraction module consists of convolutional layer 1.
[0018] The deep feature extraction module is composed of line attention units 1 to 14 connected in series, and then connected in series with cascaded layers and convolutional layers 2.
[0019] The reconstruction module consists of an upsampling layer 1 and a convolutional layer 3 connected in series.
[0020] (5) Training the super-resolution reconstruction network
[0021] 1) Construct the total loss function
[0022] Construct the total loss function according to equation (1). :
[0023] (1)
[0024] in, This represents the pixel reconstruction loss function. Represents the adversarial loss function. This represents the feature matching loss function. Represents the perceptual loss function. The weights represent the pixel reconstruction loss function. The weights represent the adversarial loss function. The weights represent the feature matching loss function. Represents the weights of the perceptual loss function; , The value range is (0,1]. The value range is (0,2).
[0025] Construct the pixel reconstruction loss function according to equation (2). :
[0026] (2)
[0027] in, Indicates the first generation generated by the generator A super-resolution landscape painting image. This represents the corresponding real high-resolution landscape painting image. Indicates the number of training samples. The value range is 1 to 16.
[0028] Construct the adversarial loss function according to equation (3). :
[0029] (3)
[0030] in, This represents the discrimination result of the discriminator using the spectrally normalized U-Net structure when the input image is a real high-resolution image.
[0031] Construct the feature matching loss function according to equation (4). :
[0032] (4)
[0033] in, This represents the intermediate layer features extracted by the discriminator. Indicates the number of elements in the discriminator feature map;
[0034] Construct the perceptual loss function according to equation (5). :
[0035] (5)
[0036] in, This represents the pre-trained VGG network with fixed weights. Feature mapping extracted from layers, This indicates the number of network layers used to calculate the perceptual loss. Indicates the first The number of elements in the layer feature map.
[0037] 2) Training the super-resolution reconstruction network
[0038] The training set is input into the super-resolution reconstruction network for training. The training parameters are set as follows: batch size of 16, the generator uses the Adam optimizer with a learning rate of 0.0001 and a gradient clipping threshold of 0.001, and the discriminator uses the RMSprop optimizer with a learning rate of 0.0001 and a gradient clipping threshold of 0.0001. The loss function is... Under constraints, the super-resolution reconstruction network is iteratively trained until the total loss function is reached. convergence.
[0039] (6) Testing the super-resolution reconstruction network
[0040] The test set is input into the trained super-resolution reconstruction network for testing, and the generated super-resolution landscape image is output.
[0041] In step (4) of the present invention, the line attention unit 1 is composed of a feature enhancement branch and a spatial attention branch connected in series. The structure of the line attention units 2 to 14 of the present invention is the same as that of the line attention unit 1.
[0042] The feature enhancement branch of this invention is composed of enhanced residual block 1 and enhanced residual block 2 connected in series. The spatial attention branch of this invention is composed of a line-aware adaptive hourglass block, a convolutional layer 4, and a sigmoid activation function layer connected in series.
[0043] The enhanced residual block 1 of this invention consists of a convolutional layer 5, a normalization layer 1, a PReLU activation function layer, a depthwise separable convolutional layer 1, a convolutional layer 6, a convolutional layer 7, a depthwise separable convolutional layer 2, a convolutional layer 8, and a normalization layer 2 connected in series. The other output of the PReLU activation function layer is connected to the convolutional layer 8. The structure of the enhanced residual block 2 of this invention is the same as that of the enhanced residual block 1.
[0044] The line-sensing adaptive hourglass block of the present invention is composed of downsampling unit 1, downsampling unit 2, downsampling unit 3, downsampling unit 4, bottleneck feature sensing module, upsampling unit 1, upsampling unit 2, upsampling unit 3, and upsampling unit 4 connected in series. Downsampling unit 1, downsampling unit 2, downsampling unit 3, downsampling unit 4, bottleneck feature sensing module, upsampling unit 1, upsampling unit 2, upsampling unit 3, and upsampling unit 4 are connected in series in sequence. Another output terminal of downsampling unit 1 is connected to upsampling unit 4, another output terminal of downsampling unit 2 is connected to upsampling unit 3, another output terminal of downsampling unit 3 is connected to upsampling unit 2, and another output terminal of downsampling unit 4 is connected to upsampling unit 1.
[0045] The bottleneck feature perception module of the present invention is composed of a line perception module and a scale adaptive module connected in series.
[0046] The line sensing module of this invention is composed of a Laplacian convolutional layer and a gradient response calculation layer connected in series.
[0047] The scale-adaptive module of this invention is composed of a global average pooling layer, a convolutional layer 9, and a normalization layer 3 connected in series.
[0048] The downsampling unit 1 of the present invention is composed of a convolutional layer 10, a normalization layer 4, a ReLU activation function layer 2, and a downsampling layer 1 connected in series; the structures of the downsampling unit 2, downsampling unit 3, and downsampling unit 4 are the same as those of the downsampling unit 1.
[0049] The upsampling unit 1 of the present invention is composed of an upsampling layer 2, a convolutional layer 11, a normalization layer 5, and a ReLU activation function layer 3 connected in series; the structures of the upsampling unit 2, upsampling unit 3, and upsampling unit 4 are the same as those of the upsampling unit 1.
[0050] This invention proposes a spatial attention-based super-resolution method for enhancing lines in landscape paintings. By constructing a generative adversarial network (GAN) containing line attention units, high-quality reconstruction of low-resolution landscape painting images is achieved. Specifically, before training, a second-order degradation method from the Real-ESRGAN model is used to degrade the high-resolution landscape painting image. Line attention units, which integrate spatial attention mechanisms and residual structures, are introduced into the generator to enhance key lines and brushstroke features in the landscape painting. The discriminator employs a U-Net structure with spectral normalization and is jointly optimized using a multi-objective loss function, achieving collaborative constraints on global structure and local details. Compared with existing technologies, this invention effectively improves the accuracy of line structure restoration and the stability of texture details in landscape paintings. The generated results have clear lines, complete brushstrokes, and coherent structures, exhibiting good robustness and generalization ability even under complex degradation conditions, making it suitable for digital restoration and super-resolution reconstruction of landscape paintings. Attached Figure Description
[0051] Figure 1 This is a flowchart of Embodiment 1 of the present invention.
[0052] Figure 2 This is a schematic diagram of the super-resolution reconstruction network.
[0053] Figure 3 yes Figure 2 Note the structural diagram of Unit 1 in the middle line.
[0054] Figure 4 yes Figure 3 A schematic diagram of the structure of the enhanced residual block 1.
[0055] Figure 5 yes Figure 3 A schematic diagram of the structure of the adaptive hourglass block with line sensing.
[0056] Figure 6 yes Figure 5 A schematic diagram of the bottleneck feature perception module.
[0057] Figure 7 yes Figure 5 A schematic diagram of the structure of the downsampling unit 1.
[0058] Figure 8 yes Figure 5 A schematic diagram of the structure of the upper sampling unit 1.
[0059] Figure 9 The figure shows the simulation results of Embodiment 1 of the present invention. Detailed Implementation
[0060] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments, but the present invention is not limited to the following embodiments.
[0061] Example 1
[0062] The spatial attention-based super-resolution reconstruction method for enhancing lines in landscape paintings in this embodiment consists of the following steps (see...). Figure 1 ):
[0063] (1) Constructing a landscape painting dataset
[0064] Collect landscape painting images, process them into images with a pixel size of 256×256, and use the image format of jpg to obtain a high-resolution landscape painting dataset.
[0065] (2) Constructing low-resolution images
[0066] The second-order degradation method in the Real-ESRGAN model is used to degrade high-resolution landscape painting images to generate corresponding low-resolution landscape painting images, resulting in a low-resolution degradation dataset. The Real-ESRGAN model is a known model.
[0067] (3) Divide the training set and the test set
[0068] The high-resolution landscape painting dataset was merged with the low-resolution degraded dataset and divided into training and testing sets in a 9:1 ratio.
[0069] (4) Constructing a super-resolution reconstruction network
[0070] Figure 2 A schematic diagram of the super-resolution reconstruction network in this embodiment is provided. Figure 2 In this embodiment, the super-resolution reconstruction network consists of a generator and a discriminator connected in series.
[0071] The generator in this embodiment consists of a shallow feature extraction module, a deep feature extraction module, and a reconstruction module connected together. One output of the shallow feature extraction module is connected to the deep feature extraction module, and the other output is connected to the reconstruction module.
[0072] The shallow feature extraction module in this embodiment consists of a convolutional layer 1, which has a kernel size of 3×3, a stride of 1, and padding of 1.
[0073] The deep feature extraction module in this embodiment is composed of line attention unit 1, line attention unit 2, line attention unit 3, line attention unit 4, line attention unit 5, line attention unit 6, line attention unit 7, line attention unit 8, line attention unit 9, line attention unit 10, line attention unit 11, line attention unit 12, line attention unit 13, line attention unit 14, cascaded layers, and convolutional layer 2 connected in series. The convolutional kernel size of convolutional layer 2 is 1×1, the stride is 1, and the padding is 0.
[0074] The reconstruction module in this embodiment consists of an upsampling layer 1 and a convolutional layer 3 connected in series. The structure of the convolutional layer 3 is the same as that of the convolutional layer 1.
[0075] Figure 3 Given Figure 2 Note the structural diagram of unit 1 in the middle line. Figure 3 In this embodiment, the line attention unit 1 is composed of a feature enhancement branch and a spatial attention branch connected in series.
[0076] In this embodiment, the feature enhancement branch is composed of enhanced residual block 1 and enhanced residual block 2 connected in series; the spatial attention branch is composed of a line-aware adaptive hourglass block, convolutional layer 4, and a sigmoid activation function layer connected in series. The structure of convolutional layer 4 is the same as that of convolutional layer 1, but other convolutional layer structures can also be used. The structures of line attention units 2 to 14 are the same as those of line attention unit 1.
[0077] Figure 4 Given Figure 3 A schematic diagram of the structure of the enhanced residual block 1. Figure 4 In this embodiment, the enhanced residual block 1 consists of convolutional layer 5, normalization layer 1, PReLU activation function layer, depthwise separable convolutional layer 1, convolutional layer 6, convolutional layer 7, depthwise separable convolutional layer 2, convolutional layer 8, and normalization layer 2 connected in series. The output of the PReLU activation function layer is connected to convolutional layer 8. The structures of convolutional layer 5 and convolutional layer 8 are the same as those of convolutional layer 1, but other convolutional layer structures can also be used. The kernel size of depthwise separable convolutional layer 1 and depthwise separable convolutional layer 2 is 5×5, the stride is 1, and the padding is 2. Other depthwise separable convolutional layer structures can also be used. The structures of convolutional layer 6 and convolutional layer 7 are the same as those of convolutional layer 2, but other convolutional layer structures can also be used.
[0078] The structure of the enhanced residual block 2 is the same as that of the enhanced residual block 1.
[0079] Figure 5 Given Figure 3 A schematic diagram of the structure of a line-sensing adaptive hourglass block. Figure 5 In this embodiment, the line-sensing adaptive hourglass block is composed of downsampling unit 1, downsampling unit 2, downsampling unit 3, downsampling unit 4, bottleneck feature sensing module, upsampling unit 1, upsampling unit 2, upsampling unit 3, and upsampling unit 4 connected together. Downsampling unit 1, downsampling unit 2, downsampling unit 3, downsampling unit 4, bottleneck feature sensing module, upsampling unit 1, upsampling unit 2, upsampling unit 3, and upsampling unit 4 are connected in series. Another output terminal of downsampling unit 1 is connected to upsampling unit 4, another output terminal of downsampling unit 2 is connected to upsampling unit 3, another output terminal of downsampling unit 3 is connected to upsampling unit 2, and another output terminal of downsampling unit 4 is connected to upsampling unit 1.
[0080] Figure 6 Given Figure 5 A schematic diagram of the bottleneck feature perception module. Figure 6 In this embodiment, the bottleneck feature perception module is composed of a line perception module and a scale adaptation module connected in series.
[0081] The line sensing module in this embodiment consists of a Laplacian convolutional layer and a gradient response calculation layer connected in series. The Laplacian convolutional layer has a kernel size of 5×5, a stride of 1, and a padding of 2. Other Laplacian convolutional layers can also be used.
[0082] The scale-adaptive module in this embodiment consists of a global average pooling layer, a convolutional layer 9, and a normalization layer 3 connected in series. The structure of the convolutional layer 9 is the same as that of the convolutional layer 2, but other convolutional layer structures can also be used.
[0083] Figure 7 Given Figure 5 A schematic diagram of the structure of the downsampling unit 1. Figure 7 In this embodiment, the downsampling unit 1 is composed of a convolutional layer 10, a normalization layer 4, a ReLU activation function layer 2, and a downsampling layer 1 connected in series. The structure of the convolutional layer 10 is the same as that of the convolutional layer 1, but other convolutional layer structures can also be used. The structures of the downsampling units 2, 3, and 4 are all the same as those of the downsampling unit 1.
[0084] Figure 8 Given Figure 5 A schematic diagram of the structure of the upsampling unit 1. Figure 8 In this embodiment, the upsampling unit 1 is composed of an upsampling layer 2, a convolutional layer 11, a normalization layer 5, and a ReLU activation function layer 3 connected in series. The structure of the convolutional layer 11 is the same as that of the convolutional layer 1, but other convolutional layer structures can also be used. The structures of the upsampling unit 2, upsampling unit 3, and upsampling unit 4 are all the same as those of the upsampling unit 1.
[0085] (5) Training the super-resolution reconstruction network
[0086] 1) Construct the total loss function
[0087] Construct the total loss function according to equation (1). :
[0088] (1)
[0089] in, This represents the pixel reconstruction loss function. Represents the adversarial loss function. This represents the feature matching loss function. Represents the perceptual loss function. The weights represent the pixel reconstruction loss function. The weights represent the adversarial loss function. The weights represent the feature matching loss function. Represents the weights of the perceptual loss function; , The value range is (0,1]. The value range of is (0, 2], in this embodiment , The value is 0.5. The value is 1.
[0090] Construct the pixel reconstruction loss function according to equation (2). :
[0091] (2)
[0092] in, Indicates the first generation generated by the generator A super-resolution landscape painting image. This represents the corresponding real high-resolution landscape painting image. Indicates the number of training samples. The value range is 1 to 16 in this embodiment. The value range is 8, but it can also be selected arbitrarily from 1 to 16.
[0093] Construct the adversarial loss function according to equation (3). :
[0094] (3)
[0095] in, This represents the discrimination result of the discriminator using the spectrally normalized U-Net structure when the input image is a real high-resolution image.
[0096] Construct the feature matching loss function according to equation (4). :
[0097] (4)
[0098] in, This represents the intermediate layer features extracted by the discriminator. This indicates the number of elements in the discriminator feature map.
[0099] Construct the perceptual loss function according to equation (5). :
[0100] (5)
[0101] in, This represents the pre-trained VGG network with fixed weights. Feature mapping extracted from layers, This indicates the number of network layers used to calculate the perceptual loss. Indicates the first The number of elements in the layer feature map.
[0102] 2) Training the super-resolution reconstruction network
[0103] The training set is input into the super-resolution reconstruction network for training. The training parameters are set as follows: batch size of 16, the generator uses the Adam optimizer with a learning rate of 0.0001 and a gradient clipping threshold of 0.001, and the discriminator uses the RMSprop optimizer with a learning rate of 0.0001 and a gradient clipping threshold of 0.0001. The loss function is... Under constraints, the super-resolution reconstruction network is iteratively trained until the total loss function is reached. convergence.
[0104] (6) Testing the super-resolution reconstruction network
[0105] The test set is input into the trained super-resolution reconstruction network for testing, and the generated super-resolution landscape image is output.
[0106] A method for enhancing super-resolution reconstruction of lines in landscape paintings based on spatial attention was developed.
[0107] Example 2
[0108] The spatial attention-based super-resolution reconstruction method for enhancing lines in landscape paintings, as described in this embodiment, consists of the following steps:
[0109] (1) Constructing a landscape painting dataset
[0110] The steps are the same as in Example 1.
[0111] (2) Constructing low-resolution images
[0112] The steps are the same as in Example 1.
[0113] (3) Divide the training set and the test set
[0114] The steps are the same as in Example 1.
[0115] (4) Constructing a super-resolution reconstruction network
[0116] The steps are the same as in Example 1.
[0117] (5) Training the super-resolution reconstruction network
[0118] 1) Constructing the loss function
[0119] Construct the total loss function L according to equation (1):
[0120] The expression of equation (1) is the same as that in Example 1.
[0121] In equation (1), This represents the pixel reconstruction loss function. Represents the adversarial loss function. This represents the feature matching loss function. Represents the perceptual loss function. The weights represent the pixel reconstruction loss function. The weights represent the adversarial loss function. The weights represent the feature matching loss function. The weights represent the perceptual loss function. , , The value range is (0,1]. The value range of is (0,2]; in this embodiment , , , The value is 0.1, and the meanings and values of other parameters and variables are the same as in Example 1.
[0122] The other steps are the same as in Example 1. This completes the super-resolution reconstruction method for enhancing lines in landscape paintings based on spatial attention.
[0123] Example 3
[0124] The spatial attention-based super-resolution reconstruction method for enhancing lines in landscape paintings, as described in this embodiment, consists of the following steps:
[0125] (1) Constructing a high-resolution dataset of landscape paintings
[0126] The steps are the same as in Example 1.
[0127] (2) Constructing low-resolution images based on a second-order degradation model
[0128] The steps are the same as in Example 1.
[0129] (3) Divide into training set and test set
[0130] The steps are the same as in Example 1.
[0131] (4) Constructing a super-resolution reconstruction network
[0132] The steps are the same as in Example 1.
[0133] (5) Training the super-resolution reconstruction network
[0134] 1) Constructing the loss function
[0135] Construct the total loss function L according to equation (1):
[0136] The expression of equation (1) is the same as that in Example 1.
[0137] In equation (1), This represents the pixel reconstruction loss function. Represents the adversarial loss function. This represents the feature matching loss function. Represents the perceptual loss function. The weights represent the pixel reconstruction loss function. The weights represent the adversarial loss function. The weights represent the feature matching loss function. The weights represent the perceptual loss function. , , The value range is (0,1]. The value range of is (0,2]; in this embodiment , , The value of is 1. The value is 2, and the meanings and values of other parameters and variables are the same as in Example 1.
[0138] The other steps are the same as in Example 1. This completes the super-resolution reconstruction method for enhancing lines in landscape paintings based on spatial attention.
[0139] To verify the beneficial effects of the present invention, a computer simulation experiment was conducted using the method of Embodiment 1 of the present invention. The simulation experiment results are as follows:
[0140] 1. Experimental Environment
[0141] The hardware requirements are: Linux operating system and one NVIDIA RTX 2060 GPU card.
[0142] The software platform consists of the Python language and the PyTorch deep learning framework.
[0143] 2. Simulation Content and Results
[0144] Landscape painting images were selected as experimental data, and a super-resolution reconstruction simulation experiment was conducted using the method described in Example 1. Some experimental results are shown below. Figure 9 As shown in the figure. The first row of the figure is the low-resolution input image, and the second row is the super-resolution reconstruction result generated using the method of this invention. Figure 9 As can be seen, the reconstructed landscape painting image maintains a good overall structure while significantly enhancing the continuity of lines and the details of texture, effectively alleviating problems such as blurred lines and missing details, thus verifying the effectiveness and practical value of the method of the present invention.
Claims
1. A method for enhancing super-resolution reconstruction of lines in landscape paintings based on spatial attention, characterized in that... It consists of the following steps: (1) Constructing a landscape painting dataset Collect landscape painting images, process them into images with a pixel size of 256×256, and set the image format to jpg to obtain a high-resolution landscape painting dataset; (2) Constructing low-resolution images The second-order degradation method in the Real-ESRGAN model is used to degrade high-resolution landscape painting images to generate corresponding low-resolution landscape painting images, thus obtaining a low-resolution degradation dataset. (3) Divide the training set and the test set The high-resolution landscape painting dataset and the low-resolution degraded dataset were merged and divided into training and testing sets in a 9:1 ratio. (4) Constructing a super-resolution reconstruction network The super-resolution reconstruction network consists of a generator and a discriminator connected in series; The generator is composed of a shallow feature extraction module, a deep feature extraction module, and a reconstruction module connected together. One output end of the shallow feature extraction module is connected to the deep feature extraction module, and the other output end is connected to the reconstruction module. The shallow feature extraction module consists of convolutional layer 1; The deep feature extraction module is composed of line attention units 1 to 14 connected in series and then connected in series with cascaded layers and convolutional layers 2. The reconstruction module consists of an upsampling layer 1 and a convolutional layer 3 connected in series. (5) Training the super-resolution reconstruction network 1) Construct the total loss function Construct the total loss function according to equation (1). : (1) in, This represents the pixel reconstruction loss function. Represents the adversarial loss function. This represents the feature matching loss function. Represents the perceptual loss function. The weights represent the pixel reconstruction loss function. The weights represent the adversarial loss function. The weights represent the feature matching loss function. Represents the weights of the perceptual loss function; , The value range is (0,1]. The value range is (0,2]; Construct the pixel reconstruction loss function according to equation (2). : (2) in, Indicates the first generation generated by the generator A super-resolution landscape painting image. This represents the corresponding real high-resolution landscape painting image. Indicates the number of training samples. The value range is 1 to 16; Construct the adversarial loss function according to equation (3). : (3) in, This represents the discrimination result of the discriminator using the spectrally normalized U-Net structure when the input image is a real high-resolution image; Construct the feature matching loss function according to equation (4). : (4) in, This represents the intermediate layer features extracted by the discriminator. Indicates the number of elements in the discriminator feature map; Construct the perceptual loss function according to equation (5). : (5) in, This represents the pre-trained VGG network with fixed weights. Feature mapping extracted from layers, This indicates the number of network layers used to calculate the perceptual loss. Indicates the first The number of elements in the layer feature map; 2) Training the super-resolution reconstruction network The training set is input into the super-resolution reconstruction network for training. The training parameters are set as follows: batch size of 16, the generator uses the Adam optimizer with a learning rate of 0.0001 and a gradient clipping threshold of 0.001, and the discriminator uses the RMSprop optimizer with a learning rate of 0.0001 and a gradient clipping threshold of 0.0001. The loss function is... Under constraints, the super-resolution reconstruction network is iteratively trained until the total loss function is reached. convergence; (6) Testing the super-resolution reconstruction network The test set is input into the trained super-resolution reconstruction network for testing, and the generated super-resolution landscape image is output.
2. The method for enhancing super-resolution reconstruction of landscape painting lines based on spatial attention according to claim 1, characterized in that: In step (4), the line attention unit 1 is composed of a feature enhancement branch and a spatial attention branch connected in series; the structure of the line attention unit 2 to the line attention unit 14 is the same as that of the line attention unit 1.
3. The method for enhancing super-resolution reconstruction of landscape painting lines based on spatial attention according to claim 2, characterized in that: The feature enhancement branch is composed of enhanced residual block 1 and enhanced residual block 2 connected in series; the spatial attention branch is composed of line-aware adaptive hourglass block, convolutional layer 4, and sigmoid activation function layer connected in series.
4. The method for enhancing super-resolution reconstruction of landscape painting lines based on spatial attention according to claim 3, characterized in that: The enhanced residual block 1 is composed of convolutional layer 5, normalization layer 1, PReLU activation function layer, depthwise separable convolutional layer 1, convolutional layer 6, convolutional layer 7, depthwise separable convolutional layer 2, convolutional layer 8, and normalization layer 2 connected in series. The other output of the PReLU activation function layer is connected to the convolutional layer 8. The structure of the enhanced residual block 2 is the same as that of the enhanced residual block 1.
5. The method for enhancing super-resolution reconstruction of landscape painting lines based on spatial attention according to claim 3, characterized in that: The line-sensing adaptive hourglass block is composed of downsampling unit 1, downsampling unit 2, downsampling unit 3, downsampling unit 4, bottleneck feature sensing module, upsampling unit 1, upsampling unit 2, upsampling unit 3, and upsampling unit 4 connected together. Downsampling unit 1, downsampling unit 2, downsampling unit 3, downsampling unit 4, bottleneck feature sensing module, upsampling unit 1, upsampling unit 2, upsampling unit 3, and upsampling unit 4 are connected in series. Another output terminal of downsampling unit 1 is connected to upsampling unit 4, another output terminal of downsampling unit 2 is connected to upsampling unit 3, another output terminal of downsampling unit 3 is connected to upsampling unit 2, and another output terminal of downsampling unit 4 is connected to upsampling unit 1.
6. The method for enhancing super-resolution reconstruction of landscape painting lines based on spatial attention according to claim 5, characterized in that: The bottleneck feature perception module is composed of a line perception module and a scale adaptive module connected in series.
7. The method for enhancing super-resolution reconstruction of landscape painting lines based on spatial attention according to claim 6, characterized in that: The line sensing module consists of a Laplacian convolutional layer and a gradient response calculation layer connected in series.
8. The method for enhancing super-resolution reconstruction of landscape painting lines based on spatial attention according to claim 6, characterized in that: The scale-adaptive module consists of a global average pooling layer, a convolutional layer 9, and a normalization layer 3 connected in series.
9. The method for enhancing super-resolution reconstruction of landscape painting lines based on spatial attention according to claim 5, characterized in that: The downsampling unit 1 is composed of a convolutional layer 10, a normalization layer 4, a ReLU activation function layer 2, and a downsampling layer 1 connected in series; the structures of the downsampling units 2, 3, and 4 are the same as those of the downsampling unit 1.
10. The method for enhancing super-resolution reconstruction of landscape painting lines based on spatial attention according to claim 5, characterized in that: The upsampling unit 1 is composed of an upsampling layer 2, a convolutional layer 11, a normalization layer 5, and a ReLU activation function layer 3 connected in series; the structures of the upsampling unit 2, upsampling unit 3, and upsampling unit 4 are the same as those of the upsampling unit 1.