A clothing design method, device, medium and equipment based on artificial intelligence

The method enhances clothing design flexibility by fusing image and text information through a trained feature extraction and reconstruction model, addressing the inflexibility of existing generative models in clothing design.

CN118627153BActive Publication Date: 2024-12-10BEIJING INST OF CLOTHING TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411106041.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-13
Publication Date
2024-12-10
Estimated Expiration
2044-08-13

AI Technical Summary

Technical Problem

Existing generative models in clothing design lack sufficient training data, leading to weak feature representation and poor generalization, resulting in inflexible and low-value automatically generated clothing designs.

Method used

A clothing design method using a trained clothing feature extraction model to fuse image and text information, combined with an image reconstruction model and attribute prediction models, to generate target clothing images that satisfy user-defined attributes, enhancing model flexibility.

Benefits of technology

Improves the representation ability of the fused feature vector, allowing for flexible clothing generation that meets user-defined attributes, thereby enhancing the flexibility and quality of artificial intelligence in clothing design.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118627153B_ABST
    Figure CN118627153B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of clothing design, and in particular to an artificial intelligence-based clothing design method, device, medium and equipment, comprising: performing image reconstruction according to a basic clothing image and a target clothing attribute vector provided by a user, obtaining a reference clothing image, obtaining an image reconstruction loss according to a first clothing attribute vector corresponding to the basic clothing image, a second clothing attribute vector corresponding to the reference clothing image and a target clothing attribute vector, training an image reconstruction model, using the reference clothing image output by the trained image reconstruction model as the target clothing image, improving the representation ability of a fused feature vector by combining clothing attributes with an image, and being able to generate clothing on the premise of satisfying user-defined clothing attributes, thereby improving the flexibility of an artificial intelligence model in clothing design.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of clothing design, and in particular to a clothing design method, device, medium and equipment based on artificial intelligence. Background Art

[0002] Traditional clothing design usually requires a lot of manpower and time, and the designer's experience and creativity play an important role in the design process. With the development of artificial intelligence technology, generative models have been widely used in creative design fields such as image generation and style transfer.

[0003] Digital virtual clothing generation is a cutting-edge application of generative models. Its principle is to use computer vision technology and deep learning methods to learn the characteristics and styles of clothing from real clothing images to generate realistic virtual clothing images. When applied to the field of clothing design, it can automate clothing design and optimize clothing design effects, thereby improving design efficiency and quality.

[0004] However, when designing clothing, the generative models in the existing technology often lack sufficient training data, resulting in weak feature representation capabilities and poor generalization capabilities of model learning, which in turn leads to a lack of flexibility in the generated clothing designs. The reference value and usage value of the clothing designs automatically generated by the artificial intelligence models are both small.

[0005] Therefore, how to improve the flexibility of artificial intelligence models in clothing design has become an urgent problem to be solved. Summary of the invention

[0006] In view of the above technical problems, the technical solution adopted by the present invention is a clothing design method based on artificial intelligence, and the clothing design method based on artificial intelligence comprises the following steps:

[0007] S101, obtaining a target clothing attribute vector provided by a user, wherein the target clothing attribute vector includes M target clothing attribute sub-vectors corresponding to clothing parts, the target clothing attribute sub-vectors include corresponding clothing parts, N clothing attributes and a target attribute value corresponding to each clothing attribute, and M and N are both positive integers.

[0008] S102, inputting the basic clothing image and the target clothing attribute vector into the trained clothing feature extraction model to obtain a fused feature vector, wherein the fused feature vector is used to represent the fusion information of the image information in the basic clothing image and the text information in the target clothing attribute vector.

[0009] S103, inputting the fused feature vector into an image reconstruction model to obtain a reference clothing image.

[0010] S104, inputting the basic clothing image and the preset basic clothing attribute vector into the attribute prediction model to obtain a first clothing attribute vector, wherein the basic clothing attribute vector includes M basic clothing attribute sub-vectors corresponding to clothing parts, and the basic clothing attribute sub-vectors include corresponding clothing parts, N clothing attributes and basic attribute values ​​corresponding to each clothing attribute.

[0011] S105: Input the reference clothing image and the basic clothing attribute vector into the attribute prediction model to obtain a second clothing attribute vector.

[0012] S106, obtaining image reconstruction loss according to the first clothing attribute vector, the second clothing attribute vector and the target clothing attribute vector.

[0013] S107, updating the parameters of the image reconstruction model according to the image reconstruction loss until the image reconstruction loss converges, and obtaining a trained image reconstruction model.

[0014] S108, inputting the fused feature vector into the trained image reconstruction model to obtain the target clothing image.

[0015] The present invention also provides a clothing design device based on artificial intelligence, and the clothing design device based on artificial intelligence includes:

[0016] The first vector acquisition module is used to acquire a target clothing attribute vector provided by a user, wherein the target clothing attribute vector includes M target clothing attribute sub-vectors corresponding to clothing parts, the target clothing attribute sub-vectors include the corresponding clothing parts, N clothing attributes and the target attribute value corresponding to each clothing attribute, and M and N are both positive integers.

[0017] The feature fusion module is used to input the basic clothing image and the target clothing attribute vector into the trained clothing feature extraction model to obtain a fused feature vector, wherein the fused feature vector is used to represent the fusion information of the image information in the basic clothing image and the text information in the target clothing attribute vector.

[0018] The image reconstruction module is used to input the fused feature vector into the image reconstruction model to obtain the reference clothing image.

[0019] The first attribute prediction module is used to input the basic clothing image and the preset basic clothing attribute vector into the attribute prediction model to obtain the first clothing attribute vector, wherein the basic clothing attribute vector includes M basic clothing attribute sub-vectors corresponding to clothing parts, and the basic clothing attribute sub-vectors include the corresponding clothing parts, N clothing attributes and the basic attribute value corresponding to each clothing attribute.

[0020] The second attribute prediction module is used to input the reference clothing image and the basic clothing attribute vector into the attribute prediction model to obtain the second clothing attribute vector.

[0021] The loss calculation module is used to obtain the image reconstruction loss according to the first clothing attribute vector, the second clothing attribute vector and the target clothing attribute vector.

[0022] The model training module is used to update the parameters of the image reconstruction model according to the image reconstruction loss until the image reconstruction loss converges, thereby obtaining a trained image reconstruction model.

[0023] The clothing determination module is used to input the fused feature vector into the trained image reconstruction model to obtain the target clothing image.

[0024] The present invention also provides a non-transitory computer-readable storage medium, in which at least one instruction or at least one program is stored, and the at least one instruction or at least one program is loaded and executed by a processor to implement the above-mentioned artificial intelligence-based clothing design method.

[0025] The present invention also provides an electronic device, comprising a processor and the above-mentioned non-transitory computer-readable storage medium.

[0026] The present invention has at least the following beneficial effects: obtaining a target clothing attribute vector provided by a user, inputting a basic clothing image and the target clothing attribute vector into a trained clothing feature extraction model, obtaining a fused feature vector, inputting the fused feature vector into an image reconstruction model, obtaining a reference clothing image, inputting a basic clothing image and a preset basic clothing attribute vector into an attribute prediction model, obtaining a first clothing attribute vector, inputting a reference clothing image and a basic clothing attribute vector into an attribute prediction model, obtaining a second clothing attribute vector, obtaining an image reconstruction loss according to the first clothing attribute vector, the second clothing attribute vector and the target clothing attribute vector, updating the parameters of the image reconstruction model according to the image reconstruction loss until the image reconstruction loss converges, obtaining a trained image reconstruction model, inputting the fused feature vector into the trained image reconstruction model, and obtaining a target clothing image. It can be seen that by combining clothing attributes and images, the representation ability of the fused feature vector is improved, and clothing generation can be performed on the premise of satisfying user-defined clothing attributes, thereby improving the flexibility of the artificial intelligence model in clothing design. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0028] Figure 1 A flowchart of a clothing design method based on artificial intelligence provided in Embodiment 1 of the present invention;

[0029] Figure 2 This is a schematic diagram of the structure of an artificial intelligence-based clothing design device provided in Example 2 of the present invention. DETAILED DESCRIPTION

[0030] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0032] Embodiment 1

[0033] The first embodiment provides a clothing design method based on artificial intelligence, and the clothing design method based on artificial intelligence includes the following steps: Figure 1 As shown:

[0034] S101, obtaining a target clothing attribute vector provided by a user, wherein the target clothing attribute vector includes M target clothing attribute sub-vectors corresponding to clothing parts, the target clothing attribute sub-vectors include corresponding clothing parts, N clothing attributes and a target attribute value corresponding to each clothing attribute, and M and N are both positive integers.

[0035] The user may refer to a user who needs clothing design, the target clothing attribute vector may be represented as a one-dimensional vector, and the target clothing attribute vector may be used to represent the user's demand information for clothing design.

[0036] Specifically, a single target clothing attribute sub-vector can be represented as a vector of size 1*(1+N), that is, a vector of size 1 row and N+1 columns. Furthermore, the target clothing attribute vector can be represented as a vector of size 1*[M×(1+N)], that is, a vector of size 1 row and M×(1+N) columns.

[0037] The target clothing attribute vector can be obtained by converting the text information provided by the user through numerical mapping. Taking clothing parts as an example, the mapping value corresponding to the clothing body is 1, the mapping value corresponding to the clothing accessories is 2, the mapping value corresponding to the clothing cuffs is 3, the mapping value corresponding to the clothing collar is 4, etc. In this embodiment, the mapping values ​​are all integers greater than zero.

[0038] In this embodiment, the target attribute value corresponding to the clothing attribute in the target clothing attribute vector may be 0. When the target attribute value is 0, it indicates that the user has not set the clothing attribute for the clothing part corresponding to the target attribute value.

[0039] In a specific implementation, the clothing parts include at least the clothing body and clothing accessories, and the clothing attributes include at least color, shape and pattern.

[0040] Among them, clothing parts may also include clothing cuffs, clothing collars, etc., and clothing attributes may also include textures, materials, etc., and implementers may set them according to actual conditions.

[0041] S102, inputting the basic clothing image and the target clothing attribute vector into the trained clothing feature extraction model to obtain a fused feature vector, wherein the fused feature vector is used to represent the fusion information of the image information in the basic clothing image and the text information in the target clothing attribute vector.

[0042] In a specific implementation, the training process of the trained clothing feature extraction model includes the following steps:

[0043] S201, pre-training the initial clothing feature extraction model to obtain a pre-trained clothing feature extraction model;

[0044] S202, retraining the pre-trained clothing feature extraction model to obtain a trained clothing feature extraction model.

[0045] Among them, the initial clothing feature extraction model is first pre-trained so that the clothing feature extraction model can have basic feature extraction capabilities, and the pre-trained clothing feature extraction model is obtained, and then the pre-trained clothing feature extraction model is trained again so that the pre-trained clothing feature extraction model can learn the relationship between attribute information and image information, thereby ensuring the representation ability of the fusion feature vector output by the clothing feature extraction model.

[0046] In a specific implementation, the initial clothing feature extraction model includes a first encoder, a second encoder, and a third encoder, and S201 further includes the following steps:

[0047] S2011, obtaining a reference clothing image and a reference clothing attribute vector corresponding to the reference clothing image, wherein the reference clothing attribute vector includes M reference clothing attribute sub-vectors corresponding to clothing parts, and the reference clothing attribute sub-vector includes the corresponding clothing part, N clothing attributes, and a reference attribute value corresponding to each clothing attribute;

[0048] S2012, inputting the reference clothing image into a first encoder to obtain a first reference image feature vector;

[0049] S2013, inputting the reference clothing attribute vector into a second encoder to obtain a first reference attribute feature vector;

[0050] S2014, inputting the first reference image feature vector and the first reference attribute feature vector into a third encoder to obtain a first reference fusion feature vector;

[0051] S2015, inputting the first reference fused feature vector into a preset first decoder to obtain a first predicted clothing image, and inputting the first reference fused feature vector into a preset second decoder to obtain a first predicted clothing attribute vector;

[0052] S2016, calculating a first reference loss according to the reference clothing image, the first predicted clothing image, the reference clothing attribute vector, and the first predicted clothing attribute vector;

[0053] S2017, training the first encoder, the second encoder, the third encoder, the first decoder, and the second decoder according to the first reference loss until the first reference loss converges, and obtaining a pre-trained first encoder, a pre-trained second encoder, a pre-trained third encoder, a pre-trained first decoder, and a pre-trained second decoder;

[0054] S2018, forming a pre-trained clothing feature extraction model by using a pre-trained first encoder, a pre-trained second encoder and a pre-trained third encoder.

[0055] The first encoder may be used to extract image features, the second encoder may be used to extract attribute features, and the third encoder may be used to fuse image features and attribute features.

[0056] The first decoder and the second decoder are only used in the training process and do not belong to the clothing feature extraction model. The first decoder can be used to reconstruct the image, and the second decoder can be used to reconstruct the attribute vector.

[0057] Specifically, the condition that the mapping values ​​are all integers greater than zero is used as prior information, and the reference attribute values ​​are all integers greater than zero, that is, the reference clothing attribute vector can completely describe each clothing attribute of each clothing part in the reference clothing image.

[0058] According to the reference clothing image and the first predicted clothing image, cosine similarity calculation is performed to obtain a calculation result a, and l1=exp(a×(-b)) is used as the first prediction sub-loss, wherein exp represents an exponential function with e as the base, e is a natural constant, b is a first adjustment coefficient, b>1, and in this embodiment, b=10. It can be known that since the value range of cosine similarity is [-1, 1], when the cosine similarity is -1, it indicates that the reference clothing image and the first predicted clothing image are completely dissimilar, and at this time l1 is much greater than 0. When the cosine similarity is 1, it indicates that the reference clothing image and the first predicted clothing image are completely similar, and at this time l1 is close to 0. Therefore, the first prediction sub-loss can constrain the first predicted clothing image to be as similar as possible to the reference clothing image.

[0059] According to the reference clothing attribute vector and the first predicted clothing attribute vector, the Euclidean distance calculation is performed, and the calculation result is used as the second prediction sub-loss l2. The larger the Euclidean distance, the more dissimilar the reference clothing attribute vector and the first predicted clothing attribute vector are. At this time, l2 is much greater than 0. The smaller the Euclidean distance, the more similar the reference clothing attribute vector and the first predicted clothing attribute vector are. At this time, l2 is close to 0. Therefore, the first prediction sub-loss can constrain the first predicted clothing attribute vector to be as similar as possible to the reference clothing attribute vector.

[0060] Taking the sum of the first predictor loss and the second predictor loss as the first reference loss, it can be known that the first reference loss is mainly used to constrain the reconstruction task, that is, to make the reconstructed output of the first decoder consistent with the input of the first encoder, and to make the reconstructed output of the second decoder consistent with the input of the second encoder, thereby constraining the first encoder, the second encoder and the third encoder to have the ability to extract features, and reconstruction can be performed through the extracted feature vectors.

[0061] In a specific implementation, S202 further includes the following steps:

[0062] S2021, randomly occluding at least one clothing part or reference attribute value in the reference clothing attribute vector to obtain an occluded clothing attribute vector;

[0063] S2022, inputting the reference clothing image into a pre-trained first encoder to obtain a second reference image feature vector;

[0064] S2023, inputting the occluded clothing attribute vector into a pre-trained second encoder to obtain a second reference attribute feature vector;

[0065] S2024, inputting the second reference image feature vector and the second reference attribute feature vector into a pre-trained third encoder to obtain a second reference fusion feature vector;

[0066] S2025, inputting the second reference fused feature vector into the pre-trained first decoder to obtain a second predicted clothing image, and inputting the second reference fused feature vector into the pre-trained second decoder to obtain a second predicted clothing attribute vector;

[0067] S2026, calculating a second reference loss according to the reference clothing image, the second predicted clothing image, the reference clothing attribute vector, and the second predicted clothing attribute vector;

[0068] S2027, training the pre-trained first encoder, the pre-trained second encoder, the pre-trained third encoder, the pre-trained first decoder, and the pre-trained second decoder according to the second reference loss until the second reference loss converges, and obtaining the trained first encoder, the trained second encoder, the trained third encoder, the trained first decoder, and the trained second decoder;

[0069] S2028, forming a trained clothing feature extraction model by using the trained first encoder, the trained second encoder and the trained third encoder.

[0070] The purpose of retraining the pre-trained clothing feature extraction model may be to enable the clothing feature extraction model to learn the correlation and correspondence between the attribute vector and the clothing image.

[0071] Specifically, when a clothing part in the reference clothing attribute vector is occluded, the clothing feature extraction model can be guided to predict the clothing part based on the part of the clothing image that conforms to the clothing attributes in the attribute vector. Furthermore, in order to avoid the clothing feature extraction model learning the specific position of the clothing part in the reference clothing attribute vector, thereby causing overfitting of the clothing feature extraction model training, the implementer can switch the position of the reference clothing attribute sub-vector in the reference clothing attribute vector.

[0072] Similarly, when the reference attribute value in the reference clothing attribute vector is occluded, the clothing feature extraction model can be guided to predict clothing attributes according to the image information of the clothing parts in the clothing image.

[0073] According to the reference clothing image and the second predicted clothing image, the third prediction sub-loss l3 is obtained by using the same cosine similarity calculation method. According to the reference clothing attribute vector and the second predicted clothing attribute vector, the fourth prediction sub-loss l4 is obtained by using the same Euclidean distance calculation method. The fourth prediction sub-loss is still calculated based on the reference clothing attribute vector, that is, the task corresponding to the second predicted clothing attribute vector is to predict the content occluded in the occluded clothing attribute vector.

[0074] S103, inputting the fused feature vector into an image reconstruction model to obtain a reference clothing image.

[0075] Among them, the image reconstruction model can be used to generate clothing images.

[0076] S104: Input the basic clothing image and the preset basic clothing attribute vector into the attribute prediction model to obtain a first clothing attribute vector.

[0077] Among them, the basic clothing attribute vector includes M basic clothing attribute sub-vectors corresponding to clothing parts, the basic clothing attribute sub-vector includes the corresponding clothing parts, N clothing attributes and the basic attribute value corresponding to each clothing attribute, and the first clothing attribute vector can be used to describe the clothing attribute information of the basic clothing image.

[0078] Specifically, the condition that the mapping values ​​are all integers greater than zero is also used as prior information, and the basic attribute values ​​corresponding to all clothing attributes in the basic clothing attribute vector are all 0, and only the mapping values ​​corresponding to the clothing parts are not 0.

[0079] In a specific implementation, the attribute prediction model includes a trained clothing feature extraction model and a trained second decoder.

[0080] Among them, the attribute prediction model can be used to predict and obtain the corresponding clothing attribute vector based on the clothing image, and in the training process of the above-mentioned clothing feature extraction model, the prediction of the clothing attribute vector can be achieved through the trained clothing feature extraction model and the trained second decoder.

[0081] S105: Input the reference clothing image and the basic clothing attribute vector into the attribute prediction model to obtain a second clothing attribute vector.

[0082] The second clothing attribute vector may be used to describe clothing attribute information of the reference clothing image.

[0083] S106, obtaining image reconstruction loss according to the first clothing attribute vector, the second clothing attribute vector and the target clothing attribute vector.

[0084] Among them, the image reconstruction loss can be used to supervise the training process of the image reconstruction model.

[0085] In a specific implementation, S106 further includes the following steps:

[0086] S1061, obtaining a first reconstruction sub-loss according to the first clothing attribute vector and the second clothing attribute vector;

[0087] S1062, obtaining a second reconstruction sub-loss according to the second clothing attribute vector and the target clothing attribute vector;

[0088] S1063: Taking the weighted sum of the first reconstruction sub-loss and the second reconstruction sub-loss as the image reconstruction loss.

[0089] Among them, the target clothing attribute vector C is mapped using the mapping function f to obtain the mapping result f(C). The mapping function f can adopt f(x)=1 / (1+exp(-kx)), where exp is an exponential function, k is the second adjustment coefficient, and the larger the k value, the better. In this embodiment, k is set to 50, x is the input variable, and f(x) is the binarization result. Using the mapping function f for the binarization operation can ensure that the binarization operation is also differentiable, which is convenient for the model to perform reverse gradient calculation and then train.

[0090] Specifically, the first reconstruction sub-loss P1 can be expressed as P1=exp(w×dis1(D, E)), where dis1 can represent cosine similarity calculation, D can represent the first clothing attribute vector, and E can represent the second clothing attribute vector. The second reconstruction sub-loss P2 can be expressed as P2=dis2(C, f(C)·E), and dis2 can represent Euclidean distance calculation.

[0091] The first reconstruction sub-loss corresponds to the first weight, and the second reconstruction sub-loss corresponds to the second weight. In this embodiment, the second weight is greater than or equal to the first weight, and the sum of the first weight and the second weight is 1. For example, the first weight may be 0.4 and the second weight may be 0.6.

[0092] S107, updating the parameters of the image reconstruction model according to the image reconstruction loss until the image reconstruction loss converges, and obtaining a trained image reconstruction model.

[0093] Among them, according to the image reconstruction loss, the gradient descent method can be used to update the parameters of the image reconstruction model. The gradient descent method can use the stochastic gradient descent method, the batch gradient descent method, etc.

[0094] S108, inputting the fused feature vector into the trained image reconstruction model to obtain the target clothing image.

[0095] Among them, the fused feature vector is input into the trained image reconstruction model to output the target clothing image, which can be used as the design result provided to the user.

[0096] In the above, a target clothing attribute vector provided by a user is obtained, a basic clothing image and a target clothing attribute vector are input into a trained clothing feature extraction model, a fused feature vector is obtained, the fused feature vector is input into an image reconstruction model, a reference clothing image is obtained, a basic clothing image and a preset basic clothing attribute vector are input into an attribute prediction model, a first clothing attribute vector is obtained, a reference clothing image and a basic clothing attribute vector are input into an attribute prediction model, a second clothing attribute vector is obtained, an image reconstruction loss is obtained according to the first clothing attribute vector, the second clothing attribute vector and the target clothing attribute vector, parameters of the image reconstruction model are updated according to the image reconstruction loss until the image reconstruction loss converges, a trained image reconstruction model is obtained, the fused feature vector is input into the trained image reconstruction model, a target clothing image is obtained, and the representation ability of the fused feature vector is improved by combining clothing attributes and images, and clothing generation can be performed on the premise of satisfying user-defined clothing attributes, thereby improving the flexibility of the artificial intelligence model in clothing design.

[0097] Embodiment 2

[0098] The second embodiment provides a clothing design device based on artificial intelligence, and the clothing design device based on artificial intelligence includes: Figure 2 As shown:

[0099] The first vector acquisition module 21 is used to acquire a target clothing attribute vector provided by a user, wherein the target clothing attribute vector includes M target clothing attribute sub-vectors corresponding to clothing parts, and the target clothing attribute sub-vector includes the corresponding clothing part, N clothing attributes, and a target attribute value corresponding to each clothing attribute, and M and N are both positive integers;

[0100] A feature fusion module 22 is used to input the basic clothing image and the target clothing attribute vector into the trained clothing feature extraction model to obtain a fused feature vector, wherein the fused feature vector is used to represent the fusion information of the image information in the basic clothing image and the text information in the target clothing attribute vector;

[0101] An image reconstruction module 23 is used to input the fused feature vector into an image reconstruction model to obtain a reference clothing image;

[0102] A first attribute prediction module 24 is used to input the basic clothing image and the preset basic clothing attribute vector into the attribute prediction model to obtain a first clothing attribute vector, wherein the basic clothing attribute vector includes M basic clothing attribute sub-vectors corresponding to clothing parts, and the basic clothing attribute sub-vector includes the corresponding clothing part, N clothing attributes and the basic attribute value corresponding to each clothing attribute;

[0103] A second attribute prediction module 25, for inputting the reference clothing image and the basic clothing attribute vector into the attribute prediction model to obtain a second clothing attribute vector;

[0104] A loss calculation module 26, used to obtain an image reconstruction loss according to the first clothing attribute vector, the second clothing attribute vector and the target clothing attribute vector;

[0105] A model training module 27 is used to update the parameters of the image reconstruction model according to the image reconstruction loss until the image reconstruction loss converges, thereby obtaining a trained image reconstruction model;

[0106] The clothing determination module 28 is used to input the fused feature vector into the trained image reconstruction model to obtain the target clothing image.

[0107] In a specific embodiment, the artificial intelligence-based clothing design device further includes:

[0108] A pre-training module, used to pre-train the clothing feature extraction model to obtain a pre-trained clothing feature extraction model;

[0109] The retraining module is used to retrain the pre-trained clothing feature extraction model to obtain the trained clothing feature extraction model.

[0110] In a specific embodiment, the clothing feature extraction model includes a first encoder, a second encoder and a third encoder, and the pre-training module includes:

[0111] A second vector acquisition submodule is used to acquire a reference clothing image and a reference clothing attribute vector corresponding to the reference clothing image, wherein the reference clothing attribute vector includes M reference clothing attribute subvectors corresponding to clothing parts, and the reference clothing attribute subvector includes the corresponding clothing part, N clothing attributes, and a reference attribute value corresponding to each clothing attribute;

[0112] A first feature extraction submodule, used to input the reference clothing image into a first encoder to obtain a first reference image feature vector;

[0113] A second feature extraction submodule is used to input the reference clothing attribute vector into a second encoder to obtain a first reference attribute feature vector;

[0114] A first fusion submodule, used for inputting the first reference image feature vector and the first reference attribute feature vector into a third encoder to obtain a first reference fusion feature vector;

[0115] A first prediction submodule is used to input the first reference fused feature vector into a preset first decoder to obtain a first predicted clothing image, and input the first reference fused feature vector into a preset second decoder to obtain a first predicted clothing attribute vector;

[0116] A first loss determination submodule, configured to calculate a first reference loss based on a reference clothing image, a first predicted clothing image, a reference clothing attribute vector, and a first predicted clothing attribute vector;

[0117] A first training submodule is used to train the first encoder, the second encoder, the third encoder, the first decoder and the second decoder according to the first reference loss until the first reference loss converges, and obtain a pre-trained first encoder, a pre-trained second encoder, a pre-trained third encoder, a pre-trained first decoder and a pre-trained second decoder;

[0118] The first model determination submodule is used to form a pre-trained clothing feature extraction model by using a pre-trained first encoder, a pre-trained second encoder and a pre-trained third encoder.

[0119] In a specific embodiment, the retraining module includes:

[0120] A third vector acquisition submodule is used to randomly occlude at least one clothing part or reference attribute value in the reference clothing attribute vector to obtain an occluded clothing attribute vector;

[0121] A third feature extraction submodule is used to input the reference clothing image into the pre-trained first encoder to obtain a second reference image feature vector;

[0122] The fourth feature extraction submodule is used to input the occlusion clothing attribute vector into the pre-trained second encoder to obtain a second reference attribute feature vector;

[0123] A second fusion submodule is used to input the second reference image feature vector and the second reference attribute feature vector into a pre-trained third encoder to obtain a second reference fusion feature vector;

[0124] A second prediction submodule is used to input the second reference fused feature vector into the pre-trained first decoder to obtain a second predicted clothing image, and input the second reference fused feature vector into the pre-trained second decoder to obtain a second predicted clothing attribute vector;

[0125] A second loss determination submodule, configured to calculate a second reference loss based on the reference clothing image, the second predicted clothing image, the reference clothing attribute vector, and the second predicted clothing attribute vector;

[0126] A second training submodule is used to train the pre-trained first encoder, the pre-trained second encoder, the pre-trained third encoder, the pre-trained first decoder and the pre-trained second decoder according to the second reference loss until the second reference loss converges, and obtain the trained first encoder, the trained second encoder, the trained third encoder, the trained first decoder and the trained second decoder;

[0127] The second model determination submodule is used to form a trained clothing feature extraction model by using the trained first encoder, the trained second encoder and the trained third encoder.

[0128] In a specific implementation, the attribute prediction model includes a trained clothing feature extraction model and a trained second decoder.

[0129] In a specific implementation, the loss calculation module 26 includes:

[0130] A first sub-loss calculation unit, used to obtain a first reconstruction sub-loss according to the first clothing attribute vector and the second clothing attribute vector;

[0131] A second sub-loss calculation unit, used to obtain a second reconstruction sub-loss according to the second clothing attribute vector and the target clothing attribute vector;

[0132] The sub-loss weighting unit is used to use the weighted sum of the first reconstruction sub-loss and the second reconstruction sub-loss as the image reconstruction loss.

[0133] In a specific implementation, the clothing parts include at least the clothing body and clothing accessories, and the clothing attributes include at least color, shape and pattern.

[0134] It should be noted that the information interaction, execution process and other contents between the above modules are based on the same concept as the embodiment of the method of the present invention. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0135] Embodiment 3

[0136] Embodiment 3 of the present invention provides a non-transitory computer-readable storage medium, wherein at least one instruction or at least one program is stored in the non-transitory computer-readable storage medium, and the at least one instruction or at least one program is loaded and executed by a processor to implement the steps:

[0137] S101, obtaining a target clothing attribute vector provided by a user, wherein the target clothing attribute vector includes M target clothing attribute sub-vectors corresponding to clothing parts, the target clothing attribute sub-vectors include corresponding clothing parts, N clothing attributes and a target attribute value corresponding to each clothing attribute, and M and N are both positive integers.

[0138] S102, inputting the basic clothing image and the target clothing attribute vector into the trained clothing feature extraction model to obtain a fused feature vector.

[0139] S103, inputting the fused feature vector into an image reconstruction model to obtain a reference clothing image.

[0140] S104, inputting the basic clothing image and the preset basic clothing attribute vector into the attribute prediction model to obtain a first clothing attribute vector, wherein the basic clothing attribute vector includes M basic clothing attribute sub-vectors corresponding to clothing parts, and the basic clothing attribute sub-vectors include corresponding clothing parts, N clothing attributes and basic attribute values ​​corresponding to each clothing attribute.

[0141] S105: Input the reference clothing image and the basic clothing attribute vector into the attribute prediction model to obtain a second clothing attribute vector.

[0142] S106, obtaining image reconstruction loss according to the first clothing attribute vector, the second clothing attribute vector and the target clothing attribute vector.

[0143] S107, updating the parameters of the image reconstruction model according to the image reconstruction loss until the image reconstruction loss converges, and obtaining a trained image reconstruction model.

[0144] S108, inputting the fused feature vector into the trained image reconstruction model to obtain the target clothing image.

[0145] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0146] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0147] Embodiment 4

[0148] A fourth embodiment of the present invention provides an electronic device, which includes a processor and the non-transitory computer-readable storage medium in the third embodiment of the present invention.

[0149] The above are only preferred embodiments of the present invention, and are not intended to limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment as above, it is not intended to limit the present invention. Any technician familiar with the profession can make some changes or modifications to equivalent embodiments of equivalent changes using the technical contents disclosed above without departing from the scope of the technical solution of the present invention. However, any simple modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention are still within the scope of the technical solution of the present invention.

Claims

1. A clothing design method based on artificial intelligence, characterized in that: The clothing design method based on artificial intelligence comprises the following steps: S101, obtaining a target clothing attribute vector provided by a user, wherein the target clothing attribute vector includes M target clothing attribute sub-vectors corresponding to clothing parts, the target clothing attribute sub-vectors include the corresponding clothing parts, N clothing attributes, and a target attribute value corresponding to each clothing attribute, and M and N are both positive integers; S102, inputting the basic clothing image and the target clothing attribute vector into a trained clothing feature extraction model to obtain a fused feature vector, wherein the fused feature vector is used to represent fused information of image information in the basic clothing image and text information in the target clothing attribute vector; S103, inputting the fused feature vector into an image reconstruction model to obtain a reference clothing image; S104, inputting the basic clothing image and the preset basic clothing attribute vector into the attribute prediction model to obtain a first clothing attribute vector, wherein the basic clothing attribute vector includes M basic clothing attribute sub-vectors corresponding to clothing parts, the basic clothing attribute sub-vectors include corresponding clothing parts, N clothing attributes and basic attribute values ​​corresponding to each clothing attribute, and the first clothing attribute vector is used to represent clothing attribute information of the basic clothing image; S105, inputting the reference clothing image and the basic clothing attribute vector into the attribute prediction model to obtain a second clothing attribute vector, wherein the second clothing attribute vector is used to represent clothing attribute information of the reference clothing image; S106, acquiring image reconstruction loss according to the first clothing attribute vector, the second clothing attribute vector and the target clothing attribute vector; S107, updating the parameters of the image reconstruction model according to the image reconstruction loss until the image reconstruction loss converges, thereby obtaining a trained image reconstruction model; S108, inputting the fused feature vector into the trained image reconstruction model to obtain a target clothing image.

2. The clothing design method based on artificial intelligence according to claim 1, characterized in that: The training process of the trained clothing feature extraction model includes the following steps: S201, pre-training the initial clothing feature extraction model to obtain a pre-trained clothing feature extraction model; S202, retraining the pre-trained clothing feature extraction model to obtain the trained clothing feature extraction model.

3. The clothing design method based on artificial intelligence according to claim 2 is characterized in that: The initial clothing feature extraction model includes a first encoder, a second encoder and a third encoder, and S201 also includes the following steps: S2011, obtaining a reference clothing image and a reference clothing attribute vector corresponding to the reference clothing image, wherein the reference clothing attribute vector includes M reference clothing attribute sub-vectors corresponding to clothing parts, and the reference clothing attribute sub-vector includes the corresponding clothing part, N clothing attributes, and a reference attribute value corresponding to each clothing attribute; S2012, inputting the reference clothing image into the first encoder to obtain a first reference image feature vector; S2013, inputting the reference clothing attribute vector into the second encoder to obtain a first reference attribute feature vector; S2014, inputting the first reference image feature vector and the first reference attribute feature vector into the third encoder to obtain a first reference fusion feature vector; S2015, inputting the first reference fused feature vector into a preset first decoder to obtain a first predicted clothing image, and inputting the first reference fused feature vector into a preset second decoder to obtain a first predicted clothing attribute vector; S2016, calculating a first reference loss according to the reference clothing image, the first predicted clothing image, the reference clothing attribute vector, and the first predicted clothing attribute vector; S2017: train the first encoder, the second encoder, the third encoder, the first decoder, and the second decoder according to the first reference loss until the first reference loss converges, and obtain a pre-trained first encoder, a pre-trained second encoder, a pre-trained third encoder, a pre-trained first decoder, and a pre-trained second decoder; S2018, forming the pre-trained clothing feature extraction model by the pre-trained first encoder, the pre-trained second encoder and the pre-trained third encoder.

4. The clothing design method based on artificial intelligence according to claim 3 is characterized in that: S202 also includes the following steps: S2021, randomly occluding at least one clothing part or reference attribute value in the reference clothing attribute vector to obtain an occluded clothing attribute vector; S2022, inputting the reference clothing image into the pre-trained first encoder to obtain a second reference image feature vector; S2023, inputting the occlusion clothing attribute vector into the pre-trained second encoder to obtain a second reference attribute feature vector; S2024, inputting the second reference image feature vector and the second reference attribute feature vector into the pre-trained third encoder to obtain a second reference fusion feature vector; S2025, inputting the second reference fused feature vector into the pre-trained first decoder to obtain a second predicted clothing image, and inputting the second reference fused feature vector into the pre-trained second decoder to obtain a second predicted clothing attribute vector; S2026, calculating a second reference loss according to the reference clothing image, the second predicted clothing image, the reference clothing attribute vector, and the second predicted clothing attribute vector; S2027, training the pre-trained first encoder, the pre-trained second encoder, the pre-trained third encoder, the pre-trained first decoder, and the pre-trained second decoder according to the second reference loss until the second reference loss converges, and obtaining a trained first encoder, a trained second encoder, a trained third encoder, a trained first decoder, and a trained second decoder; S2028, forming the trained clothing feature extraction model by the trained first encoder, the trained second encoder and the trained third encoder.

5. The artificial intelligence-based clothing design method according to claim 4, characterized in that: The attribute prediction model includes the trained clothing feature extraction model and the trained second decoder.

6. The artificial intelligence-based clothing design method according to claim 1, characterized in that: S106 also includes the following steps: S1061, obtaining a first reconstruction sub-loss according to the first clothing attribute vector and the second clothing attribute vector; S1062, obtaining a second reconstruction sub-loss according to the second clothing attribute vector and the target clothing attribute vector; S1063: Taking a weighted sum of the first reconstruction sub-loss and the second reconstruction sub-loss as the image reconstruction loss.

7. The artificial intelligence-based clothing design method according to any one of claims 1 to 6, characterized in that: The clothing parts include at least the clothing body and clothing accessories, and the clothing attributes include at least color, shape and pattern.

8. A clothing design device based on artificial intelligence, characterized in that: The clothing design device based on artificial intelligence includes: A first vector acquisition module is used to acquire a target clothing attribute vector provided by a user, wherein the target clothing attribute vector includes M target clothing attribute sub-vectors corresponding to clothing parts, and the target clothing attribute sub-vectors include the corresponding clothing parts, N clothing attributes, and a target attribute value corresponding to each clothing attribute, and M and N are both positive integers; A feature fusion module, used to input the basic clothing image and the target clothing attribute vector into the trained clothing feature extraction model to obtain a fused feature vector, wherein the fused feature vector is used to represent the fusion information of the image information in the basic clothing image and the text information in the target clothing attribute vector; An image reconstruction module, used for inputting the fused feature vector into an image reconstruction model to obtain a reference clothing image; A first attribute prediction module is used to input the basic clothing image and a preset basic clothing attribute vector into an attribute prediction model to obtain a first clothing attribute vector, wherein the basic clothing attribute vector includes M basic clothing attribute sub-vectors corresponding to clothing parts, the basic clothing attribute sub-vectors include corresponding clothing parts, N clothing attributes and basic attribute values ​​corresponding to each clothing attribute, and the first clothing attribute vector is used to represent clothing attribute information of the basic clothing image; A second attribute prediction module, used for inputting the reference clothing image and the basic clothing attribute vector into the attribute prediction model to obtain a second clothing attribute vector, wherein the second clothing attribute vector is used to represent clothing attribute information of the reference clothing image; a loss calculation module, configured to obtain an image reconstruction loss according to the first clothing attribute vector, the second clothing attribute vector and the target clothing attribute vector; A model training module, used to update the parameters of the image reconstruction model according to the image reconstruction loss until the image reconstruction loss converges, thereby obtaining a trained image reconstruction model; The clothing determination module is used to input the fused feature vector into the trained image reconstruction model to obtain a target clothing image.

9. A non-transitory computer-readable storage medium, wherein at least one instruction or at least one program is stored in the non-transitory computer-readable storage medium, characterized in that: The at least one instruction or the at least one program is loaded and executed by the processor to implement the artificial intelligence-based clothing design method as described in any one of claims 1-7.

10. An electronic device, characterized in that: The invention comprises a processor and the non-transitory computer-readable storage medium as claimed in claim 9.