A sketching method and device based on down jacket image

CN115830166BActive Publication Date: 2026-09-11ZHEJIANG UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211511934.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-29
Publication Date
2026-09-11
Estimated Expiration
2042-11-29

AI Technical Summary

Technical Problem

基于这些改进,用于羽绒服图像生成时,输入羽绒服线稿图,模型生成的羽绒服图像质量更高,但是高分辨率上存在训练不稳定等问题

Benefits of technology

[0037] Compared with the prior art, the beneficial effects of the present invention include at least the following:

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115830166B_ABST
    Figure CN115830166B_ABST
Patent Text Reader

Abstract

The application discloses a sketch clothing making method and device based on a down jacket image, and on the basis of pre-training of a StyleGAN2, a residual encoder is added to generate a down jacket image based on a down jacket sketch, and a coding discriminator is introduced to make the w+ space generated by the residual encoder more decoupled, and meanwhile, the down jacket image has higher quality, the efficiency of down jacket sketch clothing making is improved, and meanwhile, the details and textures of the down jacket are guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the fields of computer vision and deep learning technology, and specifically relates to a method and apparatus for creating garments based on line drawings of down jacket images. Background Technology

[0002] Down jackets are outer garments filled with down filling. They are large and round in shape. Down jackets generally contain more than half duck down, and may also contain some small feathers. The duck down is cleaned, sterilized at high temperature, and then filled into the garment to make a down jacket. Down jackets have the best warmth retention.

[0003] Currently, down jackets come in a variety of styles. In the actual design process, designers first draw a line drawing of the down jacket, and then color the line drawing to obtain a colored image of the down jacket. The entire coloring process is labor-intensive, and the images of these down jackets lack realism and detail.

[0004] To address the issue of manual coloring, researchers have explored using machine learning methods, such as neural networks, to generate realistic images of down jackets based on line art sketches. Generating color images from line art sketches is essentially a field of image translation research, which involves learning a conditional image generation method to map the source domain to the target domain to obtain the image.

[0005] Condition GANs, as the first proposed model to solve image translation, can be used to generate color images of down jackets from line drawings. Although Condition GANs can generate specific types of color images compared to the original GANs, they suffer from problems such as low quality in color images generated from line drawings.

[0006] Subsequent pix2pix models redesigned the generator based on Condition GANs, creating a U-Net-like structure, and introduced the PatchGAN discriminator, which only penalizes values ​​for a specific image size. Based on these improvements, when used for generating down jacket images, the model produces higher-quality images when given a down jacket line drawing as input; however, it suffers from training instability at high resolutions.

[0007] In addition, down jackets come in a variety of styles and have a wide variety of components. This results in low accuracy and precision when existing generative models translate down jacket line drawings into images, which fails to meet design requirements.

[0008] Therefore, there is an urgent need for a method to generate color images of down jackets from line drawings to improve the efficiency of down jacket design. Summary of the Invention

[0009] In view of the above, the purpose of this invention is to provide a method and apparatus for garment production based on line drawings of down jackets, which can improve the efficiency of garment production from down jacket line drawings while ensuring the detail and texture of the down jacket.

[0010] To achieve the above-mentioned objectives, an embodiment provides a method for creating garments from line drawings of down jackets, comprising the following steps:

[0011] Obtain real images of down jackets and generate line drawings of down jackets based on the real images;

[0012] The StyleGAN2, which includes a mapping network, a generator, and a discriminator, is pre-trained using real down jacket images to obtain the pre-trained StyleGAN2.

[0013] A training architecture is constructed, which includes a residual encoder, a pre-trained StyleGAN2, and an encoding discriminator. The residual encoder is used to encode the input down jacket line drawing to obtain a w+ space encoding vector. The pre-trained generator is used to generate a down jacket image based on the w+ space encoding vector. The pre-trained discriminator is used to distinguish between the generated down jacket image and the real down jacket image. The encoding discriminator is used to distinguish between the w+ space encoding vector and the w space encoding vector generated by the pre-trained mapping network.

[0014] Construct the total loss function of the training architecture, which includes the loss function of StyleGAN2 and the discriminant loss of the encoding vector constructed based on the results of the encoding discriminator;

[0015] Based on samples consisting of real down jacket images and corresponding down jacket line drawings, and using a loss function to optimize the parameters of the training architecture, the residual encoder and generator after parameter optimization form a line drawing garment model.

[0016] Create garments from line art using a garment model.

[0017] Preferably, the residual encoder includes a residual coding network and a spatial transformation network. The residual coding network is used to encode the input down jacket line drawing and output feature maps of three levels of detail. The spatial transformation network performs spatial transformation on the feature maps of the three levels to obtain w+ spatial coding vectors of the three levels.

[0018] Preferably, the spatial transformation network includes at least one convolutional layer;

[0019] The residual coding network employs multiple convolutional layers and contains at least two residual structures. The feature map output by the convolutional layer before the first residual structure is used as a feature map of a detail level, and the feature map encoded after the residual structure is used as the feature maps of the other two detail levels.

[0020] Preferably, the w+ spatial encoding vectors of the three detail levels are multiplexed to the same number as the w spatial encoding vectors generated by the mapping network, and then input into the pre-trained generator after affine transformation to generate a down jacket image.

[0021] Preferably, the w+ space coding vectors of the three detail levels are multiplexed to the same number as the w space coding vectors generated by the mapping network, and then input into the coding discriminator to determine the authenticity of the coding.

[0022] Preferably, the encoding discriminator includes a fully connected layer, an activation layer, and a batch normalization layer.

[0023] Preferably, a vector is randomly generated and input into a pre-trained mapping network, which generates a w-space encoded vector based on the randomly generated vector through spatial mapping.

[0024] Preferably, the discrimination loss Loss1 is expressed as:

[0025]

[0026] Where z represents a random vector in the Z space, F(z) represents the encoded vector in the w space generated by the mapping network, and P data Represents the true hidden coding space distribution, F(z)~P data This indicates that F(z) follows the true hidden coding space distribution P. data Let x be a real image of a down jacket, G2(x) represent the w+ spatial encoding vector generated by the residual encoder, and P z Let G2(x) represent a random noise distribution, and P be the distribution of random noise. z This indicates that G(x) follows a random noise distribution P. z D2(·) represents the discrimination result of the encoder discriminator, and E represents the expectation.

[0027] To achieve the above-mentioned objective, a garment-making device based on a down jacket image (line drawing) includes:

[0028] The acquisition module is used to acquire real down jacket images and generate down jacket line drawings based on the real down jacket images;

[0029] The pre-training module is used to pre-train StyleGAN2, which includes a mapping network, a generator, and a discriminator, using images of down jackets to obtain a pre-trained StyleGAN2.

[0030] The training architecture construction module is used to construct the training architecture, which includes a residual encoder, a pre-trained StyleGAN2, and an encoding discriminator. The residual encoder is used to encode the input down jacket line drawing to obtain a w+ space encoding vector. The pre-trained generator is used to generate a down jacket image based on the w+ space encoding vector. The pre-trained discriminator is used to distinguish between the generated down jacket image and the real down jacket image. The encoding discriminator is used to distinguish between the w+ space encoding vector and the w space encoding vector generated by the pre-trained mapping network.

[0031] The loss function construction module is used to construct the loss function of the training architecture. The loss function includes the loss function of StyleGAN2 and the encoding vector discriminant loss constructed based on the encoding discriminator results.

[0032] The parameter optimization module is used to optimize the parameters of the training architecture based on samples consisting of real down jacket images and corresponding down jacket line drawings, and to use a loss function. The residual encoder and generator after parameter optimization form a line drawing garment model.

[0033] The application module is used to create garments from line art using a garment model.

[0034] To achieve the above-mentioned objectives, an embodiment also provides a garment-making apparatus based on a down jacket image, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. The memory stores a garment model constructed using the above-described garment-making method based on a down jacket image. When the processor executes the computer program, it performs the following steps:

[0035] Obtain the line drawing of the down jacket;

[0036] The process of generating a down jacket image by calling the line drawing garment model includes: using a residual encoder to encode the down jacket line drawing to obtain a w+ spatial encoding vector, inputting the w+ spatial encoding vector into the generator, and using the generator to generate a down jacket image based on the w+ spatial encoding vector.

[0037] Compared with the prior art, the beneficial effects of the present invention include at least the following:

[0038] Based on the pre-trained StyleGAN2, a residual encoder is added to generate down jacket images based on down jacket line drawings. At the same time, an encoding discriminator is introduced to make the w+ space generated by the residual encoder more decoupled, while generating down jacket images of higher quality. This improves the efficiency of turning down jacket line drawings into garments while ensuring the detail and texture of the down jacket. Attached Figure Description

[0039] 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.

[0040] Figure 1 This is a flowchart of the method for creating garments based on line drawings of down jacket images provided in the embodiment;

[0041] Figure 2 This is a schematic diagram of the training architecture provided in the embodiment;

[0042] Figure 3 This is a schematic diagram of the structure of the line drawing garment-making device based on a down jacket image provided in the embodiment. Detailed Implementation

[0043] 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.

[0044] Because down jackets come in a wide variety of styles and have numerous components, few people perform line drawing to original image conversion tasks on down jacket data. Even when using existing generative models to generate down jacket images based on line drawings, low accuracy remains a problem. Therefore, this embodiment provides a method and apparatus for creating garments from line drawings of down jackets.

[0045] Figure 1 This is a flowchart of a line drawing garment creation method based on a down jacket image, provided in this embodiment. As shown in the figure, the line drawing garment creation method includes the following steps:

[0046] Step 1: Obtain a real down jacket image and generate a down jacket line drawing based on the real down jacket image to construct a sample.

[0047] In this embodiment, a total of 250,000 down jacket images were downloaded from the internet and taken in real-world locations. The data was cleaned, mainly including: using the OpenPose algorithm to remove down jacket images with people in them; using Photoshop's batch processing to extract the foreground from the images; then manually screening and classifying the real down jacket images from the front; first, the screened images were filled with pixels to form squares; then, the OpenCV resize function was used to obtain 1024*1024 pixel images; finally, the HED and Sketch-Simplification algorithms were used on the images to obtain the down jacket line drawing corresponding to each down jacket image; finally, 30,000 samples composed of real down jacket images and down jacket line drawings were obtained.

[0048] Step 2: Pre-train StyleGAN2 using real down jacket images.

[0049] In this embodiment, StyleGAN2 is a model comprising a mapping network, a generator, and a discriminator. After training, it can generate realistic down jacket images based on randomly generated vectors. The mapping network performs a w-space mapping on the randomly generated z-space vectors to generate a w-space encoded vector. The generator generates down jacket images based on the w-space encoded vectors. The discriminator distinguishes between the generated down jacket images and real down jacket images. StyleGAN2 is pre-trained using real down jacket images as samples, employing the following loss function:

[0050]

[0051] Where x is a real image of a down jacket, P data Represents the true hidden coding space distribution, x ~ P data This indicates that x follows the true hidden coding space distribution P. data Let z represent a random vector in the Z-space, F(z) represent the encoding vector in the w-space generated by the mapping network based on z, G1(·) represent the image of the down jacket generated by the generator, and P z Let z represent a random noise distribution, and P be the random noise distribution. z This indicates that z follows a random noise distribution P. z D1(·) represents the discrimination result of the discriminator, and E represents the expectation.

[0052] The pre-trained StyleGAN2 can generate down jacket images by inputting any z-space encoding vector.

[0053] Step 3: Construct a training architecture based on the pre-trained StyleGAN2.

[0054] In this embodiment, a training architecture is constructed based on the pre-trained StyleGAN2, such as... Figure 2As shown, the training architecture includes a residual encoder, a pre-trained StyleGAN2, and an encoding discriminator. The residual encoder is used to encode the input down jacket line drawing to obtain a w+ space encoding vector. The pre-trained generator is used to generate a down jacket image based on the w+ space encoding vector. The pre-trained discriminator is used to distinguish between the generated down jacket image and the real down jacket image. The encoding discriminator is used to distinguish between the w+ space encoding vector and the w space encoding vector generated by the pre-trained mapping network.

[0055] In this embodiment, the residual encoder acts as a latent space encoder. After encoding the down jacket line drawing into w+ space encoding vectors, the pre-trained generator can generate higher-quality down jacket images based on these w+ space encoding vectors. Inspired by StyleGAN2, different w-space style inputs control different levels of image detail. Image detail levels can be divided into three categories: upper, middle, and lower. The upper level controls the overall shape and posture of the down jacket, the middle level controls the length and shape of each component, and the lower level controls the texture details of the garment. Based on this, the residual encoder includes a residual coding network and a spatial transformation network. The residual coding network encodes the input down jacket line drawing and outputs feature maps at three detail levels. The spatial transformation network GenStyle performs spatial transformation on the three levels of feature maps to obtain three levels of w+ space encoding vectors.

[0056] In this embodiment, the residual coding network employs multiple convolutional layers and includes at least two residual structures. The feature map output by the convolutional layer before the first residual structure is used as a feature map of one level, and the feature map encoded after the residual structure is used as feature maps of the other two levels. In one implementation, such as Figure 2 As shown, the residual coding network includes six sequentially connected convolutional layers. The output of the first convolutional layer and the output of the fifth convolutional layer form a residual structure, and the output of the second convolutional layer and the output of the fourth convolutional layer form another residual structure. The three feature maps output by the fourth, fifth, and sixth convolutional layers serve as feature maps for three levels of detail, corresponding to low detail, medium detail, and high detail levels respectively, according to the order of the data flow.

[0057] In this embodiment, the spatial transformation network GenStyle includes at least one convolutional layer, and in one implementation, it includes three convolutional layers. Furthermore, to ensure unaffected transformation of the three detail levels of feature maps output by the residual coding network, three spatial transformation networks are employed, such as... Figure 2 As shown, each level of detail feature map corresponds to a certain level of image detail, and passing them through the same GenStyle will generate the same w+ spatial encoding vector.

[0058] To accommodate the input dimension of the pre-trained generator, the w+ spatial encoding vectors at the three levels are multiplexed to the same number as those generated by the mapping network before being input into the pre-trained generator to generate a down jacket image. The number of input vectors to the generator is related to the resolution of the generated image and is set according to the resolution requirements. When the generator inputs 18 w+ spatial encoding vectors, the w+ spatial encoding vectors corresponding to the low-detail-level feature maps are multiplexed twice, those corresponding to the medium-detail-level feature maps are multiplexed five times, and those corresponding to the high-detail-level feature maps are multiplexed eleven times. Each w+ spatial encoding vector can be 512-dimensional. These 18 w+ spatial encoding vectors, after affine transformation, are fed into the pre-trained generator to generate the down jacket image corresponding to the line drawing.

[0059] StyleGAN2's discriminator distinguishes between the generated down jacket images and real down jacket images. To improve the accuracy of the generated down jacket images, an encoding discriminator is added to differentiate between the w+ space encoding vectors of the residual encoder. Specifically, the w+ space encoding vector obtained from the down jacket line drawing through the residual encoder is used as a fake sample, while the w-space encoding vector obtained by passing the randomly generated z-encoding through the pre-trained mapping network in StyleGAN2 is used as a real sample. The encoding discriminator distinguishes between real and fake samples. In practice, the w+ space encoding vectors at three detail levels are multiplexed to the same number as the w-space encoding vectors generated by the mapping network before being input into the encoding discriminator to determine the authenticity of the encoding.

[0060] In this embodiment, the encoder discriminator includes a fully connected layer (Fully-conn), an activation layer (ReLU), and a batch normalization layer. In one implementation, it includes a sequentially connected Fully-conn, ReLU, BatchNorm, Fully-conn, ReLU, BatchNorm, and Fully-conn.

[0061] Step 4: Construct the total loss function for the training architecture.

[0062] In this embodiment, the total loss function of the training architecture includes the loss function of StyleGAN2, and also includes the encoding vector discriminant loss constructed based on the results of the encoding discriminator. The encoding vector discriminant loss is expressed as follows.

[0063]

[0064] Where z represents a random vector in the Z space, F(z) represents the encoded vector in the w space generated by the mapping network, and P data Represents the true hidden coding space distribution, F(z)~P dataThis indicates that F(z) follows the true hidden coding space distribution P. data Let x be a real image of a down jacket, G2(x) represent the w+ spatial encoding vector generated by the residual encoder, and P z Let G2(x) represent a random noise distribution, and P be the distribution of random noise. z This indicates that G(x) follows a random noise distribution P. z D2(·) represents the discrimination result of the encoder discriminator, and E represents the expectation.

[0065] Thus, the total loss function Loss can be expressed as: Loss = Loss1 + Loss2

[0066] Step 5: Optimize the training architecture based on the samples and loss function parameters to obtain the line drawing garment model.

[0067] In this embodiment, the training architecture constructed in step 4 is optimized using the samples constructed in step 1 and the loss function constructed in step 5 to optimize the parameters of the residual encoder, the pre-trained StyleGAN2 and the encoding discriminator. After the parameter optimization is completed, the extracted residual encoder and the generator with optimized parameters form a line drawing garment model.

[0068] Step 6: Use the line art garment model to create the garment from the line art.

[0069] In this embodiment, when applied, the designer's line drawing of a down jacket is input into the line drawing garment model. The line drawing garment model is then used to generate a down jacket image from the down jacket line drawing. This includes: using a residual encoder to encode the down jacket line drawing to obtain a w+ spatial encoding vector, and inputting the w+ spatial encoding vector into a generator. The generator then uses the w+ spatial encoding vector to generate a down jacket image. The generated down jacket image not only includes the shape of the down jacket but also includes detailed textures. This not only inspires down jacket designers but also improves their work efficiency.

[0070] Based on the same inventive concept, the embodiment also provides a garment-making device based on a down jacket image, including an acquisition module, a pre-training module, a training architecture construction module, a loss function construction module, a parameter optimization module, and an application module.

[0071] The acquisition module is used to acquire real down jacket images and generate down jacket line drawings based on the real down jacket images.

[0072] The pre-training module is used to pre-train StyleGAN2, which includes a mapping network, a generator, and a discriminator, using images of down jackets to obtain a pre-trained StyleGAN2.

[0073] The training architecture construction module is used to construct the training architecture, which includes a residual encoder, a pre-trained StyleGAN2, and an encoding discriminator. The residual encoder is used to encode the input down jacket line drawing to obtain a w+ space encoding vector. The pre-trained generator is used to generate a down jacket image based on the w+ space encoding vector. The pre-trained discriminator is used to distinguish between the generated down jacket image and the real down jacket image. The encoding discriminator is used to distinguish between the w+ space encoding vector and the w space encoding vector generated by the pre-trained mapping network.

[0074] The loss function construction module is used to construct the loss function of the training architecture. The loss function includes the loss function of StyleGAN2 and the encoding vector discriminant loss constructed based on the encoding discriminator results.

[0075] The parameter optimization module is used to optimize the parameters of the training architecture based on samples consisting of real down jacket images and corresponding down jacket line drawings, and uses a loss function. The residual encoder and generator after parameter optimization form a line drawing garment model.

[0076] The application module is used to create garments from line art using a garment model.

[0077] It should be noted that the garment-making device based on down jacket images provided in the above embodiments should be illustrated using the above-described functional module divisions when generating garments based on down jacket images. The functions can be assigned to different functional modules as needed, i.e., the internal structure of the terminal or server can be divided into different functional modules to complete all or part of the functions described above. Furthermore, the garment-making device based on down jacket images and the garment-making method based on down jacket images provided in the above embodiments belong to the same concept. For details of their implementation, please refer to the garment-making method embodiment based on down jacket images, which will not be repeated here.

[0078] Based on the same inventive concept, the embodiment also provides a garment-making apparatus based on a down jacket image, including a memory, a processor, and a computer program stored in the memory and executable on the processor. The memory stores a garment model constructed by the above-described garment-making method based on a down jacket image. When the processor executes the computer program, it performs the following steps:

[0079] Obtain the line drawing of the down jacket;

[0080] The process of generating a down jacket image by calling the line drawing garment model includes: using a residual encoder to encode the down jacket line drawing to obtain a w+ spatial encoding vector, inputting the w+ spatial encoding vector into the generator, and using the generator to generate a down jacket image based on the w+ spatial encoding vector.

[0081] In practical applications, the memory can be volatile memory at the local end, such as RAM, or non-volatile memory, such as ROM, FLASH, floppy disk, hard disk, etc., or even a remote storage cloud. The processor can be a central processing unit (CPU), microprocessor (MPU), digital signal processor (DSP), or field-programmable gate array (FPGA), meaning that these processors can be used to implement the garment-making process based on the line drawing of a down jacket image.

[0082] The above embodiments provide a method and apparatus for garment production based on down jacket images using line drawings. StyleGAN2 is trained using a cleaned down jacket dataset to form a pre-trained model, reducing the final training time and improving training stability. The added residual encoder extracts w+ space encoding vectors of different detail levels from the down jacket line drawing, and the trained w+ space better decouples the feature space of the line drawing. The added encoding discriminator, during the discrimination stage, not only discriminates the generated image but also the w-space encoding vectors of StyleGAN2. This further decouples the w+ space and results in higher quality generated down jacket images.

[0083] 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 method for creating garments based on line drawings of down jacket images, characterized in that, Includes the following steps: Obtain real images of down jackets and generate line drawings of down jackets based on the real images; The StyleGAN2, which includes a mapping network, a generator, and a discriminator, is pre-trained using real down jacket images to obtain the pre-trained StyleGAN2. A training architecture is constructed, which includes a residual encoder, a pre-trained StyleGAN2, and an encoding discriminator. The residual encoder is used to encode the input down jacket line drawing to obtain a w+ space encoding vector. The pre-trained generator is used to generate a down jacket image based on the w+ space encoding vector. The pre-trained discriminator is used to distinguish between the generated down jacket image and the real down jacket image. The encoding discriminator is used to distinguish between the w+ space encoding vector and the w space encoding vector generated by the pre-trained mapping network. The residual encoder includes a residual coding network and a spatial transformation network. The residual coding network encodes the input down jacket line drawing and outputs feature maps at three levels of detail. The residual coding network uses multiple convolutional layers and contains at least two residual structures. The feature map output by the convolutional layer before the first residual structure is used as a feature map at one level of detail, and the feature map encoded after the residual structure is used as the feature maps at the other two levels of detail. The spatial transformation network performs spatial transformation on the three levels of feature maps to obtain three levels of w+ spatial coding vectors. The three levels of w+ spatial coding vectors are reused to have the same number of w spatial coding vectors as the mapping network. After affine transformation, they are input into a pre-trained generator to generate a down jacket image. The w+ space coding vectors at three detail levels are multiplexed to the same number as the w space coding vectors generated by the mapping network, and then input into the coding discriminator to determine the authenticity of the coding. When the generator input has 18 w-space encoding vectors, the w+ space encoding vectors corresponding to the low detail level feature maps are reused twice, the w+ space encoding vectors corresponding to the medium detail level feature maps are reused five times, and the w+ space encoding vectors corresponding to the high detail level feature maps are reused eleven times. Construct the total loss function of the training architecture, which includes the loss function of StyleGAN2 and the discriminant loss of the encoding vector constructed based on the results of the encoding discriminator; Based on samples consisting of real down jacket images and corresponding down jacket line drawings, and using a loss function to optimize the parameters of the training architecture, the residual encoder and generator after parameter optimization form a line drawing garment model. Create garments from line art using a garment model.

2. The method for creating garments from line drawings based on down jacket images according to claim 1, characterized in that, The spatial transformation network includes at least one convolutional layer.

3. The method for creating garments from line drawings based on down jacket images according to claim 1, characterized in that, The encoding discriminator includes a fully connected layer, an activation layer, and a batch normalization layer.

4. The method for creating garments from line drawings based on down jacket images according to claim 1, characterized in that, A random vector is generated and input into a pre-trained mapping network. The pre-trained mapping network generates a w-space encoded vector based on the randomly generated vector through spatial mapping.

5. The method for creating garments from line drawings based on down jacket images according to claim 1, characterized in that, Determine the loss Represented as: in, Represents a random vector in the Z-space. This represents the w-space encoding vector generated by the mapping network. This represents the true distribution of the hidden coding space. express Follows the true hidden coding space distribution , These are real down jacket images. This represents the w+ spatial encoding vector generated by the residual encoder. Represents a random noise distribution. express Follows random noise distribution , This indicates the discrimination result of the code discriminator. E It expresses expectation.

6. A garment-making device based on line drawings of down jacket images, characterized in that, include: The acquisition module is used to acquire real down jacket images and generate down jacket line drawings based on the real down jacket images; The pre-training module is used to pre-train StyleGAN2, which includes a mapping network, a generator, and a discriminator, using images of down jackets to obtain a pre-trained StyleGAN2. The training architecture construction module is used to construct the training architecture, which includes a residual encoder, a pre-trained StyleGAN2, and an encoding discriminator. The residual encoder is used to encode the input down jacket line drawing to obtain a w+ space encoding vector. The pre-trained generator is used to generate a down jacket image based on the w+ space encoding vector. The pre-trained discriminator is used to distinguish between the generated down jacket image and the real down jacket image. The encoding discriminator is used to distinguish between the w+ space encoding vector and the w space encoding vector generated by the pre-trained mapping network. The residual encoder includes a residual coding network and a spatial transformation network. The residual coding network encodes the input down jacket line drawing and outputs feature maps at three levels of detail. The residual coding network uses multiple convolutional layers and contains at least two residual structures. The feature map output by the convolutional layer before the first residual structure is used as a feature map at one level of detail, and the feature map encoded after the residual structure is used as the feature maps at the other two levels of detail. The spatial transformation network performs spatial transformation on the three levels of feature maps to obtain three levels of w+ spatial coding vectors. The three levels of w+ spatial coding vectors are reused to have the same number of w spatial coding vectors as the mapping network. After affine transformation, they are input into a pre-trained generator to generate a down jacket image. The w+ space coding vectors at three detail levels are multiplexed to the same number as the w space coding vectors generated by the mapping network, and then input into the coding discriminator to determine the authenticity of the coding. When the generator input has 18 w-space encoding vectors, the w+ space encoding vectors corresponding to the low detail level feature maps are reused twice, the w+ space encoding vectors corresponding to the medium detail level feature maps are reused five times, and the w+ space encoding vectors corresponding to the high detail level feature maps are reused eleven times. The loss function construction module is used to construct the loss function of the training architecture. The loss function includes the loss function of StyleGAN2 and the encoding vector discriminant loss constructed based on the encoding discriminator results. The parameter optimization module is used to optimize the parameters of the training architecture based on samples consisting of real down jacket images and corresponding down jacket line drawings, and to use a loss function. The residual encoder and generator after parameter optimization form a line drawing garment model. The application module is used to create garments from line art using a garment model.

7. A garment-making device based on a line drawing of a down jacket image, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The memory stores a line drawing garment model constructed using the line drawing garment method based on down jacket images as described in any one of claims 1-5. When the processor executes the computer program, it performs the following steps: Obtain the line drawing of the down jacket; The process of generating a down jacket image by calling the line drawing garment model includes: using a residual encoder to encode the down jacket line drawing to obtain a w+ spatial encoding vector, inputting the w+ spatial encoding vector into the generator, and using the generator to generate a down jacket image based on the w+ spatial encoding vector.