Continuous stability feature presentation and fusion method
By independently encoding and noise-diffusion the features in text-to-image generation, combined with feature splicing and averaging, the stability problem of feature presentation and fusion in text-to-image generation is solved, and the designer's ease of use and cross-functionality are achieved. The multi-dimensional fusion effect avoids the continuous arrangement effect and achieves the accurate generation of multiple styles and features.
Patent Information
- Application Number
- CN202410984892.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-22
- Publication Date
- 2024-10-11
AI Technical Summary
Existing technology is difficult to achieve sustained and stable feature presentation and fusion in text-to-image generation, resulting in low ease-of-use for designers when using prompt words, and difficulty in achieving multi-dimensional fusion and stable effects across latitudes.
By independently encoding the overall features, component element features and component element styles, three feature vector groups are generated, and the features are noise-diffused and averaged in the latent space, combined with feature splicing, weighting, crossover, fusion and attention mechanisms. , generate the third feature map, and perform noise prediction and decoding during the prediction process.
It achieves a stable effect for designers in opposition segmentation design, improves the ease of use of prompt words, avoids the effect of continuous arrangement in the same vector space, and can independently complete the accurate generation of object features and styles, the integration of multiple styles and the Feature merging stabilizes the function of individual features.
Smart Images

Figure CN118762098A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of data processing, and in particular relates to a method for presenting and fusing continuous stability features. Background Art
[0002] Text-to-image generation is an important branch of artificial intelligence, which involves the technology of converting text descriptions into images. The development of this technology has benefited from deep learning, especially the research and application of models such as generative adversarial networks (GANs) and variational autoencoders (VAEs). The origin of text-to-image technology can be traced back to before 2016, when it was mainly focused on the research and application of GAN and other similar technologies. These technologies use adversarial training methods to let a generative model and a discriminative model compete with each other to improve the quality and authenticity of generated content. From 2016 to 2019, the main development of text-to-image technology focused on the research and improvement of basic technologies such as GAN, VAE and Flow-based models. These technologies laid the foundation for the later diffusion model. Today, how to achieve continuous and stable feature presentation and fusion has become a technical problem that needs to be solved at this stage. Summary of the invention
[0003] The purpose of the present invention is to overcome the above problems existing in the prior art and provide a method for presenting and fusing continuous stability features.
[0004] In order to achieve the above technical objectives and the above technical effects, the present invention is implemented through the following technical solutions:
[0005] A method for presenting and fusing continuous stability features, comprising:
[0006] The overall features, component element features, and component element styles are encoded independently to form three feature vector groups;
[0007] Connecting two feature vector groups of overall features and component element features, generating a first feature map at a predetermined time, and performing noise diffusion of features in the latent space;
[0008] generating a second feature map based on the style of the component elements at a predetermined time;
[0009] The first feature map and the second feature map are averaged based on the same latent space to form a third feature map;
[0010] The third feature map is offset by adding random regular noise, and the subsequent noise prediction and decoding process is completed.
[0011] Furthermore, the independent encoding specifically adopts any one of one-hot encoding, bag-of-words model, TF-IDF or word embedding.
[0012] Furthermore, the connection includes any one of feature concatenation, feature weighting, feature intersection, feature fusion, and attention mechanism.
[0013] Furthermore, the noise diffusion includes:
[0014] Forward diffusion: Starting from the original data, gradually add noise until the data distribution is close to the standard normal distribution;
[0015] Reverse generation: Starting from the standard normal distribution, gradually remove the noise and restore the original data. Further, generate the first feature map including:
[0016] Feature extraction: extract features from raw data;
[0017] Feature dimensionality reduction: Reduce the dimension of features through dimensionality reduction techniques;
[0018] Feature mapping: Mapping the reduced-dimensional features to a new space through training models;
[0019] Feature visualization: Convert the mapped features into image form.
[0020] Furthermore, the second feature map is generated in the same manner as the first feature map.
[0021] Furthermore, the averaging includes being achieved through global average pooling.
[0022] The beneficial effects of the present invention are:
[0023] The present invention solves the problem of the ease of use of prompt words by designers by means of precise deconstruction and multi-dimensional splicing. Designers can easily achieve stable and good results in opposition segmentation design and cross-dimensional multi-dimensional fusion. Compared with the previous Wensheng map algorithm, it is more efficient to express the visualization of a certain concept and is compatible with various models. The prompt words are discretized and isolated in the encoding stage by the connection method, which eliminates the bluring effect of continuous arrangement in the same vector space. The effective weight influence of the third feature map on the second feature map in the whole prediction process can be determined by controlling the time, so that the second feature map and the third feature map are fused under the premise of maintaining independence. Only a small number of prompt words can realize the precise generation of specific styles that the prompt words cannot present before while realizing the object features independently and completely, and the functions of merging multiple styles and merging multiple features and stabilizing individual features. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0025] Figure 1 It is a flow chart of the method of the present invention. DETAILED DESCRIPTION
[0026] 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 ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0027] like Figure 1 A method for presenting and fusing continuous stability features is shown, comprising the following steps:
[0028] Step 1: Encode the overall features, component element features, and component element styles independently to form three feature vector groups;
[0029] Independent encoding is a method of converting categorical features into a format suitable for processing by machine learning algorithms. In machine learning, a feature vector is a vector used to represent the characteristics and attributes of a data sample, where each element represents a feature of the data sample. These features can be numerical, categorical, or mixed, and can be used to train machine learning models for tasks such as prediction, classification, or clustering.
[0030] Overall characteristics refer to the overall characteristics of a system, structure or design, which usually involves the system's functions, performance, appearance and user experience. In the field of design, overall characteristics refer to the overall style, proportion, color, texture and other aspects of the design work.
[0031] Component characteristics refer to the characteristics of the various parts that make up a system, structure or design. These elements can be physical, such as materials, parts, components, etc., or non-physical, such as color, texture, shape, etc. In the field of design, component characteristics refer to the characteristics of each element in a design work, such as line, shape, color, texture, etc. For example, in the new Chinese style, component characteristics include the use of materials such as wood, marble, and tiles, as well as the selection of furniture, lighting, and accessories.
[0032] The component style refers to the stylistic expression of the various parts that make up a system, structure or design. This style is usually determined by the combination and arrangement of design elements. In the field of design, the component style refers to the stylistic expression of each element in the design work, such as modern style, traditional style, simple style, retro style, etc. For example, in the new Chinese style, the component style is reflected in the placement of furniture, the selection of decorations, and the layout of space.
[0033] The independent encoding specifically adopts any one of the one-hot encoding, bag-of-words model, TF-IDF or word embedding.
[0034] One-hot encoding is a method of converting text data into a one-dimensional vector. Each position corresponds to a word. If the text contains the word, the corresponding position is set to 1, otherwise it is set to 0.
[0035] The bag-of-words model is a method of counting words in a text, ignoring the order and relationship between words. It treats words in a text as independent features and uses the number of times they appear in the text as the feature value.
[0036] TF-IDF is used to evaluate the importance of a word to a document set or a corpus. It is an improved version of the bag-of-words model, taking into account the frequency of words and document frequency, which helps to highlight keywords that appear frequently in the document set but less frequently in the entire corpus.
[0037] Word embedding is a method of converting text data into a high-dimensional real number vector, which attempts to capture the semantic relationship between words. Commonly used word embedding techniques include Word2Vec and GlobE.
[0038] Step 2: connect the two feature vector groups of the overall feature and the component element feature, generate the first feature map at a predetermined time, and perform noise diffusion of the feature in the latent space;
[0039] A latent space, also known as a latent feature space or embedding space, is an embedding of a set of items within a manifold, where items that are similar to each other are closer together in the latent space. Positions in the latent space can be viewed as defined by a set of latent variables that are derived from the similarities of the objects. In most cases, the dimensionality of the latent space is chosen to be lower than the dimensionality of the feature space from which the data points come, making the construction of the latent space an example of dimensionality reduction and can also be viewed as a form of data compression.
[0040] The connection includes any one of feature concatenation, feature weighting, feature intersection, feature fusion, and attention mechanism.
[0041] Feature concatenation is to place two feature vectors side by side in a certain order to form a new feature vector. For example, if the dimensions of the two feature vectors are n and m respectively, the dimension of the concatenated feature vector will be n+m. This method can increase the number of features but will not change the dimension of the features.
[0042] Feature weighting, this method involves assigning different weights to each feature vector and then adding them together to get a new feature vector. The weights can be set manually or learned by training a neural network. This method can highlight certain important features, but the weights need to be determined reasonably.
[0043] Feature crossover, a method for encoding nonlinear information, is formed by multiplying the values of two features.
[0044] Feature fusion,In deep learning, feature fusion is an important link, which can merge multiple feature vectors into a more powerful,representation, thereby improving the performance of the model.
[0045] Attention mechanism, this fusion method is to perform weighted fusion of different feature vectors by introducing the attention mechanism. The attention mechanism is a dynamic weight assignment method that can assign a weight to each element in the input sequence to determine which elements are more important to the output result.
[0046] Noise diffusion includes:
[0047] Forward diffusion: Starting from the original data, noise is gradually added until the data distribution approaches the standard normal distribution; in each diffusion step, the current data state is transformed into the next state according to a certain noise ratio. This process can be regarded as the process of gradually adding noise to the original data.
[0048] Reverse generation: Starting from the standard normal distribution, the noise is gradually removed to restore the original data. In this process, the diffusion model generates data by learning how to restore the original data from the noise. The reverse generation process is also a Markov chain process, and each step of generation depends on the result of the previous step.
[0049] Generating the first feature map includes:
[0050] Feature extraction: Extract features from raw data; this can be achieved through various algorithms such as Convolutional Neural Networks (CNN), SIFT (Scale Invariant Feature Transform), HOG (Histogram of Oriented Gradients), etc. These algorithms are able to capture key information of the image such as edges, textures, colors, etc.
[0051] Feature dimensionality reduction: The extracted features are often high-dimensional, and using these features directly may result in excessive computational complexity. Therefore, dimensionality reduction techniques (such as principal component analysis (PCA) and linear discriminant analysis (LDA)) are used to reduce the dimension of the features while retaining as much useful information as possible.
[0052] Feature mapping: The features after dimensionality reduction need to be mapped to a new space for subsequent processing and analysis. The features after dimensionality reduction are mapped to a new space by training models (such as support vector machines (SVMs), random forests (RFs), etc.). The model will learn the relationship between the features and the target variables and map the features to the decision space.
[0053] Feature visualization: Convert the mapped features into an image, i.e., a feature map. This can be achieved in a variety of ways, such as heat maps, color coding, etc. Feature maps can intuitively display the distribution of features in an image, which helps to understand the meaning and importance of features.
[0054] Step 3: Generate a second feature map based on the style of the component elements at a predetermined time; the second feature map is generated in the same way as the first feature map.
[0055] Step 4: Based on the same latent space, the first feature map and the second feature map are averaged to form a third feature map; the average is achieved through global average pooling. Global average pooling is a pooling operation that adds and averages all pixel values in the feature map to obtain a value that is used to represent the entire feature map. The advantage is that it can reduce the number of model parameters and the amount of calculation, and it also helps prevent overfitting.
[0056] Step 5: Add random regularized noise to the third feature map for offset, and complete the subsequent noise prediction and decoding process. Random regularized noise improves the generalization and robustness of the model by adding noise to the model's input, hidden state, or weight. This method can help the model resist overfitting, that is, prevent the model from learning too many details on the training data and failing to generalize well to new data.
[0057] The present invention solves the problem of the ease of use of prompt words by designers by means of precise deconstruction and multi-dimensional splicing. Designers can easily achieve stable and good results in opposition segmentation design and cross-dimensional multi-dimensional fusion. Compared with the previous Wensheng map algorithm, it is more efficient to express the visualization of a certain concept and is compatible with various models. The prompt words are discretized and isolated in the encoding stage by the connection method, which eliminates the bluring effect of continuous arrangement in the same vector space. The effective weight influence of the third feature map on the second feature map in the whole prediction process can be determined by controlling the time, so that the second feature map and the third feature map are fused under the premise of maintaining independence. Only a small number of prompt words can realize the precise generation of specific styles that the prompt words cannot present before while realizing the object features independently and completely, and the functions of merging multiple styles and merging multiple features and stabilizing individual features.
[0058] In the description of this specification, the description with reference to the terms "one embodiment", "example", "specific example", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0059] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments, and the above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, and these changes and improvements all fall within the scope of the present invention to be protected.
Claims
1. A method for presenting and fusing continuous stability features, characterized in that: include: The overall features, component element features, and component element styles are encoded independently to form three feature vector groups; Connecting two feature vector groups of overall features and component element features, generating a first feature map at a predetermined time, and performing noise diffusion of features in the latent space; generating a second feature map based on the style of the component elements at a predetermined time; The first feature map and the second feature map are averaged based on the same latent space to form a third feature map; The third feature map is offset by adding random regular noise, and the subsequent noise prediction and decoding process is completed.
2. A method for presenting and fusing continuous stability features according to claim 1, characterized in that: The independent encoding specifically adopts any one of the one-hot encoding, bag-of-words model, TF-IDF or word embedding.
3. A method for presenting and fusing continuous stability features according to claim 1, characterized in that: The connection includes any one of feature concatenation, feature weighting, feature intersection, feature fusion, and attention mechanism.
4. A method for presenting and fusing continuous stability features according to claim 1, characterized in that: Noise diffusion includes: Forward diffusion: Starting from the original data, gradually add noise until the data distribution is close to the standard normal distribution; Reverse generation: Starting from the standard normal distribution, gradually remove the noise and restore the original data.
5. A method for presenting and fusing continuous stability features according to claim 1, characterized in that: Generating the first feature map includes: Feature extraction: extract features from raw data; Feature dimensionality reduction: Reduce the dimension of features through dimensionality reduction techniques; Feature mapping: Mapping the reduced-dimensional features to a new space through training models; Feature visualization: Convert the mapped features into image form.
6. A method for presenting and fusing continuous stability features according to claim 5, characterized in that: The second feature map is generated in the same manner as the first feature map.
7. A method for presenting and fusing continuous stability features according to claim 1, characterized in that: Averaging is performed via global average pooling.
