Image processing method and device
The image information extraction model generates structured description information, which solves the problem of multimodal small models understanding complex image descriptions, and improves the image content understanding ability and information acquisition efficiency.
Patent Information
- Application Number
- CN202410904423.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-05
- Publication Date
- 2024-11-15
AI Technical Summary
Existing multimodal small models lack the ability to understand large languages and find it difficult to understand complex high-quality text descriptions, resulting in the inability to effectively understand image content.
By acquiring the image to be processed, input it to the image information extraction model, initial structured description information, including object and object description information, and determining the object position information based on the initial description information, and generating structured image description information for easy understanding of the downstream model.
It provides rich and easy-to-understand image description information, improves the multimodal model's understanding of image content, and simplifies the acquisition of information for subsequent tasks.
Smart Images

Figure CN118968081A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present specification relate to the field of computer technology, and in particular to an image processing method. Background Art
[0002] A large number of images and corresponding text data are required to train text-image multimodal models. Generally speaking, high-quality text descriptions will significantly help multimodal downstream tasks understand the image content. However, due to the richness of image information, high-quality text descriptions are usually very long and complex. Downstream multimodal models that lack large language understanding capabilities usually find it difficult to understand such complex text information. Therefore, there is an urgent need for a method that can provide rich but easily understood image description information by downstream multimodal models. Summary of the invention
[0003] In view of this, an embodiment of the present specification provides an image processing method. One or more embodiments of the present specification also relate to an image processing apparatus, a computing device, a computer-readable storage medium and a computer program product to solve the technical defects existing in the prior art.
[0004] According to a first aspect of an embodiment of this specification, there is provided an image processing method, including:
[0005] Get the image to be processed;
[0006] Inputting the image to be processed into an image information extraction model to obtain initial structured description information output by the image information extraction model, wherein the initial structured description information includes at least one object and object description information of each object;
[0007] Determining object position information corresponding to each object according to the image to be processed and the initial structured description information;
[0008] The structured image description information corresponding to the image to be processed is generated according to the initial structured description information and the object position information corresponding to each object.
[0009] According to a second aspect of an embodiment of this specification, there is provided an image processing method, which is applied to a cloud-side device, and includes:
[0010] An image to be processed sent by a receiving device;
[0011] Inputting the image to be processed into an image information extraction model to obtain initial structured description information output by the image information extraction model, wherein the initial structured description information includes at least one object and object description information of each object;
[0012] Determining object position information corresponding to each object according to the image to be processed and the initial structured description information;
[0013] Generating structured image description information corresponding to the image to be processed according to the initial structured description information and object position information corresponding to each object;
[0014] The structured image description information is sent to the terminal device.
[0015] According to a third aspect of the embodiments of this specification, there is provided an image processing device, including:
[0016] An acquisition module, configured to acquire an image to be processed;
[0017] An information extraction module is configured to input the image to be processed into an image information extraction model to obtain initial structured description information output by the image information extraction model, wherein the initial structured description information includes at least one object and object description information of each object;
[0018] A determination module, configured to determine object position information corresponding to each object according to the image to be processed and the initial structured description information;
[0019] The generating module is configured to generate structured image description information corresponding to the image to be processed according to the initial structured description information and object position information corresponding to each object.
[0020] According to a fourth aspect of an embodiment of this specification, a computing device is provided, including:
[0021] Memory and processor;
[0022] The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer programs / instructions are executed by the processor, the steps of the above-mentioned image processing method are implemented.
[0023] According to a fifth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores a computer program / instruction, and when the computer program / instruction is executed by a processor, the steps of the above-mentioned image processing method are implemented.
[0024] According to a sixth aspect of the embodiments of this specification, a computer program product is provided, comprising a computer program / instruction, which implements the steps of the above-mentioned image processing method when executed by a processor.
[0025] An image processing method provided by an embodiment of the present specification includes obtaining an image to be processed; inputting the image to be processed into an image information extraction model to obtain initial structured description information output by the image information extraction model, wherein the initial structured description information includes at least one object and object description information of each object; determining object position information corresponding to each object based on the image to be processed and the initial structured description information; and generating structured image description information corresponding to the image to be processed based on the initial structured description information and the object position information corresponding to each object.
[0026] Through the image processing method provided by the embodiment of the present application, the image to be processed is analyzed using the understanding ability of the large language model, and the initial structured description information corresponding to the object to be processed is generated according to the preset structured information. The initial structured description information includes at least one object and object description information corresponding to each object, which is used to describe the image to be processed, so as to facilitate the subsequent use of the information in the image to be processed. In addition, each object in the image to be processed is located by combining the initial structured description information and the image to be processed, and the object position information of each object is obtained, thereby further enriching the structured image description information of the image to be processed, and objects and object description information can be obtained from the image to be processed more quickly and accurately according to the needs of downstream tasks. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 is a flow chart of an image processing method provided by an embodiment of this specification;
[0028] Figure 2 It is a schematic diagram of the composition of initial structured description information provided by an embodiment of this specification;
[0029] Figure 3 is a schematic diagram of generating sample structured description information provided by an embodiment of this specification;
[0030] Figure 4 is a schematic diagram of object positioning provided by an embodiment of this specification;
[0031] Figure 5 is a processing framework diagram of an image processing method provided by an embodiment of this specification;
[0032] Figure 6 It is a flowchart of an image processing method applied to a cloud-side device provided by an embodiment of this specification;
[0033] Figure 7 is a structural schematic diagram of an image processing device provided by an embodiment of this specification;
[0034] Figure 8It is a structural schematic diagram of an image processing device applied to a cloud-side device provided by an embodiment of this specification;
[0035] Fig. 9 is an architecture diagram of an image processing system provided by an embodiment of this specification;
[0036] Fig.10 It is a structural block diagram of a computing device provided by an embodiment of this specification. DETAILED DESCRIPTION
[0037] Many specific details are described in the following description to facilitate a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of this specification, so this specification is not limited to the specific implementation disclosed below.
[0038] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.
[0039] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0040] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this manual are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards in the relevant regions, and corresponding operation entrances shall be provided for users to choose to authorize or refuse.
[0041] In one or more embodiments of this specification, a large model refers to a deep learning model with large-scale model parameters, which usually contains hundreds of millions, tens of billions, hundreds of billions, trillions, or even more than 10 trillion model parameters. A large model can also be called a foundation model / foundation model. The large model is pre-trained with large-scale unlabeled corpus to produce a pre-trained model with more than 100 million parameters. This model can adapt to a wide range of downstream tasks, and the model has good generalization ability, such as a large-scale language model (LLM), a multi-modal pre-training model, etc.
[0042] When the big model is used in practice, only a small number of samples are needed to fine-tune the pre-trained model and it can be applied to different tasks. The big model can be widely used in natural language processing (NLP), computer vision and other fields. Specifically, it can be applied to computer vision tasks such as visual question answering (VQA), image caption (IC), image generation, as well as natural language processing tasks such as text-based sentiment classification, text summary generation, and machine translation. The main application scenarios of the big model include digital assistants, intelligent robots, search, online education, office software, e-commerce, intelligent design, etc.
[0043] First, the terms involved in one or more embodiments of this specification are explained.
[0044] Multi-modal small model: A model that requires input of multiple modal information (such as images and text information) at the same time, but lacks the ability of a large language model to understand text information.
[0045] The text-image multimodal model requires an image and the text corresponding to the image as input. Usually, an image contains a lot of information, and a large text is needed to accurately describe the image. Moreover, the richer and more accurate the image description information is, the more beneficial it is to complete multimodal downstream tasks. However, most multimodal small models lack the text understanding ability like large language models. Even if the text information is rich enough, the multimodal small model cannot be applied. Therefore, it is necessary to provide a method that can provide rich image description information that is easy to be understood and used by multimodal small models.
[0046] Based on this, in this specification, an image processing method is provided. This specification also involves an image processing device, a computing device, a computer-readable storage medium and a computer program product, which are described in detail one by one in the following embodiments.
[0047] See also Figure 1 , Figure 1 A flowchart of an image processing method provided according to an embodiment of the present specification is shown, which specifically includes the following steps.
[0048] Step 102: Obtain an image to be processed.
[0049] The image to be processed can be understood as an image that needs to be described in text. In the method provided in the embodiment of this specification, the purpose is to provide a text description for the image to be processed and obtain image description information corresponding to the image to be processed.
[0050] In the method provided in the embodiment of this specification, it is necessary to generate corresponding image description information for the image to be processed. It is necessary to first obtain the image to be processed. The image to be processed may be obtained from a specified storage location, or the user may upload the image to be processed in a specified interactive interface. In the method provided in the embodiment of this specification, the specific implementation method of obtaining the image to be processed is not limited, and the actual application shall prevail.
[0051] Obtaining the image to be processed provides a data basis for subsequent image description of the image to be processed.
[0052] Step 104: input the image to be processed into an image information extraction model to obtain initial structured description information output by the image information extraction model, wherein the initial structured description information includes at least one object and object description information of each object.
[0053] Among them, the image information extraction model can be understood as a model that understands the image to be processed and generates corresponding descriptive information. The image information extraction model in one or more embodiments provided in this specification can be understood as a multimodal large language model, which has the ability to understand and analyze multimodal data.
[0054] The initial structured description information can be understood as the model extraction result output by the image information extraction model. The initial structured description information is not the final description information for the image to be processed. The initial structured description information is structured description information. The initial structured description information includes at least one object and object description information of each object. The object can be understood as the object in the image to be processed. For example, elements such as street lights, people, cars, and the sky in the image to be processed can all be understood as objects in the image to be processed. The object description information can be understood as the description content of the object.
[0055] For example, a picture to be processed includes a sky, two buildings, a street between the buildings, and two cars on the street. The initial structured description information may specifically include:
[0056] “Sky (inanimate object; background; the sky appears as a blue gradient with scattered clouds. Color information: blue hue.);
[0057] Building 1 (inanimate object; background; building has a unique angled design with internally lit windows. Color information: black and yellow lighting.);
[0058] Building 2 (Inanimate object; Background; This building is tall, has many windows, some of which are lit, and has a cylindrical shape. Color information: white and yellow lit windows.);
[0059] Street (inanimate objects; foreground / background; the street is shown with multiple lanes, vehicles and wet ground reflecting lights. Color information: dark grey asphalt, white road markings.);
[0060] Car 1 (inanimate object; foreground; a car driving on the street with its headlights on, car body type is sedan. Color information: black.);
[0061] Car 2 (Inanimate object; foreground; another car following Car 1, also with headlights on, appears to be a hatchback. Color information: Silver.)".
[0062] Among them, sky, building 1, building 2, street, car 1, and car 2 are 6 objects, and the content in brackets after each object is the object description information.
[0063] It should be noted that the objects and object description information in the initial structured description information provided in the embodiments of this specification can be displayed in the form of an object list. Through the objects and object description information in the form of a list, the user can more intuitively and accurately understand the objects and object description information contained in the image to be processed.
[0064] In a specific implementation provided in this specification, obtaining the initial structured description information output by the image information extraction model includes:
[0065] Initial graph structure description information output by the image information extraction model is obtained, wherein the initial graph structure description information includes at least one object node and object description information corresponding to each object node.
[0066] In this embodiment, the image information extraction model outputs initial graph structure description information according to the input image to be processed, that is, the initial structured description information can specifically be initial graph structure description information. A graph structure is a nonlinear data structure composed of nodes and edges. In the method provided in the embodiment of this specification, the initial graph structure description information includes at least one object node and object description information corresponding to each object node.
[0067] Furthermore, the initial structured description information also includes overall image description information of the image to be processed and association relationships between objects.
[0068] In practical applications, the initial structured description information also includes overall image description information for the image to be processed, which is used to reflect the content of the image to be processed as a whole. The initial structured description information also includes the association relationship between various objects.
[0069] For example, still taking the above-mentioned image to be processed as an example, which includes the sky, two buildings, a street between the buildings, and two cars on the street, the overall description information of the image may include:
[0070] “Style: This image is a photo with a realistic style.
[0071] Subject: The subject of the picture is city traffic at dusk.
[0072] Background Description: The background consists of a cloudy sky that fades from dark blue at the top to blue at the bottom. On the left is a large modern building called "***", which features a unique angled design and internally lit windows. On the right is a tall building with many windows, some of which emit a warm glow. Further away, there are more urban buildings, including one with a green glass curtain wall. The ambient light indicates that it is dawn or dusk, and artificial light begins to have a significant effect on this scene.
[0073] Foreground depiction: The foreground shows an urban street scene with multiple lanes on a busy street with vehicles all with their headlights on, indicating poor lighting conditions, vehicles of varying sizes and shapes, a mix of private and commercial vehicles, and the sidewalks along the street appearing particularly clean in the wet light, a typical feature of an urban environment at night. ".
[0074] In addition to the above-mentioned overall image description information and object list, the initial structured description information also includes the association relationship between the objects, specifically:
[0075] “The sky covers the buildings;
[0076] Building 1 is on the left side of the street;
[0077] Building 2 is located on the right side of the street;
[0078] Car 1 is driving on the street;
[0079] Car 2 follows Car 1 down the street."
[0080] The above is an introduction to the specific content of the initial structured description information. In a specific implementation provided in the embodiments of this specification, the initial structured description information at least includes an object list, which can be understood as at least one object and object description information of each pair of objects. Furthermore, the initial structured description information can also include the overall image description information of the image to be processed, and / or the association relationship between each object.
[0081] See also Figure 2 , Figure 2 FIG. 1 shows a schematic diagram of the composition of the initial structured description information provided by an embodiment of the present specification, such as Figure 2 As shown, after the image to be processed is processed by the image information extraction model, initial structured description information is generated. The initial structured description information includes three parts. The first part is the overall description information of the image, the second part is the object list, and the third part is the association relationship between the objects.
[0082] The first part is the overall description information of the image, which includes the overall description information of the image to be processed, such as image style, image theme, image background description, image foreground description and other information.
[0083] The second part is an object list, which includes at least one object in the image to be processed and object description information of each object.
[0084] The third part is the association relationship, which includes the association relationship between objects in the image to be processed.
[0085] The initial structured description information is a special format of graph structure description information. To facilitate model output, the content of model understanding and analysis can be displayed in the form of the initial structured description information. The objects and object description information in the initial structured description information can be understood as nodes in the graph structure and the description information of the nodes.
[0086] In the method provided in the embodiment of this specification, the image information extraction model is a pre-trained large language model, which is trained to output initial structured description information in a fixed format based on the input image. In a specific implementation provided in this specification, the image information extraction model is trained by the following steps:
[0087] A sample image and sample structured description information corresponding to the sample image are obtained, wherein the sample structured description information is generated by using a preset structured description template.
[0088] The sample image is input into an image information extraction model to obtain predicted structured description information output by the image information extraction model.
[0089] A model loss value is calculated according to the sample structured description information and the predicted structured description information.
[0090] The model parameters of the image information extraction model are adjusted according to the model loss value, and the image information extraction model is continuously trained until the model training stop condition is reached.
[0091] Specifically, the training method of the image information extraction model provided in the embodiments of the present specification uses supervised training, which includes multiple training sample pairs, and a training sample pair includes a sample image and sample structured description information corresponding to the sample image. Among them, the sample image can be understood as a sample for training the image information extraction model. The sample structured description information can be understood as structured description information corresponding to the sample image, which includes at least one sample object in the sample image and sample object description information corresponding to each sample object.
[0092] In practical applications, although the multimodal large language model is very powerful, it cannot directly output the desired structured description information. Therefore, in the method provided in the embodiment of this specification, a template is provided for the image information extraction model based on a preset structured description template, informing the image information extraction model that it needs to output the corresponding structured description information according to the format of the preset structured description template.
[0093] Specifically, in a specific implementation manner provided in this specification, obtaining a sample image and sample structured description information corresponding to the sample image includes:
[0094] Obtain sample images and preset structured description templates;
[0095] The sample image and the preset structured description template are input into a multimodal large language model to obtain sample structured description information output by the multimodal large language model.
[0096] Among them, the preset structured description template can be understood as a template pre-set in one or more implementations of this specification, which is used to inform the multimodal large language model that it needs to output corresponding structured description information according to the format of the preset structured description template.
[0097] In practical applications, the preset structured description template includes at least one type of preset identification characters, and the preset identification characters represent the information type in the preset structured description template. For example, the preset identification characters may be "%%", "&&", "<>", "()", ";", "[]", and the like. Each preset identification character identifies a type of information in the preset structured template, for example, "%%" is used to distinguish large titles, "&&" is used to distinguish small titles, "<>" is used to identify nouns, "()" is used to identify object attributes, ";" is used to separate object attributes, "[]" is used to identify relationships, and the like.
[0098] By using various preset identifiers in the preset structured description template, the preset structured description template can be divided into predefined information parts, thereby defining the preset character string format of the preset structured description template.
[0099] After the preset string format is designed, in order to enable the multimodal large language model to output structured description information according to the preset string format according to the preset structured description template, in one or more embodiments provided in this specification, the preset structured description template may also include a target information type instance corresponding to the target information type. The multimodal large language model is provided with examples through the In-context learning method (ICL, a method that can complete natural language processing tasks by providing only a small number of examples), so that the multimodal large language model outputs corresponding structured description information according to the preset character format.
[0100] The traditional ICL method needs to provide multiple examples and input them into the multimodal large language model in the form of dialogue. However, in the method provided in the embodiment of this specification, there are many contents in the preset string format. If examples are provided for all information, the cost is high. Based on this, in the method provided in the embodiment of this specification, a corresponding target information type instance is provided for the target information type. The target information type can be understood as a pre-set information type. For example, the target information type can be a headline, a subheading, numbering different individuals of the same category, the output format of object information, the relationship between objects, etc. Providing a corresponding target information type instance for the target information type can better help the multimodal large language model to output according to a given preset string format.
[0101] In the method provided in the embodiment of this specification, the ICL method used only provides the target information type instance at the position of the target information type, so that the multimodal large language model can output the corresponding structured description information in the specified format. The length of the text input to the multimodal large language model is shortened, and the multimodal large language model can output structured description information using only a single round of dialogue.
[0102] See also Figure 3 , Figure 3 FIG. 1 shows a schematic diagram of generating sample structured description information provided by an embodiment of this specification, such as Figure 3 As shown, the sample image and the preset structured description template are input into the multimodal large language model. After understanding and analyzing the sample image, the multimodal large language model can output the corresponding sample structured description information according to the preset structured description template. The sample structured description information is generated according to the preset string format and examples.
[0103] like Figure 3 The sample structured description information shown includes three parts. The first part is the overall description part, which further includes information such as style, theme, background description, foreground description, etc. The second part is the object list, which further includes each object in the image and the object description information of each object. The third part is the association relationship, which further includes the association relationship between each object in the image.
[0104] The sample structured description information is a pre-set structured format of image description information provided in the embodiments of this specification. After understanding and analyzing the sample image, the multimodal large language model outputs the corresponding sample structured description information according to the pre-set preset string format, and describes the sample image in a specific structured format so as to train the image information extraction model in the future. The trained image information extraction model can output the initial structured description information in the specified format.
[0105] After obtaining the sample structured description information corresponding to the sample image through the above steps, the image information extraction model can be trained according to the sample image and the sample structured description information. Specifically, the sample image is input into the image information extraction model. At this time, the image information extraction model can be understood as the above-mentioned multimodal large language model, which has the ability to output a preset format according to the sample image. The sample image is input into the image information extraction model for processing, and the image information extraction model can predict the structured description information according to the sample image output.
[0106] The predicted structured description information can be understood as the description information output by the untrained image information extraction model according to the input sample image, and its data structure corresponds to the pre-defined character format.
[0107] At this time, the image information extraction model is a model that has not been trained yet. There is still a difference between the predicted structured description information and the sample structured description information output by it. The model loss value needs to be calculated based on the predicted structured description information and the sample structured description information. In the method provided in the embodiments of this specification, there are many ways to calculate the model loss value, such as the cross entropy loss function, the maximum loss function, the average loss function, and the like. In the implementation mode provided in this specification, the specific method of the loss function is not limited, and the actual application shall prevail.
[0108] After obtaining the model loss value, back propagation can be performed in the image information extraction model according to the model loss value to adjust the model parameters in the image information extraction model. The above steps can then be repeated to continue training the image information extraction model until the model training stop condition is reached. In practical applications, the model training stop conditions of the initial image processing model include:
[0109] The model loss value is less than the preset threshold, and / or the training rounds reach the preset training rounds.
[0110] Specifically, in the process of training the image information extraction model, the training stop condition of the model can be set to a model loss value that is less than a preset threshold. That is, when the model loss value is less than the preset threshold, there is no need to adjust the model parameters of the image information extraction model.
[0111] The model training stop condition of the image information extraction model can also be set to that the training rounds reach a preset training round. For example, the preset training rounds are 10 rounds. When the model training rounds reach 10 rounds, the model training stop condition is reached.
[0112] In the method provided in this specification, there is no limitation on the model training stop condition. When the image information extraction model reaches the model training stop condition, it means that the image information extraction model training is completed and the final image information extraction model is obtained.
[0113] Step 106: Determine object position information corresponding to each object according to the image to be processed and the initial structured description information.
[0114] Among them, object position information can be understood as the position information of the object in the image to be processed. Although the image information extraction model also has a certain object positioning ability, its positioning effect is poor. In order to facilitate downstream tasks to extract corresponding image description information from the image to be processed, it is necessary to further obtain more accurate object position information of each object.
[0115] In this embodiment, after the initial structured description information is obtained, the object position information corresponding to each object in the image to be processed can be further determined based on at least one object in the initial structured description information and the object description information of each object. Specifically, the object position information of each object in the image to be processed can be marked in the form of a marking box.
[0116] In a specific implementation provided in this specification, determining the object position information corresponding to each object according to the image to be processed and the initial structured description information includes:
[0117] S1062: Acquire the object to be processed in the initial structured description information and the object description information to be processed corresponding to the object to be processed, wherein the object to be processed is any one of the at least one object.
[0118] In practical applications, the initial structured description information includes at least one object and object description information corresponding to each object. In this embodiment, one of the objects is taken as an example for explanation, and the object to be processed is the object to be processed, and the object description information to be processed is the object description information corresponding to the object to be processed. Specifically, the object to be processed and the object description information to be processed corresponding to the object to be processed can be selected from the object list.
[0119] The object to be processed may be any one of the objects, and the processing between the objects may be performed in parallel or sequentially. In the embodiments provided in this specification, the processing order between the objects is not limited.
[0120] S1064: Determine at least one candidate object marking box in the image to be processed according to the object to be processed.
[0121] After the object to be processed is determined, at least one candidate object marking box can be determined in the image to be processed according to the object to be processed. The candidate object marking box (bounding box) is a marking box for the object generated in the image in the detection and positioning task, which can mark the position information of the object in the image.
[0122] In a specific implementation provided in the embodiments of this specification, a candidate object marking frame may be generated by a positioning model, and at least one candidate object marking frame is determined in the image to be processed according to the object to be processed, including:
[0123] The object to be processed and the image to be processed are input into a positioning model to obtain at least one candidate object marking box determined by the positioning model in the image to be processed according to the object to be processed.
[0124] The positioning model can be understood as a model that performs positioning marking in an image based on input information. The positioning model can mark the object corresponding to the information in the image to be processed based on the input information. For example, taking the object to be processed as "man" as an example, the object to be processed and the image to be processed are input into the positioning model, and the positioning model marks the candidate object marking box related to "man" in the image to be processed.
[0125] At this time, the positioning model can only mark at least one candidate marking frame in the image to be processed according to the input object to be processed, but it is difficult for the positioning model to distinguish different individuals of the same category. For example, when the object to be processed is "man", the positioning model can only mark multiple man objects in the image to be processed, but cannot distinguish the difference between each man. Therefore, the method provided in the embodiment of this specification needs to further screen the candidate object marking frame determined by the positioning model to obtain the final target object marking frame.
[0126] In a specific implementation provided in this specification, determining at least one candidate object marking frame in the image to be processed according to the object to be processed includes:
[0127] Inputting the object to be processed and the image to be processed into a positioning model, obtaining at least one initial candidate object marking box determined by the positioning model according to the object to be processed in the image to be processed;
[0128] The object to be processed and each initial candidate object marking frame are input into a multimodal large language model to obtain at least one candidate object marking frame output by the multimodal large language model, wherein the multimodal large language model filters each initial candidate object marking frame according to the object to be processed.
[0129] In practical applications, the candidate object marking boxes may be significantly different from the object to be processed. In order to improve the processing efficiency in the subsequent processing, a multimodal large language model can be used to screen the candidate object marking boxes.
[0130] Specifically, the object to be processed and the image to be processed are first input into the positioning model, and the positioning model outputs at least one initial candidate object marking box. At this time, the candidate object marking box may have a marking box with positioning errors due to the accuracy of the positioning model. The object to be processed and the initial candidate object marking boxes can be input into the multimodal large language model for screening, and the initial candidate marking boxes that obviously do not match the object to be processed are deleted, and the candidate marking boxes that match the object to be processed are retained.
[0131] In one or more specific implementations provided in the present specification, the object to be processed and each initial candidate marking frame may be input together into a multimodal large language model for screening, and the multimodal large language model outputs a candidate marking frame that matches the object to be processed; or an initial candidate marking frame may be selected from multiple initial candidate object marking frames, and the selected initial candidate marking frame and the object to be processed may be input into the multimodal large language model for screening, and the multimodal large language model determines the degree of match between the initial candidate marking frame and the object to be processed, and uses the initial candidate marking frame whose degree of match meets a preset threshold as the candidate marking frame.
[0132] S1066: Determine a target object marking frame in at least one candidate object marking frame according to the description information of the object to be processed, and determine marking frame position information of the target object marking frame.
[0133] In the method provided in the embodiment of the present specification, the description information of the object to be processed is used to select a target object mark frame from at least one candidate object mark frame. The description information of the object to be processed is a detailed description of the object to be processed, and the description information of the object to be processed can assist in selecting the target object mark frame from the candidate object mark frames and determine the mark frame position information of the target object mark frame.
[0134] Specifically, determining a target object marking frame in at least one candidate object marking frame according to the description information of the object to be processed includes:
[0135] Calculating the matching similarity between the description information of the object to be processed and the marking boxes of each candidate object;
[0136] The candidate object marking box whose matching similarity meets the preset conditions is determined as the target object marking box.
[0137] In one or more embodiments provided in this specification, the matching similarity between the description information of the object to be processed and the marking frame of each candidate object is calculated. The matching similarity represents the similarity between the description information of the object to be processed and the marking frame of the candidate object. The higher the matching similarity, the more the object to be processed matches the marking frame of the candidate object. Conversely, the less the object to be processed matches the marking frame of the candidate object.
[0138] After calculating the matching similarity of each candidate object marking frame, the candidate object marking frame corresponding to the matching similarity that meets the preset condition is used as the target object marking frame. The preset condition can be understood as the condition for selecting the target object marking frame from multiple candidate object marking frames. For example, the preset condition can be that the candidate object marking frame with the highest matching similarity is the target object marking frame. After determining the target object frame, the corresponding marking frame position information can be determined according to the target object frame.
[0139] S1068: Determine the marking box position information as the object position information corresponding to the object to be processed.
[0140] After the marking frame position information is determined, the marking frame position information is determined as the object position information corresponding to the object to be processed.
[0141] See also Figure 4 , Figure 4 A schematic diagram of object positioning provided by an embodiment of the present application is shown. Figure 4 As shown, the image to be processed is input into the image information extraction model for extraction, and the initial structured description information output by the image information extraction model is obtained. The initial structured description information includes an object list, and the object list includes at least one object included in the image to be processed and the object description information of each object.
[0142] The object to be processed "person" is selected from the object list, and its corresponding description information of the object to be processed is "wearing a hat". Since the positioning model can only process object names, the object to be processed "person" is input into the positioning model. The positioning model locates the object to be processed "person" in the image to be processed and generates four initial candidate marking boxes.
[0143] The four initial candidate marker boxes and the object to be processed "person" are input into the multimodal large language model for screening, and the initial candidate marker boxes that obviously do not match the object to be processed "person" are deleted to determine three candidate marker boxes.
[0144] The three candidate marking frames are matched with the description information of the object to be processed "wearing a hat" respectively, and the candidate marking frame with the highest matching information is selected as the target marking frame, and the target marking frame is marked in the image to be processed.
[0145] Step 108: generating structured image description information corresponding to the image to be processed according to the initial structured description information and the object position information corresponding to each object.
[0146] After determining the object position information corresponding to each object, each object position information can be added to the initial structured description information to correspond to each object one by one. The generated final structured image description information includes not only each object and the object description information of each object, but also the object position information corresponding to each object.
[0147] The structured image description information with the location information of each object added can describe the image to be processed from multiple dimensions, so that downstream tasks can select corresponding sub-information from the structured image description information according to different task requirements and perform subsequent downstream tasks. Specifically, in another specific implementation provided in this specification, the method also includes:
[0148] Receiving a data request instruction of a downstream task, wherein the data request instruction carries data request information;
[0149] In response to the data request information, image description sub-information is extracted from the structured image description information, and the image description sub-information is sent to the downstream task.
[0150] Among them, the downstream tasks can be understood as other image processing tasks that need to rely on structured image description information. Different downstream tasks can perform different operations on the images to be processed, so different downstream tasks obtain different information from the images to be processed. After receiving the data request instruction of the downstream task, the structured image description information can be screened according to the data request information in the data request instruction, and the image description sub-information corresponding to the data request information can be extracted, and the image description sub-information is sent to the downstream task, so that the multimodal model of the downstream task can perform the corresponding downstream task according to the image description sub-information.
[0151] The image processing method provided in the embodiments of the present specification includes obtaining an image to be processed; inputting the image to be processed into an image information extraction model to obtain initial structured description information output by the image information extraction model, wherein the initial structured description information includes at least one object and object description information of each object; determining object position information corresponding to each object based on the image to be processed and the initial structured description information; and generating structured image description information corresponding to the image to be processed based on the initial structured description information and the object position information corresponding to each object.
[0152] The image information extraction model generates initial structured description information corresponding to the image to be processed in a preset format. According to at least one object in the initial structured description information and the object description information corresponding to each object, the object position information of each object in the image to be processed can be determined, and the final structured image description information is determined according to the initial structured description information and the object position information of each object. The image content is described in a specific structured description image manner, which facilitates the subsequent extraction of relevant information from the structured image description information.
[0153] Secondly, the image information extraction model is trained based on a specific structured description of the image. Using the ICL method, only the corresponding target information type instance is provided for the target information type, so that the image information extraction model can learn the preset string format well, and then output the initial structured description information according to the preset string format. This reduces the training cost and simplifies the learning process.
[0154] Finally, each object is located in the image to be processed through the initial structured description information and the positioning model, and the corresponding position information of each object is determined. This allows for a better description of each object in the initial structured description information, and further improves the convenience of subsequent downstream tasks in obtaining information from the structured image description information.
[0155] Figure 5 A processing framework diagram of an image processing method provided by an embodiment of this specification is shown, such as Figure 5 As shown, in the method provided by the embodiment of this specification, a preset structured description template is designed by a preset string format. The preset structured description template is used to generate sample structured description information through a multimodal large language model, and the sample structured description information and the sample image are used to train the image information extraction model, so that the image information extraction model has the ability to output structured description information according to the input image.
[0156] After the model training is completed, the image to be processed is input into the trained image information extraction model to obtain the initial structured description information output by the image information extraction model. The initial structured description information here includes at least one object and the object description information corresponding to each object, but does not include the position information of each object in the image to be processed.
[0157] Then, based on the objects and object description information, the location information of each object in the image to be processed is obtained through positioning processing of the positioning model, and the location information of each object is added to the initial structured description information to generate the final structured image description information. The structured image description information includes at least one object, object description information of each object, and object location information.
[0158] Figure 6 A flow chart of an image processing method applied to a cloud-side device provided in an embodiment of the present specification is shown. The method is applied to a cloud-side device and specifically includes:
[0159] Step 602: receiving an image to be processed sent by a terminal-side device.
[0160] Step 604: input the image to be processed into an image information extraction model to obtain initial structured description information output by the image information extraction model, wherein the initial structured description information includes at least one object and object description information of each object.
[0161] Step 606: Determine object position information corresponding to each object according to the image to be processed and the initial structured description information.
[0162] Step 608: Generate structured image description information corresponding to the image to be processed according to the initial structured description information and the object position information corresponding to each object.
[0163] Step 610: Send the structured image description information to the terminal device.
[0164] In a specific implementation provided in this specification, the method further includes:
[0165] An information processing instruction sent by a receiving end-side device in response to the structured image description information;
[0166] processing the structured image description information in response to the information processing instruction to obtain image description adjustment information;
[0167] The image description adjustment information is sent to the terminal side device.
[0168] In practical applications, since the image information extraction model is a multimodal large language model, it requires good computing resources during operation, and the end-side device may not have the corresponding processing capabilities. Therefore, the image information extraction model can be deployed on the cloud-side device, that is, the image processing process provided in the embodiment of this specification is implemented on the cloud-side device. After obtaining the structured image description information generated by the image information extraction model, the cloud-side device can also send the structured image description information to the end-side device.
[0169] The image processing method provided in the embodiments of this specification generates initial structured description information corresponding to the image to be processed according to a preset format through an image information extraction model, and can determine the object position information of each object in the image to be processed according to at least one object in the initial structured description information and the object description information corresponding to each object, and determine the final structured image description information according to the initial structured description information and the object position information of each object. The content of the image is described by a specific structured description image method, which facilitates the subsequent extraction of relevant information from the structured image description information.
[0170] Secondly, the image information extraction model is trained based on a specific structured description of the image. Using the ICL method, only the corresponding target information type instance is provided for the target information type, so that the image information extraction model can learn the preset string format well, and then output the initial structured description information according to the preset string format. This reduces the training cost and simplifies the learning process.
[0171] Finally, each object is located in the image to be processed through the initial structured description information and the positioning model, and the corresponding position information of each object is determined. This allows for a better description of each object in the initial structured description information, and further improves the convenience of subsequent downstream tasks in obtaining information from the structured image description information.
[0172] Corresponding to the above method embodiment, this specification also provides an image processing device embodiment, Figure 7 FIG. 2 shows a schematic diagram of the structure of an image processing device provided by an embodiment of the present specification. Figure 7 As shown, the device comprises:
[0173] An acquisition module 702 is configured to acquire an image to be processed;
[0174] The information extraction module 704 is configured to input the image to be processed into an image information extraction model to obtain initial structured description information output by the image information extraction model, wherein the initial structured description information includes at least one object and object description information of each object;
[0175] A determination module 706 is configured to determine object position information corresponding to each object according to the image to be processed and the initial structured description information;
[0176] The generating module 708 is configured to generate structured image description information corresponding to the image to be processed according to the initial structured description information and the object position information corresponding to each object.
[0177] Optionally, the information extraction module 704 is configured to:
[0178] Initial graph structure description information output by the image information extraction model is obtained, wherein the initial graph structure description information includes at least one object node and object description information corresponding to each object node.
[0179] Optionally, the device further comprises a training module configured to:
[0180] Acquire a sample image and sample structured description information corresponding to the sample image, wherein the sample structured description information is generated by a preset structured description template;
[0181] Inputting the sample image into an image information extraction model to obtain predicted structured description information output by the image information extraction model;
[0182] Calculating a model loss value according to the sample structured description information and the predicted structured description information;
[0183] The model parameters of the image information extraction model are adjusted according to the model loss value, and the image information extraction model is continuously trained until the model training stop condition is reached.
[0184] Optionally, the training module is further configured to:
[0185] Obtain sample images and preset structured description templates;
[0186] The sample image and the preset structured description template are input into a multimodal large language model to obtain sample structured description information output by the multimodal large language model.
[0187] Optionally, the preset structured description template includes at least one type of preset identification characters, and the preset identification characters represent the information type in the preset structured description template.
[0188] Optionally, the preset structured description template includes a target information type instance corresponding to the target information type.
[0189] Optionally, the determining module 706 is further configured to:
[0190] Acquire an object to be processed in the initial structured description information and object description information to be processed corresponding to the object to be processed, wherein the object to be processed is any one of the at least one object;
[0191] Determine at least one candidate object marking frame in the image to be processed according to the object to be processed;
[0192] Determine a target object mark frame in at least one candidate object mark frame according to the description information of the object to be processed, and determine mark frame position information of the target object mark frame;
[0193] The marking frame position information is determined as the object position information corresponding to the object to be processed.
[0194] Optionally, the determining module 706 is further configured to:
[0195] The object to be processed and the image to be processed are input into a positioning model to obtain at least one candidate object marking box determined by the positioning model in the image to be processed according to the object to be processed.
[0196] Optionally, the determining module 706 is further configured to:
[0197] Inputting the object to be processed and the image to be processed into a positioning model, obtaining at least one initial candidate object marking box determined by the positioning model according to the object to be processed in the image to be processed;
[0198] The object to be processed and each initial candidate object marking frame are input into a multimodal large language model to obtain at least one candidate object marking frame output by the multimodal large language model, wherein the multimodal large language model filters each initial candidate object marking frame according to the object to be processed.
[0199] Optionally, the determining module 706 is further configured to:
[0200] Calculating the matching similarity between the description information of the object to be processed and the marking boxes of each candidate object;
[0201] The candidate object marking box whose matching similarity meets the preset conditions is determined as the target object marking box.
[0202] Optionally, the initial structured description information also includes overall image description information of the image to be processed and association relationships between objects.
[0203] Optionally, the device further includes an information extraction module configured to:
[0204] Receiving a data request instruction of a downstream task, wherein the data request instruction carries data request information;
[0205] In response to the data request information, image description sub-information is extracted from the structured image description information, and the image description sub-information is sent to the downstream task.
[0206] The image processing device provided in the embodiments of the present specification includes acquiring an image to be processed; inputting the image to be processed into an image information extraction model to obtain initial structured description information output by the image information extraction model, wherein the initial structured description information includes at least one object and object description information of each object; determining object position information corresponding to each object based on the image to be processed and the initial structured description information; and generating structured image description information corresponding to the image to be processed based on the initial structured description information and the object position information corresponding to each object.
[0207] The image information extraction model generates initial structured description information corresponding to the image to be processed in a preset format. According to at least one object in the initial structured description information and the object description information corresponding to each object, the object position information of each object in the image to be processed can be determined, and the final structured image description information is determined according to the initial structured description information and the object position information of each object. The image content is described in a specific structured description image manner, which facilitates the subsequent extraction of relevant information from the structured image description information.
[0208] Secondly, the image information extraction model is trained based on a specific structured description of the image. Using the ICL method, only the corresponding target information type instance is provided for the target information type, so that the image information extraction model can learn the preset string format well, and then output the initial structured description information according to the preset string format. This reduces the training cost and simplifies the learning process.
[0209] Finally, each object is located in the image to be processed through the initial structured description information and the positioning model, and the corresponding position information of each object is determined. This allows for a better description of each object in the initial structured description information, and further improves the convenience of subsequent downstream tasks in obtaining information from the structured image description information.
[0210] The above is a schematic scheme of an image processing device of this embodiment. It should be noted that the technical scheme of the image processing device and the technical scheme of the above-mentioned image processing method belong to the same concept, and the details not described in detail in the technical scheme of the image processing device can be referred to the description of the technical scheme of the above-mentioned image processing method.
[0211] Corresponding to the above method embodiment, this specification also provides an image processing device embodiment, Figure 8 FIG. 1 shows a schematic diagram of a structure of an image processing device applied to a cloud-side device provided by an embodiment of the present specification. Figure 8 As shown, the device is applied to a cloud-side device, including:
[0212] The receiving module 802 is configured to receive the image to be processed sent by the terminal device;
[0213] The information extraction module 804 is configured to input the image to be processed into an image information extraction model to obtain initial structured description information output by the image information extraction model, wherein the initial structured description information includes at least one object and object description information of each object;
[0214] A determination module 806 is configured to determine object position information corresponding to each object according to the image to be processed and the initial structured description information;
[0215] A generating module 808 is configured to generate structured image description information corresponding to the image to be processed according to the initial structured description information and object position information corresponding to each object;
[0216] The sending module 810 is configured to send the structured image description information to the terminal device.
[0217] Optionally, the device further includes an adjustment module configured to:
[0218] An information processing instruction sent by a receiving end-side device in response to the structured image description information;
[0219] processing the structured image description information in response to the information processing instruction to obtain image description adjustment information;
[0220] The image description adjustment information is sent to the terminal side device.
[0221] The image processing device provided in the embodiment of the present specification generates initial structured description information corresponding to the image to be processed according to a preset format through an image information extraction model, and can determine the object position information of each object in the image to be processed according to at least one object in the initial structured description information and the object description information corresponding to each object, and determine the final structured image description information according to the initial structured description information and the object position information of each object. The content of the image is described by a specific structured description image method, which facilitates the subsequent extraction of relevant information from the structured image description information.
[0222] Secondly, the image information extraction model is trained based on a specific structured description of the image. Using the ICL method, only the corresponding target information type instance is provided for the target information type, so that the image information extraction model can learn the preset string format well, and then output the initial structured description information according to the preset string format. This reduces the training cost and simplifies the learning process.
[0223] Finally, each object is located in the image to be processed through the initial structured description information and the positioning model, and the corresponding position information of each object is determined. This allows for a better description of each object in the initial structured description information, and further improves the convenience of subsequent downstream tasks in obtaining information from the structured image description information.
[0224] The above is a schematic scheme of an image processing device of this embodiment. It should be noted that the technical scheme of the image processing device and the technical scheme of the above-mentioned image processing method belong to the same concept, and the details not described in detail in the technical scheme of the image processing device can be referred to the description of the technical scheme of the above-mentioned image processing method.
[0225] See also Fig. 9 , Fig. 9 An architecture diagram of an image processing system provided by an embodiment of the present specification is shown, and the image processing system may include a client 100 and a server 200;
[0226] The client 100 is used to send the image to be processed to the server 200;
[0227] The server 200 is used to input the image to be processed into the image information extraction model, obtain the initial structured description information output by the image information extraction model, wherein the initial structured description information includes at least one object and object description information of each object; determine the object position information corresponding to each object according to the image to be processed and the initial structured description information; generate the structured image description information corresponding to the image to be processed according to the initial structured description information and the object position information corresponding to each object; and send the structured image description information to the client 100;
[0228] The client 100 is also used to receive the structured image description information sent by the server 200.
[0229] The image processing system may include multiple clients 100 and a server 200, wherein the client 100 may be referred to as a client-side device and the server 200 may be referred to as a cloud-side device. Multiple clients 100 may establish a communication connection through the server 200. In the image processing scenario, the server 200 is used to provide image processing services between multiple clients 100. Multiple clients 100 may serve as a sender or a receiver, respectively, and realize communication through the server 200.
[0230] The user can interact with the server 200 through the client 100 to receive data sent by other clients 100, or send data to other clients 100, etc. In the image processing scenario, the user can publish a data stream to the server 200 through the client 100, and the server 200 generates structured image description information according to the data stream and pushes the structured image description information to other clients that have established communication.
[0231] The client 100 and the server 200 are connected via a network. The network provides a medium for a communication link between the client 100 and the server 200. The network may include various connection types, such as wired or wireless communication links or optical fiber cables, etc. The data transmitted by the client 100 may need to be encoded, transcoded, compressed, etc. before being released to the server 200.
[0232] The client 100 can be a browser, an APP (Application), or a web application such as an H5 (HyperText Markup Language 5, Hypertext Markup Language Version 5) application, or a light application (also known as a mini-program, a lightweight application) or a cloud application, etc. The client 100 can be based on the software development kit (SDK, Software Development Kit) of the corresponding service provided by the server 200, such as based on the real-time communication (RTC, Real Time Communication) SDK development and acquisition. The client 100 can be deployed in an electronic device, and needs to rely on the device to run or some APPs in the device to run. For example, the electronic device can have a display screen and support information browsing, such as a personal mobile terminal such as a mobile phone, a tablet computer, a personal computer, etc. Various other types of applications can also be configured in the electronic device, such as human-computer dialogue applications, model training applications, text processing applications, web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0233] The server 200 may include servers that provide various services, such as servers that provide communication services to multiple clients, servers for background training that provide support for models used on clients, and servers that process data sent by clients. It should be noted that the server 200 can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. The server can also be a server of a distributed system, or a server combined with a blockchain. The server can also be a cloud server for basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks (CDN, Content Delivery Network), and big data and artificial intelligence platforms, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology.
[0234] It is worth noting that the image processing method provided in the embodiments of this specification is generally executed by the server, but in other embodiments of this specification, the client may also have similar functions to the server, thereby executing the image processing method provided in the embodiments of this specification. In other embodiments, the image processing method provided in the embodiments of this specification may also be jointly executed by the client and the server.
[0235] Fig.10The block diagram of a computing device 1000 according to an embodiment of the present specification is shown. The components of the computing device 1000 include but are not limited to a memory 1010 and a processor 1020. The processor 1020 is connected to the memory 1010 via a bus 1030, and the database 1050 is used to store data.
[0236] The computing device 1000 also includes an access device 1040 that enables the computing device 1000 to communicate via one or more networks 1060. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 1040 may include one or more of any type of network interface (e.g., a network interface card (NIC)) of wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a world-wide interoperability for microwave access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, and a near field communication (NFC).
[0237] In one embodiment of the present specification, the above components of the computing device 1000 and Fig.10 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Fig.10 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.
[0238] The computing device 1000 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 1000 may also be a mobile or stationary server.
[0239] The processor 1020 is used to execute the following computer program / instructions, which implement the steps of the above-mentioned image processing method when executed by the processor.
[0240] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the computing device embodiment, since it is basically similar to the image processing method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the image processing method embodiment.
[0241] An embodiment of the present specification further provides a computer-readable storage medium storing a computer program / instruction, which implements the steps of the above-mentioned image processing method when executed by a processor.
[0242] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the computer-readable storage medium embodiment, since it is basically similar to the image processing method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the image processing method embodiment.
[0243] An embodiment of the present specification further provides a computer program product, including a computer program / instruction, which implements the steps of the above-mentioned image processing method when executed by a processor.
[0244] The above is a schematic solution of a computer program product of this embodiment. It should be noted that the technical solution of the computer program product and the technical solution of the above-mentioned image processing method belong to the same concept, and the details not described in detail in the technical solution of the computer program product can be referred to the description of the technical solution of the above-mentioned image processing method.
[0245] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0246] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0247] It should be noted that the above is a description of a specific embodiment of the present specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of the present specification.
[0248] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0249] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The optional embodiments do not describe all the details in detail, nor do they limit the invention to only the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that technicians in the relevant technical field can well understand and use this specification. This specification is only limited by the claims and their full scope and equivalents.
Claims
1. An image processing method, comprising: Get the image to be processed; Inputting the image to be processed into an image information extraction model to obtain initial structured description information output by the image information extraction model, wherein the initial structured description information includes at least one object and object description information of each object; Determining object position information corresponding to each object according to the image to be processed and the initial structured description information; The structured image description information corresponding to the image to be processed is generated according to the initial structured description information and the object position information corresponding to each object.
2. The method according to claim 1, obtaining the initial structured description information output by the image information extraction model, comprising: Initial graph structure description information output by the image information extraction model is obtained, wherein the initial graph structure description information includes at least one object node and object description information corresponding to each object node.
3. The method according to claim 1, wherein the image information extraction model is obtained by training through the following steps: Obtain a sample image and sample structured description information corresponding to the sample image, wherein: The sample structured description information is generated by a preset structured description template; Inputting the sample image into an image information extraction model to obtain predicted structured description information output by the image information extraction model; Calculating a model loss value according to the sample structured description information and the predicted structured description information; The model parameters of the image information extraction model are adjusted according to the model loss value, and the image information extraction model is continuously trained until the model training stop condition is reached.
4. The method according to claim 3, obtaining a sample image and sample structured description information corresponding to the sample image, comprising: Obtain sample images and preset structured description templates; The sample image and the preset structured description template are input into a multimodal large language model to obtain sample structured description information output by the multimodal large language model.
5. The method according to claim 4, wherein the preset structured description template comprises at least one type of preset identification characters, and the preset identification characters represent the type of information in the preset structured description template.
6. The method according to claim 5, wherein the preset structured description template includes a target information type instance corresponding to the target information type.
7. The method according to any one of claims 1 to 6, wherein determining the object position information corresponding to each object according to the image to be processed and the initial structured description information comprises: Acquire an object to be processed in the initial structured description information and object description information to be processed corresponding to the object to be processed, wherein the object to be processed is any one of the at least one object; Determine at least one candidate object marking frame in the image to be processed according to the object to be processed; Determine a target object mark frame in at least one candidate object mark frame according to the description information of the object to be processed, and determine mark frame position information of the target object mark frame; The marking frame position information is determined as the object position information corresponding to the object to be processed.
8. The method according to claim 7, wherein determining at least one candidate object marking frame in the image to be processed according to the object to be processed comprises: The object to be processed and the image to be processed are input into a positioning model to obtain at least one candidate object marking box determined by the positioning model in the image to be processed according to the object to be processed.
9. The method according to claim 7, wherein determining at least one candidate object marking frame in the image to be processed according to the object to be processed comprises: Inputting the object to be processed and the image to be processed into a positioning model, obtaining at least one initial candidate object marking box determined by the positioning model according to the object to be processed in the image to be processed; The object to be processed and each initial candidate object marking frame are input into a multimodal large language model to obtain at least one candidate object marking frame output by the multimodal large language model, wherein the multimodal large language model filters each initial candidate object marking frame according to the object to be processed.
10. The method according to claim 7, determining a target object marking frame in at least one candidate object marking frame according to the description information of the object to be processed, comprising: Calculating the matching similarity between the description information of the object to be processed and the marking boxes of each candidate object; The candidate object marking box whose matching similarity meets the preset conditions is determined as the target object marking box.
11. The method according to any one of claims 1 to 6, wherein the initial structured description information further includes overall image description information of the image to be processed and association relationships between objects.
12. The method according to any one of claims 1 to 6, further comprising: receiving a data request instruction of a downstream task, wherein the data request instruction carries data request information; In response to the data request information, image description sub-information is extracted from the structured image description information, and the image description sub-information is sent to the downstream task.
13. An image processing method, applied to a cloud-side device, comprising: An image to be processed sent by a receiving device; Inputting the image to be processed into an image information extraction model to obtain initial structured description information output by the image information extraction model, wherein the initial structured description information includes at least one object and object description information of each object; Determining object position information corresponding to each object according to the image to be processed and the initial structured description information; Generating structured image description information corresponding to the image to be processed according to the initial structured description information and object position information corresponding to each object; The structured image description information is sent to the terminal device.
14. The method of claim 13, further comprising: An information processing instruction sent by a receiving end-side device in response to the structured image description information; processing the structured image description information in response to the information processing instruction to obtain image description adjustment information; The image description adjustment information is sent to the terminal side device.
15. An image processing device, comprising: An acquisition module is configured to acquire an image to be processed; An information extraction module is configured to input the image to be processed into an image information extraction model to obtain initial structured description information output by the image information extraction model, wherein the initial structured description information includes at least one object and object description information of each object; A determination module, configured to determine object position information corresponding to each object according to the image to be processed and the initial structured description information; The generating module is configured to generate structured image description information corresponding to the image to be processed according to the initial structured description information and object position information corresponding to each object.
16. A computing device comprising: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer program / instructions are executed by the processor, the steps of the method described in any one of claims 1 to 14 are implemented.
17. A computer-readable storage medium storing a computer program / instruction, wherein the computer program / instruction, when executed by a processor, implements the steps of the method according to any one of claims 1 to 14.
18. A computer program product, comprising a computer program / instruction, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 14.
Citation Information
Cited By
Image generation method and device based on large model, electronic equipment and storage medium
CN119444934A
Model training method and system, data processing method and system and storage medium
CN119886362A
Image processing method and device, electronic equipment and storage medium
CN121353697A
Image processing method and apparatus
WO2026007670A1
