Image generation-oriented multi-dimensional preference prediction method and system, and medium

Through the multi-dimensional preference prediction method, using multi-modal feature encoding module and multi-layer perceptron, a multi-dimensional preference prediction model is constructed, which solves the problem of incomplete image evaluation in image generation technology, realizes multi-dimensional evaluation of images, and significantly Improved evaluation accuracy of image generation models.

CN118658048APending Publication Date: 2024-09-17HUNAN UNIV
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410515057.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-26
Publication Date
2024-09-17

AI Technical Summary

Technical Problem

The existing technology cannot conduct a comprehensive multi-dimensional evaluation of the generated images, cannot accurately measure the quality of the image generation model, and especially cannot evaluate the cultural and emotional tendencies of the images.

Method used

Using a multi-dimensional preference prediction method, through multi-modal feature encoding modules and multi-layer perceptrons, a multi-dimensional preference prediction model is constructed, which can evaluate images in multiple dimensions such as culture, emotion, aesthetics, and picture-text consistency, and achieve expert evaluation Conversion of human assessments to machine-automated metrics.

Benefits of technology

It realizes multi-dimensional measurement of image generation, can accurately measure the quality of images, solves the problem of difficulty in evaluating the quality of generated images in the field of image generation, and significantly improves the prediction accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118658048A
    Figure CN118658048A
Patent Text Reader

Abstract

The invention discloses a multi-dimensional preference prediction method and system for image generation and a medium, and the method comprises the steps: inputting cue word-image data pairs composed of cue words and images generated based on the cue words into a pre-trained multi-dimensional preference prediction model to obtain a corresponding multi-dimensional preference prediction result, the multi-dimensional preference prediction model comprises a multi-modal feature coding module and a multi-layer perceptron, the multi-modal feature coding module is used for carrying out multi-modal feature coding on cue word-image data pairs, and the multi-layer perceptron is used for obtaining a corresponding multi-dimensional preference prediction result based on a multi-modal feature coding result. The invention aims to realize multi-dimensional measurement for an image generated by an image generation technology so as to accurately measure the quality of the generated image and solve the problem that the quality of the generated image is difficult to evaluate in the image generation field.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image generation, and in particular to a multi-dimensional preference prediction method, system and medium for image generation. Background Art

[0002] Image generation technology is an important research topic in the field of generative artificial intelligence, requiring artificial intelligence models to generate realistic and human-intended image content. Benefiting from the continuous development of model architecture and training data, existing technologies have been able to generate clear images that meet human requirements. However, current technologies are still focused on studying better image generation models to generate more accurate and beautiful images, but the industry's evaluation of images generated by models is not yet mature. Existing technologies can only evaluate the aesthetics of generated images or the consistency between generated images and input prompt words, and cannot conduct a comprehensive multi-dimensional evaluation of generated images. In addition, humans also have certain cultural or emotional tendencies for generated images. For example, Chinese people tend to generate images that do not contain cultural elements of Western countries, but rather reflect some cultural elements of the Chinese nation itself. However, existing image evaluation technologies lack this evaluation capability. In summary, image generation technology is developing rapidly, but there is a lack of comprehensive evaluation of generated images, and it is impossible to measure the quality of image generation models. Therefore, how to measure the quality of generated images has become a key technical problem that needs to be solved urgently. Summary of the invention

[0003] Technical problem to be solved by the present invention: In view of the above-mentioned problems in the prior art, a multi-dimensional preference prediction method, system and medium for image generation are provided. The present invention aims to implement multi-dimensional measurement for images generated by image generation technology to evaluate the quality of the generated images, and solve the problem of difficulty in evaluating the quality of generated images faced in the field of image generation.

[0004] In order to solve the above technical problems, the technical solution adopted by the present invention is: A multidimensional preference prediction method for image generation, comprising inputting a prompt word-image data pair consisting of a prompt word and an image generated based on the prompt word into a pre-trained multidimensional preference prediction model to obtain a corresponding multidimensional preference prediction result, wherein the multidimensional preference prediction model comprises a multimodal feature encoding module and a multilayer perceptron, wherein the multimodal feature encoding module is used to perform multimodal feature encoding on the prompt word-image data pair, and the multilayer perceptron is used to obtain a corresponding multidimensional preference prediction result based on the multimodal feature encoding result.

[0005] Optionally, the multimodal feature encoding module includes: An image encoder is used to encode the input image to obtain image features; A word embedder, used to perform a word embedding operation on the input prompt word to obtain a text embedding vector, in which each text embedding vector corresponds to each character in the prompt word; N-level feature encoders connected in cascade connection are used to perform feature encoding on image features and text features, wherein the text features are obtained by concatenating a text embedding vector and an introduced randomly initialized fixed-length identification character feature; The image features output by the image encoder and the text features output by the word embedder are input into the N-level feature encoder by the first-level feature encoder in the N-level feature encoder, and the multimodal feature encoding result of the multimodal feature encoding module is output by the last-level feature encoder of the N-level feature encoder.

[0006] Optionally, in the cascade-connected N-level feature encoders, each level of the feature encoder includes a text self-attention module, a cross-modal attention module and a feedforward neural network connected in sequence, the text self-attention module is used to model the contextual information in the text features, the cross-modal attention module is used to interactively fuse the text features as queries and the image features as key-value pairs through an attention mechanism to obtain multimodal features, and the feedforward neural network is used to transform the feature dimensions of the obtained multimodal features.

[0007] Optionally, before inputting the prompt word-image data pair consisting of the prompt word and the image generated based on the prompt word into a pre-trained multi-dimensional preference prediction model to obtain the corresponding multi-dimensional preference prediction result, the method further includes training the multi-dimensional preference prediction model: S101, using an image generation model to generate images from a prompt word database and construct sample data of prompt word-image data pairs; S102, manually annotating the prompt word-image data pair sample data using a preset multi-dimensional preference rule to form a multi-dimensional preference prediction training sample data set; S103, using the multi-dimensional preference prediction training sample data set to train the multi-dimensional preference prediction model, so as to establish a mapping relationship between the prompt word-image data pairs and the multi-dimensional preference prediction results.

[0008] Optionally, before step S101 , the original prompt word database is further cleaned to remove prohibited and repeated prompt words therein, so as to obtain the prompt word database in step S101 .

[0009] Optionally, after the original prompt word database is cleaned to remove prohibited and repeated prompt words, the method further includes cleaning and filtering out prompt words in the database that contain the same topic style: first, the Sentence-BERT model is used to obtain the vector representation of each prompt word, and the cosine similarity between each vector representation is calculated; then, a directed graph is constructed based on the cosine similarity between the vector representations of the prompt words, where the vertices of the graph represent prompt words, each prompt word is connected to a specified number of k edges that are most similar to it, a score is calculated for each vertex based on the similarity of the edges to which it is connected, and vertices are iteratively selected based on the score until the required number of prompt words are obtained, as the prompt word database in step S101 is finally obtained.

[0010] Optionally, the multi-dimensional preference prediction results include preference prediction results in four dimensions: culture, emotion, aesthetics, and image-text consistency.

[0011] In addition, the present invention also provides a multi-dimensional preference prediction system for image generation, comprising a microprocessor and a memory connected to each other, wherein the microprocessor is programmed or configured to execute the multi-dimensional preference prediction method for image generation.

[0012] In addition, the present invention also provides a computer-readable storage medium, which stores a computer program / instruction, and the computer program / instruction is programmed or configured to execute the multi-dimensional preference prediction method for image generation through a processor.

[0013] In addition, the present invention also provides a computer program product, including a computer program / instruction, which is programmed or configured to execute the multi-dimensional preference prediction method for image generation through a processor.

[0014] Compared with the prior art, the present invention mainly has the following advantages: the method of the present invention comprises inputting a prompt word-image data pair consisting of a prompt word and an image generated based on the prompt word into a pre-trained multidimensional preference prediction model to obtain a corresponding multidimensional preference prediction result, the multidimensional preference prediction model comprises a multimodal feature encoding module and a multilayer perceptron, the multimodal feature encoding module is used to perform multimodal feature encoding on the prompt word-image data pair, the multilayer perceptron is used to obtain a corresponding multidimensional preference prediction result based on the multimodal feature encoding result, through the above-mentioned method, it is possible to realize comprehensive and accurate measurement from expert manual evaluation to machine automatic measurement, from single dimension to multidimensional for the image generated by the image generation technology, and it is possible to accurately measure the quality of the generated image through multidimensional measurement, thereby solving the problem of difficult evaluation of the quality of the generated image faced by the image generation field. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1Schematic diagram of the structure of the multi-dimensional preference prediction model in Example 1 of the present invention.

[0016] Figure 2 Schematic diagram of the training process of the multi-dimensional preference prediction model in Example 1 of the present invention. DETAILED DESCRIPTION

[0017] In order to solve the problem of difficulty in evaluating the quality of generated images in the field of image generation, the multi-dimensional preference prediction method, system and medium for image generation of the present invention start from two levels of data and algorithm. First, a multi-dimensional preference dataset for image generation is constructed, and then a multi-dimensional preference prediction model is designed. By training on the constructed dataset, machine automatic evaluation of multi-dimensional preference is realized.

[0018] Embodiment 1: like Figure 1 As shown, the multidimensional preference prediction method for image generation in this embodiment includes inputting a prompt word-image data pair consisting of a prompt word and an image generated based on the prompt word into a pre-trained multidimensional preference prediction model to obtain a corresponding multidimensional preference prediction result. The multidimensional preference prediction model includes a multimodal feature encoding module and a multilayer perceptron. The multimodal feature encoding module is used to perform multimodal feature encoding on the prompt word-image data pair, and the multilayer perceptron is used to obtain a corresponding multidimensional preference prediction result based on the multimodal feature encoding result.

[0019] like Figure 1 As shown, the multimodal feature encoding module in this embodiment includes: An image encoder is used to encode the input image to obtain image features; A word embedder, used to perform a word embedding operation on the input prompt word to obtain a text embedding vector, in which each text embedding vector corresponds to each character in the prompt word; The N-level feature encoders connected in cascade are used to encode image features and text features, wherein the text features are text embedding vectors and a randomly initialized fixed-length identification character feature introduced (named <value>Characters) are concatenated; The image features output by the image encoder and the text features output by the word embedder are input into the N-level feature encoder by the first-level feature encoder in the N-level feature encoder, and the multimodal feature encoding result of the multimodal feature encoding module is output by the last-level feature encoder in the N-level feature encoder. Among them, N in the N-level feature encoder can be set according to actual needs. For example, as an optional implementation, in this embodiment, N is set to 12, that is, a cascaded 12-level feature encoder is used to realize text self-attention and image-text cross-attention. <value>The characters interact with both the prompt words and the generated images, thus containing multimodal perceptual information that can be used to measure value preferences later. <value>The features of the characters are fed into a multi-layer perceptron for multi-dimensional preference measurement to obtain the final multi-dimensional preference prediction results.

[0020] See also Figure 1 In the cascade-connected N-level feature encoders in this embodiment, each level of the feature encoder includes a text self-attention module, a cross-modal attention module and a feedforward neural network connected in sequence. The text self-attention module is used to model the context information in the text features. The cross-modal attention module is used to interactively fuse the text features as queries and the image features as key-value pairs through the attention mechanism to obtain multimodal features. The feedforward neural network is used to transform the feature dimensions of the obtained multimodal features.

[0021] like Figure 2 As shown, before the prompt word-image data pair consisting of the prompt word and the image generated based on the prompt word is input into the pre-trained multi-dimensional preference prediction model to obtain the corresponding multi-dimensional preference prediction result, the present embodiment also includes training the multi-dimensional preference prediction model: S101, using an image generation model to generate images from a prompt word database and construct sample data of prompt word-image data pairs; S102, manually annotating the prompt word-image data pair sample data using a preset multi-dimensional preference rule to form a multi-dimensional preference prediction training sample data set; S103, using the multi-dimensional preference prediction training sample data set to train the multi-dimensional preference prediction model, so as to establish a mapping relationship between the prompt word-image data pairs and the multi-dimensional preference prediction results.

[0022] In step S101 of this embodiment, the prompt word database is used to generate images using an image generation model. The prompt word database can be input into a variety of mainstream image generation models to obtain images with different multi-dimensional preferences. As an optional implementation, the mainstream image generation models used in this embodiment include: Stable Diffusion 1.5: Stable Diffusion 1.0 series model, trained on the LAION-aesthetics dataset, with a resolution of 512×512; Stable Diffusion 2.1: Stable Diffusion 2.0 series model, fine-tuned and trained on the LAION-5B dataset, with a generated image resolution of 768×768; Stable Diffusion XL-1.0: Stable Diffusion XL series models. Compared with previous versions of the model, the XL series models use a larger backbone network, more attention blocks, and also increase the resolution of image generation to 1024×1024; Stable Diffusion XL-1.0 + refiner: This model adds a refinement module based on XL-1.0 to further refine the image and improve the visual fidelity of the image. The resolution of the image generated by this model is also 1024×1024; DeepFloyd-IF: This model uses a stronger text encoder to improve the model's understanding of text prompts. In addition, the model also uses a multi-stage cascade architecture to continuously optimize from low resolution to high resolution, and finally generates 1024×1024 resolution images.

[0023] Midjourney 5.2: Midjourney is a popular commercial text-based image model that can generate images of various styles. Given a prompt word, the model can simultaneously return four images with a resolution of 1024×1024.

[0024] Finally, in this embodiment, 1,000 high-quality prompt words in the prompt word database PromptDB are respectively input into the above-mentioned image generation model, and finally 9,000 image data with different styles and preferences are obtained.

[0025] Before step S101 of this embodiment, the original prompt word database is also cleaned to remove prohibited and repeated prompt words, so as to obtain the prompt word database in step S101. Cleaning to remove prohibited and repeated prompt words can adopt a preset rule matching algorithm as needed. By using the rule matching algorithm to filter out prompt words containing illegal words in the database and remove prompt words that appear repeatedly in the database, a high-quality text map prompt word database can be obtained. As an optional implementation, the original prompt word database in this embodiment is specifically the prompt words of real users in the open source DiffusionDB data set. Since DiffusionDB contains some prompt words with irregular text structures and illegal information, this embodiment uses the rule matching algorithm to clean and filter out some prohibited and repeated prompt words.

[0026] In order to control the size and diversity of the prompt word database, this embodiment cleans the original prompt word database to remove prohibited and repeated prompt words, and also includes cleaning and filtering out prompt words in the database that contain the same theme style to reduce the burden of subsequent annotation work: first, the Sentence-BERT model is used to obtain the vector representation of each prompt word, and the cosine similarity between each vector representation is calculated; then, a directed graph is constructed based on the cosine similarity between the vector representations of the prompt words, and the vertices of the graph represent prompt words, and each prompt word is connected to the specified number k (which can be determined according to actual needs, in this embodiment, k=150) of edges that are most similar to it, and a score is calculated for each vertex according to the similarity of the edges connected to it, and a vertex is iteratively selected according to the score until the required number of prompt words is obtained, as the prompt word database in step S101 is finally obtained. For example, in this embodiment, through the above cleaning strategy, the present invention finally obtains a prompt word database consisting of 1,000 high-quality prompt words, which is recorded as the prompt word database PromptDB.

[0027] The multi-dimensional preference prediction results can comprehensively express the effect of image generation through the prediction results of multiple dimensional preferences, and the above dimensions can be selected according to actual needs.

[0028] For example, as an optional implementation, the multi-dimensional preference prediction results of this embodiment include preference prediction results of four dimensions, namely culture, emotion, aesthetics, and consistency of image and text. Among them: (1) The preference prediction result of culture is 1 or 0, 1 means that the image clearly presents certain elements of traditional Chinese culture, embodies the traditional art, values, historical stories or symbols of traditional Chinese culture, and has a certain degree of cultural recognition; 0 means that the image lacks obvious elements of traditional Chinese culture, does not embody the traditional art, values, historical stories or symbols of traditional Chinese culture, and is difficult to identify the characteristics of traditional Chinese culture. (2) The preference prediction result of emotion is 1, 0 or -1, where 1 means positive, the image conveys positive emotions such as happiness, beauty, and warmth, which can trigger the audience's pleasure and satisfaction; 0 means neutral, the image has no obvious positive or negative emotions, and presents an objective and neutral state; -1 means negative, the image conveys negative emotions such as frustration, anger, and anxiety, which may trigger the audience's discomfort and depression. (3) The prediction results of aesthetic preference are from 1 to 5, where 5 means very good, the image is unique in shape, creative, harmonious in color matching, excellent in visual effect, and the overall feeling is very beautiful; 4 means good, the image has a good overall feeling, good in color matching, excellent in visual effect, and high in overall aesthetics; 3 means average, the image has an average overall feeling, average in color matching, acceptable in visual effect, and medium in overall aesthetics; 2 means barely acceptable, the image has a poor overall feeling, unreasonable in color matching, poor in visual effect, and low in overall aesthetics; 1 means extremely poor, the image has a very poor overall feeling, leaving a bad impression, and the overall aesthetics is extremely low. (4) The prediction results of preference for consistency between image and text are from 1 to 5, where 5 means very good, the image and the prompt word are highly consistent (about 100%), echoing each other, and the content described by the prompt word is intuitively presented in the image. 4 means good, the image and the prompt word are consistent (about 70%), the information is conveyed clearly, and the content described by the prompt word is reasonably presented in the image. 3 means average, the image and the prompt word are basically consistent (about 50%), and the content described by the prompt word is presented to a certain extent in the image. 2 means barely, the image is not consistent with the prompt word (about 30%), the information is vague, and the content described by the prompt word is weakly presented in the image. 1 means extremely poor, the image is completely inconsistent with the prompt word (about 10%), the information is chaotic, and the content described by the prompt word cannot be presented in the image.

[0029] When manually annotating the prompt word-image data pair sample data using preset multi-dimensional preference rules in step S102 of this embodiment, the annotators may be required to strictly follow the scoring criteria based on the four dimensions of text, emotion, aesthetics, and text-image consistency to ensure a certain degree of objectivity. Due to the large data set, professional data annotators are organized to perform the annotations in this embodiment, and all the annotators have received higher education above college level. Before annotation, the annotators are required to understand the annotation criteria and annotation cases, and they are tested. Only those who pass the test can start the subsequent annotation work. In addition, for the convenience and controllability of data annotation, this embodiment uses a simple data annotation webpage. The annotators can carry out the annotation work by accessing the annotation webpage through a browser. Finally, this embodiment constructs a multi-dimensional preference prediction training sample data set consisting of a total of 9,000 prompt word-image pair data. Finally, using Figure 1 The multi-dimensional preference prediction model shown can predict preference prediction results in four dimensions: culture, emotion, aesthetics, and image-text consistency.

[0030] In order to verify the accuracy of the multi-dimensional preference prediction method for image generation in this embodiment, the multi-dimensional preference prediction method for image generation in this embodiment is compared with the existing CLIP (see the literature: Alee Radford, jong WVookKim, Chris Hallacy, et, al, Learning Transferable Visual Models From Natural Language Supervision International Conference on Machine Learning.2021) and BLIP (see the literature: Junnan Li, Dongxu Li, Caiming Xiong, et, al, BLlP: Bootstrapping Language-Image Pre-training for Unifed Vision-Language Understanding and Generation, International Conference on Machine Learning, 2022) in terms of prediction accuracy indicators, and the results are shown in Table 1.

[0031] Table 1 Comparison of prediction accuracy between the method of this embodiment and the existing method

[0032] As can be seen from Table 1, the method of this embodiment has a significant improvement in prediction accuracy compared with the existing method, and can accurately measure the quality of the generated image through multi-dimensional measurement.

[0033] In summary, the method of this embodiment includes inputting a prompt word-image data pair consisting of a prompt word and an image generated based on the prompt word into a pre-trained multidimensional preference prediction model to obtain a corresponding multidimensional preference prediction result. The multidimensional preference prediction model includes a multimodal feature encoding module and a multilayer perceptron. The multimodal feature encoding module is used to perform multimodal feature encoding on the prompt word-image data pair, and the multilayer perceptron is used to obtain a corresponding multidimensional preference prediction result based on the multimodal feature encoding result. Through the above method, it is possible to achieve comprehensive and accurate measurement from expert manual evaluation to machine automatic measurement, and from single dimension to multi-dimensional measurement for the images generated by the image generation technology. It is possible to accurately measure the quality of the generated image through multi-dimensional measurement, thereby solving the problem of difficult evaluation of the quality of generated images faced in the field of image generation.

[0034] In addition, the present embodiment further provides a multidimensional preference prediction system for image generation, comprising a microprocessor and a memory connected to each other, wherein the microprocessor is programmed or configured to execute the multidimensional preference prediction method for image generation. In addition, the present embodiment further provides a computer-readable storage medium, wherein a computer program / instruction is stored in the computer-readable storage medium, wherein the computer program / instruction is programmed or configured to execute the multidimensional preference prediction method for image generation through a processor. In addition, the present embodiment further provides a computer program product, comprising a computer program / instruction, wherein the computer program / instruction is programmed or configured to execute the multidimensional preference prediction method for image generation through a processor.

[0035] Embodiment 2: This embodiment is basically the same as the first embodiment, and the main difference is that the multi-dimensional preference prediction results of this embodiment include preference prediction results of two dimensions, namely image clarity and image-text consistency. Image clarity is a commonly used image evaluation dimension, and various well-known indicators can be used as needed, such as Brenner gradient function, Tenengrad gradient function, Tenengrad gradient function, grayscale variance function SMD, grayscale variance product function SMD2, variance function, Tenengrad gradient function, entropy function and EAV point sharpness algorithm function, etc. The definition of image-text consistency is the same as that in the first embodiment. Therefore, multi-dimensional preference prediction can also be achieved through two dimensions, namely image clarity and image-text consistency. And the dimensions of multi-dimensional preference prediction performed by the method of this embodiment can be selected according to actual needs, and do not depend on the dimensional examples of the first or second embodiments.

[0036] In addition, the present embodiment further provides a multidimensional preference prediction system for image generation, comprising a microprocessor and a memory connected to each other, wherein the microprocessor is programmed or configured to execute the multidimensional preference prediction method for image generation. In addition, the present embodiment further provides a computer-readable storage medium, wherein a computer program / instruction is stored in the computer-readable storage medium, wherein the computer program / instruction is programmed or configured to execute the multidimensional preference prediction method for image generation through a processor. In addition, the present embodiment further provides a computer program product, comprising a computer program / instruction, wherein the computer program / instruction is programmed or configured to execute the multidimensional preference prediction method for image generation through a processor.

[0037] Those skilled in the art should understand that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application can take the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the process Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the functions specified in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0038] The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.< / value> < / value> < / value>

Claims

1. A multi-dimensional preference prediction method for image generation, characterized in that: The method includes inputting a prompt word-image data pair consisting of a prompt word and an image generated based on the prompt word into a pre-trained multidimensional preference prediction model to obtain a corresponding multidimensional preference prediction result. The multidimensional preference prediction model includes a multimodal feature encoding module and a multilayer perceptron. The multimodal feature encoding module is used to perform multimodal feature encoding on the prompt word-image data pair. The multilayer perceptron is used to obtain a corresponding multidimensional preference prediction result based on the multimodal feature encoding result.

2. The multi-dimensional preference prediction method for image generation according to claim 1, characterized in that: The multimodal feature encoding module comprises: An image encoder is used to encode the input image to obtain image features; A word embedder, used to perform a word embedding operation on the input prompt word to obtain a text embedding vector, in which each text embedding vector corresponds to each character in the prompt word; N-level feature encoders connected in cascade connection are used to perform feature encoding on image features and text features, wherein the text features are obtained by concatenating a text embedding vector and an introduced randomly initialized fixed-length identification character feature; The image features output by the image encoder and the text features output by the word embedder are input into the N-level feature encoder by the first-level feature encoder in the N-level feature encoder, and the multimodal feature encoding result of the multimodal feature encoding module is output by the last-level feature encoder of the N-level feature encoder.

3. The multi-dimensional preference prediction method for image generation according to claim 2, characterized in that: In the cascade-connected N-level feature encoders, each level of the feature encoder includes a text self-attention module, a cross-modal attention module and a feedforward neural network connected in sequence. The text self-attention module is used to model context information in text features, the cross-modal attention module is used to interactively fuse text features as queries and image features as key-value pairs through an attention mechanism to obtain multimodal features, and the feedforward neural network is used to transform the feature dimensions of the obtained multimodal features.

4. The multi-dimensional preference prediction method for image generation according to claim 1, characterized in that: Before inputting the prompt word-image data pair consisting of the prompt word and the image generated based on the prompt word into the pre-trained multi-dimensional preference prediction model to obtain the corresponding multi-dimensional preference prediction result, the multi-dimensional preference prediction model is further trained: S101, using an image generation model to generate images from a prompt word database and construct sample data of prompt word-image data pairs; S102, manually annotating the prompt word-image data pair sample data using a preset multi-dimensional preference rule to form a multi-dimensional preference prediction training sample data set; S103, using the multi-dimensional preference prediction training sample data set to train the multi-dimensional preference prediction model, so as to establish a mapping relationship between the prompt word-image data pairs and the multi-dimensional preference prediction results.

5. The multi-dimensional preference prediction method for image generation according to claim 4, characterized in that: Before step S101 , the original prompt word database is also cleaned to remove prohibited and repeated prompt words, so as to obtain the prompt word database in step S101 .

6. The multi-dimensional preference prediction method for image generation according to claim 5, characterized in that: After the original prompt word database is cleaned to remove prohibited and repeated prompt words, the method further includes cleaning and filtering out prompt words in the database that contain the same topic style: first, the Sentence-BERT model is used to obtain the vector representation of each prompt word, and the cosine similarity between each vector representation is calculated; then, a directed graph is constructed based on the cosine similarity between the vector representations of the prompt words, and the vertices of the graph represent prompt words, each prompt word is connected to a specified number of k edges that are most similar to it, and a score is calculated for each vertex according to the similarity of the edges connected to it, and vertices are iteratively selected according to the score until the required number of prompt words are obtained, as the prompt word database in step S101 is finally obtained.

7. The multi-dimensional preference prediction method for image generation according to claim 1, characterized in that: The multi-dimensional preference prediction results include preference prediction results in four dimensions: culture, emotion, aesthetics, and image-text consistency.

8. A multi-dimensional preference prediction system for image generation, comprising a microprocessor and a memory connected to each other, characterized in that: The microprocessor is programmed or configured to execute the multi-dimensional preference prediction method for image generation as described in any one of claims 1 to 7.

9. A computer-readable storage medium having a computer program / instruction stored therein, characterized in that: The computer program / instructions are programmed or configured to execute the multi-dimensional preference prediction method for image generation described in any one of claims 1 to 7 through a processor.

10. A computer program product comprising a computer program / instructions, characterized in that The computer program / instructions are programmed or configured to execute the multi-dimensional preference prediction method for image generation described in any one of claims 1 to 7 through a processor.

Citation Information

Cited By

  • Multi-dimensional fine-grained reward method and device for image and video generation

    CN119851174A

  • Power equipment fault monitoring method and device based on image voiceprint

    CN121306192A