Freehand sketch generation system and method based on wavelet transform
By using a wavelet transform-based hand-drawn line drawing generation system, multi-scale coding and attention mechanisms are employed to address the issues of insufficient efficiency and quality in existing line drawing generation technologies. This results in the generation of delicate and smooth hand-drawn line drawings, making it suitable for diverse application scenarios.
Patent Information
- Application Number
- CN202610043690.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-14
- Publication Date
- 2026-02-10
AI Technical Summary
Existing line art generation technologies are inadequate in terms of efficiency and quality, making it difficult to generate delicate and smooth hand-drawn line art in diverse scenarios, and they are poorly adaptable to complex backgrounds and multiple styles.
A hand-drawn line drawing generation system based on wavelet transform is adopted. Through multi-scale continuous downsampling and upsampling encoding process, combined with attention mechanism and inverse wavelet transform, hand-drawn line drawings are generated, improving image resolution and suppressing noise. The system also uses frequency domain perception module and dual upsampling strategy to capture global structure and detail information.
The generated line art is more natural and coherent, with proper handling of details and a strong hand-drawn style, improving the efficiency and quality of line art generation and making it suitable for diverse application scenarios.
Smart Images

Figure CN121505070A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of line drawing image generation technology, specifically relating to a hand-drawn line drawing generation system and method based on wavelet transform. Background Technology
[0002] The rapid development of artificial intelligence technology has indeed brought about changes in many fields, especially in image processing and generation. Traditional manual line drawing processes are typically time-consuming and require significant professional skills, while modern AI technology can accelerate this process through automation and intelligence. For example, patent application CN119479044A implements an intelligent comic line drawing generation system that preserves facial features. Another example is patent application CN118968241A, which implements a mural line drawing extraction method based on multi-scale extraction and intra-layer learnable fusion.
[0003] Line art extraction technology currently focuses on five main research directions, each with significant differences in method design and application scenarios. The first category is traditional image processing techniques, which rely on gradient calculation, threshold segmentation, or filtering algorithms. Representative methods include Canny edge detection and FDoG. Canny extracts edges through gradient and non-maximum suppression, which is computationally efficient but susceptible to noise interference. FDoG combines flow field direction with DoG filtering to enhance line coherence, making it suitable for artistic line art generation, but it is prone to artifacts in complex backgrounds and cannot adapt to multiple style requirements.
[0004] The second category is machine learning methods based on handcrafted features. These methods can train edge classifiers using the geometric structure of local image patches (such as straight lines or T-shaped connections) or fuse prior knowledge through optimization algorithms. While these methods can suppress scattered noise, they rely on manually designed features, making it difficult to capture complex mutations and limiting their generalization ability.
[0005] The third category is end-to-end deep learning methods. Typical models include HED's multi-scale nested network, BDCN's bidirectional cascaded structure, and Anime2Sketch's adversarial domain adaptation framework. These methods significantly improve cross-style adaptation capabilities by automatically learning features, but require a large amount of labeled data, and deep networks are prone to losing details (such as BDCN causing blurred lines in some complex images due to feature abstraction).
[0006] The fourth category is hybrid methods, which combine the complementary advantages of traditional algorithms and deep learning. For example, the Detail-aware BDCN + MSU-Net framework: in the coarse extraction stage, FDoG provides detailed priors, and transfer learning alleviates the data shortage problem; in the fine extraction stage, multi-scale U-Net (MSU-Net) is used to fuse features and suppress noise. Similar methods include Ref2sketch, which utilizes an attention mechanism to transfer reference styles. While it can generate diverse line drawings, its model complexity is high and its adaptability to different styles is poor.
[0007] The fifth category focuses on multimodal and semi-supervised learning, such as semi-supervised frameworks based on contrastive learning. These frameworks extract style features through pre-trained models and combine spatial-channel attention to separate shape and style information, supporting training on unpaired data. Unsupervised multimodal methods like MUNIT generate multi-style outputs through domain adaptation. These techniques reduce reliance on labeled data but are sensitive to the quality of reference images and are prone to style transfer instability in complex scenes (such as multi-source interference). Summary of the Invention
[0008] To overcome the numerous technical problems in line drawing generation, the present invention proposes a hand-drawn line drawing generation system and method based on wavelet transform. Specifically, it uses wavelet transform for guided upsampling and downsampling and frequency sensing to generate hand-drawn line drawings, which not only improves the efficiency and quality of line drawing generation but also provides more possibilities for diverse application scenarios.
[0009] To achieve the above-mentioned objectives, an embodiment provides a hand-drawn line drawing generation system based on wavelet transform, comprising: Input unit, which is used to input an image; The line drawing generation unit is used to generate hand-drawn line drawings based on the input image using a hand-drawn line drawing generation model. The hand-drawn line drawing generation model includes a multi-scale continuous downsampling encoding process and a continuous upsampling decoding process. The downsampling encoding process at each scale includes performing wavelet transform on the input features to obtain low-frequency component features and high-frequency component features, and then combining an attention mechanism to compress and filter the features to retain key features and suppress irrelevant textures and noise. The upsampling encoding process at each scale includes introducing a dual upsampling strategy and combining it with inverse wavelet transform. Guided by the high-frequency component features of the same scale, the image resolution is gradually restored from the upsampling encoding results of the previous scale to generate the hand-drawn line drawing. The output unit is used to output hand-drawn line art.
[0010] Preferably, the downsampling encoding process at each scale is implemented using a frequency domain sensing module and a wavelet transform downsampling module, including: The frequency domain sensing module is used to perform wavelet transform on the input features to obtain the first low-frequency component features and the first high-frequency component features. After the first low-frequency component features are enhanced by the FMB convolution module, they are fused with the first high-frequency component features. The fused features are then subjected to inverse wavelet transform to construct new high-resolution features, and then refined features are extracted by the ESDB module. The wavelet transform downsampling module is used to decompose the refined input features using wavelet transform to obtain the second low-frequency component features and the second high-frequency component features. The decomposed component features are processed by the frequency domain attention module to calculate the attention map. This attention map is applied to all component features after convolutional layer compression to extract key features. The key features are then added point-by-point to the convolutional layer compressed features to obtain the upsampling encoding result.
[0011] Preferably, when performing wavelet transform decomposition on the features, four wavelet transform channels are used to obtain the low-frequency component features. The high-frequency component characteristics are ,in, The input is fed into the frequency domain attention module. and ,as well as and The elements are added one by one, and the sums are then passed through separable convolutional layers before being added element by element again. Finally, an attention map is generated using the sigmoid function. The formula is expressed as follows: in, For attention maps, and These are depthwise separable convolutions. σ represents pointwise convolution operation, and σ represents the sigmoid function.
[0012] Preferably, the ESDB module utilizes pointwise convolution and depthwise separable convolution to perform refined feature extraction.
[0013] Preferably, the upsampling encoding process at each scale is implemented through a wavelet transform upsampling module, including: The upsampling coding result of the previous scale is divided into two parts for double upsampling. One part is processed by the PixelShuffle layer through convolutional expansion of the channel, and the other part is merged with the high-frequency component features of the same scale and then reconstructed into high-resolution features through wavelet inverse transform. The high-resolution features are then concatenated with the PixelShuffle layer processing result and then processed by the FMB convolution module to complete information filtering and integration before outputting the upsampling coding result of the current scale.
[0014] Preferably, the FMB convolutional module first undergoes channel expansion through convolution, then further compresses the model parameters by introducing a lightweight structure based on group convolution, and then constructs features through SiLU and convolution. At the same time, residual connections are built between the input and output of the FMB convolutional module.
[0015] Preferably, the input and output of the hand-drawn line drawing generation model are further equipped with convolutional layers, which are used to perform convolution operations on the input image and the last upsampled encoding result, respectively.
[0016] Preferably, the hand-drawn line art generation model undergoes parameter optimization before being used for line art generation. The loss function used in parameter optimization includes L1 loss and Dists loss between the generated line art and the real line art, wherein Dists loss measures the image similarity by combining structural similarity and texture similarity.
[0017] Preferably, when calculating the Dists loss, the structure is first represented by the mean of the features of each layer of the generated line art and the real line art, and then the structural similarity is calculated using the following formula. : in, Representing the true line drawing i Layer features The mean, Indicates the generation of the line art. i Layer features The mean, It is a stability constant to prevent the denominator from being zero; Texture similarity is calculated using the following formula. : Among them, symbols Represents the norm; Dists loss Represented as: in, and They represent and The weight parameters.
[0018] To achieve the above-mentioned objectives, this invention also provides a method for generating hand-drawn line art based on wavelet transform. The method employs the aforementioned hand-drawn line art generation system and includes the following steps: Input the image using the input unit; The hand-drawn line art generation model in the line art generation unit is used to generate hand-drawn line art based on the input image; Output hand-drawn line art using the output unit.
[0019] Compared with the prior art, the beneficial effects of the present invention include at least the following: This invention constructs a hand-drawn line art generation model using a deep learning network. The downsampling encoding process involves performing wavelet transform on the input features to obtain low-frequency and high-frequency component features. Then, an attention mechanism is used to compress and filter these features to retain key features while suppressing irrelevant textures and noise. The upsampling encoding process introduces a dual upsampling strategy combined with inverse wavelet transform. Guided by high-frequency component features at the same scale, the image resolution is gradually restored from the upsampling encoding results at the previous scale, successfully capturing the global structure and detailed information of the image, and generating delicate and smooth hand-drawn line art. This invention not only improves the efficiency and quality of line art generation but also provides more possibilities for diverse application scenarios. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is a schematic diagram of the structure of the hand-drawn line drawing generation system based on wavelet transform provided in the embodiment; Figure 2 This is a schematic diagram illustrating the structure and process of the hand-drawn line drawing generation model provided in the embodiment; Figure 3 This is a schematic diagram of the structure and process of the frequency domain sensing module provided in the embodiment; Figure 4 This is a schematic diagram of the structure and process of the wavelet transform downsampling module provided in the embodiment; Figure 5 This is a schematic diagram of the structure and process of the frequency domain attention module provided in the embodiment; Figure 6 This is a schematic diagram of the structure and process of the wavelet upsampling module provided in the embodiment; Figure 7 This is a schematic diagram of the structure and process of the FMB convolutional module provided in the embodiment; Figure 8 This is a schematic diagram of the structure and process of the ESDB module provided in the embodiment; Figure 9 This is a schematic diagram of the structure and process of the BSRB module provided in the embodiment; Figure 10 This is a flowchart of the hand-drawn line drawing generation method based on wavelet transform provided in the embodiment. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the scope of protection of this invention.
[0023] Line art extraction, a crucial task in animation production and computer vision, aims to separate line information from color images that reflects the contours and structure of objects while suppressing irrelevant textures and noise. Traditional methods, such as Canny edge detection or gradient thresholding algorithms, while computationally efficient, are susceptible to variations in lighting and texture interference in complex scenes, leading to issues like broken lines and artifacts. Deep learning techniques, especially U-Net and its variants, have significantly improved the robustness of line art generation through end-to-end feature learning. However, existing methods still face two major challenges: first, the network struggles to distinguish between the main structure and background texture when extracting global details, resulting in unclear hierarchy in the generated line art; second, the loss function relies excessively on pixel-level label matching, neglecting the smoothness and visual harmony of lines, easily producing results that feel mechanical and do not conform to human aesthetics. In summary, to address the technical problems of low structural matching and weak smoothness and harmony in the extraction results of previous methods, this invention provides a hand-drawn line art generation system and method based on wavelet transform.
[0024] like Figure 1 As shown, the hand-drawn line drawing generation system 10 includes an input unit 11, a line drawing generation unit 12, and an output unit 13. The input unit 10 is used to input an image; the line drawing generation unit 12 is used to generate a hand-drawn line drawing based on the input image using a hand-drawn line drawing generation model, wherein the hand-drawn line drawing generation model achieves effective extraction and optimization of image features by integrating wavelet decomposition and attention mechanism; and the output unit 13 is used to output the hand-drawn line drawing.
[0025] The hand-drawn line art generation model has a highly hierarchical architecture, similar to UNet. Given a color image, the model first extracts low-level features through a convolutional operation, then passes them through a wavelet transform-based downsampling-upsampling module. A frequency domain awareness module is also included to handle low- and high-frequency information. These modules are selectively applied in the encoding stage and at the bottom of the model. Finally, a convolutional layer outputs the feature maps to obtain the extracted hand-drawn line art.
[0026] Specifically, such as Figure 2As shown, the hand-drawn line drawing generation model includes a multi-scale continuous downsampling encoding process and a continuous upsampling decoding process. The downsampling encoding process at each scale includes performing wavelet transform on the input features to obtain low-frequency component features and high-frequency component features to capture global structure and detail information in the image. Then, an attention mechanism is used to compress and filter the features to retain key features and suppress irrelevant textures and noise.
[0027] like Figure 2 As shown, the downsampling encoding process at each scale is implemented using a frequency domain sensing module and a wavelet transform downsampling module, including: like Figure 3 As shown, the frequency domain sensing module processes features through a coarse-to-fine strategy, optimizing computational costs and refining the feature space with a maximum downsampling of 8 times, thus achieving a good balance between efficiency and accuracy. Specifically, it is used for fine-grained extraction of input features. After performing wavelet transform (DWT) on the input features to obtain the first low-frequency component features and the first high-frequency component features, the first low-frequency component features are enhanced by the FMB convolution module and then fused with the first high-frequency component features. The fused features are then subjected to inverse wavelet transform (IDWT) to construct new high-resolution features. in, The first high-frequency component is characterized. To enhance the characteristics of the first low-frequency component, This indicates a splicing operation. This represents the inverse wavelet transform. Indicates new high-resolution features; To enhance the detail of high-frequency features, high-resolution features Feature distillation using the ESDB module's distillation mechanism can effectively enhance high-frequency information, thereby extracting refined features. For example, Figure 8 and Figure 9 As shown, the ESDB module uses pointwise convolution, depthwise separable convolution, and 1×1 convolution to perform refined feature extraction.
[0028] In the embodiment, input features The wavelet transform (DWT) separates the low-frequency information (reflecting the overall structure of the image) as low-frequency component features and the high-frequency information (corresponding to the edges and details of the image) as high-frequency component features. Low-pass filtering is used here. and high-pass filtering Four kernel functions with a step size of 2 were established to decompose the input features into four wavelet transform channels, and the output features were respectively... ,in Indicates the length and width of the feature. The number of channels representing the features, where the low-frequency component features are: At the feature level, information about the main structure is preserved, and the high-frequency component features are: It provides high-frequency information while retaining a significant amount of noise.
[0029] like Figure 4 As shown, the wavelet transform downsampling module employs a novel squeezing and attention mechanism to optimize the feature downsampling process while preserving discriminative features and removing noise components. Specifically, it performs wavelet transform (DWT) on the refined input features to obtain the second low-frequency component features and the second high-frequency component features. The decomposed component features are then processed by the frequency domain attention module to calculate the attention map. This attention map applies to all component features. go through Features after convolutional layer compression The attention map that will be output soon and characteristics Multiplication removes noise and enhances refined information to extract key features. This key feature With features The result of the upsampling encoding is obtained by adding the results point by point. Meanwhile, the wavelet transform downsampling module additionally returns a high-frequency component feature. This provides a high-frequency path for the wavelet transform upsampling module.
[0030] Among them, all components After splicing, it forms , These are the parameters of the convolutional layer.
[0031] In this embodiment, to reduce the interference of noise on the generated results, a lightweight attention mechanism is introduced during the multi-level downsampling process. This mechanism effectively enhances the expressive power of important features and suppresses interference from background texture and noise by compressing attention and spatial information squeezing (SE-like structure). The frequency domain attention module is located in the middle encoding region of the wavelet transform downsampling module and is used to further enhance the feature responses of key regions in order to generate the attention map.
[0032] Specifically, such as Figure 5 As shown, and ,as well as and Add each element separately, and pass the results through... After a separable convolutional layer DWConv, the layers are added element-wise, and finally an attention map is generated by the sigmoid function. The formula is as follows: in, For attention maps, and These are depthwise separable convolutions. express The pointwise convolution operation is used to increase the number of input channels, where σ represents the sigmoid function, because... Noise was present, so it was not used to generate the attention map.
[0033] In this embodiment, after downsampling encoding at each scale, the network is connected to the upsampling encoding process via a frequency domain awareness module. For each scale's upsampling encoding process, a dual upsampling and fusion mechanism is introduced to enhance awareness of high-frequency components and aid in the reconstruction of high-frequency details. Specifically, the dual upsampling paths correspond to the restoration and reconstruction of low-frequency and high-frequency information, respectively. The fusion mechanism employs skip connections and cascaded convolutions to maintain feature consistency while ensuring the clarity of lines and texture restoration capabilities in the output image. By using high-frequency information to guide attention distribution, the network becomes more sensitive in perceiving and preserving detailed features, significantly improving the coherence and smoothness of lines.
[0034] Specifically, the upsampling encoding process at each scale includes introducing a dual upsampling strategy combined with inverse wavelet transform. Guided by high-frequency component features at the same scale, the image resolution is gradually recovered from the upsampling encoding results of the previous scale, and the ability to perceive high-frequency components is enhanced to generate hand-drawn line art. In implementation, the upsampling encoding process at each scale is implemented through a wavelet transform upsampling module, including: like Figure 6 As shown, the upsampling encoding result of the previous scale is divided into two parts for double upsampling. and In order to save computation in the upsampling part, one part pass The convolutional dilation channels are processed by the PixelShuffle layer: The other part High-frequency component characteristics at the same scale After merging, high-resolution features are reconstructed using inverse wavelet transform. : This high-resolution feature Results of processing with PixelShuffle layer After splicing, the FMB convolution module completes information filtering and integration, and outputs the upsampling encoding result at the current scale.
[0035] In the embodiments, such as Figure 7 As shown, the FMB convolutional module first passes through The convolution is used to expand the channels, and then a lightweight structure based on group convolution is introduced to further compress the model parameters and improve computational efficiency. After that, SiLU and convolution are used to form features. At the same time, the FMB convolution module simulates multi-scale response through a multi-branch structure and builds residual connections between input and output to avoid gradient vanishing and improve network stability.
[0036] The hand-drawn line art generation model described above underwent parameter optimization before being applied. The specific process is as follows: First, we constructed the sample data, specifically using a self-built image-line drawing pair dataset containing approximately 1600 sets of high-quality color images and their corresponding hand-drawn style line drawings. This dataset covers various content types, including people, animals, and scenes, and is highly representative. Image preprocessing included image resizing, normalization, and line drawing format standardization (white background with black lines). This process not only formatted the line drawing images but also improved image quality and removed noise to ensure the accuracy and consistency of the dataset. The dataset was divided into training and validation sets in an 8:2 ratio. This division allows us to effectively evaluate the model's generalization ability during training and perform performance testing on the validation set to ensure the model's reliability and accuracy in real-world applications.
[0037] During parameter optimization, a stochastic gradient descent optimizer was used with a learning rate of 0.001. Loss calculations were performed based on the model's predictions and the actual hand-drawn results. The loss functions used in parameter optimization included L1 loss and Diss loss between the generated and real line drawings, ensuring pixel-level and perceptual-level similarity between the generated and target images. Specifically, the Diss loss measures image similarity by combining structural and texture similarity, and is used in the design of perceptual loss functions for image generation and reconstruction tasks. A pre-trained deep convolutional network (such as VGG) was used to extract multi-layer feature maps from the images, and the similarity between images was evaluated from both structural and texture dimensions. The calculation method is as follows: First, the structure is represented by the mean of the features of each layer of the generated line art and the real line art: Then, structural similarity is calculated using the following formula. : Texture similarity is calculated using the following formula. : in, Representing the true line drawing i Layer features The mean, Indicates the generation of the line art. i Layer features The mean, It is a stability constant to prevent the denominator from being zero; sign Represents the norm, with the symbol Represents the dot product; Dists loss Represented as: in, and They represent and Weight parameters; Total loss of parameter optimization Defined as: in, and They are respectively and The weight parameters. The total loss. Taking into account factors such as pixel-level label matching, line smoothness, and visual harmony, this method guides network training and further improves the quality and aesthetic effect of generated line art. It has advantages in maintaining the overall structure and detailed texture of the image, and is especially suitable for tasks with high requirements for detail fidelity, such as generating hand-drawn line art.
[0038] During parameter optimization training, the model is trained using a constructed image dataset. By optimizing the loss function, the network parameters are continuously adjusted to improve the quality of the generated images. The optimized hand-drawn line art generation model can ultimately output line art images with a consistent style, smooth lines, and a hand-drawn texture. In actual deployment, this network supports high-resolution input images and meets the requirements for real-time processing in terms of inference speed.
[0039] The implementation examples also verified the effectiveness and superiority of the hand-drawn line art generation model, specifically through systematic experimental evaluation. To comprehensively evaluate model performance, the following quantitative metrics were used: PSNR (Peak Signal-to-Noise Ratio), SSIM (Structural Similarity), and LPIPS (Perceptual Similarity). Quantitatively, the hand-drawn line art generation model outperformed the Unet method in PSNR, SSIM, and LPIPS, particularly excelling in detail representation and structural preservation. As shown in Table 1: Table 1 like Figure 10 As shown, the embodiment also provides a method for generating hand-drawn line art based on wavelet transform, including the following steps: S1, Input the image using the input unit; S2, using the hand-drawn line drawing generation model in the line drawing generation unit to generate hand-drawn line drawings based on the input image; S3 outputs hand-drawn line art using the output unit.
[0040] This invention proposes a hand-drawn line drawing extraction system and method. By constructing a high-quality image-hand-drawn line drawing pairwise dataset and utilizing a wavelet transform-based hand-drawn line drawing generation model, it achieves efficient feature extraction and optimization of input images. This method successfully captures the global structure and detailed information of images through multi-scale decomposition, attention mechanisms, and dual upsampling strategies, generating delicate and smooth hand-drawn line drawings. Furthermore, an innovative loss function design further enhances the quality and visual effect of the line drawings. Through reasonable dataset partitioning and model training and validation, this invention provides an efficient and widely applicable solution for the field of image processing while ensuring model reliability and accuracy.
[0041] The hand-drawn line drawing generation method of this invention produces more natural and coherent lines with proper detail processing, exhibiting strong expressive power in a hand-drawn style. Furthermore, while maintaining structural integrity, this method avoids common problems such as line breaks and artifacts, thus possessing greater practical value.
[0042] The specific embodiments described above illustrate the technical solution and beneficial effects of the present invention in detail. It should be understood that the above description is only the most preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, additions, and equivalent substitutions made within the scope of the principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A hand-drawn line drawing generation system based on wavelet transform, characterized in that, include: Input unit, which is used to input an image; The line drawing generation unit is used to generate hand-drawn line drawings based on the input image using a hand-drawn line drawing generation model. The hand-drawn line drawing generation model includes a multi-scale continuous downsampling encoding process and a continuous upsampling decoding process. The downsampling encoding process at each scale includes performing wavelet transform on the input features to obtain low-frequency component features and high-frequency component features, and then combining an attention mechanism to compress and filter the features to retain key features and suppress irrelevant textures and noise. The upsampling encoding process at each scale includes introducing a dual upsampling strategy and combining it with inverse wavelet transform. Guided by the high-frequency component features of the same scale, the image resolution is gradually restored from the upsampling encoding results of the previous scale to generate the hand-drawn line drawing. The output unit is used to output hand-drawn line art.
2. The hand-drawn line drawing generation system based on wavelet transform according to claim 1, characterized in that, The downsampling encoding process at each scale is implemented using a frequency domain sensing module and a wavelet transform downsampling module, including: The frequency domain sensing module is used to perform wavelet transform on the input features to obtain the first low-frequency component features and the first high-frequency component features. After the first low-frequency component features are enhanced by the FMB convolution module, they are fused with the first high-frequency component features. The fused features are then subjected to inverse wavelet transform to construct new high-resolution features, and then refined features are extracted by the ESDB module. The wavelet transform downsampling module is used to decompose the refined input features using wavelet transform to obtain the second low-frequency component features and the second high-frequency component features. The decomposed component features are processed by the frequency domain attention module to calculate the attention map. This attention map is applied to all component features after convolutional layer compression to extract key features. The key features are then added point-by-point to the convolutional layer compressed features to obtain the upsampling encoding result.
3. The hand-drawn line drawing generation system based on wavelet transform according to claim 2, characterized in that, When performing wavelet transform decomposition on the features, four wavelet transform channels are used to obtain the low-frequency component features. The high-frequency component characteristics are ,in, The input is fed into the frequency domain attention module. and ,as well as and The elements are added one by one, and the sums are then passed through separable convolutional layers before being added element by element again. Finally, an attention map is generated using the sigmoid function. The formula is expressed as follows: in, For attention maps, and These are depthwise separable convolutions. σ represents pointwise convolution operation, and σ represents the sigmoid function.
4. The hand-drawn line drawing generation system based on wavelet transform according to claim 2, characterized in that, The ESDB module utilizes pointwise convolution, depthwise separable convolution, and convolution to perform refined feature extraction.
5. The hand-drawn line drawing generation system based on wavelet transform according to claim 1, characterized in that, The upsampling encoding process at each scale is implemented through a wavelet transform upsampling module, including: The upsampling coding result of the previous scale is divided into two parts for double upsampling. One part is processed by the PixelShuffle layer through convolutional expansion of the channel, and the other part is merged with the high-frequency component features of the same scale and then reconstructed into high-resolution features through wavelet inverse transform. The high-resolution features are then concatenated with the PixelShuffle layer processing result and then processed by the FMB convolution module to complete information filtering and integration before outputting the upsampling coding result of the current scale.
6. The hand-drawn line drawing generation system based on wavelet transform according to claim 2 or 5, characterized in that, The FMB convolutional module first performs channel expansion through convolution, then further compresses the model parameters by introducing a lightweight structure based on group convolution, and then constructs features through SiLU and convolution. At the same time, residual connections are built between the input and output of the FMB convolutional module.
7. The hand-drawn line drawing generation system based on wavelet transform according to claim 1, characterized in that, The input and output of the hand-drawn line drawing generation model are also equipped with convolutional layers, which are used to perform convolution operations on the input image and the last upsampled encoding result, respectively.
8. The hand-drawn line drawing generation system based on wavelet transform according to claim 1, characterized in that, The hand-drawn line art generation model underwent parameter optimization before being used for line art generation. The loss function used in parameter optimization included L1 loss and Dists loss between the generated line art and the real line art. Dists loss measures the image similarity by combining structural similarity and texture similarity.
9. The hand-drawn line drawing generation system based on wavelet transform according to claim 8, characterized in that, When calculating the Dists loss, the structure is first represented by the mean of the features at each layer of the generated and real line art, and then the structural similarity is calculated using the following formula. : in, Representing the true line drawing i Layer features The mean, Indicates the generation of the line art. i Layer features The mean, It is a stability constant to prevent the denominator from being zero; Texture similarity is calculated using the following formula. : Among them, symbols Represents the norm; Dists loss Represented as: in, and They represent and The weight parameters.
10. A method for generating hand-drawn line art based on wavelet transform, characterized in that, The method employs the hand-drawn line drawing generation system according to any one of claims 1-9, and includes the following steps: Input the image using the input unit; The hand-drawn line art generation model in the line art generation unit is used to generate hand-drawn line art based on the input image; Output hand-drawn line art using the output unit.
Citation Information
Patent Citations
Mural line draft extraction method based on multi-scale extraction and in-layer learnable fusion
CN118968241A
Intelligent cartoon line manuscript generation system capable of keeping human face features
CN119479044A
Image super-resolution method based on blueprint separable residual network
CN115082306A
Low-dose CT image super-resolution method and system based on multi-scale wavelet transform
CN118674623A
Image reconstruction method based on multi-window cross feature fusion attention mechanism
CN119168860A