Mural line draft extraction method based on multi-scale extraction and in-layer learnable fusion

Through multi-scale extraction and learning-integrated mural line draft extraction method, the problem of difficulty in extracting line drafts of mural cultural relics is solved, efficient and accurate line draft extraction is achieved, and the digital protection effect of mural cultural relics is improved.

CN118968241APending Publication Date: 2024-11-15NORTHWEST UNIV

Patent Information

Application Number
CN202410997719.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-24
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

The existing technology is difficult to efficiently and accurately extract line drafts of mural cultural relics, especially when surface diseases and cracks are common in mural cultural relics, and deep learning methods require a large number of clear, complete and sufficient data sets, which leads to line drafts. Extraction work is difficult.

Method used

Using the mural line draft extraction method based on multi-scale extraction and learning-fusion in-layer, the line draft extraction model including multi-scale feature extraction module and learning-fusion module in-layer is established, and unsupervised learning, multi-scale feature extraction and layer are used. The fusion technology can be learned and combined with the cyclic consistency loss function to generate accurate line drawing images.

Benefits of technology

It realizes efficient and accurate extraction of line drafts of mural cultural relics under the conditions of no matching data, reduces the impact of insufficient data, captures rich line details information, improves the effect and accuracy of line draft extraction, and significantly improves the mural cultural relics. Digital protection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118968241A_ABST
    Figure CN118968241A_ABST
Patent Text Reader

Abstract

The invention discloses a mural line draft extraction method based on multi-scale extraction and in-layer learnable fusion, and the method comprises the steps: 1, building a line draft extraction model which comprises a multi-scale feature extraction module and an in-layer learnable fusion module; the multi-scale feature extraction module is used for extracting line features of the image to obtain a line feature map Ffuse; the in-layer learnable fusion module is used for capturing key line details of the line feature map Ffuse through class activation mapping and feature weight fusion; and 2, generating an image line draft graph by using the line draft extraction model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information technology, and in particular to a mural line drawing extraction method based on multi-scale extraction and intra-layer learnable fusion. Background Art

[0002] As precious historical relics, murals are important witnesses of the thousands of years of cultural heritage of the Chinese nation, reflecting the wisdom and creativity of the ancient Chinese people and possessing extremely high historical and cultural value. These cultural relics not only record the development of Chinese history, but also display the unique lifestyles and artistic characteristics of each period and region, becoming a valuable resource for studying the development of Chinese and national culture. At the same time, murals, as important types such as architectural murals and epitaph murals, are mostly unearthed in ancient tombs or temples, bearing the historical imprint of social progress, economic and political changes, and environmental evolution, and have important scientific value for the study of human social development.

[0003] The protection of murals has always been a focus of public attention. However, murals have been severely affected by time and natural factors. For a long time, they have been subjected to natural erosion[3], such as oxidation, cracks, fading and pollution. After excavation, murals are exposed to more serious damage such as temperature and humidity changes, microbial erosion and acid corrosion. In addition, since many mural cultural heritages are fixed in place and cannot be moved, coupled with the limitations of on-site protection and excavation technology, these cultural relics have generally suffered various degrees of damage. Therefore, current research urgently needs to adopt more efficient, professional and systematic technical means to carry out the restoration and protection of these precious mural heritages. Such technical support will become an important guarantee for the continuation and inheritance of precious mural heritage. Line drawing is not only a painting technique, but also a vital part of the restoration and protection of murals, providing necessary support for current cultural relic restoration workers. However, traditional line drawing mainly relies on manual drawing, which places high demands on the painter's painting skills and artistic attainments, and requires a sufficient mural culture and historical monument culture. The process is cumbersome and time-consuming. At present, with the continuous development of deep learning, computer-assisted line drawing extraction methods have been widely used in mural cultural relic research. However, existing murals and cultural relics generally have surface diseases and cracks, and deep learning methods require a clear, complete and sufficient excellent data set, which leads to the current difficulties in line drawing extraction. Therefore, using computers to achieve more accurate and efficient line drawing extraction of murals and cultural relics is still an area that needs to be further studied. Such exploration is of great significance to the digital protection of murals and cultural relics, and has broad research space and development prospects.

[0004] Therefore, it is necessary to provide a mural line drawing extraction method based on multi-scale extraction and intra-layer learnable fusion to solve the problems mentioned in the above background technology. Summary of the invention

[0005] To achieve the above purpose, the present invention provides the following technical solution: a mural line drawing extraction method based on multi-scale extraction and intra-layer learnable fusion, comprising:

[0006] Step 1: Establish a line draft extraction model, wherein the line draft extraction model includes a multi-scale feature extraction module and an intra-layer learnable fusion module;

[0007] The multi-scale feature extraction module is used to extract the line features of the image and obtain the line feature map F fuse ;

[0008] The layer-in-learnable fusion module is used to fuse the line feature map F through class activation mapping and feature weight fusion. fuse Capture the key line details;

[0009] Step 2: Generate an image line drawing using the line drawing extraction model.

[0010] Preferably, the multi-scale feature extraction module extracts line features of the image to obtain a line feature map F fuse , including the following steps:

[0011] Inputting the image into the multi-scale feature extraction module to obtain image features of different scales;

[0012] The image features of different scales are combined to obtain the line feature map F fuse .

[0013] Preferably, before extracting line features from an image, the method further includes:

[0014] The image is downsampled to obtain the primary features of the image and obtain the primary feature map F0.

[0015] Preferably, the line feature map F is fused by class activation mapping and feature weights. fuse The key line details are captured, including:

[0016] The image is input into the network, and after downsampling and multi-scale extraction modules, the encoded mural feature map E is obtained. b , for the mural feature map E b Perform global maximum pooling and global average pooling respectively to obtain the global maximum pooling weight W of the feature a and the global average pooling weight W m ;

[0017] The global maximum pooling weight W is a and the global average pooling weight W mThe corresponding mural feature map E b Multiply them together to get the feature map A ba And feature map A bm ;

[0018] Fusion of the feature map A ba and the characteristic graph A bm , get the fusion feature map A b .

[0019] Preferably, the characteristic graph A ba and the characteristic graph A bm The fusion method is:

[0020] A b =f[C(α*A ba +β*A bm )]

[0021] Among them, f(·) represents a 1×1 convolution, C(·) represents the number of channels in series, and α and β represent adaptive learning parameters.

[0022] Preferably, the method further comprises: b Perform weight balancing to obtain the balanced line feature map F fuse , that is, the line drawing of the image.

[0023] Preferably, the line feature graph F fuse Obtained by the following formula:

[0024] F fuse =R[E b *γ+A b *(1-γ)]

[0025] Among them, R(·) represents the ReLU activation function and γ represents the adaptive learning parameter.

[0026] Preferably, the method further comprises adding a loss function to the establishment of the line draft extraction model for training:

[0027] Adding a cycle consistency loss function to the line draft extraction model;

[0028] Reconstructing the image line drawing to obtain a reconstructed image;

[0029] The reconstructed image is used to train the line drawing extraction model based on a cycle consistency loss function.

[0030] Preferably, the loss function also includes adversarial loss and / or identity loss.

[0031] Preferably, the data set used for the training also includes an initial image data set;

[0032] The initial image data set is unpaired image data.

[0033] Compared with the prior art, the present invention provides a mural line drawing extraction method based on multi-scale extraction and intra-layer learnable fusion, which has the following beneficial effects:

[0034] 1. An unsupervised learning method is adopted to reduce the impact of insufficient mural matching data on line drawing extraction.

[0035] 2. Adopting the idea of ​​multi-scale feature extraction, a series of parallel convolutional layers with different expansion rates are used to perform multi-scale feature extraction on the input features. This can capture richer feature information without significantly increasing the model parameters, thereby accurately extracting line details at all levels.

[0036] 3. Using the intra-layer learnable fusion technology, the feature map is processed through global pooling to obtain weight vectors, and these vectors are combined with the original feature map to generate two attention-enhanced feature maps for merging. After that, through adaptive parameter adjustment, weighted fusion between the merged feature map and the multi-scale extracted feature map is achieved, effectively retaining the key line information.

[0037] 4. Design a mural reconstruction generator and cycle consistency loss. By comparing the reconstructed mural image with the original mural image, the generator is continuously optimized to improve the effect and accuracy of line drawing extraction. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 This is a framework diagram of a mural line drawing extraction method based on multi-scale extraction and intra-layer learnable fusion;

[0039] Figure 2 This is a multi-scale information extraction module structure diagram of a mural line drawing extraction method based on multi-scale extraction and intra-layer learnable fusion;

[0040] Figure 3 This is a structural diagram of the intra-layer learnable fusion module in a mural line drawing extraction method based on multi-scale extraction and intra-layer learnable fusion;

[0041] Figure 4 It is a schematic diagram of the complete results of extracting line drawings from mural data using different methods in a simulation experiment in one embodiment of a mural line drawing extraction method based on multi-scale extraction and intra-layer learnable fusion;

[0042] Figure 5 This is a schematic diagram of the enlarged area results of line drawing extraction from mural data using different methods in a simulation experiment in an embodiment of a mural line drawing extraction method based on multi-scale extraction and intra-layer learnable fusion. DETAILED DESCRIPTION

[0043] See also Figure 1-3 The present invention provides a mural line drawing extraction method based on multi-scale extraction and intra-layer learnable fusion, comprising the following steps:

[0044] Firstly, a mural cultural relic training data set is established, wherein the training data set includes an initial image data set, and the initial image data set is unpaired image data.

[0045] Specifically, the initial image dataset is a cultural relic domain and a line drawing domain image dataset;

[0046] The images in the cultural relic domain are mainly collected from the Buddhist murals of Fengguo Temple and the electronic book "Complete Collection of Chinese Unearthed Murals", while the images in the line drawing domain are obtained from the physical book "Dunhuang Murals". These collected images have undergone processing steps such as cropping, scaling, and high-definition scanning before use, and are randomly cropped to a size of 256×256 pixels. In order to maximize the utilization efficiency of data and enhance the generalization ability of the model under limited data volume, the method adopts the method of single sample data enhancement. By performing several geometric transformations on the images, such as flipping and rotation, the dataset is expanded to 2832 cultural relic images and 1497 line drawing images.

[0047] Furthermore, the mural line draft extraction method includes:

[0048] Step 1: Establish a line draft extraction model, wherein the line draft extraction model includes a multi-scale feature extraction module and an intra-layer learnable fusion module;

[0049] The multi-scale feature extraction module is used to extract the line features of the image and obtain the line feature map F fuse ;

[0050] The layer-in-learnable fusion module is used to fuse the line feature map F through class activation mapping and feature weight fusion. fuse Capture the key line details;

[0051] Step 2: Generate an image line drawing using the line drawing extraction model.

[0052] Among them, the line draft extraction model is the line draft extraction generator in Figure 1.

[0053] Furthermore, the process of realizing multi-level line detail extraction by using a multi-scale feature extraction module includes the following steps:

[0054] Step a1: by inputting image I In Perform downsampling to obtain the primary feature map F0, the formula is:

[0055] F0=Conv 3×3 (Conv 7×7 (I In ))

[0056] Among them, the input image I In First, a 7×7 convolution kernel is used for preliminary processing, and then a 3×3 convolution kernel with a step size of 2 is used to further extract the primary features of the image;

[0057] Step a2, sending the feature map F0 to the multi-scale feature extraction module to perform multi-scale feature extraction to obtain image features of different scales, and then merging the image features of different scales to obtain the line feature map F fuse , the formula is:

[0058] F1=DConv 3×3 (F0, dilation=1)

[0059] F2=DConv 3×3 (F1, dilation = 4 × 1)

[0060] F3=DConv 3×3 (F1, dilation = 4 × 2)

[0061] F4=DConv 3×3 (F1, dilation = 4 × 3)

[0062] Among them, DConv 3×3 (·) represents dilated convolutions with different dilation rates, dilation represents the dilation rate, F1 represents the output feature of the first ordinary convolution, and F2, F3, and F4 represent the output features of the second, third, and fourth dilated convolutions, respectively;

[0063] Step a3: merge the convolution output features of different branches. The formula is:

[0064] F fuse =F1+F2+F3+F4

[0065] Furthermore, by class activation mapping and feature weight fusion, key line details of the line feature map are captured, including:

[0066] The image is input into the network, and after downsampling and multi-scale extraction modules, the encoded mural feature map E is obtained. b , for the mural feature map E b Perform global maximum pooling and global average pooling respectively to obtain the global maximum pooling weight W of the feature a and the global average pooling weight W m ;

[0067] The global maximum pooling weight W is a and the global average pooling weight W m The corresponding mural feature map E b Multiply them together to get the feature map A ba And feature map A bm ; The formula is:

[0068]

[0069] Where n is the total number of encoded feature maps, k refers to the specific kth feature map, α and β represent adaptive learning parameters, and E b The encoded mural feature map is obtained through downsampling and multi-scale extraction modules.

[0070] Fusion of the feature map A ba and the characteristic graph A bm , get the fusion feature map A b , the fusion method is:

[0071] A b =f[C(α*A ba +β*A bm )]

[0072] Among them, f(·) represents a 1×1 convolution, C(·) represents the number of channels in series, and α and β represent adaptive learning parameters.

[0073] Furthermore, the method further comprises: b Perform weight balancing to obtain the balanced line feature map F fuse , that is, the line drawing of the image.

[0074] The line feature map F fuse Obtained by the following formula:

[0075] F fuse =R[E b *γ+A b *(1-γ)]

[0076] Among them, R(·) represents the ReLU activation function and γ represents the adaptive learning parameter.

[0077] Furthermore, the method further includes adding a loss function to the line draft extraction model for training:

[0078] Adding a cycle consistency loss function to the line draft extraction model;

[0079] Reconstructing the image line drawing to obtain a reconstructed image;

[0080] The reconstructed image is used to train the line drawing extraction model based on a cycle consistency loss function.

[0081] Among them, the cycle consistency loss is added to the line manuscript extraction model to enhance the ability of the model and ensure that the conversion process can retain the key information and structural features of the original image as much as possible without paired data, while reducing the loss and distortion of information. For each image x in the X domain, the image conversion process should ensure that the image can be converted back to its original state. The formula is:

[0082] F(G(x))≈x

[0083] Similarly, for each image y in the Y domain, G and F should also satisfy reverse cycle consistency, as follows:

[0084] G(F(y))≈y

[0085] The model uses cycle consistency loss to encourage the above behavior, the formula is:

[0086]

[0087] Where G and F represent mapping functions; F(G(x)) means that image x should be transformed back to its original state during the transformation process; G(F(y)) means that image y should be transformed back to its original state during the transformation process, and L cyc (G, F) represents the sum of the losses of images from the two domains when they are converted back to their original states.

[0088] Furthermore, the loss function also includes adversarial loss and / or identity loss.

[0089] Specifically, in CycleGAN, there are two adversarial losses, namely the generator G and the discriminator D y The adversarial loss, as well as the generator F and the discriminator D x of confrontation losses;

[0090] Generator G and Discriminator D y The adversarial loss function is:

[0091]

[0092] Among them, G(x) is a fake image of the Y domain generated by the generator G, which is obtained by the discriminator D y Determine whether the generated image is a real image or a fake image. Therefore, the purpose of the generator G is to minimize the loss function value, while the discriminator D y The purpose is to maximize the value of the loss function. The specific formula is as follows:

[0093]

[0094] Similarly, construct the generator F and the discriminator D x The corresponding adversarial loss function and corresponding target are:

[0095]

[0096]

[0097] The initial image data set is unpaired image data.

[0098] In the present invention, an unsupervised learning method is adopted for the line drawing extraction task of the mural, which reduces the influence of insufficient mural paired data on the line drawing extraction work. The whole model consists of a downsampling module, a multi-scale feature extraction module, an intra-layer learnable fusion module and an upsampling module. The network takes the mural cultural relic image as input, first obtains the feature map, and then passes it through the downsampling and multi-scale feature extraction modules. A series of parallel convolutional layers with different expansion rates are used to perform multi-scale feature extraction on the input features, which can capture richer feature information without significantly increasing the model parameters, thereby accurately extracting the line details of each level; then, using the intra-layer learnable fusion module, the feature map is processed by global pooling to obtain the weight vector, and these vectors are combined with the original feature map to generate two feature maps with enhanced attention for merging, and then the weighted fusion between the merged feature map and the multi-scale extracted feature map is achieved through adaptive parameter adjustment; finally, the final line drawing image is generated through the upsampling step. In addition, in order to improve the accuracy of line drawing extraction, the present invention introduces a mural reconstruction generator and a cycle consistency loss. By comparing the reconstructed mural image with the original mural image, the generator is continuously optimized to improve the effect and accuracy of line drawing extraction.

[0099] In order to verify the line drawing extraction result of the present invention, the effectiveness of the mural line drawing extraction method based on multi-scale extraction and intra-layer learnable fusion proposed in the present invention is verified by simulation below:

[0100] First, in one embodiment of the present invention, the mural line drawing extraction method based on multi-scale extraction and intra-layer learnable fusion proposed by the present invention is used to extract line drawings from the mural data collected and produced by the mural itself, and the specific process is as follows:

[0101] The experiment of the present invention was set up on a server equipped with a Linux operating system, and the server was equipped with a high-performance NVIDIA GeForce RTX3090 GPU to ensure efficient execution of computing tasks. All neural network models designed and implemented in the experiment were completed through the deep learning framework Pytorch, and Python 3.7 was selected as the development language to better complete the tasks of the present invention by utilizing its powerful functions and stability.

[0102] During the network training process, a rotation training method was implemented to optimize the generator and discriminator alternately, aiming to improve the overall network performance. In this process, the Adam optimizer was used for parameter optimization of all networks because its adaptive learning rate adjustment mechanism is suitable for processing large data sets.

[0103] This experiment set 200 iterations of training, in which the initial learning rate was set to 0.0002 to ensure rapid progress at the beginning of the training process. After reaching half of the iteration, that is, 100 iterations, the learning rate began to be gradually reduced, and the linear decay strategy was adopted to fine-tune the network weights, which helped stabilize the performance of the model in the later stages of training.

[0104] In order to further enhance the network's adaptive ability, this method introduces three self-learning fusion parameters α, β, and γ. At the beginning of the experiment, α and β were set to 0, intending not to give additional weight in the initial stage, while γ was set to 1 to ensure that the output of the generator can be fully utilized from the beginning. With this setting, the model can focus on basic functional learning in the early stages of training, and as training progresses, these parameters will adjust themselves to better adapt to the characteristics of the training data. Finally, the results of the line draft extraction of the simulation experiment are analyzed:

[0105] Attached Figure 4 The comparison results of different methods on the mural dataset in the simulation experiment are shown in the following figure. Figure 5 is the comparison result of the enlarged area; Figure 4 (a)-(f) are the fusion result images of six comparison methods, among which (a) is the original mural, (b) is GroundTruth, (c) is Canny, (d) is RCF, (e) is BDCN, (f) is CycleGan, (g) is U-GAT-IT, (h) is UVCGAN, and (i) Ours is the line drawing extraction result of the method proposed in this invention; Figure 4 and 5 From the intuitive feeling of the comparison results of line draft extraction, we can find that: Figure 4(c) The line drawing extracted by the traditional edge detection method Canny only contains a relatively complete basic outline, but some key details are missing and the edges are not coherent, such as Figure 5 As shown in the first and third images in (c), when processing fine features, there is obvious loss of details such as facial features and texture lines on clothing, which seriously affects the integrity of the line drawing extraction results. When extracting line drawings, the CNN-based RCF algorithm shows blurred and intermittent edges, and lacks small-scale features inside, such as Figure 5 In the first and fourth images of (d), the facial information of the Buddha statue is seriously missing, and the facial features are not extracted. In the second image, the facial features can hardly be accurately extracted due to the severe edge blur. The BDCN algorithm can capture the details more completely. Although the line edges are relatively complete, blurring and artifacts appear in the detail-dense areas. For example, in the example Figure 5 In the second and fourth images of (e), the details of the Buddha's head and decorations are not clear enough, and there are obvious blurs and artifacts, which affects the extraction accuracy. For GAN-based technologies (CycleGAN, U-GAT-IT, UVCGAN), although the line thickness is handled reasonably and artifacts and blurring are controlled, there is still a problem of missing details. Figure 5 The fourth picture in (g) shows the facial details of the Buddha statue, such as the obvious lack of nose, mouth and ears. The details of the clothing in the third picture are also not fully extracted. Compared with these methods, the technology proposed in the present invention shows higher integrity and clarity when extracting line drawings, and the lines are coherent. Even in the parts with concentrated details, artifacts can be avoided, showing more precise details. Experimental results show that the method of the present invention has the best effect in extracting line drawings, especially when processing clear mural images, it can ensure the detailed richness of the lines and improve the accuracy of the results.

[0106] Visual evaluation and comparison can provide a more intuitive understanding of the line draft extraction results, but it is difficult to give the most accurate judgment of the line draft extraction results based solely on subjective evaluation. Therefore, it is necessary to combine objective indicators to evaluate the line draft extraction results. This experimental design includes three key performance indicators to evaluate and quantify the effectiveness of the model: Structural Similarity Index Measure (SSIM), Average Precision (AP), and Root Mean Square Error (RMSE). The SSIM indicator focuses on measuring the degree of match between the brightness, contrast, and structure of the image to determine the visual consistency between the synthetic line draft image and the actual reference image. The improvement of the SSIM indicator implies that the quality of image reconstruction has increased, which means that the model visually reproduces higher quality image details. The AP indicator quantifies the performance of the model in the classification task by the area under the precision and recall curve. A larger AP value indicates that the model has shown higher accuracy in distinguishing different categories. RMSE is used to measure the difference between the predicted value and the true value. It reflects the size of the prediction error through the root of the square mean. It is an important indicator to measure the accuracy of the prediction. A lower RMSE value indicates that the prediction result of the model is very close to the actual situation and the prediction reliability is high.

[0107] Table 1 Index evaluation results of different methods on the mural dataset

[0108]

[0109] Table 1 lists in detail the comparative data of the method of the present invention and several other algorithms in various evaluation indicators in the mural dataset, thereby comprehensively demonstrating the performance and advantages of the method of the present invention. Observing the three evaluation indicators of SSIM, RMSE and AP, it can be found that the edge detection algorithm based on deep learning (such as RCF, BDCN) shows significantly better performance than the traditional gradient-based method (Canny), which further confirms the limitations faced by traditional edge detection technology when using underlying features for edge detection. On the other hand, the image conversion method based on generative adversarial network (GAN) (including CycleGAN, U-GAT-IT, UVCGAN and the method proposed in the present invention) also surpasses the edge detection algorithm (RCF, BDCN) that relies solely on CNN in these performance indicators. This result emphasizes the potential and efficiency of generative adversarial networks in the task of extracting clear mural line drawings. When the method of the present invention is used for a clearer data set, the three experimental indicators all reach the optimal values: the SSIM indicator is about 5%-26% higher than the other methods, and the AP and RMSE indicators are about 2.3%-16% and 2%-17% better than the other methods, respectively; this shows that compared with the other six methods, the method of the present invention has brought significant improvements in the completeness, accuracy and error reduction of mural line drawing extraction.

[0110] Based on comprehensive visual evaluation and objective indicator evaluation, the mural line drawing extraction method based on multi-scale extraction and intra-layer learnable fusion given in this embodiment can well obtain clear, complete and accurate line drawing extraction images.

[0111] What is described above is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. A mural line drawing extraction method based on multi-scale extraction and intra-layer learnable fusion, characterized in that: The following steps are involved: Step 1: Establish a line draft extraction model, wherein the line draft extraction model includes a multi-scale feature extraction module and an intra-layer learnable fusion module; The multi-scale feature extraction module is used to extract the line features of the image and obtain the line feature map F fuse ; The layer-in-learnable fusion module is used to fuse the line feature map F through class activation mapping and feature weight fusion. fuse Capture the key line details; Step 2: Generate an image line drawing using the line drawing extraction model.

2. According to claim 1, a mural line drawing extraction method based on multi-scale extraction and intra-layer learnable fusion is characterized in that: The multi-scale feature extraction module extracts the line features of the image to obtain a line feature map F fuse , including the following steps: Inputting the image into the multi-scale feature extraction module to obtain image features of different scales; The image features of different scales are combined to obtain the line feature map F fuse .

3. According to claim 1, a mural line drawing extraction method based on multi-scale extraction and intra-layer learnable fusion is characterized in that: Before extracting line features from an image, it also includes: The image is downsampled to obtain the primary features of the image and obtain the primary feature map F0.

4. According to claim 3, a mural line drawing extraction method based on multi-scale extraction and intra-layer learnable fusion is characterized in that: Through class activation mapping and feature weight fusion, the line feature map F fuse The key line details are captured, including: The image is input into the network, and after downsampling and multi-scale extraction modules, the encoded mural feature map E is obtained. b , for the mural feature map E b Perform global maximum pooling and global average pooling respectively to obtain the global maximum pooling weight W of the feature a and the global average pooling weight W m ; The global maximum pooling weight W is a and the global average pooling weight W m The corresponding mural feature map E b Multiply them together to get the feature map A ba And feature map A bm ; Fusion of the feature map A ba and the characteristic graph A bm , get the fusion feature map A b .

5. According to claim 4, a mural line drawing extraction method based on multi-scale extraction and intra-layer learnable fusion is characterized in that: The characteristic graph A ba and the characteristic graph A bm The fusion method is: A b =F[C(α*A ba +β*A bm )] Among them, f(·) represents a 1×1 convolution, C(·) represents the number of channels in series, and α and β represent adaptive learning parameters.

6. According to claim 4, a mural line drawing extraction method based on multi-scale extraction and intra-layer learnable fusion is characterized in that: The method further comprises: b Perform weight balancing to obtain the balanced line feature map F fuse , that is, the line drawing of the image.

7. The mural line drawing extraction method based on multi-scale extraction and intra-layer learnable fusion according to claim 4 is characterized in that: The line feature map F fuse Obtained by the following formula: F fuse =R[E b *c+A b *(1-c)] Among them, R(·) represents the ReLU activation function and γ represents the adaptive learning parameter.

8. The mural line drawing extraction method based on multi-scale extraction and intra-layer learnable fusion according to claim 1 is characterized in that: The method further includes adding a loss function to the line draft extraction model for training: Adding a cycle consistency loss function to the line draft extraction model; Reconstructing the image line drawing to obtain a reconstructed image; The reconstructed image is used to train the line drawing extraction model based on a cycle consistency loss function.

9. The mural line drawing extraction method based on multi-scale extraction and intra-layer learnable fusion according to claim 8 is characterized in that: The loss function also includes adversarial loss and / or identity loss.

10. The mural line drawing extraction method based on multi-scale extraction and intra-layer learnable fusion according to claim 8, characterized in that: The data set used in the training also includes an initial image data set; The initial image data set is unpaired image data.

Citation Information

Patent Citations

  • Colored drawing cultural relic line draft extraction method

    CN115731450A

  • Systems and methods with integrated gaming engines and smart contracts

    US20230173395A1

Cited By

  • Animation image line draft extraction method, system and device and storage medium

    CN120747540A

  • A method, system, device, and storage medium for extracting line art from anime images.

    CN120747540B

  • Freehand sketch generation system and method based on wavelet transform

    CN121505070A

  • Vectorization method and system of line draft image, computer equipment and medium

    CN121788661A