Image recognition method, system and device based on fused large model, and storage medium

By combining a dedicated label model and a multi-modal large model through a multi-model fusion network, the problem of insufficient recognition accuracy and generalization ability of image label recognition models for small samples is solved, achieving accurate recognition of undefined categories and simplifying the training process. Improved recognition accuracy and efficiency.

CN118609138APending Publication Date: 2024-09-06BIGO TECH PTE LTD
View PDF 0 Cites 13 Cited by

Patent Information

Application Number
CN202410770369.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-14
Publication Date
2024-09-06

AI Technical Summary

Technical Problem

Existing image label recognition models require hundreds of thousands of positive samples in large-scale data applications, are difficult to identify undefined categories, and have insufficient recognition accuracy and generalization capabilities for small samples. The training process is cumbersome and complex, with large errors.

Method used

An image recognition method based on multi-model fusion is adopted, by receiving the image to be recognized and interactive text data, inputting the pre-built multi-model fusion network, and combining multiple dedicated label models and multi-modal large models to perform cross-attention interaction of image features. Fusion with text features to generate label recognition results, simplify the training process, and improve recognition accuracy and generalization capabilities.

Benefits of technology

It achieves accurate recognition of few-sample label categories, simplifies the model training process, improves recognition accuracy and generalization capabilities, eliminates the need for additional training, and saves time and labor costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118609138A
    Figure CN118609138A
Patent Text Reader

Abstract

The embodiment of the invention discloses an image recognition method, system and device based on a fused large model and a storage medium. According to the technical scheme provided by the embodiment of the invention, the method comprises the steps: receiving a to-be-recognized image and interactive text data of the to-be-recognized image, and inputting the to-be-recognized image and the interactive text data into a pre-constructed multi-model fusion network; collecting target image features of the to-be-recognized image based on the plurality of special label models and the multi-modal large model, and collecting target text features of the to-be-recognized image based on the language large model; and determining a label identification result based on the target image feature and the target text feature, and generating reply information corresponding to the interactive text data based on the label identification result. By adopting the above technical means, accurate identification of few samples is realized through a model fusion mode, the model training process is simplified, and the model training efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer technology, and in particular to an image recognition method, system, device and storage medium based on a fusion large model. Background Art

[0002] At present, many image business scenarios involve the recognition of image labels. When identifying image label categories, the mainstream method is based on deep learning, which requires obtaining positive samples of interest from a large amount of data, building training sets and local test sets for supervised learning through manual annotation, and then training a label recognition model to recognize the pre-annotated label categories in the image.

[0003] However, when the relevant label recognition models are applied to large-scale audit data, they often require hundreds of thousands or tens of thousands of cumulative positive samples. However, for some categories that have not been clearly defined in the training data, it is difficult to manually collect and label this type of data, and further train a separate visual recognition model to effectively recognize new categories in this way. The whole process is relatively cumbersome and complicated, and the label recognition model has errors in label recognition of a small number of samples, and its recognition accuracy and generalization ability are insufficient. Summary of the invention

[0004] The embodiments of the present application provide an image recognition method, system, device and storage medium based on a fused large model, which can improve the recognition accuracy and generalization ability of the label recognition model and solve the technical problem that the label recognition model has large label recognition errors for a small number of samples.

[0005] In a first aspect, an embodiment of the present application provides an image recognition method based on a fusion large model, comprising:

[0006] Receiving an image to be recognized and interactive text data of the image to be recognized, and inputting the image to be recognized and the interactive text data into a pre-built multi-model fusion network, wherein the multi-model fusion network includes multiple dedicated label models, a multi-modal large model, and a language large model;

[0007] Based on multiple dedicated label models, first image features corresponding to the image to be identified are respectively collected, and cross-attention interaction is performed based on each of the first image features, and then fused into second image features. Based on the multimodal large model, third image features of the image to be identified are collected, and the second image features and the third image features are fused into target image features. Based on the language large model, target text features of the image to be identified are collected;

[0008] A label recognition result is determined based on the target image feature and the target text feature, and reply information corresponding to the interactive text data is generated based on the label recognition result.

[0009] In a second aspect, an embodiment of the present application provides an image recognition system based on a fusion large model, including:

[0010] An input module is configured to receive an image to be recognized and interactive text data of the image to be recognized, and input the image to be recognized and the interactive text data into a pre-built multi-model fusion network, wherein the multi-model fusion network includes multiple dedicated label models, a multi-modal large model, and a language large model;

[0011] The recognition module is configured to respectively collect first image features corresponding to the image to be recognized based on multiple dedicated label models, fuse them into second image features after cross-attention interaction based on each of the first image features, collect third image features of the image to be recognized based on the multimodal large model, fuse the second image features and the third image features into target image features, and collect target text features of the image to be recognized based on the language large model;

[0012] The output module is configured to determine a label recognition result based on the target image feature and the target text feature, and generate reply information corresponding to the interactive text data based on the label recognition result.

[0013] In a third aspect, an embodiment of the present application provides an image recognition device based on a fusion large model, including:

[0014] memory and one or more processors;

[0015] The memory is configured to store one or more programs;

[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement the image recognition method based on the fused large model as described in the first aspect.

[0017] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores computer-executable instructions, and the computer-executable instructions, when executed by a computer processor, are configured to execute the image recognition method based on the fused large model as described in the first aspect.

[0018] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes instructions. When the instructions are executed on a computer or a processor, the computer or the processor executes the image recognition method based on the fused large model as described in the first aspect.

[0019] The embodiment of the present application receives the image to be identified and the interactive text data of the image to be identified, and inputs the image to be identified and the interactive text data into a pre-constructed multi-model fusion network, wherein the multi-model fusion network includes multiple dedicated label models, a multi-modal large model and a language large model; based on the multiple dedicated label models, the first image features corresponding to the image to be identified are respectively collected, and the first image features are fused into the second image features after cross-attention interaction based on each first image feature; the third image features of the image to be identified are collected based on the multi-modal large model, and the second image features and the third image features are fused into the target image features; the target text features of the image to be identified are collected based on the language large model; the label recognition result is determined based on the target image features and the target text features, and the reply information corresponding to the interactive text data is generated based on the label recognition result. By adopting the above technical means, the image features are recognized by combining multiple dedicated label models and the multi-modal large model, and then the image recognition is performed by combining the text features, so that the generalization ability of the model can be improved by using the multi-modal large model, and the recognition accuracy of the model for each type of label features can be guaranteed by using multiple dedicated label models, and the accurate recognition of a few samples can be realized by model fusion, without the need for additional training of the few samples, simplifying the model training process, and improving the model training efficiency.

[0020] In addition, this application fuses image features through cross-attention interaction of multiple dedicated label models, which can achieve accurate collection of corresponding label features and further improve the accuracy of image label recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 It is a flow chart of an image recognition method based on a fusion large model provided in an embodiment of the present application;

[0022] Figure 2 It is a training flow chart of a multi-model fusion network in an embodiment of the present application;

[0023] Figure 3 It is a processing flow chart of a multi-model fusion network in an embodiment of the present application;

[0024] Figure 4 It is a schematic diagram of the structure of a block-based fully connected neural network in an embodiment of the present application;

[0025] Figure 5 is a flow chart of cross-attention interaction of image features in an embodiment of the present application;

[0026] Figure 6 It is a reasoning schematic diagram of a multi-model fusion network in an embodiment of the present application;

[0027] Figure 7 It is a structural schematic diagram of an image recognition system based on a fusion large model provided in an embodiment of the present application;

[0028] Figure 8 It is a structural schematic diagram of an image recognition device based on a fusion large model provided in an embodiment of the present application. DETAILED DESCRIPTION

[0029] In order to make the purpose, technical scheme and advantages of the present application clearer, the specific embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. It is understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for the convenience of description, only the part related to the present application but not all the contents are shown in the accompanying drawings. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow chart describes each operation (or step) as a sequential process, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of each operation can be rearranged. The process can be terminated when its operation is completed, but it can also have additional steps not included in the accompanying drawings. The process can correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.

[0030] The image recognition method based on the fused large model provided in the present application combines multiple dedicated label models and a multimodal large model to identify image features, and then combines text features for image recognition, so as to utilize the multimodal large model to improve the generalization ability of the model, and utilize multiple dedicated label models to ensure the recognition accuracy of the model for various types of label features, and realize accurate recognition of a small number of samples through model fusion.

[0031] For visual recognition systems applied to large-scale image labeling technology, the relevant implementation method is based on deep learning methods. Most of these methods require the accumulation of a large amount of data to ensure that the model has good generalization ability and practical application value. This method requires obtaining positive samples of interest from a large amount of data. Such positive samples often require hundreds of thousands or tens of thousands of accumulations when applied to large-scale audit data. However, in the recognition of categories that have not been clearly defined in some training data, the current general technical solution is to manually collect more data of this type of interest to alleviate the problem of insufficient data. At the same time, a separate visual recognition model is further trained to achieve effective recognition of new categories in this way. Retraining a recognition model requires a long R&D cycle and time cost, such as often requiring a lot of annotation time cost. And because the audit rules change with the business and scale, the process of collecting data and annotating will consume more time and manpower costs. If there is no dedicated algorithm model to identify the target category, it is difficult for the algorithm model to accurately identify images with a small number of samples, and the generalization ability and recognition accuracy of the model are relatively low.

[0032] In addition, there is also a way to identify image labels through a general multimodal large model. However, for a multimodal large model with strong versatility, it is often unable to achieve reliable recognition of data within the domain due to domain migration, resulting in recognition accuracy that is lower than expected.

[0033] Based on this, an image recognition method based on a fused large model is provided in an embodiment of the present application. In view of the problems of low accuracy and poor generalization performance in identifying new label content and the need for huge manpower and time costs to label a large amount of labeled data in the context of large-scale image content recognition business, the multimodal large model is combined with the existing dedicated label model to realize the recognition of a small number of samples of image content under new scenes and new labels.

[0034] Example:

[0035] Figure 1 A flowchart of an image recognition method based on a fused large model provided in an embodiment of the present application is given. The image recognition method based on a fused large model provided in this embodiment can be executed by an image recognition device based on a fused large model. The image recognition device based on a fused large model can be implemented by software and / or hardware. The image recognition device based on a fused large model can be composed of two or more physical entities, or it can be composed of one physical entity. Generally speaking, the image recognition device based on a fused large model can be a processing device such as a computer, a mobile phone, a tablet live broadcast server, etc.

[0036] The following description is made by taking an image recognition device as an example to implement the image recognition method based on the fusion large model. Figure 1 , the image recognition method based on the fusion large model specifically includes:

[0037] S110, receiving an image to be recognized and interactive text data of the image to be recognized, and inputting the image to be recognized and the interactive text data into a pre-built multi-model fusion network, wherein the multi-model fusion network includes multiple dedicated label models, a multi-modal large model and a language large model.

[0038] When performing image recognition, this application first starts from a pre-trained general multimodal large model and combines multiple special label models to realize the recognition of some newly specified labels. Combining the strong generalization ability of the multimodal large model and the special recognition ability of multiple special label models, it realizes the recognition of new labels with a small number of samples, so that the small number of sample label categories can be accurately recognized without the need for a large amount of labeled data.

[0039] Among them, a multimodal large model refers to a deep learning model that can process multiple media data (such as text, images, audio, video, etc.). The model can learn their common semantics from different data modalities, thereby realizing cross-media understanding and generation between different modalities. Multimodal large models are usually trained in a self-supervised learning manner, generating task objectives and predicting task results by comparing the similarity and semantic consistency between different modal data. They are widely used in various application fields, such as intelligent customer service, intelligent voice assistants, and intelligent recommendations. Multimodal large models have many advantages, such as being able to process different media data, being able to learn from a large amount of unlabeled data, and being able to improve the generalization ability of the model. However, multimodal large models also face some challenges and problems, such as data inconsistency, semantic gaps between modalities, computational efficiency, and storage. The multimodal large model of this application can be fine-tuned based on large models such as ChatGBT and Wenxin Yiyan, or it can be directly called by calling the corresponding large model through an interface.

[0040] A dedicated label model is a machine learning or deep learning model, which is usually a classification or detection model with specialization, such as only identifying and detecting a certain category. Such models often have strong recognition accuracy. It can be used to classify or label input data to determine the label or category to which it belongs. Dedicated label models are usually trained based on supervised learning, that is, a training data set with known labels is used to adjust the parameters of the model so that its label can be accurately predicted when new data is input. According to the type of label in the image to be identified, the dedicated label model is adaptively trained for the corresponding label category so that the dedicated label model has the ability to accurately identify the corresponding label category. According to the actual detection requirements, the number of dedicated label models used by the multi-model fusion network can be adaptively set and added. In addition, according to the label category to be detected, the dedicated label model can also be adaptively set.

[0041] The large language model is used to identify the corresponding text information and obtain text features.

[0042] In the combined use of the multimodal large model and the dedicated label model, the dedicated label model provides a supervised learning signal for the multimodal fusion network, helping the multimodal fusion network to better understand and process multimodal input data. At the same time, the multimodal fusion network can improve the accuracy and generalization of label recognition by utilizing the common semantic information in multimodal data, thereby generating more accurate response information. It is only necessary to describe the target category to a certain extent and provide the basis for identifying the category, and then describe and identify the category by combining a few example pictures.

[0043] Prior to this, a multi-model fusion network based on the above-mentioned dedicated label model and multimodal large model is pre-built to fine-tune the multiple dedicated label models and multimodal large models already in the business, complement the capabilities of the two models, and thus obtain the ability to determine whether there are new labels.

[0044] Specifically, refer to Figure 2 ,The training samples of the multi-model fusion network include training images and the corresponding text description information, and the training samples are pre-labeled with the corresponding label information;

[0045] The training process of the multi-model fusion network includes:

[0046] S1001, inputting the training image into a plurality of dedicated label models and a multimodal large model respectively, collecting first training features of the training image based on the plurality of dedicated label models, fusing the first training features into second training features after cross-attention interaction based on the first training features, collecting third training features of the training image based on the multimodal large model, and fusing the second training features and the third training features into training image features;

[0047] S1002, inputting the corresponding text description information into the language model to obtain training text features;

[0048] S1003, input the training image features and the training image features into the autoregressive large model network to obtain corresponding result information;

[0049] S1004, calculating the loss function of the result information and the corresponding label information, and iteratively adjusting the model parameters of the multi-model fusion network based on the loss function to perform model training until the loss function converges.

[0050] In actual business scenarios, the business data sources are sorted and stored in the database in the form of training images and texts. Then, the template is used to construct and describe the sorted data set, so as to obtain the corresponding text description information of the training image, and then the model training samples are constructed with the training images and text description information. Figure 3 The text description information of the training image may include the dog's label information, the dog's coordinates, the image content description of the training image, and interactive text information for the training image, etc. The interactive text information may be text information such as "how many dogs are there in the picture". The text description information may be adaptively set according to actual training needs.

[0051] Furthermore, in the process of training the multi-model fusion network based on the training samples, the training images of the training samples are first standardized to obtain a 224*224*3d image tensor matrix I (representing image). The training images are then input into multiple dedicated label models and the multi-modal large model respectively to collect the image features of the training images, which are defined as training image features.

[0052] Among them, for multiple dedicated label models 1 to n, by collecting the first training features of the training image, cross-attention interaction is performed based on each first training feature and then fused into the second training feature. The second training feature is represented as an image matrix of 192*512 dimensions For multimodal large models, use the visual encoder to obtain the third training feature

[0053] Then, by fusing the training features identified by the dedicated label model and the multimodal large model, the training image features of the training image are obtained. The feature fusion method can adopt the method of feature splicing, addition, weighted fusion or attention mechanism fusion. This application does not impose fixed restrictions on the specific feature fusion method, and will not be elaborated here.

[0054] Optionally, the second training feature and the third training feature are fused into a training image feature, including:

[0055] The second training feature and the third training feature are input into a preset block fully connected neural network, and corresponding visual encoding information is extracted from the second training feature and the third training feature based on the block fully connected neural network to obtain training image features.

[0056] The first training feature, the second training feature, the third training feature and the training image feature are feature vectors of the same dimension. For example, the dedicated label model and the multimodal large model output image vectors of 192*512 dimensions respectively through feature recognition, and then output image vectors of 192*512 dimensions, i.e., training image features, through feature attention mechanism fusion.

[0057] The dedicated label model and the multimodal large model use the visual large model Transformer network (i.e., block fully connected neural network) to obtain a 192*512 dimensional image vector according to the identification coding information extracted as needed, and then perform feature fusion through a general visual module (fusion MLP) to output a 192*512 vector.

[0058] Similarly, for the text description information, after normalization, it is first aggregated into a matrix with a length of 1024*512 dimensions, and then the text data is further processed through the language large model LLM Transformer network to obtain a 512-dimensional text vector E T (T): = P(x text θ LLM )∈R 1024×512 , i.e. training text features. The first dimension length is 1024 and is accompanied by a mask vector mask = [1,1,…,0,0], where 1 represents a valid value and 0 represents an invalid value.

[0059] Finally, the image vector and the text vector (i.e., the training image features and the training text features) are placed in the large autoregressive model network to determine the label recognition result corresponding to the training image, such as Figure 3 The label recognition result of the dog in the picture. Then, based on the label recognition result and the interactive text information "How many dogs are there in the picture" contained in the text description information, the autoregressive model outputs the corresponding question-answering result. The specific calculation formula is as follows:

[0060] P(A)=P(x answer |x describtion ,x objects ,x Question ,x I θ LLM ,θ vision1 ,θ vision2 )

[0061] Among them, the result P(A) represents the probability of the answer obtained by the large text model. The probability is calculated as the probability distribution on the large model dictionary, that is, P(A) is a non-negative vector whose sum is 1 and whose length is the length of the dictionary. Secondly, on the right side of the formula, there are feature vector embeddings of the two modalities of text and image:

[0062] [x describtion ,x objects ,x Question ,x image ]

[0063] =concat([E T (Descrbtion),E T (Objects),E T (Question), E I (Image)])

[0064] Represented as the concatenation of each text embedding and feature embedding of length 1024, x describtion ,x objects ,xQuestion ,x image represents the feature vector, θ LLM ,θ vision1 ,θ vision2 The above-mentioned language large model, dedicated label model and multimodal large model are represented respectively.

[0065] After calculating the probability of generating the answer, the loss is calculated with the actual answer label information, that is, the loss function calculation formula is:

[0066] L(P(A),y)=-ylog(P(A))

[0067] After training by collecting a large amount of text and image data, the multi-model fusion network parameters are continuously updated, specifically the model parameters of the language large model, each dedicated label model and the multi-modal large model. After the converged optimal network is obtained, the network weights are no longer updated. The network parameters corresponding to each model network in the multi-model fusion network are fixed, and used as the generation parameters of the image and feature extractor and text respectively, so as to complete the training of the multi-model fusion network. By combining the perceptual information and semantic information for model training, the content required by the user can be better understood, and the effect of direct text retrieval of the semantic similarity of the image can be achieved. In addition, the multi-model fusion network has a strong generalization ability, and can also realize normal retrieval in user input data that has never been seen before, without additional training, saving system development time and time for specific business. By controlling the image feature encoding information that the multi-modal large model pays attention to, the multi-modal large model can pay attention to different details of the image or introduce expert knowledge, etc., so as to achieve the migration ability of user retrieval in different fields.

[0068] Optionally, the block-based fully connected neural network includes a multi-head self-attention layer, a residual link layer, and a forward network layer. The block-based fully connected neural network can be applied to the language large model, dedicated label model, and multimodal large model of the present application. Taking image processing as an example, for an original RGB image, by scaling the image to a size of 224*224, an equal-sized patch (image block) is obtained, and then feature extraction is performed based on the Transformer network to obtain the corresponding 512-dimensional vector. The network structure is a 12-layer self-attention and residual neural network, consisting of 5 stages and a total of 16 layers. Figure 4, showing the core structure of Transformer, which mainly extracts information through multi-head self-attention and short-cut residual links, and also includes a learnable forward network. The above components form an Encoder-Block. The information input and information output of each Encoder-Block are a matrix output with a fixed dimension of 512, keeping the dimension unchanged. The Transformer network structure contains the above 12 Encoder-Blocks arranged in cascade. The cascade module extracts high-level semantic information from images and texts. Then, the 512-dimensional vector is further mapped to 512 dimensions through a fully connected layer network to obtain the corresponding feature vector.

[0069] Through the above-mentioned pre-trained multi-model fusion network, in the subsequent model reasoning stage, by inputting the corresponding image to be recognized and the corresponding interactive text data, accurate recognition of the image to be recognized can be achieved through model reasoning.

[0070] S120. Collect first image features corresponding to the image to be identified based on multiple dedicated label models, fuse them into second image features after cross-attention interaction based on the first image features, collect third image features of the image to be identified based on the multimodal large model, fuse the second image features and the third image features into target image features, and collect target text features of the image to be identified based on the language large model.

[0071] Furthermore, based on the trained multi-model fusion network, the image features of the image to be identified are respectively collected through the dedicated label model and the multi-modal large model of the multi-model fusion network, and defined as the target image features. The target image features are collected by referring to the collection method of the training image features during the model training process.

[0072] Among them, the first image feature, the cross-attention feature, the second image feature and the third image feature are feature vectors of the same dimension. The dedicated label model and the multimodal large model output image vectors of 192*512 dimensions respectively through feature recognition, and then output image vectors of 192*512 dimensions, i.e., target image features, through the fusion of feature attention mechanisms. Similarly, for interactive text data, its text feature vector is collected through the language large model and defined as the target text feature. The extraction of target image features and target text features refers to the extraction method of the above-mentioned training image features and training text features, which will not be elaborated here.

[0073] Optionally, the cross-attention interaction based on each first image feature is performed and then fused into the second image feature, including:

[0074] Based on the learnable query vector, cross-attention interactions are performed with each first image feature to generate corresponding cross-attention features;

[0075] The cross-attention features are fused into the second image feature.

[0076] Reference Figure 5 When each dedicated label model processes the input image, it is assumed that the input image is an original RGB image. The image is scaled to a size of 224*224, and then the dedicated label model is used to extract image features. The dedicated label model extracts features based on the above-mentioned fully connected layer network. After obtaining the corresponding image features, for each image feature (defined as the first image feature), the dedicated label model uses a learnable query vector to perform cross-attention interaction with multiple first image features. The attention cross-attention method is as follows: Figure 5 As shown, the query vector remains unchanged during inference. Each first image feature is output as a cross-attention feature after cross-attention interaction. Subsequently, multiple cross-attention features are aggregated into one image feature, which is the second image feature. Similarly, in the model inference stage, the first training feature is output as a cross-attention feature after cross-attention interaction through a learnable query vector, and multiple cross-attention features can be aggregated into one second training feature.

[0077] It should be noted that the query vector of the present application is a learnable parameter vector, which can be dynamically generated or learned during the model training process. This query vector is designed to be a representation vector related to the task as a benchmark for feature selection. When performing cross-attention interaction, the information is screened and integrated by calculating the correlation between the query vector and the image features collected by multiple dedicated label models. Among them, the attention scoring function (such as an additive model, a dot product model, a scaled dot product model, or a bilinear model) can be used to calculate the correlation score between the query vector and each dedicated label model feature. According to these correlation scores, the probability distribution (i.e., attention distribution) of each feature being selected is calculated. The input features are weighted averaged according to the attention distribution to filter out the feature information most relevant to the task, and then the cross-attention feature is obtained. During the model training process, the query vector is learned by optimization methods such as back propagation algorithm and gradient descent. Once the model training is completed, the value of the query vector is fixed and remains unchanged during the reasoning process. In this way, the consistency and stability of the model during reasoning can be ensured, so that the query vector will not change with the change of input data.

[0078] S130 , determining a tag recognition result based on the target image feature and the target text feature, and generating reply information corresponding to the interactive text data based on the tag recognition result.

[0079] Finally, the matching degree between the target image features and the target text features is calculated through the pre-trained multi-model fusion network, and a specific score is given according to the matching degree between the image and text description. If the score is high enough, such as higher than a given threshold, these images are considered to meet the description of the target category, and the recognition of undefined categories can be achieved, and the label recognition result can be determined. Then, the interactive text data is replied based on the label recognition result, and the corresponding reply information is output. In the entire recognition process, a large amount of data can be obtained without further training of a dedicated recognition model. If the required label accuracy is higher, a more dedicated visual discrimination model can be trained.

[0080] For example, refer to Figure 6 , by inputting an image to be identified and the interactive text data "whether the image contains label a", the multi-model fusion network extracts the target image features of the image to be identified and the target text features of the interactive text data respectively. Based on the matching score of the target image features and the target text features, if the score is higher than the set threshold, it is determined that the image to be identified contains label a, so that the accurate recognition of the few sample label categories can be achieved. Even if the dedicated label model has not been trained with a large number of samples based on label a, the multi-model fusion network can combine the generalization performance of the multi-modal large model to achieve accurate recognition of the label a category.

[0081] Finally, by parsing the label recognition results, the labels or categories corresponding to the image to be recognized and the interactive text data are determined. Based on the label recognition results, the model or subsequent logic will generate a reply message corresponding to the interactive text data. This reply may be text, voice, or other forms of output, designed to answer the user's questions, provide relevant information, or interact.

[0082] In the above, by receiving the image to be identified and the interactive text data of the image to be identified, the image to be identified and the interactive text data are input into the pre-constructed multi-model fusion network, which includes multiple dedicated label models, a multi-modal large model and a language large model; based on the multiple dedicated label models, the first image features corresponding to the image to be identified are respectively collected, and the first image features are fused into the second image features after cross-attention interaction based on each first image feature, and the third image features of the image to be identified are collected based on the multi-modal large model, and the second image features and the third image features are fused into the target image features, and the target text features of the image to be identified are collected based on the language large model; the label recognition result is determined based on the target image feature and the target text feature, and the reply information corresponding to the interactive text data is generated based on the label recognition result. By adopting the above technical means, by combining multiple dedicated label models and the multi-modal large model to identify image features, and then combining text features for image recognition, the multi-modal large model can be used to improve the generalization ability of the model, and multiple dedicated label models can be used to ensure the recognition accuracy of the model for various types of label features, and the accurate recognition of a few samples can be achieved by model fusion, without the need for additional training of the few samples, simplifying the model training process, and improving the model training efficiency.

[0083] In addition, this application fuses image features through cross-attention interaction of multiple dedicated label models, which can achieve accurate collection of corresponding label features and further improve the accuracy of image label recognition.

[0084] Based on the above embodiments, Figure 7 This is a schematic diagram of the structure of an image recognition system based on a fusion large model provided by this application. Figure 7 The image recognition system based on the fusion large model provided in this embodiment specifically includes: an input module 21, a recognition module 22 and an output module 23.

[0085] The input module 21 is configured to receive the image to be identified and the interactive text data of the image to be identified, and input the image to be identified and the interactive text data into a pre-built multi-model fusion network, wherein the multi-model fusion network includes a plurality of dedicated label models, a multi-modal large model and a language large model;

[0086] The recognition module 22 is configured to respectively collect first image features corresponding to the image to be recognized based on multiple dedicated label models, fuse them into second image features after cross-attention interaction based on each first image feature, collect third image features of the image to be recognized based on the multimodal large model, fuse the second image features and the third image features into target image features, and collect target text features of the image to be recognized based on the language large model;

[0087] The output module 23 is configured to determine a tag recognition result based on the target image feature and the target text feature, and generate reply information corresponding to the interactive text data based on the tag recognition result.

[0088] Specifically, cross-attention interaction is performed based on each first image feature and then fused into a second image feature, including:

[0089] Based on the learnable query vector, cross-attention interactions are performed with each first image feature to generate corresponding cross-attention features;

[0090] The cross-attention features are fused into the second image feature.

[0091] Among them, the first image feature, the cross-attention feature, the second image feature and the third image feature are feature vectors with the same dimension.

[0092] Specifically, the training samples of the multi-model fusion network include training images and corresponding text description information, and the training samples are pre-labeled with corresponding label information;

[0093] The training process of the multi-model fusion network includes:

[0094] Input the training images into a plurality of dedicated label models and a multimodal large model respectively, collect first training features of the training images based on the plurality of dedicated label models, fuse them into second training features after cross-attention interaction based on the first training features, collect third training features of the training images based on the multimodal large model, and fuse the second training features and the third training features into training image features;

[0095] Input the corresponding text description information into the language model to obtain the training text features;

[0096] Input the training image features and the training image features into the autoregressive large model network to obtain the corresponding result information;

[0097] The loss function of the calculation result information and the corresponding label information is calculated, and the model parameters of the multi-model fusion network are iteratively adjusted based on the loss function to perform model training until the loss function converges.

[0098] The second training feature and the third training feature are fused into a training image feature, including:

[0099] The second training feature and the third training feature are input into a preset block fully connected neural network, and corresponding visual encoding information is extracted from the second training feature and the third training feature based on the block fully connected neural network to obtain training image features.

[0100] The block-based fully connected neural network includes a multi-head self-attention layer, a residual link layer, and a forward network layer.

[0101] In the above, by receiving the image to be identified and the interactive text data of the image to be identified, the image to be identified and the interactive text data are input into the pre-constructed multi-model fusion network, which includes multiple dedicated label models, a multi-modal large model and a language large model; based on the multiple dedicated label models, the first image features corresponding to the image to be identified are respectively collected, and the first image features are fused into the second image features after cross-attention interaction based on each first image feature, and the third image features of the image to be identified are collected based on the multi-modal large model, and the second image features and the third image features are fused into the target image features, and the target text features of the image to be identified are collected based on the language large model; the label recognition result is determined based on the target image feature and the target text feature, and the reply information corresponding to the interactive text data is generated based on the label recognition result. By adopting the above technical means, by combining multiple dedicated label models and the multi-modal large model to identify image features, and then combining text features for image recognition, the multi-modal large model can be used to improve the generalization ability of the model, and multiple dedicated label models can be used to ensure the recognition accuracy of the model for various types of label features, and the accurate recognition of a few samples can be achieved by model fusion, without the need for additional training of the few samples, simplifying the model training process, and improving the model training efficiency.

[0102] In addition, this application fuses image features through cross-attention interaction of multiple dedicated label models, which can achieve accurate collection of corresponding label features and further improve the accuracy of image label recognition.

[0103] The image recognition system based on the fused large model provided in the embodiment of the present application can be configured to execute the image recognition method based on the fused large model provided in the above embodiment, and has corresponding functions and beneficial effects.

[0104] Based on the above practical example, the present application embodiment also provides an image recognition device based on a fusion large model, referring to Figure 8, the image recognition device based on the fusion large model includes: a processor 31, a memory 32, a communication module 33, an input device 34 and an output device 35. The memory, as a computer-readable storage medium, can be configured to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the image recognition method based on the fusion large model described in any embodiment of the present application (for example, the input module, recognition module and output module in the image recognition system based on the fusion large model). The communication module is configured to perform data transmission. The processor executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory, that is, realizing the above-mentioned image recognition method based on the fusion large model. The input device can be configured to receive input digital or character information, and generate key signal input related to the user settings and function control of the device. The output device may include a display device such as a display screen. The above-mentioned image recognition device based on the fusion large model can be configured to execute the image recognition method based on the fusion large model provided in the above-mentioned embodiment, and has corresponding functions and beneficial effects.

[0105] On the basis of the above embodiments, the embodiments of the present application further provide a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, wherein the computer-executable instructions are configured to execute an image recognition method based on a fused large model when executed by a computer processor, and the storage medium may be any of various types of memory devices or storage devices. Of course, the computer-executable instructions of the computer-readable storage medium provided in the embodiments of the present application are not limited to the image recognition method based on a fused large model as described above, and may also execute related operations in the image recognition method based on a fused large model provided in any embodiment of the present application.

[0106] On the basis of the above embodiments, the embodiments of the present application also provide a computer program product. The essence of the technical solution of the present application or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer program product is stored in a storage medium, including a number of instructions for enabling a computer device, a mobile terminal or a processor therein to execute all or part of the steps of the image recognition method based on the fusion large model described in each embodiment of the present application.

Claims

1. An image recognition method based on a fusion large model, It is characterized in that include: Receiving an image to be recognized and interactive text data of the image to be recognized, and inputting the image to be recognized and the interactive text data into a pre-built multi-model fusion network, wherein the multi-model fusion network includes a plurality of dedicated label models, a multi-modal large model, and a language large model; Based on the multiple dedicated label models, first image features corresponding to the image to be identified are respectively collected, and after cross-attention interaction, the first image features are fused into second image features. Based on the multimodal large model, third image features of the image to be identified are collected, and the second image features and the third image features are fused into target image features. Based on the language large model, target text features of the image to be identified are collected; A tag recognition result is determined based on the target image feature and the target text feature, and reply information corresponding to the interactive text data is generated based on the tag recognition result.

2. The image recognition method based on the fusion large model according to claim 1, It is characterized in that The cross-attention interaction based on each of the first image features is performed and then fused into a second image feature, comprising: Based on the learnable query vector, cross-attention interactions are performed with each of the first image features to generate corresponding cross-attention features; The respective cross-attention features are fused into the second image feature.

3. The image recognition method based on the fusion large model according to claim 2, It is characterized in that The first image feature, the cross-attention feature, the second image feature and the third image feature are feature vectors of the same dimension.

4. The image recognition method based on the fusion large model according to claim 1, It is characterized in that The training samples of the multi-model fusion network include training images and corresponding text description information, and the training samples are pre-labeled with corresponding label information; The training process of the multi-model fusion network includes: Input the training image into the multiple dedicated label models and the multimodal large model respectively, collect the first training features of the training image based on the multiple dedicated label models, fuse them into the second training features after cross-attention interaction based on the first training features, collect the third training features of the training image based on the multimodal large model, and fuse the second training features and the third training features into the training image features; Inputting the corresponding text description information into the language macro model to obtain the training text features; Input the training image features and the training image features into the autoregressive large model network to obtain corresponding result information; Calculate the loss function of the result information and the corresponding label information, and iteratively adjust the model parameters of the multi-model fusion network based on the loss function to perform model training until the loss function converges.

5. The image recognition method based on the fusion large model according to claim 4, It is characterized in that The step of fusing the second training feature and the third training feature into the training image feature comprises: The second training feature and the third training feature are input into a preset block fully connected neural network, and corresponding visual encoding information is extracted from the second training feature and the third training feature based on the block fully connected neural network to obtain the training image feature.

6. The image recognition method based on the fusion large model according to claim 5, It is characterized in that The block fully connected neural network includes a multi-head self-attention layer, a residual link layer and a forward network layer.

7. An image recognition system based on a fusion large model, It is characterized in that include: An input module is configured to receive an image to be recognized and interactive text data of the image to be recognized, and input the image to be recognized and the interactive text data into a pre-built multi-model fusion network, wherein the multi-model fusion network includes a plurality of dedicated label models, a multi-modal large model and a language large model; A recognition module is configured to respectively collect first image features corresponding to the image to be recognized based on the multiple dedicated label models, fuse the first image features into second image features after cross-attention interaction based on the first image features, collect third image features of the image to be recognized based on the multimodal large model, fuse the second image features and the third image features into target image features, and collect target text features of the image to be recognized based on the language large model; The output module is configured to determine a label recognition result based on the target image feature and the target text feature, and generate reply information corresponding to the interactive text data based on the label recognition result.

8. An image recognition device based on a fusion large model, It is characterized in that include: memory and one or more processors; The memory is configured to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the image recognition method based on the fused large model as described in any one of claims 1-6.

9. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer-executable instructions, which, when executed by a computer processor, are configured to execute the image recognition method based on a fused large model as described in any one of claims 1-6.

10. A computer program product, It is characterized in that The computer program product includes instructions, and when the instructions are executed on a computer or a processor, the computer or the processor executes the image recognition method based on the fused large model as described in any one of claims 1-6.

Citation Information

Cited By

  • General image annotation system and method based on multi-modal large model

    CN118887496A

  • Artificial intelligence general recognition large model training method and system based on digital human

    CN119089206A

  • A method and system for training a general-knowledge large-scale artificial intelligence model based on digital human

    CN119089206B

  • Aerial image detection method and device, storage medium and electronic equipment

    CN119091335A

  • Railway image data processing method and device based on large model

    CN119579981A