Model evaluation method and device, electronic equipment, storage medium and program product

Through automated color information extraction and comparison methods, the color generation capability of the Wensheng graph model is evaluated, which solves the time-consuming and labor-intensive problem of manual evaluation in the existing technology and realizes efficient and accurate color generation capability evaluation.

CN120708235APending Publication Date: 2025-09-26CHINA TELECOM CORP LTD TECHNOLOGY INNOVATION CENTER +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510805511.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-16
Publication Date
2025-09-26

AI Technical Summary

Technical Problem

Existing text-to-image models tend to ignore color attribute information when generating images, resulting in deviations between the generated images and the text descriptions, and the evaluation of color generation capabilities requires manual effort and time.

Method used

By extracting the first color information and its associated target object from the text content and extracting the second color information from the output image, the similarity between the two is calculated to evaluate the color generation ability of the text-based image model and reduce manual intervention.

Benefits of technology

It realizes automated and rapid evaluation of color generation capability, improves evaluation efficiency, reduces labor costs, and enhances evaluation accuracy and consistency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120708235A_ABST
    Figure CN120708235A_ABST
Patent Text Reader

Abstract

The invention provides a model evaluation method and device, electronic equipment, a storage medium and a program product, and relates to the technical field of artificial intelligence. The method comprises the steps of obtaining text content; taking the text content as input of a text graph model to obtain an output image of the text graph model; extracting first color information and a target object associated with the first color information from the text content; extracting second color information of the target object in the output image; and determining an evaluation result of the text graph model in the color dimension based on the first color information and the second color information. According to the embodiment, the first color information and the target object corresponding to the first color information are extracted from the text content, the second color information of the target object is detected from the output image of the text graph model, then the two pieces of color information are compared and analyzed, the evaluation result of the text graph model is determined according to the consistency degree, the labor cost is reduced, and the evaluation efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of artificial intelligence technology, and in particular to a model evaluation method, device, electronic device, storage medium, and program product. Background Art

[0002] Text-generated images are a key technology within the AIGC (Artificial Intelligence Generated Content) framework. Leveraging a large multimodal model, they automatically generate corresponding image content based on input text descriptions. This technology can be used in a variety of fields, including art creation, education, game development, virtual reality, and smart homes.

[0003] The text-based graph model primarily focuses on its text comprehension capabilities, specifically whether the generated image is consistent with the text description. For complex text, current text-based graph models often ignore attribute information and focus solely on the main body, resulting in a discrepancy between the generated image and the text description. For example, ignoring the color attribute information in the text description can result in the generated image having the correct main body, but incorrect color information corresponding to the main body.

[0004] In related technologies, the evaluation of the color generation ability of the cultural image model requires manual evaluation, which is time-consuming and labor-intensive.

[0005] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute prior art known to ordinary technicians in the field. Summary of the Invention

[0006] The present disclosure provides a model evaluation method, device, electronic device, storage medium and program product, which at least to some extent overcome the problem that the color ability of related technologies requires manual evaluation, which is time-consuming and labor-intensive.

[0007] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by practice of the present disclosure.

[0008] According to one aspect of the present disclosure, a model evaluation method is provided, comprising:

[0009] Get text content;

[0010] The text content is used as the input of the text-generated graph model to obtain the output image of the text-generated graph model;

[0011] extracting first color information and a target object associated with the first color information from the text content;

[0012] extracting second color information of the target object in the output image;

[0013] An evaluation result of the Vincent graph model in a color dimension is determined based on the first color information and the second color information.

[0014] In some possible embodiments, extracting the second color information of the target object in the output image includes:

[0015] Extract the bounding box of the target object from the output image;

[0016] The target image is obtained by cropping the output image based on the bounding box of the target object;

[0017] The color value of each pixel in the target image is detected to obtain second color information.

[0018] In some possible embodiments, extracting a bounding box of the target object from the output image includes:

[0019] The output image and the target object are used as inputs of the target detector to obtain multiple candidate bounding boxes output by the target detector and the detection confidence of each candidate bounding box, wherein the target object is used to indicate the detection category of the target detector;

[0020] The candidate bounding box corresponding to the detection confidence that meets the set conditions is used as the bounding box of the target object.

[0021] In some possible embodiments, the second color information includes a second color word;

[0022] Detecting the color value of each pixel in the target image to obtain the second color information includes:

[0023] Extract the color value of each pixel in the target image;

[0024] Cluster the color values ​​of each pixel to obtain the color value of the target image;

[0025] Calculate the distance between the color value of the target image and each standard color value in the standard color library;

[0026] The standard color word corresponding to the standard color value with the smallest distance is used as the second color word.

[0027] In some possible embodiments, extracting the first color information and the target object associated with the first color information from the text content includes:

[0028] The text content is used as the input of the language model to obtain multiple words and the dependency relationships between the words output by the language model;

[0029] Based on matching each word in the color word library, determining the first color word in the text content;

[0030] A noun having a dependency relationship with the first color word is used as a target object associated with the first color information.

[0031] In some possible embodiments, the following further comprises:

[0032] If no noun having a dependency relationship with the first color word is found in the multiple words, the position distance between each noun in the multiple words and the first color word is calculated;

[0033] The nouns whose position distance is less than the distance threshold are regarded as target objects associated with the first color information.

[0034] In some possible embodiments, the first color information includes a first color word, and the second color information includes a second color word; and determining an evaluation result of the Vincent graph model in a color dimension based on the first color information and the second color information includes:

[0035] Calculate the similarity between the first color word and the second color word;

[0036] If the similarity is greater than the set similarity threshold, it is determined that the evaluation result of the cultural graph model in the color dimension meets the set requirements.

[0037] According to another aspect of the present disclosure, a model evaluation device is provided, comprising:

[0038] A text content acquisition module is used to acquire text content;

[0039] An output image output module is used to take the text content as the input of the text-graph model and obtain the output image of the text-graph model;

[0040] A first color information determination module, configured to extract first color information and a target object associated with the first color information from text content;

[0041] A second color information determination module, configured to extract second color information of the target object in the output image;

[0042] An evaluation result determination module is used to determine an evaluation result of the Wensheng graph model in a color dimension based on the first color information and the second color information.

[0043] According to another aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute any one of the above-mentioned model evaluation methods by executing the executable instructions.

[0044] According to another aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, any one of the above-mentioned model evaluation methods is implemented.

[0045] According to another aspect of the present disclosure, a computer program product is provided, including: a computer program or instructions, which implements any one of the above-mentioned model evaluation methods when the computer program or instructions are executed by a processor.

[0046] The model evaluation method provided in the embodiments of the present disclosure first obtains text content, then uses the text content as input to a text graph model to obtain an output image of the text graph model; then, extracts first color information and a target object associated with the first color information from the text content; again extracts second color information of the target object in the output image; and finally, determines an evaluation result of the text graph model in the color dimension based on the first color information and the second color information. In this embodiment, the first color information and its corresponding target object are extracted from the text content, the text graph model generates an output image based on the text content, detects the second color information of the target object from the output image, and then compares and analyzes the two color information. The evaluation result of the text graph model is determined based on the degree of consistency, thereby reducing labor costs and improving evaluation efficiency.

[0047] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] The accompanying drawings are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification, are used to explain the principles of the present disclosure. Obviously, the drawings described below are only some embodiments of the present disclosure, and those skilled in the art can derive other drawings based on these drawings without inventive effort.

[0049] Figure 1 A schematic diagram of an exemplary application system architecture for applying the model evaluation method in an embodiment of the present disclosure is shown;

[0050] Figure 2 A flow chart of a model evaluation method according to an embodiment of the present disclosure is shown;

[0051] Figure 3 A flow chart of another model evaluation method according to an embodiment of the present disclosure is shown;

[0052] Figure 4 A flowchart of a second color information extraction method according to an embodiment of the present disclosure is shown;

[0053] Figure 5A block diagram showing a color attribute evaluation process in an embodiment of the present disclosure;

[0054] Figure 6 A schematic diagram of a model evaluation device according to an embodiment of the present disclosure is shown;

[0055] Figure 7 A structural block diagram of an electronic device in an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0056] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete and will fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0057] In addition, the accompanying drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. Identical reference numerals in the figures denote identical or similar parts, and thus repetitive descriptions thereof will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities that do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0058] For ease of understanding, before introducing the embodiments of the present disclosure, several terms involved in the embodiments of the present disclosure are first explained as follows:

[0059] AIGC: This refers to technologies based on artificial intelligence (AI) techniques such as generative adversarial networks (GANs) and large pre-trained models. By learning from and identifying existing data, AIGC uses appropriate generalization capabilities to generate relevant content. The core concept of AIGC technology is to use AI algorithms to generate content with a certain level of creativity and quality.

[0060] Text-to-Image: A key technology within the AIGC framework, text-to-image is used to automatically generate and display corresponding image content based on input text descriptions. This technology combines advances in natural language processing, computer vision, and generative models to achieve automatic conversion of text into images.

[0061] Prompt following: refers to the text comprehension ability of the text-to-image model, that is, whether the generated image is consistent with the text description and whether the generated image is reasonable and complete according to the requirements of the text description.

[0062] The specific implementation of the embodiment of the present disclosure is described in detail below with reference to the accompanying drawings.

[0063] Figure 1 FIG. 1 shows an exemplary application system architecture diagram to which the model evaluation method in the embodiment of the present disclosure can be applied. Figure 1 As shown, the system architecture may include a terminal device 101 , a network 102 and a server 103 .

[0064] The network 102 is a medium for providing a communication link between the terminal device 101 and the server 103 , and can be a wired network or a wireless network.

[0065] Optionally, the above-mentioned wireless network or wired network uses standard communication technologies and / or protocols. The network is typically the Internet, but can also be any network, including but not limited to a local area network (LAN), a metropolitan area network (MAN), a wide area network (WAN), a mobile, wired or wireless network, a private network or any combination of a virtual private network). In some embodiments, technologies and / or formats including Hypertext Markup Language (HTML), Extensible Markup Language (XML), etc. are used to represent data exchanged over the network. In addition, conventional encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), Internet Protocol Security (IPSec) can be used to encrypt all or some links. In other embodiments, customized and / or dedicated data communication technologies can also be used to replace or supplement the above-mentioned data communication technologies.

[0066] The terminal device 101 can be various electronic devices, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, smart speakers, smart watches, wearable devices, augmented reality devices, virtual reality devices, etc.

[0067] Optionally, the client of the application installed in different terminal devices 101 is the same, or the client of the same type of application based on different operating systems. Based on the different terminal platforms, the specific form of the client of the application can also be different, for example, the application client can be a mobile phone client, a PC client, etc.

[0068] The server 103 may be a server that provides various services, such as a background management server that provides support for the devices operated by the user using the terminal device 101. The background management server may analyze and process the received request and other data, and feed back the processing results to the terminal device.

[0069] Optionally, the server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.

[0070] Those skilled in the art will know that Figure 1 The number of terminal devices, networks, and servers in the embodiment is merely illustrative, and any number of terminal devices, networks, and servers may be provided based on actual needs. This embodiment of the present disclosure does not limit this.

[0071] Under the above system architecture, an embodiment of the present disclosure provides a model evaluation method, which can be executed by any electronic device with computing and processing capabilities.

[0072] In some embodiments, the model evaluation method provided in the embodiments of the present disclosure can be executed by the terminal device of the above-mentioned system architecture; in other embodiments, the model evaluation method provided in the embodiments of the present disclosure can be executed by the server in the above-mentioned system architecture; in other embodiments, the model evaluation method provided in the embodiments of the present disclosure can be implemented by the terminal device and the server in the above-mentioned system architecture through interaction.

[0073] Figure 2 A flow chart of a model evaluation method according to an embodiment of the present disclosure is shown as follows: Figure 2 As shown, the model evaluation method provided in the embodiment of the present disclosure includes the following steps: S202-S210.

[0074] S202: Obtain text content.

[0075] Text content refers to information, data, or materials presented in textual form, such as a paragraph, an article, or a group of words. In this embodiment, text content can be understood as the textual description input into the text-based graph model, serving as a prompt for the model to generate an image. It can also be referred to as a text description or text prompt. Text content can include a specific scene description, for example, "A golden wheat field sways in the wind at sunset, with a red brick cottage in the distance."

[0076] Acquiring text content includes: acquiring a text description input by a user through an input device. Alternatively, extracting paragraphs or sentences that can be used in a text map from electronic documents such as novels, scripts, articles, and poems. Alternatively, using OCR (Optical Character Recognition) technology to recognize text content in images such as paper materials, handwritten manuscripts, old photos, and book covers. This embodiment only illustrates the method for acquiring text content, and is not intended to be limiting.

[0077] S204: Using the text content as input of the text-generated graph model to obtain an output image of the text-generated graph model.

[0078] The text-based graph model is an artificial intelligence model whose core function is to generate corresponding image content based on input text descriptions through algorithmic and model training. The text-based graph model belongs to the field of multimodal artificial intelligence, achieving the conversion from linguistic text to visual images. The output image can be understood as the visual image generated by the text-based graph model after processing the input text content. It can include but is not limited to photographs, illustrations, artwork, and other visual content.

[0079] Using text as input to the text-based graph model can be understood as using the text as the initial data and basis for the model's image generation. Obtaining the output image from the text-based graph model can be understood as representing the image generated after the input is processed by the model.

[0080] In one possible implementation, a text-based graph model typically employs core architectures such as the Transformer architecture, a diffusion model, or a variational autoencoder (VAE). A text-based graph model consists of two main components: a text encoder and an image decoder. The text encoder converts the input text into a semantic vector, capturing key information such as semantics, sentiment, objects, and scenes. The image decoder generates corresponding image pixel data based on the semantic vector.

[0081] In one possible implementation, a large amount of text-image pair data is collected and used to train the model. The model parameters are continuously adjusted through a backpropagation algorithm, enabling the model to learn the mapping relationship between text semantics and image features. During the training process, a multi-stage training strategy can be adopted, starting with pre-training to learn general text-image mapping capabilities, followed by fine-tuning for specific domains or tasks to improve the model's performance in specific scenarios.

[0082] The user needs to clearly express the text content for generating an image, obtain the input text content from the user, perform word segmentation, semantic parsing and other processing on the input text content, extract the keywords and semantic information in the text content, and convert it into a text semantic vector that the model can understand. Call the trained text-to-image model through methods such as API (Application Programming Interface), locally deployed software, or an online platform. Input the processed text semantic vector into the text-to-image model. The text-to-image model generates the corresponding image feature representation according to the learned knowledge and algorithms, and gradually converts it into image pixel data to obtain the output image of the text-to-image model.

[0083] S206. Extract the first color information and the target object associated with the first color information from the text content.

[0084] Among them, color information refers to words representing colors, such as red, blue, golden yellow, dark gray, etc. The first color information can be understood as the words representing colors that appear in the text content obtained in step S202.

[0085] The target object refers to the specific things, objects or people described in the text content. The target object associated with the first color information can be understood as having an association relationship between the target object and the first color information. For example: The first color information modifies or describes the target object. For example, in "a red apple", "apple" is the target object, "red" is the first color information, and "red" modifies "apple".

[0086] In a possible implementation, starting from the beginning position of the text content, read each word in sequence to identify the color words in the text content. When encountering a word that meets the color definition, record the color word as the first color information. After finding the first color information, analyze the grammatical structure of its context to determine the target object that matches the first color information. If there is a noun before the color word, the target object may be the previous noun; for example, in "The apple is red", the target object associated with "red" is the previous noun "apple". If a noun follows the color word, the target object is the following noun. For example, in "Red apples are delicious", the target object associated with "red" is the following noun "apples".

[0087] Use syntactic analysis in natural language processing to judge the modification relationship between color words and nouns.

[0088] The "de" structure often indicates modification. For example, in "the blue sky", "blue" modifies "sky". Then, "blue" is the first color information, and "sky" is the target object associated with the first color information.

[0089] When the text content includes a plurality of first color information, the plurality of first color information and the target objects corresponding to the respective first color information are extracted respectively.

[0090] S208: Extract second color information of the target object in the output image.

[0091] The second color information may be understood as the color information presented by the target object in the output image.

[0092] Extracting the color information of the target object in the output image includes: identifying the target object from the output image, analyzing the color information contained in the target object, and selecting the color information with the highest proportion as the second color information. When the text content includes multiple target objects, the second color information of each target object in the output image is extracted separately.

[0093] In one possible embodiment, a target object included in the text content is determined in the output image, color information within the target object area is extracted, the proportion or frequency of occurrence of each color information is counted, and the color information with the highest proportion or the highest frequency of occurrence is selected as the second color information.

[0094] S210: Determine an evaluation result of the Vincent graph model in a color dimension based on the first color information and the second color information.

[0095] The color dimension can be understood as the color generation ability of the Wensheng graph model, that is, when evaluating the Wensheng graph model, the focus is on color performance rather than composition, style or other aspects, including color accuracy and semantic matching. The evaluation results can be understood as a score or evaluation of the Wensheng graph model's performance in the color dimension, which is used to measure whether it accurately restores the visual description in the text content. The evaluation results are presented in the form of scores, grades or descriptive evaluations. Exemplary evaluation results of the Wensheng graph model in the color dimension include: the color words of the output image are consistent with the color words in the text description and the color words of the output image are inconsistent with the color words in the text description.

[0096] When the first and second color information are represented as color values, the distance between the first and second color values ​​in color space is calculated. If this distance exceeds a set distance, it indicates that the color words in the output image are inconsistent with the color words in the text description, and the Wensheng graph model has some deficiencies in color generation capabilities. If this distance is less than the set distance, it indicates that the color words in the output image are consistent with the color words in the text description, and the Wensheng graph model performs well in color generation capabilities.

[0097] In some possible embodiments, a correspondence between scores and distances is preset. After calculating the distance between the first color value and the second color value in the color space, a query is performed in the above correspondence to determine the corresponding score. The higher the score, the better the Vincent graph model performs in terms of color generation capability, and the lower the score, the worse the Vincent graph model performs in terms of color generation capability.

[0098] When the first color information and the second color information are expressed as color words, natural language technology is used to analyze the semantic similarity between the first color word and the second color word. If the semantic similarity exceeds a set similarity, it indicates that the color word of the output image is inconsistent with the color word in the text description, and the Wensheng graph model performs well in color generation capability. If the semantic similarity is less than the set similarity, it indicates that the color word of the output image is consistent with the color word in the text description, and the Wensheng graph model has certain deficiencies in color generation capability.

[0099] In some possible embodiments, a correspondence between the score and the semantic similarity is preset, the semantic similarity between the first color value and the second color value is calculated, and a query is performed in the above correspondence to determine the score corresponding to the semantic similarity. The higher the score, the better the Vincent graph model performs in terms of color generation ability, and the lower the score, the worse the Vincent graph model performs in terms of color generation ability.

[0100] In this embodiment, first color information and its corresponding target object are extracted from the text content. The text-based graph model generates an output image based on the text content, and second color information of the target object is detected from the output image. The two color information are then compared and analyzed, and the evaluation result of the text-based graph model is determined based on the degree of consistency, thereby reducing labor costs and improving evaluation efficiency.

[0101] Based on the above embodiment, this embodiment optimizes the model evaluation method, such as Figure 3 As shown, the optimized model evaluation method mainly includes steps S302-S324.

[0102] S302: Obtain text content.

[0103] S304: Using the text content as input of the text-generated graph model to obtain an output image of the text-generated graph model.

[0104] S302-S302 provided in this embodiment are the same as the execution process of S202-S204 in the above embodiment. For details, please refer to the description in the above embodiment and no specific limitations are given in this embodiment.

[0105] S306: Using the text content as input to the language model, obtaining multiple words output by the language model and the dependency relationships between the words.

[0106] Words can be understood as basic language units with independent meanings that are obtained after word segmentation in text content, such as red, apple, and sky. Dependency relationships can be understood as the grammatical dependence between two words. For example, in the sentence "red apple," "red" modifies "apple," "apple" is the central word, and "red" is dependent on "apple."

[0107] A language model is an artificial intelligence model that can perform word segmentation, part-of-speech tagging, and dependency grammar analysis.

[0108] In one possible implementation, the text content is preprocessed. The text content T is basically cleaned and a preprocessing function Preprocess(·) is defined, which includes removing irrelevant symbols and standardizing punctuation to obtain a normalized text T′, as shown in formula (1).

[0109] T′=Preprocess(T) (1)

[0110] Where T′ represents the normalized text and T represents the text content.

[0111] The normalized text T′ is input into the language model to perform word segmentation, part-of-speech tagging and dependency syntactic analysis to obtain the word sequence and its syntactic relationship set S = {(w i ,p i ,d i )}, where i represents the number, w i For words, p i For part of speech, d i Dependency label.

[0112] S308: Determine the first color word in the text content based on matching each word in the color word library.

[0113] A color lexicon can be thought of as a pre-organized vocabulary containing various color names, such as red, blue, green, golden yellow, dark gray, and silver. The color lexicon is used to determine whether a term is a color word. The first color word is the color word in the text that matches the color lexicon.

[0114] Use the matcher to match each word in the predefined color word library, which is represented by C = {c1, c2, c3, ..., c m}. c represents a color word, and the subscript represents the number of the color word in the color word library.

[0115] The matching conditions are defined as: At the same time c j ∈T′, that is, word c j It can be found in the color vocabulary or in the normalized text T′.

[0116] After matching each word in the color word library, we get the set of all color words that appear in the text content. And record the position of the reference set I in the text = {i1,i2,i3,...,i k}.

[0117] S310: Taking a noun having a dependency relationship with the first color word as a target object associated with the first color information.

[0118] A noun that has a dependency relationship with the first color word means that the noun is grammatically modified or limited by the first color word. For example, in "blue hat", "blue" modifies "hat".

[0119] The target object refers to a specific thing modified or described by the color word. In this embodiment, the target object refers to the noun that has a dependency relationship with the first color word.

[0120] For each first color word c j ∈C′, in the word sequence and its syntactic relation set S=

[0121] {(w i ,p i ,d i )} to find the nouns with which there is a dependency relationship. If there is (c j ,w k )∈d i , and p k If it is a noun, then the color word c j Modifying object nouns w k , that is, the noun w k Is the color word c j The target object of the association.

[0122] In this embodiment, by analyzing word dependencies through a language model, color words can be directly associated with target objects at the grammatical level. Through syntactic structure constraints, semantic ambiguity is reduced, the matching accuracy of color information and target objects is improved, and the accuracy of model evaluation is thereby improved.

[0123] S312: If no noun having a dependency relationship with the first color word is found in the multiple words, calculate the position distance between each noun in the multiple words and the first color word.

[0124] Position distance refers to the relative position difference between words in the text content, which is calculated based on the order index of the words in the sentence. For example, the first word is at position 1 and the second word is at position 2.

[0125] If the language model fails to identify the dependency relationship between the first color word and any nouns, for example, in the text "Red apples are sweet," the syntactic analysis may fail to identify the modifying relationship between "red" and "apple," resulting in a missing dependency relationship. Dependency syntactic analysis is used to obtain a list of nouns associated with the first color word. If the list is empty, position distance calculation is triggered.

[0126] The words obtained from the word segmentation in the text content are numbered according to the order in which they appear in the text content. Each word corresponds to a unique position index. For example, in the sentence "The blue sky is very clear", the position index of "blue" is 1, the position index of "of" is 2, the position index of "sky" is 3, the position index of "very" is 4, and the position index of "clear" is 5. Get the position index of each noun in the text content.

[0127] In step S308, the position of each first color word in the text is recorded, and the reference set I={i1,i2,i3,...,i k}.

[0128] Calculate the absolute distance between the position index of the first color word and the position index of each noun, that is, the number of words between the two in the text, as the position distance between the noun and the first color word.

[0129] S314: Take the nouns whose location distance is less than the distance threshold as target objects associated with the first color information.

[0130] The distance threshold can be understood as a pre-set position distance critical value, which is used to determine the closeness of the association between the noun and the first color word. For example, if the threshold is set to 2, it means that nouns with a distance less than 2 have an association relationship. Optionally, the threshold is 2 or 3.

[0131] If the position distance between the noun and the first color word is less than the distance threshold, the noun is used as the target object associated with the first color information.

[0132] If there is no direct dependency, but the first color word c j With the noun w k The positions appearing in the text content are adjacent, that is, the distance is defined as Dist(c j ,w k )≤d max , then determine the first color word c j and the noun w k There is a correlation between them. Dist(c j ,w k ) represents the first color word c j and the noun w k The distance between the positions, d max is the distance threshold.

[0133] The identified first color word and the object noun it modifies form the pairing result of "first color word and target object", and finally output the first color word and target object pair set P = {(c j ,w k )}, as shown in formula (2).

[0134] P={(c j ,w k )|(c j ,w k )∈R} (2) This is done to facilitate subsequent object detection and pixel color detection.

[0135] In this embodiment, when dependency analysis fails, the target object corresponding to the color word is determined based on the position distance, ensuring that the association between color information and the target object has high coverage and practicality. This is especially suitable for scenarios where the text structure is changeable or grammatical analysis is difficult, further improving the accuracy of model evaluation.

[0136] S316: Extract the bounding box of the target object from the output image.

[0137] The target object can be understood as the specific thing of interest within the text, such as the "car" in "red car," or as a specific region within an image. A bounding box is a rectangular box that identifies the location of the target object in the output image. It is typically defined by the coordinates of its top-left and bottom-right corners and is used to select the target object's region.

[0138] Extracting the bounding box of the target object from the output image can be understood as locating the target object in the output image and generating its circumscribed rectangular box to define the spatial range of the target object.

[0139] In some possible embodiments, a pre-trained computer vision model is used to identify and generate bounding boxes in the output image based on the target objects in the text. For example, if the text mentions "red car," the computer vision model detects all objects of the "car" category in the output image and generates corresponding bounding boxes. If automatic detection fails, a manual annotation tool is used to manually select the bounding box of the target object.

[0140] In one possible embodiment, the bounding box is resized to closely fit the contour of the target object, or a more accurate mask is generated by an image segmentation model and then converted into a bounding box.

[0141] S318 : Crop the output image based on the bounding box of the target object to obtain a target image.

[0142] The target image refers to the local image cropped from the output image according to the bounding box, which only contains the target object and the area where it is located.

[0143] Obtaining the target image based on bounding box cropping can be understood as using the bounding box coordinates to cut out the local area where the target object is located from the original image to obtain a sub-image containing only the object.

[0144] In one possible implementation, a rectangular area is cut out from the output image according to the coordinates of the bounding box to generate the target image.

[0145] S320: Detect the color value of each pixel in the target image to obtain second color information.

[0146] A pixel is the smallest unit constituting a digital image, and each pixel contains color information. In this embodiment, the second color information is a determined standard color word.

[0147] Detecting the color values ​​of the pixels of the target image can be understood as analyzing the color value of each pixel in the target image and statistically analyzing the color distribution to obtain the main color information.

[0148] In one possible implementation, the target image is converted from RGB color space to HSV (hue, saturation, value) or Lab color space to facilitate color classification and comparison. The target image is then divided into a grid, and the color mean of each pixel within the grid is extracted. If the target image is small, the color distribution of all pixels is directly calculated. A clustering algorithm such as K-means is used to merge similar colors to determine the dominant color of the target image. A color mapping table is then created to convert the dominant color into a natural language description, i.e., a color word.

[0149] In this embodiment, the target object is extracted by a bounding box, so that color detection is only targeted at the target object described in the text, avoiding interference from background or other objects, improving the accuracy of the text-image model evaluation, and reducing misjudgments caused by background color.

[0150] S322: Calculate the similarity between the first color word and the second color word.

[0151] The first color word refers to a term extracted from the text content that describes the color of the target object and serves as a color benchmark specified by the text's semantics. The second color word refers to the color of the target object displayed in the output image and is the color result generated by the text-based graph model. Similarity measures the degree of semantic similarity between the first and second color words and is typically expressed as a value between 0 and 1. A higher similarity value indicates a greater similarity between the first and second color words.

[0152] The second color word d detected in the output image * The first color word c in the text content jCalculate semantic similarity. Use a model like Word2Vec to convert color words into semantic vectors and calculate cosine similarity. For example, the vector similarity between "red" and "deep red" is approximately 0.9, and the vector similarity between "red" and "blue" is approximately 0.1. Alternatively, calculate the path distance between words based on the color classification hierarchy; the shorter the path, the higher the similarity. For example, the path length between "deep red" and "red" is 1, and the path length between "deep red" and "purple" is 3. Therefore, the similarity between "deep red" and "red" is higher than that between "deep red" and "purple."

[0153] S324: If the similarity is greater than the set similarity threshold, it is determined that the evaluation result of the cultural image model in the color dimension meets the set requirement.

[0154] The similarity threshold is a pre-set similarity threshold used to determine whether the color output of the Wensheng graph model meets the requirements. The color dimension evaluation result is a judgment on the color performance of the image generated by the Wensheng graph model, such as whether the color meets the requirements or deviates. It can also be a specific score.

[0155] For the case where there is a slight color difference but the human eye perceives it similarly, set a reasonable similarity threshold δ. j -d cj |≤δ, the colors are considered to match.

[0156] Through the above pixel color detection method, the color attributes of the target object can be accurately identified and determined, providing a data basis for the evaluation results of the cultural image model in the color dimension.

[0157] Since color words can reflect the semantic attributes of colors, such as "warm tones" and "metallic colors", when calculating semantic similarity through word vector models, it can capture the implicit associations of colors, improve the accuracy of color analysis, and thus improve the accuracy of model evaluation.

[0158] Based on the above embodiment, this embodiment optimizes the process of “extracting the second color information of the target object in the output image”, such as Figure 4 As shown, the optimized second color information extraction process includes steps S402-414.

[0159] S402: Using the output image and the target object as input to a target detector, obtaining multiple candidate bounding boxes output by the target detector and a detection confidence of each candidate bounding box, wherein the target object is used to indicate a detection category of the target detector.

[0160] An object detector is a computer vision model used to identify objects of a specific category in an image and generate bounding boxes, such as the YOLO (You Only Look Once) algorithm and Faster R-CNN (Faster Region Convolutional Neural Network).

[0161] A candidate bounding box is a rectangular area that the object detector outputs as possibly containing the target object. Each bounding box corresponds to a detection result. Detection confidence is the object detector's estimate of the probability that the candidate bounding box contains the target object, ranging from 0 to 1, with higher values ​​indicating a higher probability of accuracy.

[0162] Taking the output image and the target object as the input of the target detector can be understood as inputting the output image and the object category of the target object (such as "car") into the target detector to trigger the detection process.

[0163] In one possible implementation, a pre-trained target detection model is selected and the weights of the corresponding categories are loaded. If the target object is a special category, the detector is trained with image data containing the special category so that it can recognize the specific object.

[0164] The output image is resized to the input requirements of the object detector, maintaining its proportions and padding its edges to avoid distortion. The target object's category label is converted into a category ID recognizable by the model. The detector's convolutional neural network extracts features from the input image, generates multiple candidate bounding boxes, and predicts the confidence level of each candidate bounding box as the target object.

[0165] For example, if there are multiple cars in the input image, the detector generates multiple candidate bounding boxes, each with a different confidence level for the "car" category.

[0166] In a possible embodiment, the output image I generated by the cultural graph model is input to the YOLO detector, and the detection target category is designated as the target object according to the target object corresponding to the first color word, and the detection category set O is set to {o1, o2, ..., o n}, where each o i Corresponding to the category of a target object, the YOLO model infers the output image I and outputs the candidate bounding box set B of the detected target object = {(b i ,c i ,s i )|i=1,2,…,n}, where b i Indicates the position of the i-th detection box; c i is the category corresponding to the candidate bounding box; s i is the detection confidence score.

[0167] S404: The candidate bounding box corresponding to the detection confidence that meets the set conditions is used as the bounding box of the target object.

[0168] The set conditions refer to predefined screening rules used to select a valid bounding box from the candidate results, including but not limited to: confidence threshold, bounding box size, etc.

[0169] For each target object, the candidate bounding box with the highest detection confidence corresponding to the target object is used as the bounding box of the target object.

[0170] Screening confidence s i The detection results that are higher than the confidence threshold τ are used to obtain the effective detection box set B′={(b i ,c i ,s i )∈B|s i ≥τ}, only keep the target object c i The corresponding bounding box of ∈O provides regional input for subsequent color detection.

[0171] In this embodiment, through the efficient detection of the target detector, the target area requiring color detection can be quickly and accurately locked, avoiding aimless searching within the entire image range, thereby improving detection efficiency and accuracy.

[0172] S406 : Crop the output image based on the bounding box of the target object to obtain a target image.

[0173] The target image I output by the target detector b Perform preprocessing, including cropping, noise reduction, and edge enhancement. Suppose the preprocessing operation function is Preprocess(·), as shown in formula (3),

[0174] I b ′=Preprocess(I b ) (3)

[0175] S408: Extract the color value of each pixel in the target image.

[0176] Color values ​​represent the numerical description of color, which is used to accurately represent the hue, saturation, and brightness of the color.

[0177] In a possible implementation, the pixel matrix of the target image is read, and each pixel point is traversed by row or column to obtain the color value of each pixel point.

[0178] S410 , clustering the color values ​​of each pixel to obtain the color value of the target image.

[0179] Clustering refers to the algorithmic process of grouping similar color values ​​into one category, with the goal of reducing the number of colors and extracting representative colors.

[0180] In one possible implementation, the K-Means clustering algorithm is used to cluster the color values ​​of each pixel in the target image, and the number of cluster centers is set to k. The clustering goal is to minimize the total distance from the pixel to its assigned center, as shown in formula (4).

[0181]

[0182] Where N is the number of pixels in the target image; p i is the color vector of the i-th pixel; C j is the jth cluster center, i.e. the main color.

[0183] Specifically, the K-Means clustering algorithm is used for clustering. The number of clusters K is specified. Similar color values ​​are clustered into one class. The center point of each class is calculated as the representative color. The cluster center with the highest proportion is taken as the main color, that is, the color value of the target image.

[0184] S412: Calculate the distance between the color value of the target image and each standard color value in the standard color library.

[0185] A standard color library is a predefined set of colors that contains standardized color values ​​and their corresponding semantic names, such as red and blue. A standard color value is the numerical representation of each color in the standard color library.

[0186] In a possible implementation, all color values ​​in the standard color library are traversed, and the distance between the color value of the target image and each standard color is calculated. The distance may be a Euclidean distance.

[0187] S414: Use the standard color word corresponding to the standard color value with the smallest distance as the second color word.

[0188] The standard color word refers to the natural language name corresponding to the color value in the standard color library. The second color word refers to the standard color name closest to the target image color obtained through clustering and distance calculation, and is used to represent the color of the target object in the image.

[0189] In one possible implementation, the color value C of the extracted target image j With the standard color library D={d1,d2,...,d m}, determine the standard color value with the smallest distance through the minimum Euclidean distance algorithm, and then determine the standard color word d corresponding to the standard color value with the smallest distance based on the correspondence between the standard color word and the standard color. * , as shown in formula (4).

[0190]

[0191] In this embodiment, if the distance between the color value of the target image and a certain standard color value is the smallest, the name of the standard color value is the second color word.

[0192] In this embodiment, a large number of color values ​​are compressed into a few representative color values ​​through color value clustering, thereby reducing the amount of data while filtering out noise interference, improving the accuracy of second color word extraction, and further improving the accuracy of model evaluation.

[0193] Based on the above embodiment, a block diagram of the color attribute evaluation process of the cultural image model is provided. Figure 5 As shown in the figure, it is mainly divided into two parts: the first is to extract color words and their corresponding target objects from the text content; the second is to use object detection and color value detection methods to detect the color attributes of the target object from the output image; then the two are compared and analyzed, and the final score is given according to the degree of consistency. The specific steps are as follows:

[0194] S502: Match the text content with the color word library to locate the first color word in the text content.

[0195] S504: Extract the target object modified by the color word from the text content, retain only the main information, and remove the remaining modified information.

[0196] S506: The text-image model generates a corresponding output image according to the text content, which serves as an evaluation object of the text-image model color attribute evaluation system.

[0197] S508: The output image and the target object modified by the acquired color word are input as input parameters to the YOLO algorithm for detection. The YOLO algorithm detects the target object in the output image, frames it, and returns a bounding box of the target object.

[0198] S510 , performing pre-processing operations such as noise reduction, edge detection, and cropping on the target object in the bounding box to obtain a target image.

[0199] S512: Perform color detection on pixels of the target image to obtain a second color word of the target object in the output image.

[0200] S514: Calculate semantic similarity between the second color word detected in the output image and the first color word in the text content.

[0201] S516: Determine whether the semantic similarity is greater than a similarity threshold. If so, execute S518; if not, execute S520.

[0202] S518: The color detected in the output image is consistent with the color in the text content.

[0203] S520: Output the color detected by the image and the color in the text content

[0204] The final color attribute evaluation score is given based on the degree of color consistency matching.

[0205] In a specific embodiment, taking the input text content "Generate a picture of an old man sitting on a red chair" as an example, the evaluation method mainly includes the following process:

[0206] First, text analysis: Using the spaCy algorithm for word segmentation and dependency syntax analysis, we match the color word "red" and identify the object it modifies as "chair."

[0207] Second, image generation: Call the text-to-image model to input the above text content and generate the corresponding output image.

[0208] Third, object detection: Use the YOLO detector to locate the target object "chair" in the output image and output its location bounding box;

[0209] Fourth, color detection: extract the main color of the detected "chair" area.

[0210] Fifth, consistency assessment: If the extracted main color is red, which matches the text content, the color attributes are considered consistent and the score is full. If there is a deviation, points will be deducted based on the size of the color difference.

[0211] Through the above model evaluation method, the ability of the cultural image model in understanding and generating color attributes can be evaluated automatically, efficiently and objectively, significantly reducing the cost of manual evaluation and providing a quantitative reference for model optimization.

[0212] It should be noted that the acquisition, storage, use, and processing of data in the technical solution disclosed herein are in compliance with the relevant provisions of relevant laws and regulations. The various types of data such as personal identity data, operation data, behavioral data, etc. related to individuals, customers, and groups obtained in the embodiments of the present disclosure have all been agreed to by the users.

[0213] Based on the same inventive concept, the present disclosure also provides a model evaluation device, such as the following embodiment. Since the principle of solving the problem in the device embodiment is similar to that in the above method embodiment, the implementation of the device embodiment can refer to the implementation of the above method embodiment, and the repeated parts will not be repeated.

[0214] Figure 6 A schematic diagram of a model evaluation device according to an embodiment of the present disclosure is shown. Figure 6As shown, the apparatus includes: a text content acquisition module 610 , an output image output module 620 , a first color information determination module 630 , a second color information determination module 640 and an evaluation result determination module 650 .

[0215] The text content acquisition module 610 is used to acquire text content; the output image output module 620 is used to use the text content as the input of the text graph model to obtain the output image of the text graph model; the first color information determination module 630 is used to extract the first color information and the target object associated with the first color information from the text content; the second color information determination module 640 is used to extract the second color information of the target object in the output image; the evaluation result determination module 650 is used to determine the evaluation result of the text graph model in the color dimension based on the first color information and the second color information.

[0216] In some possible embodiments, the second color information determination module 640 includes: a bounding box extraction unit, used to extract the bounding box of the target object from the output image; a target image determination unit, used to crop the output image based on the bounding box of the target object to obtain the target image; and a second color information detection unit, used to detect the color of each pixel in the target image to obtain second color information.

[0217] In some possible embodiments, the bounding box extraction unit is specifically configured to use the output image and the target object as inputs of a target detector to obtain multiple candidate bounding boxes output by the target detector and detection confidences of the respective candidate bounding boxes, wherein the target object is used to indicate a detection category of the target detector; and the candidate bounding box corresponding to the detection confidence that satisfies the set conditions is used as the bounding box of the target object.

[0218] In some possible embodiments, the second color information includes a second color word; a second color information detection unit is specifically used to extract the color value of each pixel in the target image; cluster the color values ​​of each pixel to obtain the color value of the target image; calculate the distance between the color value of the target image and each standard color value in the standard color library; and use the standard color word corresponding to the standard color value with the smallest distance as the second color word.

[0219] In some possible embodiments, the first color information determination module 630 is specifically used to use the text content as the input of the language model to obtain multiple words output by the language model and the dependency relationship between each word; based on matching each word in the color vocabulary, determine the first color word in the text content; and use the noun that has a dependency relationship with the first color word as the target object associated with the first color information.

[0220] In some possible embodiments, the first color information determination module 630 is further used to calculate the position distance between each noun in the multiple words and the first color word if no noun having a dependency relationship with the first color word is found in the multiple words; and to use the noun whose position distance is less than the distance threshold as the target object associated with the first color information.

[0221] In some possible embodiments, the first color information includes a first color word, and the second color information includes a second color word; the second color information determination module 640 is specifically used to calculate the similarity between the first color word and the second color word; when the similarity is greater than a set similarity threshold, it is determined that the evaluation result of the cultural graph model in the color dimension meets the set requirements.

[0222] It should be noted that the examples and application scenarios implemented by the modules in the above-mentioned apparatus embodiment are the same as those implemented by the corresponding steps in the method embodiment, but are not limited to the contents disclosed in the above-mentioned method embodiment. It should be noted that the above-mentioned modules, as part of the apparatus, can be executed in a computer system, such as a set of computer-executable instructions.

[0223] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or an implementation that combines hardware and software aspects, which may be collectively referred to herein as a "circuit," "module," or "system."

[0224] Based on the same inventive concept, an embodiment of the present disclosure further provides an electronic device, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute any one of the above-described model evaluation methods by executing the executable instructions. Because the principles for solving the problem in this electronic device embodiment are similar to those in the above-described method embodiment, the implementation of this electronic device embodiment can refer to the implementation of the above-described method embodiment, and repeated parts will not be repeated here.

[0225] Refer to the following Figure 7 700 according to this embodiment of the present disclosure will be described. Figure 7 The electronic device 700 shown is merely an example and should not limit the functions and scope of use of the embodiments of the present disclosure.

[0226] like Figure 7 As shown, electronic device 700 is implemented as a general-purpose computing device. Components of electronic device 700 may include, but are not limited to, the aforementioned at least one processing unit 710, the aforementioned at least one storage unit 720, and a bus 730 connecting various system components (including storage unit 720 and processing unit 710).

[0227] The storage unit stores program code, which can be executed by the processing unit 710, causing the processing unit 710 to perform the steps described in the "Exemplary Method" section above according to various exemplary embodiments of the present disclosure. For example, the processing unit 710 can perform the following steps of the aforementioned method embodiment: obtaining text content; using the text content as input to a text graph model to obtain an output image of the text graph model; extracting first color information and a target object associated with the first color information from the text content; extracting second color information of the target object in the output image; and determining an evaluation result of the text graph model in the color dimension based on the first color information and the second color information.

[0228] The storage unit 720 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 7201 and / or a cache 7202 , and may further include a read-only memory unit (ROM) 7203 .

[0229] The storage unit 720 may also include a program / utility 7204 having a set (at least one) of program modules 7205, such program modules 7205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0230] Bus 730 may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0231] The electronic device 700 can also communicate with one or more external devices 740 (e.g., a keyboard, a pointing device, a Bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 700, and / or any device that enables the electronic device 700 to communicate with one or more other computing devices (e.g., a router, a modem, etc.). Such communication can occur via an input / output (I / O) interface 750. Furthermore, the electronic device 700 can also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network such as the Internet) via a network adapter 760. As shown, the network adapter 760 communicates with other modules of the electronic device 700 via a bus 730. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the electronic device 700, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0232] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.

[0233] Based on the same inventive concept, embodiments of the present disclosure also provide a computer-readable storage medium having a computer program stored thereon. When executed by a processor, the computer program implements any of the aforementioned model evaluation methods. Because the principles underlying the problem solved by this computer-readable storage medium embodiment are similar to those of the aforementioned method embodiment, the implementation of this computer-readable storage medium embodiment can be referenced to the implementation of the aforementioned method embodiment, and any repetitions will not be repeated.

[0234] More specific examples of computer-readable storage media in the present disclosure may include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), optical fibers, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0235] In the present disclosure, a computer-readable storage medium may include a data signal propagated in baseband or as part of a carrier wave, which carries readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium that can transmit, propagate, or transfer a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0236] Alternatively, the program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination thereof.

[0237] In a specific implementation, the program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, and the like, as well as conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computing device, partially on the user's device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0238] Based on the same inventive concept, embodiments of the present disclosure further provide a computer program product, including a computer program or instructions, which, when executed by a processor, implements the model evaluation method of any one of the above-described method embodiments. Because the principles for solving the problems in this computer program product embodiment are similar to those in the above-described method embodiment, the implementation of this computer program product embodiment can refer to the implementation of the above-described method embodiment, and any repetitions will not be repeated.

[0239] It should be noted that although several modules or units of the device for action execution are mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be concretized in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be concretized.

[0240] Furthermore, although the steps of the method of the present disclosure are described in a particular order in the accompanying drawings, this does not require or imply that the steps must be performed in this particular order, or that all steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.

[0241] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.

[0242] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the appended claims.

Claims

1. A model evaluation method, characterized in that: include: Get text content; Using the text content as input of a text graph model to obtain an output image of the text graph model; extracting first color information and a target object associated with the first color information from the text content; extracting second color information of the target object in the output image; An evaluation result of the cultural graph model in a color dimension is determined based on the first color information and the second color information.

2. The model evaluation method according to claim 1, characterized in that Extracting the second color information of the target object in the output image includes: extracting a bounding box of the target object from the output image; cropping the output image based on a bounding box of the target object to obtain a target image; The color value of each pixel in the target image is detected to obtain second color information.

3. The model evaluation method according to claim 2, characterized in that Extracting the bounding box of the target object from the output image comprises: Using the output image and the target object as inputs of an object detector, obtaining a plurality of candidate bounding boxes output by the object detector and a detection confidence score of each of the candidate bounding boxes, wherein the target object is used to indicate a detection category of the object detector; The candidate bounding box corresponding to the detection confidence that meets the set conditions is used as the bounding box of the target object.

4. The model evaluation method according to claim 2, characterized in that The second color information includes a second color word; Detecting the color value of each pixel in the target image to obtain the second color information includes: Extracting the color value of each pixel in the target image; Clustering the color values ​​of each pixel to obtain the color value of the target image; Calculating the distance between the color value of the target image and each standard color value in the standard color library; The standard color word corresponding to the standard color value with the smallest distance is used as the second color word.

5. The model evaluation method according to claim 1, characterized in that: The extracting of the first color information and the target object associated with the first color information from the text content includes: Using the text content as input to a language model, obtaining a plurality of words output by the language model and dependency relationships between the words; Determining a first color word in the text content based on matching each of the words in a color word library; A noun having a dependency relationship with the first color word is used as a target object associated with the first color information.

6. The model evaluation method according to claim 5, characterized in that Also includes: If no noun having a dependency relationship with the first color word is found in the plurality of words, calculating the position distance between each noun in the plurality of words and the first color word; The nouns whose position distance is less than a distance threshold are taken as target objects associated with the first color information.

7. The model evaluation method according to claim 1, characterized in that The first color information includes a first color word, and the second color information includes a second color word; and determining an evaluation result of the culture graph model in a color dimension based on the first color information and the second color information includes: Calculating the similarity between the first color word and the second color word; If the similarity is greater than the set similarity threshold, it is determined that the evaluation result of the cultural graph model in the color dimension meets the set requirement.

8. A model evaluation device, characterized in that include: A text content acquisition module is used to acquire text content; An output image output module, configured to take the text content as input of a text graph model and obtain an output image of the text graph model; a first color information determining module, configured to extract first color information and a target object associated with the first color information from the text content; a second color information determining module, configured to extract second color information of the target object in the output image; An evaluation result determination module is used to determine an evaluation result of the cultural graph model in a color dimension based on the first color information and the second color information.

9. An electronic device, characterized in that: include: processor; as well as a memory for storing executable instructions of the processor; The processor is configured to perform the model evaluation method according to any one of claims 1 to 7 by executing the executable instructions.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the model evaluation method according to any one of claims 1 to 7 is implemented.

11. A computer program product comprising: A computer program or instruction, characterized in that when the computer program or instruction is executed by a processor, it implements the model evaluation method according to any one of claims 1 to 7.