Performance evaluation method and device of visual language model in positioning task

By constructing an evaluation data set and performing positioning tasks of attributes, relationships, and primary and secondary distinctions, a positioning heat map is generated to evaluate the combinatorial reasoning ability of the visual language model, which solves the problem of insufficient combinatorial reasoning ability of the pre-trained model in positioning tasks and significantly improves the performance of the model.

CN118736355AActive Publication Date: 2024-10-01INST OF AUTOMATION CHINESE ACAD OF SCI

Patent Information

Application Number
CN202410747440.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-11
Publication Date
2024-10-01
Estimated Expiration
2044-06-11

AI Technical Summary

Technical Problem

The pre-trained visual language model exhibits problems such as inaccurate attribute distinction, insufficient relationship understanding, and neglect of primary and secondary order in positioning tasks, resulting in poor combinatorial reasoning capabilities.

Method used

By constructing an evaluation data set, including an attribute evaluation sample set, a relationship evaluation sample set, and a primary and secondary evaluation sample set, a visual language model is used to perform positioning tasks based on attributes, relationships, and primary and secondary distinctions, generate positioning heat maps, and calculate performance evaluation scores. Then evaluate the combinatorial reasoning ability of the model.

Benefits of technology

It effectively verifies and improves the combined reasoning ability of the visual language model in distinguishing attributes, relationships, and priorities, solves the shortcomings of poor performance in these aspects of pre-trained models in the existing technology, and significantly improves the model's positioning task performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118736355A_ABST
    Figure CN118736355A_ABST
Patent Text Reader

Abstract

The invention provides a method and device for evaluating the performance of a visual language model in positioning tasks, and the method and device are characterized in that the positioning tasks comprise a positioning task based on attribute distinguishing, a positioning task based on relation distinguishing, and a positioning task based on primary and secondary distinguishing. The method comprises the steps that an evaluation data set used for performance evaluation of a visual language model is constructed, a positioning task is executed on an evaluation sample through the visual language model for the evaluation sample in the evaluation data set, a positioning heat map in the evaluation sample is obtained, and a performance evaluation score of the evaluation sample is determined according to the positioning heat map; and determining an average value of the performance evaluation scores as an average accuracy rate of the evaluation data set as a performance evaluation result of the visual language model. Through the method and the device, the combined reasoning capability of the visual language model in distinguishing attributes, distinguishing relationships and distinguishing primary and secondary dimensions can be verified, and the defect that the pre-trained visual language model in the prior art is poor in performance in the aspect of the combined reasoning capability is overcome.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer vision technology, and in particular to a method and device for evaluating the performance of a visual language model in a positioning task. Background Art

[0002] The purpose of visual language combination evaluation is to gain a deeper understanding of the capabilities of pre-trained visual language models in processing combinations of image and text information. However, in localization tasks, for some complex visual language combinations, pre-trained visual language models have the following problems when processing images and descriptive text: First, attribute discrimination, which inaccurately distinguishes target objects in the image. It is difficult to accurately count closely packed target objects or complex image scenes, or to identify and describe attributes such as color and shape of target objects in the image; second, relationship discrimination, which is unable to understand and process the relationships between target objects in the image, such as the relative position, orientation, and combination of the target object and other objects in the image; third, primary and secondary discrimination, which often ignores the importance of word order when processing descriptive text, and cannot distinguish the primary and secondary order of target objects in the image, resulting in a misunderstanding of the image content.

[0003] Therefore, from the performance of distinguishing attributes, relationships, and primary and secondary dimensions above, it can be seen that the pre-trained visual language model performs poorly in terms of combinatorial reasoning ability in positioning tasks. Summary of the Invention

[0004] The present invention provides a performance evaluation method and device for a visual language model in a positioning task, which can verify the combinatorial reasoning ability of the visual language model in distinguishing attributes, distinguishing relationships, and distinguishing primary and secondary dimensions, so as to address the defect of poor performance of pre-trained visual language models in the prior art in combinatorial reasoning ability.

[0005] The present invention provides a method for evaluating the performance of a visual language model in a localization task, wherein the localization task includes a localization task based on attribute differentiation, a localization task based on relationship differentiation, and a localization task based on primary and secondary differentiation, and the method comprises the following steps: Constructing an evaluation dataset for performance evaluation of the visual language model, the evaluation dataset including a plurality of evaluation samples, the evaluation samples including a target image and two description texts, the target image being marked with two target objects corresponding one-to-one to the description texts; For each evaluation sample in the evaluation data set, the localization task is performed on the evaluation sample using the visual language model to obtain a localization heat map of the target image in the evaluation sample, wherein the localization task is to determine the corresponding target object from the target image based on the description text under the conditions of distinguishing attributes, distinguishing relationships, and distinguishing primary and secondary; and a performance evaluation score of the evaluation sample is determined based on the localization heat map; An average value of the performance evaluation scores is determined as an average accuracy of the evaluation data set, and the average accuracy is used as a performance evaluation result of the visual language model.

[0006] In some embodiments, the evaluation data set includes an attribute evaluation sample set, a relationship evaluation sample set, and a primary and secondary evaluation sample set; the performance evaluation results of the visual language model include: attribute performance evaluation results, relationship evaluation results, and primary and secondary performance evaluation results; The attribute performance evaluation result is obtained after the visual language model performs the attribute differentiation-based positioning task using the attribute evaluation sample set; The relationship performance evaluation result is obtained after the visual language model performs the positioning task based on genus relationship distinction through the relationship evaluation sample set; The primary and secondary performance evaluation results are obtained after the visual language model performs the primary and secondary distinction-based positioning task through the primary and secondary evaluation sample sets.

[0007] In some embodiments, the two target objects in the evaluation samples of the attribute evaluation sample set are objects with two different attributes in the target image; the two target objects in the evaluation samples of the relationship evaluation sample set are objects with two different relationships in the target image, where the relationship is an association relationship between the target object and other objects, and the other objects are objects in the target image other than the two target objects; the two target objects in the evaluation samples of the primary and secondary evaluation sample set are two objects with a primary and secondary order in the target image.

[0008] In some embodiments, performing the positioning task on the evaluation sample using the visual language model to obtain a positioning heat map of the target image in the evaluation sample includes: Obtaining a target attention map, wherein the target attention map is any intermediate attention map obtained in the visual language model during the execution of the localization task; Determine the image-text matching scores of the target image and the description text respectively, and for each image-text matching score, determine the gradient of the target attention map relative to the image-text matching score; For each gradient, a localization heatmap of the target image in the evaluation sample is determined by combining the target attention map and the gradient.

[0009] In some embodiments, determining the performance evaluation score of the evaluation sample based on the positioning heat map includes: determining a mask map of the target image for the target object; Determining an average activation value of the evaluation sample based on the positioning heat map and the mask map; The performance evaluation score of the evaluation sample is determined based on the preset activation value condition satisfied by the average activation value.

[0010] In some embodiments, the visual language model is obtained by training by performing a proxy task, and the training process of the visual language model includes: Obtaining a training image sample and a text pair corresponding to the training image sample; For each training image sample, calling the visual language model to perform the proxy task to obtain a training heat map of the training image sample for the text pair, wherein the proxy task is to determine a training target object in the training image sample according to the text pair and construct a training heat map based on the training target object; A loss function of the visual language model is constructed based on the training heat map, and backpropagation is performed in the visual language model through the loss function to update parameters of the visual language model.

[0011] In some embodiments, obtaining the text pair corresponding to the training image sample includes: Determining a plurality of candidate description texts based on the training image samples; Performing dependency structure analysis on the candidate description text to obtain a tree structure of the candidate description text, wherein the tree structure includes nodes and directed arcs connecting the nodes, the nodes represent each word in the candidate description text, and the directed arcs represent the connection relationship between each word; A training target object in the training image sample is determined according to a root node in the tree structure, and a text pair corresponding to the training image sample is constructed according to the root node corresponding to the training target object.

[0012] In some embodiments, constructing the loss function of the visual language model based on the training heat map includes: determining an element-wise multiplication result of the training heat map, and determining an area of ​​the training heat map; A ratio of the element-wise multiplication result to the area is determined, and a loss function of the visual language model is constructed according to a mathematical expectation value of the ratio.

[0013] The present invention also provides a performance evaluation device for a visual language model in a positioning task, comprising the following modules: a construction module for constructing an evaluation data set for performance evaluation of the visual language model, the evaluation data set comprising a plurality of evaluation samples, the evaluation samples comprising a target image and two description texts, the target image being marked with two target objects corresponding one-to-one to the description texts; an execution module, configured to perform the positioning task on each evaluation sample in the evaluation data set using the visual language model to obtain a positioning heat map of the target image in the evaluation sample, wherein the positioning task is to determine the corresponding target object from the target image according to the description text under the conditions of distinguishing attributes, distinguishing relationships, and distinguishing primary and secondary; A determination module, configured to determine a performance evaluation score of the evaluation sample based on the positioning heat map; The determination module is configured to determine an average value of the performance evaluation scores as an average accuracy rate of the evaluation data set, and use the average accuracy rate as a performance evaluation result of the visual language model.

[0014] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the performance evaluation method of the visual language model in the positioning task as described above is implemented.

[0015] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the performance evaluation method of the visual language model in the positioning task as described in any of the above.

[0016] The present invention also provides a computer program product, comprising a computer program, which, when executed by a processor, implements any of the above-mentioned methods for evaluating the performance of a visual language model in a positioning task.

[0017] The present invention provides a method for evaluating the performance of a visual language model in a localization task. By setting a localization task based on attribute differentiation, a localization task based on relationship differentiation, and a localization task based on primary and secondary differentiation for the visual language model, the visual language model is called upon to perform the corresponding localization task under a constructed evaluation dataset. The performance evaluation score of the visual language model is ultimately determined based on the localization heat map obtained after performing the localization task. This verifies the visual language model's ability to perform combinatorial reasoning in the three dimensions of distinguishing attributes, distinguishing relationships, and distinguishing primary and secondary, thereby addressing the poor combinatorial reasoning performance of pre-trained visual language models in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced one by one below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0019] Figure 1 Schematic diagram of the performance evaluation method of the visual language model in the positioning task provided by the present invention; Figure 2 is a sample diagram of the evaluation data provided by the present invention; Figure 3 is a schematic diagram of a positioning heat map of a target object provided by the present invention; Figure 4 This is a diagram showing the principle of text dependency parsing provided by the present invention; Figure 5 Schematic diagram of the structure of the performance evaluation device of the visual language model in the positioning task provided by the present invention; Figure 6 It is a schematic diagram of the physical structure of an electronic device provided by the present invention. DETAILED DESCRIPTION

[0020] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0021] Figure 1 This is a flow chart of the performance evaluation method of the visual language model in the positioning task provided by the present invention. Figure 1 As shown, the method includes the following steps: Step 101: Construct an evaluation dataset for performance evaluation of a visual language model.

[0022] In an embodiment of the present invention, in order to further explore the ability of the visual language pre-training model in combinatorial reasoning, a positioning task for the visual language model is constructed as an evaluation task and a corresponding evaluation dataset is constructed, which is recorded as the ARPGrounding dataset. The ability of combinatorial reasoning is mainly reflected in the three dimensions of attributes, relationships, and primary and secondary of the target object. Correspondingly, the positioning task is also divided into a positioning task based on attribute distinction, a positioning task based on relationship distinction, and a positioning task based on primary and secondary distinction, which are used to respectively evaluate the visual language model's ability to distinguish object attributes, the ability to distinguish object relationships, and the ability to distinguish object primary and secondary.

[0023] The evaluation dataset includes multiple evaluation samples. Each evaluation sample includes a target image and two description texts. The target image is labeled with two target objects corresponding to the description texts. The labeling method uses bounding boxes. That is, the target objects are selected in the target image using bounding boxes.

[0024] In the embodiment of the present invention, the evaluation data set is divided into three categories, namely, attribute evaluation sample set, relationship evaluation sample set, and primary and secondary evaluation sample set. These sample sets are introduced one by one below.

[0025] In the attribute evaluation sample set, the two target objects of the evaluation sample are two objects with different attributes in the target image, and the corresponding positioning task is a positioning task based on attribute differentiation. In the image of the evaluation sample, the object attributes can be attributes such as color, state, size, etc. The two target objects have the same category and belong to the same category of objects. For details, see Figure 2 , Figure 2 This is a sample diagram of the evaluation data provided by the present invention, such as Figure 2 As shown in (a) and (b), the two description texts are "brown dog" and "white dog". The target objects in the images both belong to the dog category, but have different color attributes. The localization task of the visual language model is to distinguish between white and brown and identify and select the dog with the correct color in the image.

[0026] In terms of attributes, this embodiment of the present invention screened the Visual Genome (VG) dataset and selected two objects of appropriate size, non-overlapping, and belonging to the same category. To ensure that these attributes are distinguishable, this embodiment of the present invention also used WordNet to identify the differences in attributes between the objects and generate distinguishing descriptive text based on this information.

[0027] In the relationship evaluation sample set, the two target objects in the evaluation sample are two objects in the target image with different relationships but the same attributes. Here, the relationship is the relationship between the target object and other objects, and other objects are objects other than the two target objects in the target image. The corresponding positioning task is a positioning task based on relationship distinction. In the image of the evaluation sample, the relationship is the association relationship between the target object and other objects in the image. The association relationship can be the positional relationship, direction relationship, connection relationship, or combination relationship between the target object and other objects. Here, the two target objects in the image may have the same attributes and the same category. For example Figure 2 As shown in (c) and (d), the two description texts are "bear under car, bear in car". The two target objects in the image are both yellow bears with the same color attributes and the same bear category, but different relationships. That is, the relationship between the bear and other objects (car) in the image is different (different positional relationships, inside the car and under the car). The localization task of the visual language model is to distinguish the positional relationship between the two bears and the car (inside the car or under the car) and identify and select the bear in the correct position in the image.

[0028] In the relational dimension, in order to ensure that the visual language model can distinguish target objects based on the relationship between them according to the descriptive text, the embodiment of the present invention screens out qualified triple relationship pairs (for example: bear in car, bear under car, car) in the VG dataset, ensures that these relationships are semantically distinguishable, and excludes attribute information that may cause confusion.

[0029] In the primary and secondary evaluation sample set, the two target objects in the evaluation sample are two objects with a specific primary and secondary order in the target image. The corresponding positioning task is a positioning task based on the primary and secondary distinction. In the image of the evaluation sample, the primary and secondary are the main and the secondary, and the target objects can be two objects with different attributes and different relationships, with different emphasis in the image and description text. Figure 2 As shown in (e) and (f), the two descriptions are "bathroom sink under bathroom mirror, bathroom mirror above bathroom sink." The target objects in the image are the bathroom mirror and bathroom sink, but the first description focuses on the bathroom sink, with the bathroom sink being the primary focus and the bathroom mirror being secondary. The second description, on the other hand, focuses on the bathroom mirror, with the bathroom mirror being the primary focus and the bathroom sink being secondary. In other words, the two descriptions describe different target objects with different priorities. The visual language model's localization task aims to distinguish the priority of the bathroom mirror and bathroom sink, and identify and select the primary bathroom mirror or bathroom sink in the image based on the corresponding description.

[0030] In the dimension of importance, the present invention constructs a test set that reverses the relationship between the target object and the description text in the image to test the model's understanding of the order of importance. For example, for a description text that focuses on a bathroom mirror (i.e., the bathroom mirror is primary, and the bathroom sink is secondary), the bathroom sink is intentionally annotated with a bounding box in the target image. This allows the visual language model to recognize the bathroom sink and thus assess its ability to distinguish between importance and importance.

[0031] Thus, through step 101 above, in this embodiment of the present invention, an attribute sample set containing 6,632 evaluation samples, a relationship sample set containing 370 evaluation samples, and a primary and secondary sample set containing 4,423 evaluation samples were constructed. Each evaluation sample involves different examples of target objects in the image, and some target objects have ambiguous relationships. Compared with the other two dimensions, the number of evaluation samples in the relationship sample set is smaller because when an image involves two ambiguous target objects, they are more likely to have distinguishable attributes but are less likely to exhibit a distinguishable relationship with the other target object.

[0032] For example, given the descriptions "black car" and "white car," a model can typically select the correct target object based on one description, but not the other. This is because the visual language model is subject to interference from more prominent target objects in the target image ("black car" is more prominent in the target image) during reasoning ("black car" is more common in the training dataset). Therefore, in this embodiment of the present invention, the combinational reasoning performance of the visual language model is comprehensively evaluated by using the mutual interference of two compositionally ambiguous target objects.

[0033] Step 102: For each evaluation sample in the evaluation data set, perform a positioning task on the evaluation sample through the visual language model to obtain a positioning heat map of the target image in the evaluation sample.

[0034] After constructing the ARPGrounding dataset, the dataset was then fed into a visual language model for evaluation. By having the visual language model perform corresponding localization tasks (i.e., localization tasks based on attribute differentiation, localization tasks based on relationship differentiation, and localization tasks based on primary and secondary differentiation), the model was tested to identify and determine the corresponding target object from the target image based on the descriptive text, under the conditions of distinguishing attributes, distinguishing relationships, and distinguishing primary and secondary. The visual language model is pre-trained and can directly perform localization tasks on the dataset.

[0035] In the embodiment of the present invention, the recognition results of the visual language model are reflected in the form of a positioning heat map. Therefore, the visual language model performs a positioning task for the evaluation sample, that is, after determining the corresponding target object from the target image according to the description text, the positioning heat map of the target image in the evaluation sample can be obtained.

[0036] The following describes the process of using a visual language model to perform a localization task to identify the target object and obtain a localization heat map.

[0037] In the embodiment of the present invention, the Grad-GAM algorithm is used to calculate the positioning heatmap, and the visual language model can specifically be an image recognition network (such as a Transformer). The target image and description text in the evaluation sample are input into the visual language model. The Grad-GAM algorithm guides the visual language model to locate the target object described by the description text in the target image by utilizing the gradient flow from the description text to the intermediate layer of the visual language model Transformer.

[0038] First, the target attention map is obtained, where the target attention map is any intermediate attention map obtained in the visual language model during the positioning task. There are multiple Transformer intermediate layers in the visual language model. Each intermediate layer processes the target image to obtain the corresponding feature map (attention map). f ) to extract an intermediate attention map A Z As the target attention map, if the processing function of the Transformer intermediate layer f is recorded as f Z , then the attention map A Z It is expressed as the following formula: A Z =f Z (φ f (v,t))

[0039] In the above formula, v represents the target image in the input evaluation sample, and t is the description text.

[0040] Next, the image-text matching scores between the target image and the description text are determined, and for each image-text matching score, the gradient of the target attention map relative to the image-text matching score is determined. Because the visual language model needs to identify the target object in the image based on the description text, image-text matching is required during the recognition process. By extracting the semantic features of the description text and the image features of the target image, and then calculating the similarity between the semantic features and the image features, the image-text matching score is obtained. This matching score can be used to represent the image-text similarity or image-text matching score when the visual language model is trained using the image-text contrast loss, denoted as y.

[0041] Next, we calculate the gradient of the image-text matching score corresponding to the target attention map. The formula for calculating the gradient is as follows:

[0042] Finally, for each gradient, the target attention map and the gradient are used to determine the localization heatmap of the target image in the evaluation sample. Because there are two description texts, the image-text matching score can be used to determine the localization recognition result of the visual language model (i.e., the target object with the larger image-text matching score). From this, two gradients are obtained. The target attention map and the gradient are then used to calculate the localization heatmap of the target image in the evaluation sample, denoted as H. The calculation formula is as follows: H=ReLu(A z ☉G z )

[0043] In the above formula, ⊙ is element-wise multiplication, A Z is the target attention map, G Zis the gradient, and ReLu is the ReLu activation function commonly used in the fully connected layer of neural networks.

[0044] For examples, see Figure 3 As shown, Figure 3 is a schematic diagram of the positioning heat map of the target object provided by the present invention, such as Figure 3 As shown in (b), a black-and-white dog is marked with a yellow bounding box in the target image. Based on the description text "black-and-white dog", the visual language model recognizes the black-and-white dog in the target image and generates a Figure 3 The positioning heat map shown in (a) is shown in Figure 3 As shown in (d), the target image is marked with a yellow bounding box behind the flower pot. Based on the description text "pot behind dog", the visual language model recognizes the dog behind the flower pot in the target image and generates a Figure 3 The localization heat map shown in (c).

[0045] Step 103: Determine the performance evaluation score of the evaluation sample based on the positioning heat map.

[0046] After calculating the location heatmaps (respectively denoted as H0 and H1) of the two description texts corresponding to the target object in step 102, the performance evaluation score of the evaluation sample needs to be determined based on the location heatmaps. The specific process of determining the performance evaluation score is described below.

[0047] First, determine the target object's mask map for the target image. Use a binary mask to mask the pixel values ​​within the target object. Pixel values ​​within the target object's bounding box are set to 1, while pixel values ​​outside the target object's bounding box are set to 0. After masking all pixels in the target image, the corresponding mask map is obtained. Since there are two target objects in the target image, two mask maps are obtained, denoted as M0 and M1. Each pixel value in the localization heatmap is anywhere in the range of 0 to 1.

[0048] Next, based on the positioning heat map and the mask map, the average activation value of the evaluation sample is determined. That is, the average activation value of the current evaluation sample is calculated based on the positioning heat map H0, H1 and the mask map M0, M1, and is recorded as act(M i , H j ), the calculation formula is as follows:

[0049] In the above formula, ⊙ is the element-wise multiplication symbol. When i equals j, it means that the mask bounding box matches the description text, in which case the average activation value within the bounding box should be high. When i and j are not equal, it means that the mask bounding box does not match the description text, in which case the average activation value within the bounding box should be low.

[0050] Since the positioning heat map has two H0 and H1, and the mask map also has two M0 and M1, four average activation values ​​can be obtained through free composition, namely act(M0, H1), act(M1, H0), act(M0, H1), and act(M1, H1). The performance evaluation score of the evaluation sample is then determined based on the preset activation value conditions satisfied by the average activation values. Among them, the activation value conditions are act(M0, H1)>act(M1, H0) and act(M0, H1)<act(M1, H1). The performance evaluation score is recorded as f(H0, H1, M0, M1), and the calculation formula is as follows:

[0051] As can be seen from the above formula, the performance evaluation score is 0 or 1. The score of this evaluation method determines whether the target object of the description text has a higher average activation value than another target object in the image, and whether the same is true for the other target object and description text in the evaluation sample. In this way, it can be determined whether the visual language model has made different activation responses based on different description texts, that is, whether it understands the difference between different combinations of target objects.

[0052] Step 104: Determine the average value of the performance evaluation score as the average accuracy of the evaluation data set, and use the average accuracy as the performance evaluation result of the visual language model.

[0053] Through step 103, a performance evaluation score can be finally calculated for each evaluation sample in the ARPGrounding dataset, and finally the average value of the performance evaluation score is determined to be the average accuracy of the evaluation dataset, which can be recorded as acc, and the average accuracy acc is used as the performance evaluation result of the visual language model.

[0054] The average performance evaluation score acc of the entire ARPGrounding dataset is calculated as follows:

[0055] In the above formula, N is the total number of evaluation samples in the ARPGrounding dataset.

[0056] In some embodiments, the performance evaluation results (average accuracy) of the visual language model will also obtain performance evaluation results of the corresponding three dimensions based on the sample sets of the corresponding three dimensions. Therefore, in an embodiment of the present invention, the performance evaluation results of the visual language model include: attribute performance evaluation results, relationship evaluation results, and primary and secondary performance evaluation results; wherein, the attribute performance evaluation results are obtained after the visual language model performs the positioning task based on attribute distinction through the attribute evaluation sample set; the relationship performance evaluation results are obtained after the visual language model performs the positioning task based on genus distinction through the relationship evaluation sample set; the primary and secondary performance evaluation results are obtained after the visual language model performs the positioning task based on primary and secondary distinction through the primary and secondary evaluation sample set. In the subsequent process, the corresponding performance evaluation results can be selected for experimental verification or comparison with other models based on the focus of the visual language model's capabilities.

[0057] In order to verify the technical effect of the evaluation method, a verification experiment is also set up in the embodiment of the present invention. The experiment evaluates the performance of four most advanced pre-trained visual language models on the standard visual positioning dataset and the ARPGrounding dataset provided by the present invention (performance evaluation results, i.e., average accuracy), and uses the random performance effect of the SOTA algorithm on the corresponding dataset as a reference. The experimental results (i.e., attribute performance evaluation results, relationship evaluation results, primary and secondary performance evaluation results, and the average result of the three) show that the performance of the pre-trained visual language model on the standard visual positioning task is excellent, but the ARPGrounding dataset reveals their limitations. The performance of the pre-trained visual language model on the VG dataset, Flickr dataset, and ReferIt dataset can reach or exceed the random performance effect of the SOTA algorithm, but the performance on the ARPGrounding dataset is around the random performance effect. This shows that the ARPGrounding dataset can effectively verify the combinatorial reasoning ability of the visual language model, provide guidance for the training of the combinatorial reasoning ability of the visual language model, and solve the defect of poor performance of the pre-trained visual language model in the existing technology in terms of combinatorial reasoning ability.

[0058] In order to comply with the present invention Figure 1 In this embodiment of the present invention, a pre-trained visual language model is fine-tuned, following the performance evaluation method proposed in [1]. The fine-tuning process first generates a text pair for each target image, where each description in the text pair describes a different target object. A proxy task is then introduced to increase the diversity of the localization heatmaps of these two descriptions. This fine-tuning process plays a significant role in improving the visual language model's understanding of combinatorial semantics. The following details the text pair generation method and introduces the proxy task used in the visual language model training process.

[0059] First, training image samples and corresponding text pairs are obtained. In the embodiment of the present invention, multiple candidate description texts are generated based on the training image samples. This generation method can utilize an image-text generation model. The candidate description texts are then sampled and subjected to dependency structure parsing to obtain a tree structure (dependency tree) of the candidate description texts. The tree structure comprises nodes and directed arcs connecting the nodes. The nodes represent each word in the candidate description texts, and the directed arcs represent the connections between the words.

[0060] For examples, see Figure 4 , Figure 4 This is a diagram showing the principle of text dependency parsing provided by the present invention. Figure 4 As shown in the figure, dependency parsing is introduced during the sampling phase. Using the spacy library, the parsing method analyzes the grammatical structure of the candidate descriptions to identify related words and determine the connections between them. For training image samples, all candidate descriptions are parsed into a tree structure, with directed arcs representing the connections between each word in the candidate descriptions.

[0061] Next, the training target objects in the training image samples are determined based on the root nodes of the tree structure. Based on the root nodes corresponding to the training target objects, text pairs corresponding to the training image samples are constructed. Here, the root nodes of the dependency tree are used to construct text pairs for different target objects. These texts contain different target objects with various attributes, relationships, and priority orders, providing rich combinational semantics for subsequent training stages.

[0062] For example, Figure 4 As shown, for Figure 4 In (a), the corresponding candidate description text is "man wearing a red shirt", corresponding to Figure 4 In (b), the corresponding candidate description text is "tall green clock". The candidate description texts "man wearing a red shirt" and "tall green clock" are parsed through the dependency tree as follows Figure 4 As shown in (c) of the figure, after dependency tree parsing, it is possible to distinguish nouns, verbs, adjectives, and other terms within the descriptive text. Names generally represent target objects, while adjectives generally represent attributes of the target object. Multiple nouns may have relationships or a hierarchy of importance. The root node of the dependency tree generally represents the noun describing the text, that is, the target object. Based on the root node of the dependency tree (e.g., shirt, man, clock), the target object in the image can be determined, and the image-to-text pair can be constructed.

[0063] After constructing training image and text pairs, the visual language model is invoked to perform a proxy task for each training image sample, generating a training heatmap for the training image sample against the text pair. The proxy task involves identifying the training target object in the training image sample based on the text pair and constructing a training heatmap based on the training target object. The proxy task aims to introduce diversity in heatmap generation. Diverse representations simultaneously train the ability to distinguish attributes, relationships, and primary and secondary. Training these three dimensions simultaneously generates a training heatmap.

[0064] The training heatmap represents the training results of the visual language model. Next, the loss function of the visual language model is constructed based on the training heatmap. Since it is a text pair, two training heatmaps are generated, which are still recorded as H0 and H1. The element multiplication result H0⊙H1 of the training heatmap is calculated and the area of ​​the training heatmap is calculated. The area is determined by the width w and height h of the training heatmap size, that is, w×h. Then the ratio of the element multiplication result to the area is determined, H0⊙H1 / (w×h). Finally, the loss function L of the visual language model is constructed based on the mathematical expectation value E(H0⊙H1 / (w×h)) of the ratio. The specific calculation formula is as follows:

[0065] In the above formula, B is the training sample batch, B={v i , t i 0, t i 1} n i=1 , where v i represents the training image sample, t i 0, t i 1 represents the text pair, H0 and H1 correspond to t i 0, t i 1, w and h represent the width and height of the training heat map respectively.

[0066] During training, the loss function L is back-propagated through the visual language model for each training sample batch B. The gradient optimization algorithm is used to optimize the gradients and update the weight parameters of the visual language model. After continuous iteration of each training sample batch, training of the visual language model is terminated when the loss function converges or the specified number of iterations is reached.

[0067] The loss function L provided in this embodiment of the present invention uses coarse-grained text descriptions rather than dense bounding box annotations to provide weak supervision guidance for heatmaps. This loss function L guides the visual language model to generate different training heatmaps for different description text inputs in a text pair. Furthermore, the dependency tree of the description text encompasses various target objects, attributes, relationships, and primary and secondary combinations. Therefore, it encourages the visual language model's output to be more discriminative while mitigating the noise caused by combinatorial ambiguity in the generation of training heatmaps.

[0068] In order to verify the effectiveness of fine-tuning, the embodiment of the present invention also uses the fine-tuning process of the visual language model provided by the present invention on two visual language models with different architectures, and experimentally verifies the performance evaluation results between the CLIP model, the CLIP fine-tuning process, the ALBEF model, and the ALBEF fine-tuning process. The performance evaluation results (i.e., the attribute performance evaluation results, the relationship evaluation results, the primary and secondary performance evaluation results, and the average result of the three) show that for two pre-trained visual language models with different model structures, the fine-tuning process of the present invention can significantly improve the combined reasoning ability of the pre-trained visual language model. And in the visual positioning dataset, the fine-tuning process significantly enhances the performance effect of the two visual language models.

[0069] In summary, the present invention conducts research on pre-trained visual language models and reveals the combinatorial reasoning problems they have. By proposing a scheme based on attribute, relation and priority grounding benchmark testing, the combinatorial reasoning ability of the visual language pre-training model in the visual positioning task is evaluated. In the present invention, an ARPGrounding dataset containing 11,425 samples is constructed, and the combinatorial understanding ability of the visual language pre-training model is evaluated from three dimensions. Several mainstream pre-trained visual language models are evaluated using the ARPGrounding dataset. The experimental results show that these visual language models show obvious deficiencies in combinatorial reasoning. In addition, the present invention also proposes a fine-tuning process for combinatorial perception, which demonstrates the use of low-cost image-text annotations to improve the combinatorial understanding ability of pre-trained visual language models in positioning tasks.

[0070] The performance evaluation device of the visual language model in the positioning task provided by the present invention is described below. The performance evaluation device of the visual language model in the positioning task described below and the performance evaluation method of the visual language model in the positioning task described above can be referenced to each other.

[0071] Figure 5 Schematic diagram of the performance evaluation device of the visual language model in the positioning task provided by the present invention. Figure 5As shown, the present invention provides a performance evaluation device for a visual language model in a positioning task, wherein the positioning tasks include a positioning task based on attribute differentiation, a positioning task based on relationship differentiation, and a positioning task based on primary and secondary differentiation. The device includes: a construction module 501, an execution module 502, and a determination module 503. The construction module 501 is used to construct an evaluation data set for performance evaluation of the visual language model, wherein the evaluation data set includes multiple evaluation samples, wherein the evaluation samples include a target image and two description texts, and the target image is marked with two target objects corresponding to the description texts; the execution module 502 is used to perform a positioning task on each evaluation sample in the evaluation data set using the visual language model to obtain a positioning heat map of the target image in the evaluation sample, wherein the positioning task is to determine the corresponding target object from the target image according to the description text under the conditions of distinguishing attributes, distinguishing relationships, and distinguishing primary and secondary; the determination module 503 is used to determine the performance evaluation score of the evaluation sample according to the positioning heat map; the determination module 503 is further used to determine the average of the performance evaluation scores as the average accuracy of the evaluation data set, and use the average accuracy as the performance evaluation result of the visual language model.

[0072] Specifically, the performance evaluation device of the above-mentioned visual language model in the positioning task provided by the present invention can implement all the method steps implemented in the embodiment of the performance evaluation method of the above-mentioned visual language model in the positioning task, and can achieve the same technical effect. The parts and beneficial effects of this embodiment that are the same as those of the method embodiment will not be described in detail here.

[0073] Figure 6 This is a schematic diagram of the physical structure of an electronic device provided by the present invention, such as Figure 6As shown, the electronic device may include: a processor (processor) 610, a communication interface (Communications Interface) 620, a memory (memory) 630 and a communication bus 640, wherein the processor 610, the communication interface 620, and the memory 630 communicate with each other through the communication bus 640. The processor 610 can call the logic instructions in the memory 630 to execute the performance evaluation method of the visual language model in the positioning task, which method includes: constructing an evaluation data set for the performance evaluation of the visual language model, the evaluation data set including multiple evaluation samples, the evaluation sample including a target image and two description texts, and the target image is marked with two target objects corresponding to the description texts one by one; for each evaluation sample in the evaluation data set, the positioning task is performed on the evaluation sample by the visual language model to obtain a positioning heat map of the target image in the evaluation sample, wherein the positioning task is to determine the corresponding target object from the target image according to the description text under the conditions of distinguishing attributes, distinguishing relationships, and distinguishing primary and secondary; determine the performance evaluation score of the evaluation sample according to the positioning heat map; determine the average value of the performance evaluation score as the average accuracy of the evaluation data set, and use the average accuracy as the performance evaluation result of the visual language model.

[0074] In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0075] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the performance evaluation method of the visual language model in the positioning task provided by the above methods, the method including: constructing an evaluation data set for the performance evaluation of the visual language model, the evaluation data set including multiple evaluation samples, the evaluation sample including a target image and two description texts, and the target image is marked with two target objects corresponding to the description texts one by one; for each evaluation sample in the evaluation data set, the positioning task is performed on the evaluation sample by the visual language model to obtain a positioning heat map of the target image in the evaluation sample, wherein the positioning task is to determine the corresponding target object from the target image according to the description text under the conditions of distinguishing attributes, distinguishing relationships, and distinguishing primary and secondary; determining the performance evaluation score of the evaluation sample according to the positioning heat map; determining the average value of the performance evaluation score as the average accuracy of the evaluation data set, and using the average accuracy as the performance evaluation result of the visual language model.

[0076] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a performance evaluation method for a visual language model in a positioning task provided by the above-mentioned methods, the method comprising: constructing an evaluation data set for performance evaluation of the visual language model, the evaluation data set comprising multiple evaluation samples, the evaluation samples comprising a target image and two description texts, the target image being marked with two target objects corresponding one-to-one to the description texts; for each evaluation sample in the evaluation data set, performing the positioning task on the evaluation sample through the visual language model to obtain a positioning heat map of the target image in the evaluation sample, wherein the positioning task is to determine the corresponding target object from the target image according to the description text under the conditions of distinguishing attributes, distinguishing relationships, and distinguishing primary and secondary; determining the performance evaluation score of the evaluation sample according to the positioning heat map; determining the average value of the performance evaluation score as the average accuracy of the evaluation data set, and taking the average accuracy as the performance evaluation result of the visual language model.

[0077] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0078] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, or of course, by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiments.

[0079] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A performance evaluation method for visual language models in localization tasks, It is characterized in that The positioning task includes a positioning task based on attribute distinction, a positioning task based on relationship distinction, and a positioning task based on primary and secondary distinction. The method includes: Constructing an evaluation data set for performance evaluation of the visual language model, wherein the evaluation data set includes a plurality of evaluation samples, wherein the evaluation samples include a target image and two description texts, and the target image is marked with two target objects corresponding to the description texts one by one; For each evaluation sample in the evaluation data set, the positioning task is performed on the evaluation sample through the visual language model to obtain a positioning heat map of the target image in the evaluation sample, wherein the positioning task is to determine the corresponding target object from the target image according to the description text under the conditions of distinguishing attributes, distinguishing relationships, and distinguishing primary and secondary; and the performance evaluation score of the evaluation sample is determined according to the positioning heat map; An average value of the performance evaluation score is determined as an average accuracy of the evaluation data set, and the average accuracy is used as a performance evaluation result of the visual language model.

2. The method for evaluating the performance of a visual language model in a positioning task according to claim 1, It is characterized in that The evaluation data set includes an attribute evaluation sample set, a relationship evaluation sample set, and a primary and secondary evaluation sample set; The performance evaluation results of the visual language model include: attribute performance evaluation results, relationship evaluation results, and primary and secondary performance evaluation results; The attribute performance evaluation result is obtained after the visual language model performs the attribute differentiation-based positioning task through the attribute evaluation sample set; The relationship performance evaluation result is obtained after the visual language model performs the positioning task based on genus relationship distinction through the relationship evaluation sample set; The primary-secondary performance evaluation result is obtained after the visual language model performs the primary-secondary distinction-based positioning task through the primary-secondary evaluation sample set.

3. The performance evaluation method of the visual language model in the positioning task according to claim 2, It is characterized in that The two target objects in the evaluation samples of the attribute evaluation sample set are objects with two different attributes in the target image; the two target objects in the evaluation samples of the relationship evaluation sample set are objects with two different relationships in the target image, where the relationship is an association relationship between the target object and other objects, and the other objects are objects in the target image other than the two target objects; the two target objects in the evaluation samples of the primary and secondary evaluation sample set are two objects with a primary and secondary order in the target image.

4. The method for evaluating the performance of a visual language model in a positioning task according to claim 1, It is characterized in that The performing the positioning task on the evaluation sample by the visual language model to obtain a positioning heat map of the target image in the evaluation sample includes: Obtaining a target attention map, wherein the target attention map is any intermediate attention map obtained in the visual language model during the execution of the positioning task; Determine the image-text matching scores of the target image and the description text respectively, and for each image-text matching score, determine the gradient of the target attention map relative to the image-text matching score; For each gradient, a localization heat map of the target image in the evaluation sample is determined by the target attention map and the gradient.

5. The method for evaluating the performance of a visual language model in a positioning task according to claim 1, It is characterized in that Determining the performance evaluation score of the evaluation sample according to the positioning heat map includes: Determine a mask map of the target image for the target object; Determining an average activation value of the evaluation sample based on the positioning heat map and the mask map; The performance evaluation score of the evaluation sample is determined according to the preset activation value condition satisfied by the average activation value.

6. The method for evaluating the performance of a visual language model in a positioning task according to claim 1, It is characterized in that The visual language model is obtained by training by executing a proxy task, and the training process of the visual language model includes: obtaining a training image sample and a text pair corresponding to the training image sample; For each training image sample, calling the visual language model to execute the proxy task, obtaining a training heat map of the training image sample for the text pair, wherein the proxy task is to determine a training target object in the training image sample according to the text pair, and construct a training heat map based on the training target object; A loss function of the visual language model is constructed based on the training heat map, and back propagation is performed in the visual language model through the loss function to update the parameters of the visual language model.

7. The method for evaluating the performance of the visual language model in the positioning task according to claim 6, It is characterized in that The obtaining of the text pair corresponding to the training image sample comprises: Determine a plurality of candidate description texts according to the training image samples; Performing dependency structure analysis on the candidate description text to obtain a tree structure of the candidate description text, wherein the tree structure includes nodes and directed arcs connecting the nodes, the nodes represent each word in the candidate description text, and the directed arcs represent the connection relationship between each word; The training target object in the training image sample is determined according to the root node in the tree structure, and a text pair corresponding to the training image sample is constructed according to the root node corresponding to the training target object.

8. The method for evaluating the performance of a visual language model in a positioning task according to claim 6, It is characterized in that The loss function of constructing the visual language model based on the training heat map includes: Determine an element-wise multiplication result of the training heat map, and determine an area of ​​the training heat map; A ratio of the element multiplication result to the area is determined, and a loss function of the visual language model is constructed according to a mathematical expectation value of the ratio.

9. A performance evaluation device for a visual language model in a positioning task. It is characterized in that The positioning task includes a positioning task based on attribute distinction, a positioning task based on relationship distinction, and a positioning task based on primary and secondary distinction. The device includes: A construction module is used to construct an evaluation data set for performance evaluation of the visual language model, wherein the evaluation data set includes a plurality of evaluation samples, and the evaluation samples include a target image and two description texts, and the target image is marked with two target objects corresponding to the description texts one by one; an execution module, for performing the positioning task on each evaluation sample in the evaluation data set through the visual language model to obtain a positioning heat map of the target image in the evaluation sample, wherein the positioning task is to determine the corresponding target object from the target image according to the description text under the conditions of distinguishing attributes, distinguishing relationships, and distinguishing primary and secondary respectively; A determination module, used to determine a performance evaluation score of the evaluation sample according to the positioning heat map; The determination module is used to determine the average value of the performance evaluation score as the average accuracy of the evaluation data set, and use the average accuracy as the performance evaluation result of the visual language model.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the program, the performance evaluation method of the visual language model in the positioning task as described in any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Positioning system and positioning method

    CN108168546A

  • Device and method for evaluating a saliency map determiner

    EP3767534A1

  • Systems and methods for visual question answering

    US20230419652A1

  • Image annotation method and apparatus

    WO2024045641A1

Cited By

  • Multi-dimensional evaluation method for visual basic model

    CN118887500A

  • Evaluation method of visual language model and public evaluation platform

    CN119988915A

  • Visual cognition evaluation method for automatically generating image based on multi-modal language model

    CN120203519A

  • Image processing method and device, electronic equipment and storage medium

    CN121353697A