Multi-stage attention and generative adversarial network collaborative product generation method and system

By employing a multi-stage attention and generative adversarial network (GAN) collaborative approach, the problems of detail neglect and semantic alignment discrepancies in GAN processing complex text descriptions are solved. This enables accurate generation of high-resolution product design images and compliance with manufacturing logic, thereby improving the design interaction experience and engineering implementation capabilities.

CN120997322APending Publication Date: 2025-11-21SUZHOU UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510983805.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-17
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

Existing generative adversarial network models suffer from problems such as ignoring details and semantic alignment issues when processing complex user text descriptions. They are difficult to generate high-resolution product design images that conform to manufacturing logic, and they consume a lot of computational resources, which limits their application in Industry 5.0 real-time customization and human-machine co-creation scenarios.

Method used

We employ a multi-stage attention and generative adversarial network collaborative approach. By focusing on key regions of clothing images through a multi-stage attention mechanism, we combine text features for image refinement and introduce a deep attention multimodal similarity model to optimize the generator. This results in a lightweight generation system that incorporates domain knowledge to improve the detail fidelity and manufacturing feasibility of the generated results.

Benefits of technology

It achieves the ability to express detailed features while ensuring the overall consistency of the image style. The generated results have visual expressiveness and manufacturing feasibility, can respond to user needs in real time, and meet the high-frequency iteration and rapid customization requirements of Industry 5.0.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120997322A_ABST
    Figure CN120997322A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-stage attention and generative adversarial network collaborative product generation method and system, and relates to the technical field of image generation, and the method comprises the steps: obtaining a low-resolution clothing image, focusing the low-resolution clothing image on a clothing image key region through a multi-stage attention mechanism, and carrying out the image refining processing through combining text features, a high-resolution clothing image is obtained; processing the text description to obtain corresponding word features, processing the high-resolution clothing image obtained by processing the multi-stage attention generative adversarial network to obtain corresponding local image features, and inputting the word features and the local image features into a deep attention multi-modal similarity model to obtain a deep attention multi-modal similarity model; outputting and obtaining the fine-grained similarity loss of the image and the text; and optimizing a pre-constructed multi-stage attention generative adversarial network based on the adversarial loss and the fine-grained similarity loss of the image and the text, and generating a product image based on the optimized multi-stage attention generative adversarial network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image generation technology, specifically to a method and system for generating products through multi-stage attention and generative adversarial networks. Background Technology

[0002] With the full-scale advancement of Industry 5.0, the manufacturing industry is undergoing a fundamental transformation from "automation-driven" to "human-centered intelligent collaboration." This technological revolution not only emphasizes improved production efficiency but also focuses on user participation, perception-driven processes, and co-creation of design. Product design, as the core link in the industrial chain closest to user needs, is being redefined—no longer confined to the traditional designer-led closed process, but shifting towards an intelligent system driven by user language expression, semantic understanding, and image generation. In recent years, thanks to the development of artificial intelligence, especially deep generative models, the "language-image" cross-modal conversion model, where users can automatically generate product design images by simply inputting natural language descriptions, has gradually matured. This design generation method greatly enhances the interactivity and responsiveness of product development, providing crucial support for achieving core Industry 5.0 requirements such as "high-frequency iteration," "rapid customization," and "visualization of emotional expression." While large-scale models excel in generating high-quality design images, their high dependence on computational resources and difficulty in accurately capturing personalized details limit their application in the real-time customization and human-machine co-creation scenarios advocated by Industry 5.0. In contrast, Generative Adversarial Networks (GANs) offer advantages such as efficient training and flexible structure, making them more suitable for building lightweight, fast-response design generation systems. However, GANs still face many challenges in practical applications. On the one hand, traditional GAN ​​models often rely on the overall sentence vector as input, making it difficult to identify and control fine-grained design elements in the text, resulting in deviations between the generated results and the user's intent in terms of detail. On the other hand, when generating high-resolution images, the model's ability to balance global structure and local details is limited, often resulting in distorted generation effects and missing details. Furthermore, design generation models generally lack effective embedding of domain knowledge and process rules, easily generating solutions that do not conform to actual manufacturing logic, limiting their feasibility in engineering applications. In this context, how to achieve a high-fidelity understanding of users' natural language needs and accurate mapping between high-resolution product design images has become an even more important challenge. Summary of the Invention

[0003] To address the shortcomings mentioned in the background art, the present invention aims to provide a product generation method and system that combines multi-stage attention and generative adversarial networks.

[0004] Firstly, the objective of this invention can be achieved through the following technical solution: a product generation method based on multi-stage attention and generative adversarial networks, the method comprising the following steps:

[0005] A low-resolution clothing image is acquired, and the key areas of the clothing image are focused through a multi-stage attention mechanism and combined with text features for image refinement to obtain a high-resolution clothing image.

[0006] The input text description is processed to obtain the corresponding word features, and the high-resolution clothing image obtained by the multi-stage attention generative adversarial network is processed to obtain the corresponding local image features. The word features and local image features are input into the pre-established deep attention multimodal similarity model, and the fine-grained similarity loss between the image and the text is output.

[0007] The pre-constructed multi-stage attention generative adversarial network is optimized based on adversarial loss and fine-grained similarity loss between images and text to obtain an optimized multi-stage attention generative adversarial network. Product images are then generated based on the optimized multi-stage attention generative adversarial network.

[0008] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: the pre-established multi-stage generator is constructed based on an attention generation network. In the first stage, the attention generation network generates a low-resolution clothing image using global sentence vectors, then uses the image vectors in each sub-region to form word context vectors by using an attention layer to query word vectors, combines the region image vectors and the corresponding word context vectors to form a multimodal context vector, and generates new image features in the surrounding sub-regions, ultimately generating a high-resolution clothing image.

[0009] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: the attention generation network has m generators (G0, G1, ..., G...). m-1 Take the hidden state (h0, h1, ..., h) m-1 Using this as input, generate images ranging from small to large scale. The formula is as follows:

[0010]

[0011] z is represented as a noise vector in the formula; It is the global sentence vector, e is the matrix of word vectors, and F is the global sentence vector. ca Indicates conditional expansion, which extends the sentence vector. Convert to a condition vector. The attention model proposed in the i-th stage of AttnGAN, F ca , F i , and G i It is modeled as a neural network.

[0012] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: within the attention generation network There are two inputs: word features e∈R D×T and image features from the previous hidden layer First, by adding a new perceptron layer, word features are transformed into a common semantic space of image features. Then, based on the hidden features h of the image... (query) Calculate the word context vector for each sub-region of the image, where each column of h is the feature vector of a sub-region in the image. For the j-th sub-region, its word context vector is calculated by combining h with the feature vector of the sub-region. j Dynamic representation of related word vectors;

[0013] For each part of the input image, the most relevant word vector is matched to constrain the generation. The image features and corresponding word context features are combined to generate the image for the next stage. The formula for matching image sub-regions and the most relevant words is as follows:

[0014]

[0015] β j,i This represents the weight of the i-th word in the j-th sub-region of the generated image, obtained by... Given the word context matrix of the image feature set h; then combining the image features and the corresponding word context features to generate the image for the next stage; the final objective function of the attention generation network is defined as:

[0016]

[0017] λ is a hyperparameter used to balance the two terms of the equation, L G It is a multi-stage generative adversarial network loss, L DAMSM It is a fine-grained similarity loss between images and text calculated by a deep attention multimodal similarity model.

[0018] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: the multi-stage generative adversarial network loss L G It is the GAN loss that approximates both conditional and unconditional distributions. In the i-th stage of AttnGAN, the generator G... i With corresponding discriminator D i , for G i The adversarial loss is defined as:

[0019]

[0020] in This is unconditional loss; unconditional loss determines whether an image is real or fake. Conditional loss determines whether an image and a sentence match; alternating to G... i Training of each discriminator D i All have been trained to classify the input into true or false categories by minimizing the defined cross-entropy loss;

[0021]

[0022] in For unconditional loss, For conditional loss, x i Distribution of real images at the i-th scale Model distributions from the same scale

[0023] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: the pre-established deep attention multimodal similarity model includes a text encoder and an image encoder, wherein the text encoder and the image encoder respectively map sub-regions of the image and words of the sentence to a common semantic space, thereby calculating the fine-grained similarity loss between the image and the text;

[0024] The text encoder is a bidirectional long short-term memory (Bi-LSTM) that uses an attention mechanism to encode text and outputs at the sentence and word levels. In the bidirectional Bi-LSTM, each word corresponds to two hidden states, one in each direction, and the two hidden states are connected. At the word level, the output of the middle hidden state is taken to determine the consistency between the image and the sentence.

[0025] The image encoder is a convolutional neural network (CNN) that maps images to semantic vectors. The intermediate layers of the CNN learn local features of different sub-regions of the image, while the later layers learn global features of the image. The discriminator takes the sentence level and the image generated by the generator at that stage as input and judges the consistency between the image and the sentence.

[0026] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: the image-text matching process includes:

[0027] First, calculate the similarity matrix between the sentence and the word pairs appearing in the sub-regions of the image:

[0028] s = e T v (6)

[0029] In the formula, e T ∈R T×DThis represents the feature matrix of all words extracted by the bidirectional long short-term memory text encoder, consisting of T words, each a D-dimensional vector; v∈R D×289 This represents the local feature matrix of an image extracted by a convolutional neural network image encoder, where the visual features of each region are D-dimensional; s∈R T×289 s i,j Let be the dot product similarity between the i-th word of the sentence and the j-th sub-region of the image. Then, normalize the similarity matrix as follows:

[0030]

[0031] Then, an attention model is built, and a region-context vector is calculated for each word, where c is the region-context vector. i It is a dynamic representation of the sub-region in the image that is related to the i-th word of the sentence, and is calculated as a weighted sum of the visual vectors of all regions, i.e.:

[0032]

[0033] Where c represents i The context vector of the image region corresponding to the i-th word; α j This represents the attention weight of the j-th image region under the current i-th word; γ1 is a hyperparameter. Indicates the similarity between word i and image sub-region j; ν j These are local image features extracted through a CNN image encoder;

[0034] Finally, use c i and e i The cosine similarity between the i-th word and the image is used to define the relevance between them. The attention-driven image-text matching score R(Q,D) between the entire image Q and the entire text description D is defined as:

[0035]

[0036] Where T represents the number of words in the sentence; i∈{1,2,…,T-1} iterates through each word in the sentence; c i ∈R D e represents the feature vector of the visual region in the image most relevant to the i-th word; i ∈R D R(c) represents the feature vector of the i-th word; i ,e i R(Q,D) represents the cosine similarity between the i-th word and its corresponding image context; γ2 is the factor that determines how much the importance of the most relevant word-region-context pair is amplified. As γ2→∞, R(Q,D) approximates...

[0037] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: the calculation of the fine-grained similarity loss between the image and the text is as follows:

[0038] For a batch of image-sentence pairs Sentence D i With image Q i The posterior probability of a match is calculated as follows:

[0039]

[0040] Where P(D) i / Q i ) represents a given image Q i Under the premise of image and description D i The posterior probability of a match; R(Q) i D i ) represents the image Q i With description D i The matching score; M represents the number of image-text pairs in the training batch, D i Representing the image Q i True match text description; D j Indicates any other description, does not match Q i Q i Represents the i-th image;

[0041]

[0042] Where w represents word; The text direction matching loss is based on word-level images; M represents the number of samples in a training batch, with M images Q in each batch. i Each corresponds to a matching text description D i ;P(D i / Q i ) represents a given image Q i In this case, its correct description is D. i The posterior probability,

[0043] Similarly, minimize:

[0044]

[0045] in This represents the word-level text-to-image matching loss; M represents the number of samples in a training batch. It is sentence D i Its corresponding image Q i The posterior probability of the match, where R(Q)i D i ) represents the image Q i With text D i The matching score, R(Q) i D i ) represents the image Q i With description D i Match score; R(Q) i D j ) represents the image Q i With text description D j The matching similarity score between them, γ3 represents the scaling factor in softmax, and is redefined. Using sentence vectors and global image vector Obtain the loss function and Where 's' represents a sentence;

[0046] Finally, the DAMSM loss is defined as:

[0047]

[0048] Where L DAMSM It is the total loss function of the deep attention multimodal similarity model; The word-level matching loss represents the image-text direction; Word-level matching loss representing text-image orientation; Sentence-level matching loss representing the image-text orientation; Sentence-level matching loss representing text-image orientation.

[0049] Secondly, in order to achieve the above objectives, this invention discloses a product generation system that combines multi-stage attention and generative adversarial networks, comprising:

[0050] The image processing module is used to acquire low-resolution clothing images, focus the key areas of the clothing images through a multi-stage attention mechanism, and combine text features to perform image thinning processing to obtain high-resolution clothing images.

[0051] The image-text matching module is used to process the input text description to obtain the corresponding word features, and to process the high-resolution clothing image obtained by the multi-stage attention generative adversarial network to obtain the corresponding local image features. The word features and local image features are input into the pre-established deep attention multimodal similarity model, and the fine-grained similarity loss between the image and the text is output.

[0052] The image generation module is used to optimize the pre-constructed multi-stage attention generative adversarial network based on adversarial loss and fine-grained similarity loss between images and text, resulting in an optimized multi-stage attention generative adversarial network, and then generating product images based on the optimized multi-stage attention generative adversarial network.

[0053] In another aspect of the present invention, in order to achieve the above objective, a computer-readable storage medium is disclosed, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is loaded and executed by a processor, it employs the product generation method of multi-stage attention and generative adversarial network collaboration as described above.

[0054] The beneficial effects of this invention are:

[0055] This invention addresses the problems of "ignoring details and semantic alignment discrepancies" in existing generative adversarial network (GAN) models when processing complex user text descriptions. It integrates a multi-stage generation mechanism with a dynamic attention mechanism within the GAN framework, assigning dynamic semantic weights to key design words in the text (such as "chiffon," "ruffles," and "belt decorations"), enabling the generator to focus on corresponding regions during image generation and improving the fidelity of local elements (such as material, structure, and color). Compared to traditional methods that only use global sentence vectors, this invention improves the ability to express detailed features while maintaining overall image style consistency, thus more accurately reflecting users' personalized needs and enhancing the interactive experience of product design. To address the issue of existing models generating results that "only pursue visual effects without manufacturing feasibility," this invention constructs a domain knowledge embedding mechanism, injecting basic process rules and material logic of product design into the image generation process, achieving compliance filtering and structural rationality control of image content. For example, when generating "silk skirt," it automatically avoids the matching error of "stiff shape," effectively preventing the generation of unfeasible design patterns such as "hard silk structure" or "sheer wool cover-up." This feature enables the generated results to not only possess visual expressiveness but also the feasibility of directly entering the prototyping and production stage, significantly improving the engineering feasibility of design images. Addressing the issues of slow inference speed and high computational cost inherent in existing large-scale model methods, this invention employs a lightweight, multi-stage generative adversarial network architecture, combined with a joint optimization mechanism based on image-text similarity. This significantly reduces inference time and memory usage without compromising generation accuracy, enhancing the model's adaptability in resource-constrained scenarios such as terminal devices and edge deployments. This technology allows the system to achieve real-time response and continuous optimization under the requirements of "human-machine co-creation," "rapid feedback," and "multi-round iteration" proposed by Industry 5.0, meeting high-frequency design verification and customization needs, and enhancing user engagement and system usability. Attached Figure Description

[0056] 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, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0057] Figure 1 This is a schematic diagram of the method flow of the present invention;

[0058] Figure 2 This invention relates to a process diagram;

[0059] Figure 3 This is a schematic diagram of the system structure of the present invention. Detailed Implementation

[0060] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0061] Example 1:

[0062] like Figure 1 As shown, a product generation method combining multi-stage attention and generative adversarial networks includes the following steps:

[0063] S101: Obtain a low-resolution clothing image, focus the key areas of the clothing image through a multi-stage attention mechanism and combine text features to perform image thinning processing to obtain a high-resolution clothing image.

[0064] The pre-built multi-stage generator is constructed based on an attention-based generative network.

[0065] Attention-based generative networks provide an attention mechanism for the generator, enabling it to map different sub-regions of an image by focusing on the most relevant words within that region. More specifically, in addition to encoding the natural language description as a global sentence vector, each word in the sentence is also encoded as a word vector. The generative network generates a low-resolution image in the first stage using the global sentence vector. In subsequent steps, it uses the image vectors from each sub-region to query the word vectors by forming word context vectors using an attention layer. The model then combines the region image vectors and the corresponding word context vectors to form a multimodal context vector, and generates new image features in the surrounding sub-regions based on this. This effectively produces higher-resolution images and reveals more detail at each step.

[0066] Building upon this, a convolutional neural network is used to transform the image into a set of feature maps, each representing a sub-interval on a concept map. The dimension of the feature maps is the same as that of the word vectors, facilitating similarity calculation. Based on each marker in the title, attention is focused on the feature maps, and then their weighted average is obtained.

[0067] Similar to most Text2Image models, AttnGAN generates images using random noise and global sentence vectors. In the following steps, AttnGAN is used at each step to add details to the image.

[0068] The attention-generating network has m generators (G0, G1, ..., G...). m-1 They take hidden states (h0, h1, ..., h). m-1 Using this as input, generate images ranging from small to large scale. Specifically

[0069]

[0070]

[0071] z is represented as a noise vector in the formula, which is usually sampled from a standard normal distribution. It is the global sentence vector, e is the matrix of word vectors, and F is the global sentence vector. ca The conditional expansion represents the sentence vector. Convert to a condition vector. The attention model proposed in the i-th stage of AttnGAN, F ca , F i , and G i It is modeled as a neural network.

[0072] Note the model There are two inputs: word features e∈R D×T and image features from the previous hidden layer First, by adding a new perceptron layer, word features are transformed into a common semantic space of image features. Then, based on the hidden features h of the image... (query) Calculate the word context vector for each sub-region of the image. Each column of h is the feature vector of a sub-region in the image. For the j-th sub-region, its word context vector is calculated using h. j Dynamic representation of related word vectors.

[0073] For each part of the input image, the generation of the most relevant word vector is constrained by matching it, increasing the fine-grained detail of the image. Image features are combined with corresponding word context features to generate the next stage of image generation. The formula for matching image sub-regions and the most relevant words is as follows:

[0074]

[0075] β j,i This represents the weight of word i when the model generates the j-th sub-region of the image. Then, through... Given the word context matrix of the image feature set h, the next stage image is generated by combining the image features and the corresponding word context features.

[0076] The discriminators in AttnGAN are structurally disjoint, allowing them to be trained in parallel, with each discriminator focusing on a single image scale. To generate realistic images with multiple levels of conditions (i.e., sentence-level and word-level), the ultimate objective function of the attention-generating network is defined as:

[0077]

[0078] Here, λ is a hyperparameter that balances the two terms of the equation. The first term L G It is the loss of a multi-stage generative adversarial network. The second term, L... DAMSM It is a fine-grained similarity loss between images and text calculated by the Deep Attention Multimodal Similarity Model (DAMSM).

[0079] L G It is the GAN loss that approximates both conditional and unconditional distributions. In the i-th stage of AttnGAN, the generator G... i With corresponding discriminator D i For G i The adversarial loss is defined as

[0080]

[0081] in This is unconditional loss; unconditional loss determines whether an image is real or fake. Conditional loss is used to determine whether an image and a sentence match. Alternating to G... i Training of each discriminator D i They are all trained to classify the input into true or false categories by minimizing the defined cross-entropy loss.

[0082]

[0083] in For unconditional loss, For conditional loss, x i Distribution of real images at the i-th scale Model distributions from the same scale AttnGAN's discriminators are structurally disjoint, so they can be trained in parallel, and each discriminator focuses on a single image scale.

[0084] S102: Process the input text description to obtain the corresponding word features, and process the high-resolution clothing image obtained by the multi-stage attention generative adversarial network to obtain the corresponding local image features. Input the word features and local image features into the pre-established deep attention multimodal similarity model, and output the fine-grained similarity loss between the image and the text.

[0085] The pre-established deep attention multimodal similarity model includes a text encoder and an image encoder. The text encoder and the image encoder map sub-regions of the image and words of the sentence to a common semantic space, respectively, thereby calculating the fine-grained similarity loss between the image and the text.

[0086] The text encoder is a bidirectional long short-term memory (Bi-LSTM) that uses an attention mechanism to encode text, outputting at both the sentence and lexical levels. In Bi-LSTM, each word corresponds to two hidden states, one in each direction. Therefore, we concatenate these two hidden states, and at the lexical level, we take the output of the intermediate hidden state to determine the consistency between the image and the sentence.

[0087] The image encoder is a convolutional neural network (CNN) that maps images to semantic vectors. The intermediate layers of the CNN learn local features of different sub-regions of the image, while later layers learn global features. The discriminator takes as input sentence-level data and the image generated by the generator at that stage, and judges the consistency between the image and the sentence.

[0088] The matching mechanism first encodes the input sequence into a vector containing specific information, then semantically encodes it and uses a decoder to translate the vector into output information. This method converts all input into vectors and then adaptively selects a subset based on an attention mechanism, avoiding input compression and preserving complete sentence information. To perform an attention model based on images and text to measure the matching of image-sentence pairs, the similarity matrix between the sentence in the image and possible word pairs in the sub-regions is first calculated:

[0089] s = e T v (6)

[0090] In the formula, e T ∈R T×D This represents the feature matrix of all words extracted by the bidirectional long short memory text encoder, consisting of T words, each a D-dimensional vector; v∈R D×289 This represents the local feature matrix of the image extracted by the convolutional neural network image encoder. A total of 289 sub-regions (i.e., 17×17) were extracted, and the visual features of each region are D-dimensional; s∈R T×289 s i,j Let be the dot product similarity between the i-th word of the sentence and the j-th sub-region of the image. Then, the similarity matrix is ​​normalized as follows:

[0091]

[0092] Then, an attention model is built to compute a region-context vector for each word (query). Region-context vector c i It is a dynamic representation of the sub-region in the image that is related to the i-th word of the sentence. It is calculated as a weighted sum of the visual vectors of all regions, i.e.:

[0093]

[0094] Where c represents i The context vector of the image region corresponding to the i-th word is a weighted sum representing the aggregated visual features of the image region most relevant to that word; α j This represents the attention weight of the j-th image region under the current i-th word. It is calculated using the softmax function, ensuring that the sum of the weights for all j is 1. This controls the contribution of the image region in constructing the context vector of this word. γ1 is a hyperparameter used to adjust the sensitivity of the softmax function. The larger the value, the more "focused" the model is on regions with high similarity; the smaller the value, the more "uniform" the model is. Equation (7) gives the similarity between word i and image sub-region j; ν j It is the local image features extracted by the CNN image encoder and then projected into the multimodal space.

[0095] Finally, use c i and e i The cosine similarity between the i-th word and the image is used to define the relevance between them. The attention-driven image-text matching score between the entire image (Q) and the entire text description (D) is then defined as...

[0096]

[0097] Where T represents the number of words in the sentence (the total number of words in the text description); i∈{1,2,…,T-1} iterates through each word in the sentence; c i ∈R D The feature vector representing the visual region in the image most relevant to the i-th word is derived from formula (8); e i ∈R D R(c) represents the feature vector of the i-th word (from the bidirectional long short-term memory of the text encoder); i ,e i Let represent the cosine similarity between the i-th word and its corresponding image context; γ2 is a factor that determines how much the importance of the most relevant word-region-context pair is amplified. As γ2→∞, R(Q,D) approximates...

[0098] S103: The pre-constructed multi-stage attention generative adversarial network is optimized based on adversarial loss and fine-grained similarity loss between images and text to obtain an optimized multi-stage attention generative adversarial network, and product images are generated based on the optimized multi-stage attention generative adversarial network.

[0099] A scoring network, which they called an "expert," was pre-trained: the Deep Attention Multimodal Similarity Model (DAMSM). The model takes an image and its corresponding labeled word vectors as input and outputs the similarity between the two. It was designed to learn the attention model in a semi-supervised manner, where the only supervision is the matching between the entire image and the whole (word sequence). The DAMSM was trained to minimize the difference between the aforementioned attention vectors (visual descriptions of words) and word embeddings (textual meanings of words). Once the DAMSM was sufficiently trained on the dataset, it could be used with a stepping discriminator to provide a rich objective for AttnGAN to optimize. For a batch of image-sentence pairs... Sentence D i With image Q i The posterior probability of a match is calculated as follows:

[0100]

[0101] Where P(D) i / Q i ) represents a given image Q i Under the premise that the image is consistent with description D i The posterior probability of a match; R(Q) i D i ) represents the image Q i With description D iThe matching score is defined by formula (9); M represents the number of image-text pairs in a training batch. D i Representing the image Q i True match text description; D j Indicates any other description, does not match Q i Q i This represents the i-th image; the matching score with the text is typically calculated using a combination of local feature (attention) encoding and global feature combination; γ3 is a smoothing factor determined experimentally. In this batch of sentences, only D... i Matching image Q i And treat all other M-1 sentences as non-matching descriptions. The loss function is then defined as the negative log-posterior probability of an image matching its corresponding text description, i.e.:

[0102]

[0103] Where “w” represents “word”; This represents the image-text direction matching loss based on word-level data; M represents the number of samples in a training batch (the number of image-text pairs), and each batch contains M images Q. i Each corresponds to a matching text description D i ;P(D i / Q i ) represents a given image Q i In this case, its correct description is D. i The posterior probability is derived from formula (10).

[0104] Symmetrically, we also minimize

[0105]

[0106] in This represents the word-level text-to-image matching loss; M represents the number of samples in a training batch. It is sentence D i Its corresponding image Q i The posterior probability of the match. Where R(Q) i D i ) represents the image Q i With text D i The matching score, defined by formula (9), is an attention-driven image-text matching score that considers the similarity between words and image regions, and actually reflects how the text "aligns" with the various sub-regions of the image. R(Q i D i ) represents the image Q i With description Di The matching score is defined by formula (9); R(Q) i D j ) represents the image Q i With text description D j The similarity score between the matches measures their relevance in the semantic space. γ3 represents the scaling factor (smoothing factor) in softmax, controlling the degree to which the score is amplified in softmax; a larger value indicates a greater bias towards the highest-scoring match. If redefined... We can use sentence vectors and global image vector Obtain the loss function and (Where 's' represents "sentence").

[0107] Finally, the DAMSM loss is defined as

[0108]

[0109] Where L DAMSM It is the total loss function of the deep attention multimodal similarity model. Its role is to train the image encoder and text encoder so that they have better image-text alignment ability in the common semantic space. At the same time, it provides additional fine-grained supervision signals for the image generator to improve image-text consistency. (From Equation 11) represents the word-level matching loss in the image-text direction; (From Equation 12) represents the word-level matching loss in the text-image direction; Sentence-level matching loss representing the image-text orientation; Sentence-level matching loss representing text-image orientation.

[0110] Specifically, the present invention will be further illustrated below through embodiments:

[0111] This invention proposes a product design image generation method that combines a multi-stage attention mechanism with generative adversarial networks, aiming to enhance the intelligence, automation, and user engagement of product design to meet the personalized design needs of the Industry 5.0 environment. This model, by integrating a multi-stage image generation structure, a dynamic semantic attention mechanism, and an image-text similarity matching optimization method, can efficiently convert user natural language input into high-resolution product images with structural rationality and detailed expressiveness. The implementation of this invention is described in detail below, combining the system operation flow and typical application scenarios.

[0112] First, users input their design requirements in text form through the front-end interface, such as: "A light purple velvet fitted dress with puff sleeves and a ruffled hem, suitable for spring." After text input, the text is processed by the text encoding module. This module uses a bidirectional long short-term memory neural network to embed and encode the input statement, while outputting two types of vector information: one is a global sentence vector, representing the overall semantics to guide the initial coarse image generation; the other is a word-level vector sequence, used for subsequent fine-grained semantic alignment to ensure accurate matching between the content of each region in the image and key design terms (such as "velvet," "puff sleeves," and "ruffles").

[0113] Next, the system enters a multi-stage image generation process. This generator employs a three-level progressive structure, generating images at 64×64, 128×128, and 256×256 pixel levels respectively, forming a coarse-medium-fine image construction logic. Specifically, the first stage generates the overall style outline and main color scheme; the second stage constructs the garment's structural layers (such as sleeve type and waist design); and the third stage further optimizes image texture and details (such as fabric texture and edge decorations). A deep residual module is used in the generator network to enhance image feature preservation and improve generation stability.

[0114] To achieve precise alignment between semantics and image regions, this invention introduces an attention mechanism module in the second and third stages. This module constructs an attention weight matrix based on the similarity calculation between image sub-regions and input words, thereby dynamically determining the semantic units that each region should prioritize. For example, when generating an image of "cuffs," the system can automatically increase the guiding weight of the word "puff sleeves" for the generated content in that region, thereby improving local image-text consistency and detail expression. This mechanism uses a formula to represent the calculation of the context vector:

[0115] Subsequently, to ensure that the generated images are highly consistent with the user's description in terms of macroscopic structure and semantic content, the system introduces a Graph-Text Similarity Alignment Module (DAMSM). This module consists of an image encoder (CNN-based) and a text encoder (Bi-LSTM), which embed image regions and text words into a unified multimodal semantic space, respectively. By calculating word-region matching loss and sentence-image matching loss, the system obtains semantic similarity feedback signals between image and text pairs during the training phase. Combined with adversarial loss, this optimizes the generator structure, ultimately achieving image generation under precise semantic control.

[0116] The output image at each stage will also be validated by an independently configured discriminator module. The discriminator includes an unconditional path (to determine if the image is real) and a conditional path (to determine if the image matches the semantics of the input text). The real / false judgment and matching degree output by this module will be used in reverse to optimize the generator network, improving the overall output image quality and semantic consistency.

[0117] Ultimately, the system displays the generated high-resolution image to the user. For example, if a user inputs "a light green, loose-fitting top made of cotton and linen with wooden buttons," the system can output a product image that clearly shows the fabric texture, the details of the three-dimensional wooden buttons, and the loose-fitting silhouette, possessing realism and manufacturing feasibility. The image can be exported in JPEG / PNG format for subsequent prototyping, display, and sales use. It can also be integrated with the enterprise's ERP / PLM platform through the system interface to enter customized product design and rapid production processes. In addition, users can rate or annotate the generated results, providing online feedback signals for continuous optimization of the model.

[0118] The system has been pre-trained on the DeepFashion image-text pairing dataset, covering more than 100,000 sample pairs, and possesses good semantic modeling and multi-style transfer capabilities. Deployment tests show that the model can achieve an average generation speed of 1.7 seconds per image on an NVIDIA RTX3090 server, and also supports a lightweight pruned version deployed on terminal devices, enabling efficient design feedback under edge computing conditions.

[0119] In summary, this embodiment demonstrates the comprehensive capabilities of the present invention in semantic understanding, image generation, user interaction, and industrial adaptation, reflecting its practical feasibility and application value in the intelligent generation scenario of product design under the Industry 5.0 background.

[0120] like Figure 2 As shown, in the text feature encoding stage, F ca The extended feature vector (c) is the conditional input vector formed by perturbing and enhancing sentence features through a fully connected layer, used to introduce diversity; c is the conditional vector obtained by extending the sentence-level global vector extracted by the text encoder, and it serves as one of the inputs to the generator to guide the overall structure generation of the image; z represents the random noise vector, usually sampled from a normal distribution, and is used in conjunction with the conditional vector F. ca Together, they constitute the input of the generator, used to enhance the diversity of generated images. In a multi-stage attention-based generative adversarial network, in the first stage, F0 represents the image features of the first stage, the intermediate output of the generator, used for further refinement in subsequent stages; h0 represents the hidden features of the first stage, which is the internal representation input to the generator G0, and is composed of z and F. caThe process is as follows: G0 represents the first-stage generator, responsible for generating a low-resolution image (e.g., 64×64×3) as a preliminary structural sketch. D0 represents the first-stage discriminator (Discriminator 0), used to determine if the image is real and matches the text conditions. In the second stage, F1 represents the second-stage image features, used to further extract and refine the semantics and details of the image; h1 represents the second-stage hidden features, formed by combining the output of the previous stage and the text attention context. G1 represents the second-stage generator, outputting a medium-resolution image (e.g., 128×128×3). D1 represents the second-stage discriminator, which performs realism and semantic consistency evaluation on the image. In the third stage, F2 represents the third-stage image features, containing richer visual details and semantic features; h2 represents the third-stage hidden features, further processed from the input of the previous stage; G2 represents the third-stage generator, outputting the final high-resolution image (e.g., 256×256×3); D2 represents the third-stage discriminator, used to judge the realism and semantic alignment of the final generated image. An attention module dynamically aligns image sub-regions with relevant words. Each stage uses an attention mechanism to focus on words in the text description related to the current image region. An image encoder uses a convolutional neural network to extract local and global features of the generated image for comparison with the text. A text encoder uses bidirectional long short-term memory to output sentence and word vectors, calculating similarity with image features. A deep attention multimodal similarity model measures the semantic consistency between the generated image and the text description, calculates a loss function to optimize image-text alignment accuracy, and includes both word-level and sentence-level components. Finally, the loss function is jointly trained, integrating image quality and semantic consistency. To achieve accurate generation from user natural language requirements to high-resolution design images, this invention proposes a product design generation model that integrates a multi-stage attention mechanism and a generative adversarial network. The overall structure of this model is as follows: Figure 2 As shown, the whole process includes five core processes: text feature encoding, multi-stage image generation, attention-driven image-text alignment, image semantic matching evaluation, and joint training optimization. These processes work together to achieve semantic extraction of product design elements, generation of image details, and control of style consistency.

[0121] First, in the text feature encoding stage, the product description input by the user (e.g., "red lace dress, retro style") is fed into the text encoder as natural language information for semantic extraction. The encoder outputs two levels of text representation: a global sentence vector to capture the overall semantics, and a sequence of word-level word vectors to express fine-grained design elements. The sentence vectors are conditionally expanded through a fully connected operation to generate conditional feature representations suitable for the image generation module. The output of this stage is: a global conditional vector c and a word feature matrix W.

[0122] Subsequently, the model enters a multi-stage image generation process, employing a three-level progressively refined generator structure (G0, G1, G2) to improve image resolution from coarse to fine. In the first stage, random noise z ~ N(0,1) is input to generator G0 along with the sentence conditional vector c, generating an initial low-resolution image (64×64×3). This image, along with the hidden state F0, is passed to the second-stage generator G1, where an attention mechanism is introduced to focus on the alignment of words with image regions, generating a medium-resolution image (128×128×3). The third-stage generator G2 further generates a high-resolution image (256×256×3) based on the output of the previous stage. Each stage includes a discriminator (D0, D1, D2) to evaluate the realism of the image and its consistency with the text.

[0123] In each stage of image generation, an attention mechanism module is introduced to dynamically calculate the relevance between image sub-regions and text words. By using image features as queries and word vectors as key-value pairs, a word context vector corresponding to each image region is generated. Image features and context vectors are fused to form a multimodal representation, guiding the generator to better match the user's description at the local detail level. For example, when the input text contains "lace cuffs," the attention mechanism guides the model to enhance the "lace" feature in the corresponding cuff region of the image, thereby achieving fine-grained semantic control.

[0124] To further enhance the semantic consistency between the generated image and the text description, the model introduces a deep attention multimodal similarity model. This module includes a text encoder (bidirectional long short-term memory LSTM) and an image encoder (convolutional neural network CNN), which extract features from words and image sub-regions respectively and map them into a shared semantic space. By calculating the cosine similarity between words and image regions, the model obtains the bidirectional long short-term memory LSTM matching degree between the image and text, which is used to measure whether the generated image expresses the user's textual intent.

[0125] In the loss function design and training optimization stages, this model adopts a multi-task joint optimization strategy to minimize both adversarial loss and image-text similarity loss. The former is determined by discriminators at each scale to assess the authenticity and conditional consistency of the generated images; the latter is reflected by the matching score output by the deep attention multimodal similarity model, which shows the semantic alignment between the image and the text.

[0126] In summary, this technical process achieves an efficient mapping between user needs and product image generation, ensuring both the visual realism of the generated images and enhancing the semantic consistency and personalized expression capabilities of design elements. This method is particularly suitable for human-machine collaborative design scenarios in the context of Industry 5.0, significantly improving the intelligence level and response speed of product design.

[0127] Model performance comparison and effectiveness verification (based on mainstream models)

[0128] To verify the effectiveness of the "product design image generation method based on multi-stage attention and generative adversarial networks" proposed in this invention, this paper selects several representative image generation models for experimental comparison, including:

[0129] Table 1 compares several representative image generation models experimentally.

[0130]

[0131]

[0132] Experiment setup instructions:

[0133] Dataset used: DeepFashion text-image pairing subset, 100,000 training samples + 10,000 validation samples; Input text example: "Lightweight dress with rose pattern, sleeveless, round neck"; Evaluation metrics: FID, InceptionScore, CLIP similarity, where FID: lower values ​​indicate more realistic images; IS (Inception Score): higher values ​​indicate stronger image diversity and semantic consistency; CLIP similarity: based on the OpenAI CLIP model to evaluate the consistency between image and text, higher values ​​are better.

[0134] Table 2 Quantitative comparison of model performance (text-image consistency and generation quality)

[0135]

[0136] The method of this invention outperforms other models in three metrics: FID, IS, and CLIP. It is particularly stable in generating complex descriptions (including color, material, and structure). The attention mechanism can significantly enhance the correspondence between the image and the keywords in the description, and improve the ability to restore details. The multi-stage generated structure can be gradually refined, and high-quality control can be achieved from structural outline to texture representation.

[0137] Example 2: To achieve the above objective, such as Figure 3 As shown, based on Embodiment 1, this invention discloses a product generation system that combines multi-stage attention and generative adversarial networks, comprising:

[0138] Image processing module 11 is used to acquire low-resolution clothing images, focus key areas of the clothing images through a multi-stage attention mechanism and combine text features for image thinning to obtain high-resolution clothing images.

[0139] The image-text matching module 12 is used to process the input text description to obtain the corresponding word features, and to process the high-resolution clothing image obtained by the multi-stage attention generative adversarial network to obtain the corresponding local image features. The word features and local image features are input into the pre-established deep attention multimodal similarity model, and the fine-grained similarity loss between the image and the text is output.

[0140] Image generation module 13 is used to optimize a pre-constructed multi-stage attention generative adversarial network based on adversarial loss and fine-grained similarity loss between images and text, thereby obtaining an optimized multi-stage attention generative adversarial network, and generating product images based on the optimized multi-stage attention generative adversarial network.

[0141] Based on the same inventive concept, this invention also provides a computer device, comprising: one or more processors, and a memory for storing one or more computer programs; the programs include program instructions, and the processor executes the program instructions stored in the memory. The processor may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing and control core of the terminal, used to implement one or more instructions, specifically for loading and executing one or more instructions stored in a computer storage medium to implement the above-described method.

[0142] It should be further explained that, based on the same inventive concept, the present invention also provides a computer storage medium storing a computer program, which, when executed by a processor, performs the above-described method. This storage medium can be any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In the present invention, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0143] In the description of this specification, references to terms such as "an embodiment," "example," "specific example," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this disclosure. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0144] The foregoing has shown and described the basic principles, main features, and advantages of this disclosure. Those skilled in the art should understand that this disclosure is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of this disclosure. Various changes and modifications can be made to this disclosure without departing from its spirit and scope, and all such changes and modifications fall within the scope of this disclosure as claimed.

Claims

1. A product generation method that combines multi-stage attention and generative adversarial networks, characterized in that, The method includes the following steps: A low-resolution clothing image is acquired, and the key areas of the clothing image are focused through a multi-stage attention mechanism and combined with text features for image refinement to obtain a high-resolution clothing image. The input text description is processed to obtain the corresponding word features, and the high-resolution clothing image obtained by the multi-stage attention generative adversarial network is processed to obtain the corresponding local image features. The word features and local image features are input into the pre-established deep attention multimodal similarity model, and the fine-grained similarity loss between the image and the text is output. The pre-constructed multi-stage attention generative adversarial network is optimized based on adversarial loss and fine-grained similarity loss between images and text to obtain an optimized multi-stage attention generative adversarial network. Product images are then generated based on the optimized multi-stage attention generative adversarial network.

2. The product generation method based on multi-stage attention and generative adversarial networks according to claim 1, characterized in that, The pre-established multi-stage attention generative adversarial network is constructed based on the attention generative network. In the first stage, the attention generative network uses global sentence vectors to generate low-resolution clothing images. Then, it uses image vectors from each sub-region to form word context vectors by using an attention layer to query word vectors. It combines the region image vectors and the corresponding word context vectors to form multimodal context vectors and generates new image features in the surrounding sub-regions, ultimately generating high-resolution clothing images.

3. The product generation method based on multi-stage attention and generative adversarial networks according to claim 1, characterized in that, The attention generation network has m generators (G0, G1, ..., G...). m-1 Take the hidden state (h0, h1, ..., h) m-1 Using this as input, generate images ranging from small to large scale. The formula is as follows: z is represented as a noise vector in the formula; It is the global sentence vector, e is the matrix of word vectors, and F is the global sentence vector. ca Indicates conditional expansion, which extends the sentence vector. Convert to a condition vector. The attention model proposed in the i-th stage of AttnGAN, F ca , F i , and G i It is modeled as a neural network.

4. The product generation method based on multi-stage attention and generative adversarial networks according to claim 3, characterized in that, The attention generation network There are two inputs: word features e∈R D×T and image features from the previous hidden layer First, by adding a new perceptron layer, word features are transformed into a common semantic space of image features. Then, based on the hidden features h of the image... (query) Calculate the word context vector for each sub-region of the image, where each column of h is the feature vector of a sub-region in the image. For the j-th sub-region, its word context vector is calculated by combining h with the feature vector of the sub-region. j Dynamic representation of related word vectors; For each part of the input image, the most relevant word vector is matched to constrain the generation. The image features and corresponding word context features are combined to generate the image for the next stage. The formula for matching image sub-regions and the most relevant words is as follows: β j,i This represents the weight of the i-th word in the j-th sub-region of the generated image, obtained by... Given the word context matrix of the image feature set h; then combining the image features and the corresponding word context features to generate the image for the next stage; the final objective function of the attention generation network is defined as: λ is a hyperparameter used to balance the two terms of the equation, L G It is a multi-stage generative adversarial network loss, L DAMSM It is a fine-grained similarity loss between images and text calculated by a deep attention multimodal similarity model.

5. The product generation method based on multi-stage attention and generative adversarial networks according to claim 4, characterized in that, The multi-stage generative adversarial network loss L G It is the GAN loss that approximates both conditional and unconditional distributions. In the i-th stage of AttnGAN, the generator G... i With corresponding discriminator D i , for G i The adversarial loss is defined as: in This is unconditional loss; unconditional loss determines whether an image is real or fake. Conditional loss determines whether an image and a sentence match; alternating to G... i Training of each discriminator D i All of them have been trained to classify the input into true or false categories by minimizing the defined cross-entropy loss; in For unconditional loss, For conditional loss, x i Distribution of real images at the i-th scale Model distributions from the same scale 6. The product generation method based on multi-stage attention and generative adversarial networks according to claim 1, characterized in that, The pre-established deep attention multimodal similarity model includes a text encoder and an image encoder. The text encoder and the image encoder map sub-regions of the image and words of the sentence to a common semantic space, respectively, thereby calculating the fine-grained similarity loss between the image and the text. The text encoder is a bidirectional long short-term memory (Bi-LSTM) that uses an attention mechanism to encode text and outputs at the sentence and word levels. In the bidirectional Bi-LSTM, each word corresponds to two hidden states, one in each direction, and the two hidden states are connected. At the word level, the output of the middle hidden state is taken to determine the consistency between the image and the sentence. The image encoder is a convolutional neural network (CNN) that maps images to semantic vectors. The intermediate layers of the CNN learn local features of different sub-regions of the image, while the later layers learn global features of the image. The discriminator takes the sentence level and the image generated by the generator at that stage as input and judges the consistency between the image and the sentence.

7. The product generation method based on multi-stage attention and generative adversarial networks according to claim 6, characterized in that, The image-text matching process includes: First, calculate the similarity matrix between the sentence and the word pairs appearing in the sub-regions of the image: s=e T (6) In the formula, e T ∈R T×D This represents the feature matrix of all words extracted by the bidirectional long short-term memory text encoder, consisting of T words, each a D-dimensional vector; v∈R D×289 This represents the local feature matrix of an image extracted by a convolutional neural network image encoder, where the visual features of each region are D-dimensional; s∈R T×289 s i,j Let be the dot product similarity between the i-th word of the sentence and the j-th sub-region of the image. Then, normalize the similarity matrix as follows: Then, an attention model is built, and a region-context vector is calculated for each word, where c is the region-context vector. i It is a dynamic representation of the sub-region in the image that is related to the i-th word of the sentence, and is calculated as a weighted sum of the visual vectors of all regions, i.e.: Where c represents i The context vector of the image region corresponding to the i-th word; α j This represents the attention weight of the j-th image region under the current i-th word; γ1 is a hyperparameter. Indicates the similarity between word i and image sub-region j; ν j These are local image features extracted through a CNN image encoder; Finally, use c i and e i The cosine similarity between the i-th word and the image is used to define the relevance between them. The attention-driven image-text matching score R(Q,D) between the entire image Q and the entire text description D is defined as: Where T represents the number of words in the sentence; i∈{1,2,…,T-1} iterates through each word in the sentence; c i ∈R D e represents the feature vector of the visual region in the image most relevant to the i-th word; i ∈R D R(c) represents the feature vector of the i-th word; i ,e i R(Q,D) represents the cosine similarity between the i-th word and its corresponding image context; γ2 is the factor that determines how much the importance of the most relevant word-region-context pair is amplified. As γ2→∞, R(Q,D) approximates...

8. The product generation method based on multi-stage attention and generative adversarial networks according to claim 7, characterized in that, The fine-grained similarity loss between the image and the text is calculated as follows: For a batch of image-sentence pairs Sentence D i With image Q i The posterior probability of a match is calculated as follows: Where P(D) i / Q i ) represents a given image Q i Under the premise of image and description D i The posterior probability of a match; R(Q) i D i ) represents the image Q i With description D i Match score; M represents the number of image-text pairs in the training batch, D i Representing the image Q i True match text description; D j Indicates any other description, does not match Q i Q i Let represent the i-th image; γ3 is a smoothing factor determined experimentally; the loss function is defined as the negative log-posterior probability of an image matching its corresponding text description, i.e.: Where w represents word; The text direction matching loss is based on word-level images; M represents the number of samples in a training batch, with M images Q in each batch. i Each corresponds to a matching text description D i ;P(D i / Q i ) represents a given image Q i In this case, its correct description is D. i The posterior probability is also minimized: in This represents the word-level text-to-image matching loss; M represents the number of samples in a training batch. It is sentence D i Its corresponding image Q i The posterior probability of the match, where R(Q) i D i ) represents the image Q i With text D i The matching score, R(Q) i D i ) represents the image Q i With description D i Match score; R(Q) i D j ) represents the image Q i With text description D j The matching similarity score between them, γ3 represents the scaling factor in softmax, and is redefined. Using sentence vectors and global image vector Obtain the loss function and Where 's' represents a sentence; Finally, the DAMSM loss is defined as: Where L DAMSM It is the total loss function of the deep attention multimodal similarity model; The word-level matching loss represents the image-text direction; Word-level matching loss representing text-image orientation; Sentence-level matching loss representing the image-text orientation; Sentence-level matching loss representing text-image orientation.

9. A product generation system based on multi-stage attention and generative adversarial networks, employing the product generation method based on multi-stage attention and generative adversarial networks as described in any one of claims 1 to 8, characterized in that, include: The image processing module is used to acquire low-resolution clothing images, focus the key areas of the clothing images through a multi-stage attention mechanism, and combine text features to perform image thinning processing to obtain high-resolution clothing images. The image-text matching module is used to process the input text description to obtain the corresponding word features, and to process the high-resolution clothing image obtained by the multi-stage attention generative adversarial network to obtain the corresponding local image features. The word features and local image features are input into the pre-established deep attention multimodal similarity model, and the fine-grained similarity loss between the image and the text is output. The image generation module is used to optimize the pre-constructed multi-stage attention generative adversarial network based on adversarial loss and fine-grained similarity loss between images and text, resulting in an optimized multi-stage attention generative adversarial network, and then generating product images based on the optimized multi-stage attention generative adversarial network.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is loaded and executed by the processor, it employs the product generation method of multi-stage attention and generative adversarial network collaboration as described in any one of claims 1 to 8.

Citation Information

Cited By

  • Garment multi-mode collaborative design method driven by adornments

    CN121305092A