Image recognition method, electronic equipment and storage medium

By checking and correcting the description text generated by the artificial intelligence big model, generating prompt words and performing the next round of recognition, the problem of low accuracy of image recognition results is solved and higher recognition accuracy is achieved.

CN119128194APending Publication Date: 2024-12-13WU HAN XIN ZHI SHU ZI KE JI YOU XIAN GONG SI

Patent Information

Application Number
CN202411353095.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-26
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

The description text generated by existing artificial intelligence models during image recognition is difficult to accurately describe the image content, resulting in low accuracy of the recognition results.

Method used

By obtaining the description text generated by the artificial intelligence model on the target image, checking it according to the preset verification rules, if the verification is not passed, the prompt word is generated by correction, and the next round of recognition is performed based on the prompt word, Improve the accuracy of identification results.

Benefits of technology

The accuracy of image recognition results is improved, and the accuracy of description of image content is enhanced through multiple rounds of recognition and correction processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119128194A_ABST
    Figure CN119128194A_ABST
Patent Text Reader

Abstract

The invention provides an image recognition method, electronic equipment and a storage medium. The method comprises the following steps: acquiring a description text generated by identifying a target image by an artificial intelligence large model; verifying the accuracy of the description text according to a preset verification rule; under the condition that the verification is not passed, correcting the description text to generate a cue word of the target image; and based on the cue word of the target image, utilizing the artificial intelligence large model to carry out next round of identification on the target image. In the method, after a description text generated by identifying a target image by an artificial intelligence large model is obtained, the accuracy of the description text is verified according to a preset verification rule, and the prompt word of the target image is further generated under the condition that the verification is not passed, so that the accuracy of the description text is improved. And the next round of recognition is carried out on the target image based on the cue word of the target image, so that the accuracy of the recognition result of the target image can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, specifically, an image recognition method, an electronic device and a storage medium. Background Art

[0002] With the development of science and technology, image recognition technologies need to be applied in many scenarios in daily life. For example, in automatic vending machines, product images need to be recognized, and in airport security checks, facial images need to be recognized.

[0003] At present, large artificial intelligence models such as GPT can be used to recognize images, thereby generating a description text of the image. The description text is used as the recognition result of the image, and its purpose is to describe the content of the image. However, in practical applications, the description text generated by the current large artificial intelligence models for image recognition is usually difficult to accurately describe the content of the image. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide an image recognition method, an electronic device and a storage medium to solve the problems in the prior art.

[0005] A first aspect of an embodiment of the present application provides an image recognition method, comprising:

[0006] Obtain the description text generated by the artificial intelligence large model for identifying the target image;

[0007] Verifying the accuracy of the description text according to preset verification rules;

[0008] If the verification fails, the description text is modified to generate a prompt word of the target image;

[0009] Based on the prompt words of the target image, the artificial intelligence large model is used to perform the next round of recognition on the target image.

[0010] Preferably, the method further comprises:

[0011] Obtain the new description text generated by the next round of recognition;

[0012] The accuracy of the new description text is verified according to preset verification rules. If the verification is passed, the loop is terminated and the new description text is used as the recognition result of the target image; or, if the verification is not passed, the new description text is corrected to generate a new prompt word for the target image, and based on the new prompt word for the target image, the artificial intelligence large model is used to perform the next round of recognition on the target image.

[0013] Preferably, the method further comprises: in the case of passing the verification, determining the description text as the recognition result of the target image.

[0014] Preferably, the accuracy of the description text is verified according to a preset verification rule, specifically including:

[0015] Determining a first classification category of the target image and estimated elements contained in the target image according to the description text;

[0016] Acquire the actual classification category of the target image and the elements actually contained in the target image;

[0017] The first classification category is compared with the actual classification category of the target image, and the estimated elements contained in the target image are compared with the actual elements contained therein, and the accuracy of the description text is verified based on the comparison results.

[0018] Preferably, the first classification category is compared with the actual classification category of the target image, and the estimated elements contained in the target image are compared with the actual elements contained therein, and the accuracy of the description text is verified according to the comparison results, which specifically includes:

[0019] By comparing the first classification category with the actual classification category, determining whether the first classification category matches the actual classification category;

[0020] If they do not match, the verification fails;

[0021] If they match, then comparing the estimated elements contained in the target image with the actual elements contained therein to determine whether the estimated elements contained in the target image match the actual elements contained therein;

[0022] If they do not match, the verification fails;

[0023] If they match, the verification passes.

[0024] Preferably, in the case of failure to pass the verification, the description text is modified to generate a prompt word of the target image, specifically including:

[0025] In the case of failure to pass the verification, the description text is corrected using the actual classification category and the elements actually contained in the target image;

[0026] Keywords are extracted from the modified description text to serve as prompt words for the target image.

[0027] Preferably, the description text is corrected using the actual classification category and the elements actually contained in the target image, specifically including:

[0028] Adding a first annotation including the actual classification category to the description text;

[0029] Determining missing elements and redundant elements in the description text according to the elements actually contained in the target image;

[0030] A second annotation is generated in the description text according to the missing element and the redundant element.

[0031] Preferably, based on the prompt word of the target image, the artificial intelligence big model is used to perform the next round of recognition on the target image, specifically including: inputting the prompt word and the target image into the artificial intelligence big model, so as to perform the next round of recognition on the target image using the artificial intelligence big model.

[0032] A second aspect of an embodiment of the present application provides an electronic device, including:

[0033] Memory for storing computer programs;

[0034] A processor is used to execute any one of the methods described in the method embodiments of the present application.

[0035] A third aspect of an embodiment of the present application provides a storage medium, including: a program, which, when executed on an electronic device, enables the electronic device to execute any one of the methods in the method embodiments of the present application.

[0036] The method provided by the embodiment of the present application includes first obtaining the description text generated by the artificial intelligence large model for identifying the target image, and then verifying the accuracy of the description text according to the preset verification rules. If the verification fails, the description text is modified to generate the prompt word of the target image, and then the artificial intelligence large model is used to perform the next round of recognition on the target image based on the prompt word of the target image. In this method, after obtaining the description text generated by the artificial intelligence large model for identifying the target image, the accuracy of the description text is verified according to the preset verification rules, and if the verification fails, the prompt word of the target image is further generated, and then the next round of recognition of the target image is performed based on the prompt word of the target image, thereby improving the accuracy of the target image recognition result. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0038] Figure 1 A schematic diagram of the structure of an electronic device provided in one embodiment of the present application.

[0039] Figure 2 A schematic diagram of a specific process of an image recognition method provided in one embodiment of the present application;

[0040] Figure 3 A schematic diagram of the specific structure of an image recognition device provided in another embodiment of the present application. DETAILED DESCRIPTION

[0041] The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings in the embodiments of the present application. In the description of the present application, terms such as "first", "second", "third", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance or sequence.

[0042] As mentioned above, currently, an artificial intelligence big model can usually be used to recognize an image, thereby generating a description text of the image. The description text is used as the recognition result of the image, and its purpose is to describe the content of the image. However, in practical applications, the description text generated by the current artificial intelligence big model for image recognition is usually difficult to accurately describe the content of the image, that is, the accuracy of the recognition result of the current recognition method is low.

[0043] In view of this, the embodiments of the present application provide an image recognition method, device, electronic device and storage medium, which can be used to solve the technical problem. Figure 1 FIG. 1 is a schematic diagram of a specific structure of an electronic device provided in this embodiment. The electronic device 1 includes: at least one processor 11 and a memory 12. Figure 1 A processor is used as an example. The processor 11 and the memory 12 may be connected via a bus 10, and the memory 12 stores instructions executable by the processor 11, and the instructions are executed by the processor 11, so that the electronic device 1 can execute all or part of the process of the method in the embodiment of the present application.

[0044] The electronic device 1 may be a client electronic device, such as a user's mobile phone, computer, etc. The electronic device 1 may also be a server electronic device, such as a server node, etc.

[0045] In one embodiment, the electronic device 1 serves as a client electronic device (hereinafter referred to as a client) and can directly execute the method provided in the embodiment of the present application to recognize an image.

[0046] In one embodiment, the electronic device 1 acts as a server-side electronic device (hereinafter referred to as a server). At this time, the server can connect to multiple clients, and thus can obtain the image sent by the client, or can also obtain the image through other means, and then execute the method provided in the embodiment of the present application to identify the image. Of course, after identifying the image, the server can also send the recognition result to the client, or save the recognition result.

[0047] The method provided in the embodiment of the present application is to identify the image based on the artificial intelligence large model, thereby generating a description text, and then a series of processing based on the description text is performed to improve the accuracy of the image recognition result. Among them, the artificial intelligence large model can be, for example, a GPT (Generative Pre-Trained) model, a CogVLM model, a GLM-4 model, etc. The artificial intelligence large model can identify the input image (such as the target image) to generate and output the description text. However, the current artificial intelligence large model is basically a wide spectrum model, and this type of model can identify images in various fields, but the problem is that the accuracy of the recognition result (i.e., the description text) is relatively low, especially when identifying pictures in certain specific fields, the description text is often difficult to accurately describe the content in the target image, which is an objective defect of the artificial intelligence large model. Of course, one of the current processing methods is to review and modify the description text output by the artificial intelligence large model manually, but the efficiency of this method is relatively low, but this application adopts other processing methods, which will be described in detail later.

[0048] like Figure 2 The figure shows a specific flow chart of the image recognition method provided by the embodiment of the present application. The method can be performed by Figure 1 The method is performed by the electronic device 1 shown in the figure. Here, the method is described by taking the electronic device 1 as a server to perform the method. In this case, the method includes the following steps:

[0049] Step S21: Obtain the description text generated by the artificial intelligence large model for identifying the target image.

[0050] The target image here is the image that needs to be identified. For example, the image sent by the client can be obtained, and then the image can be used as the target image, and then the target image can be identified by the method provided in the embodiment of the present application; for example, when identifying an image in an image library, an image can be obtained from the image library (for example, it can be obtained randomly or in a preset order) as the target image, and then the target image can be identified by the method provided in the embodiment of the present application; of course, during the monitoring process, images can also be collected in real time, and the real-time collected images can be used as the target image, and then the target image can be identified by the method provided in the embodiment of the present application, such as in the automatic vending or security inspection scene of the goods, the images of the goods and the inspected persons can be collected in real time as the target image, and then the target image can be identified by the method provided in the embodiment of the present application.

[0051] Therefore, before step S21, the target image can be acquired first. In this way, for the specific implementation of step S21, the target image can be input into the artificial intelligence big model, so that the target image can be recognized by the artificial intelligence big model to generate the description text. The target image can be used to describe the content in the target image.

[0052] Of course, when the server load is high, after acquiring the target image, the target image can be input into the artificial intelligence large model, so that the target image can be recognized by the artificial intelligence large model to generate the description text, and then the description text is stored in the text library. In this way, the specific implementation method of step S21 can be that the server obtains the description text from the text library, and then by storing the description text in the text library, the artificial intelligence large model recognizes the target image and decouples it from the server obtaining the description text to reduce the computing pressure of the server.

[0053] Step S22: Verify the accuracy of the description text according to preset verification rules.

[0054] As mentioned above, the description text is used to describe the content in the target image, but the accuracy of the description of the content is unknown, and the preset verification rule in step S22 can be used to verify the accuracy of the description text.

[0055] It should be noted that in step S22, the accuracy of the description text is verified according to the preset verification rules. If the verification result is passed, then if the verification is passed, it means that the description text can accurately describe the content in the target image, so the description text can be used as the recognition result of the target image.

[0056] On the contrary, if the verification result is failed, if it fails the verification, it means that the description text cannot accurately describe the content in the target image. At this time, the description text cannot be directly used as the recognition result of the target image, and further subsequent processing is required. Therefore, the subsequent steps S23 and S24 can be further executed.

[0057] It should be further explained that, in actual applications, there can be many specific implementation methods for step S22. For example, the first classification category of the target image and the elements estimated to be contained in the target image can be determined based on the description text. Specifically, keywords can be extracted from the description text, or semantic analysis can be performed on the description text to obtain the first classification category of the target image and the elements estimated to be contained in the target image.

[0058] For example, after obtaining the description text, since the description text is generated by identifying the target image, the description text can reflect the classification category of the target image. Of course, the classification category of the target image reflected by the description text may not be accurate enough, so the classification category is called the first classification category. Specifically, for example, the first classification category of the target image can be obtained by semantic analysis of the description text; in addition, the elements estimated to be contained in the description text can be directly extracted by keyword extraction of the description text. The reason why it is called the estimated elements here is that the elements contained in the description text may be omitted or misidentified. Among them, the elements can include various elements such as people, animals, vehicles, trees, books, etc., which are used to represent a specific object or concept in practical applications; the classification category of the target image reflects the category to which the target image belongs, for example, the classification category can be a portrait of a person, a landscape painting, a photo, etc.

[0059] After determining the first classification category of the target image and the estimated elements contained in the target image based on the description text, the actual classification category of the target image and the elements actually contained in the target image can be further obtained. Specifically, different methods can be used to obtain the actual classification category of the target image and the elements actually contained in the target image according to the different sources of the target image. For example, if the target image is an image sent by the acquired client, then during the process of the client sending the target image, an image information input page can be further displayed on the client, thereby prompting the user to input the actual classification category of the target image and the elements actually contained in the target image through the image information input page displayed by the client. In this way, the server can simultaneously obtain the actual classification category of the target image and the elements actually contained in the target image during the process of obtaining the image input by the client.

[0060] If the target image is an image obtained from an image library, the actual classification category of the target image and the elements actually contained in the target image can be determined based on the name of the image library. For example, in actual applications, when the server stores an image (specifically, when storing it in an image library), it often first determines its classification category based on the elements included in the image, and then stores the image in the corresponding image library. Therefore, the server usually includes multiple image libraries, which are usually only used to store images of corresponding classification categories, and the images of the corresponding classification categories usually only contain a number of elements, and the classification category and what is contained are often reflected in the name of the image library. Therefore, the name of the image library to which the target image belongs can be obtained, and then the actual classification category of the target image and the elements actually contained in the target image can be determined based on the name of the image library.

[0061] After obtaining the first classification category of the target image, the elements estimated to be contained in the target image, the actual classification category of the target image, and the elements actually contained in the target image, the first classification category and the actual classification category of the target image, as well as the estimated elements and the actual elements contained in the target image can be compared respectively, so as to verify the accuracy of the description text according to the comparison results.

[0062] For example, the first classification category can be compared with the actual classification category to determine whether the first classification category matches the actual classification category. Specifically, if the two are the same or there is a hierarchical inclusion relationship, it means that they match, otherwise it means that they do not match; if they do not match at this time, it means that the verification has not passed.

[0063] Of course, if the first classification category matches the actual classification category, the elements estimated to be contained in the target image are further compared with the elements actually contained therein to determine whether the elements estimated to be contained in the target image match the elements actually contained therein. For example, if the two do not match, it means that the verification has not passed. On the contrary, if the two match, it means that the verification has passed.

[0064] Among them, the elements estimated to be included in the target image are compared with the elements actually included, so as to determine whether the elements estimated to be included in the target image match the elements actually included. Specifically, one implementation method is, for example, if more than 80% of the elements actually included are included in the estimated elements, then it can be considered that the two match, otherwise they do not match; another implementation method is, for example, comparing the similarity between the elements estimated to be included in the target image and the elements actually included. At this time, the estimated elements and the actual elements can be converted into vectors respectively, and then the similarity between the two vectors is calculated. When the similarity exceeds a preset threshold, it means that the elements estimated to be included in the target image match the elements actually included, otherwise they do not match.

[0065] Step S23: If the image fails to pass the verification, the description text is modified to generate a prompt word for the target image.

[0066] After the accuracy of the description text is verified according to the preset verification rules through the above-mentioned step S22, if the verification is passed, that is, if the verification result is passed, it means that the description text can accurately describe the content in the target image, so the description text can be used as the recognition result of the target image.

[0067] On the contrary, if the verification result is that the verification is not passed, then in the case of failure to pass the verification, it means that the description text cannot accurately describe the content in the target image, and the description text cannot be directly used as the recognition result of the target image. In this way, in step S23, the description text can be corrected to generate the prompt word of the target image, for example, the description text can be corrected by using the actual classification category of the target image and the elements actually contained in the target image, so as to obtain the corrected description text, and then the keywords are extracted from the corrected description text as the prompt word of the target image.

[0068] Here, as for the method of extracting keywords from the modified description text, for example, keyword extraction tools or software may be used, or other methods may be used to extract keywords from the modified description text.

[0069] As for correcting the description text by using the actual classification category and the elements actually contained in the target image, its specific implementation method may be to first add a first annotation containing the actual classification category of the target image to the description text. For example, the first annotation may be added to the text header or the text tail of the description text. The first annotation is used to explain the classification category to which the target image belongs, that is, the actual classification category. For example, the first annotation may be "the image belongs to XX category", or the first annotation may be constructed using a sentence class with similar semantics, and then the first annotation is added to the text header or the text tail of the description text.

[0070] Then, the missing elements and redundant elements in the description text can be further determined based on the elements actually contained in the target image. For example, the elements actually contained in the target image can be compared with the estimated elements to determine the missing elements and redundant elements in the estimated elements, namely the missing elements and redundant elements, respectively. After obtaining the missing elements and redundant elements, a second annotation can be generated in the description text based on the missing elements and redundant elements. For example, the second annotation can be first generated based on the missing elements and redundant elements, and then the second annotation can be further added to the description text, wherein the second annotation is used to explain that some elements (i.e., the missing elements) are missing and some elements (i.e., the redundant elements) are added in the description text. In practical applications, the second annotation can be added to the text header or text tail of the description text.

[0071] Step S24: Based on the prompt words of the target image, the target image is recognized by using the artificial intelligence large model.

[0072] As for the specific implementation method of step S24, the prompt word of the target image and the target image can be input into the artificial intelligence big model, so that the artificial intelligence big model can perform the next round of recognition on the target image under the prompt of the prompt word, thereby generating and outputting a new description text (that is, the description text generated by the next round of recognition). Since the new description text is generated by the artificial intelligence big model through the next round of recognition of the target image under the prompt of the prompt word, it can describe the content in the target image more accurately.

[0073] It should be further explained that after executing step S24 to perform the next round of recognition on the target image, based on the same principle as the above steps S21 to S24, the method can further include obtaining the new description text generated by the next round of recognition, that is, obtaining the new description text generated by the next round of recognition on the target image in step S24, and then verifying the accuracy of the new description text according to the preset verification rules. For the specific verification method, you can refer to the content in the above step S22, which will not be repeated here. Of course, if the verification is passed, it means that the new description text can accurately describe the content in the target image, so the loop can be terminated and the new description text can be used as the recognition result of the target image; or, if the verification is not passed, it means that the new description text still cannot accurately describe the content in the target image, so it can be further modified by modifying the new description text to generate a new prompt word for the target image, wherein, for how to modify the new description text to generate a new prompt word for the target image, you can refer to the content in the above step S23, which will not be repeated here. After generating new prompt words for the target image, the target image can be recognized again in the next round based on the new prompt words using the artificial intelligence large model until the loop termination condition is met, such as the description text generated by a round of target image recognition passes the verification, or the number of loops reaches a preset number.

[0074] The method provided by the embodiment of the present application includes first obtaining the description text generated by the artificial intelligence large model for identifying the target image, and then verifying the accuracy of the description text according to the preset verification rules. If the verification fails, the description text is modified to generate the prompt word of the target image, and then the artificial intelligence large model is used to perform the next round of recognition on the target image based on the prompt word of the target image. In this method, after obtaining the description text generated by the artificial intelligence large model for identifying the target image, the accuracy of the description text is verified according to the preset verification rules, and if the verification fails, the prompt word of the target image is further generated, and then the next round of recognition of the target image is performed based on the prompt word of the target image, thereby improving the accuracy of the target image recognition result.

[0075] It should be noted that the artificial intelligence large model provided in the embodiment of the present application can be generated in the following manner: first collect and preprocess image data: obtain image data from sources such as the Internet and cameras, and perform preprocessing operations such as denoising and scaling to facilitate subsequent image recognition and text generation. Then use the large model for image recognition: use multimodal large models such as CogVLM to extract and recognize features of the preprocessed image to obtain the category and location information of objects such as people and affairs in the image. Then generate a descriptive text: based on the image recognition results, combine the generation of large models such as CogVLM and GLM-4 to generate text describing the image content.

[0076] The above is a specific description of the method provided by the embodiment of the present application. For ease of understanding, the method can be further described here. In this method, the target image is recognized in rounds, so as to finally obtain the recognition result. For example, in a round of recognition, step S21 can be executed first to obtain the description text generated by the artificial intelligence large model for recognizing the target image. At this time, the description text is not directly used as the recognition result, but the above step S22 is further executed, that is, the accuracy of the description text is verified according to the preset verification rules. If the verification is passed at this time, the description text can be determined as the recognition result of the target image. On the contrary, if the verification is not passed, the above steps S23 and S24 can be executed, that is, the description text is corrected to generate the prompt word of the target image, and then based on the prompt word of the target image, the target image is recognized by the artificial intelligence large model in the next round.

[0077] Of course, after obtaining a new description text in the next round of recognition, the accuracy of the description text needs to be verified according to the preset verification rules. If the verification passes, the new description text can be determined as the recognition result of the target image. Otherwise, based on the same principle, the above steps S23 and S24 are executed again, and then the next round of recognition is performed on the target image until the loop termination conditions are met.

[0078] Based on the same inventive concept as the image recognition method provided in the embodiment of the present application, the embodiment of the present application also provides an image recognition device. If there is any unclear point, please refer to the corresponding content of the method embodiment. Figure 3 FIG. 3 is a schematic diagram of a specific structure of the device 30, which includes a description text acquisition unit 301, a verification unit 302, a prompt word generation unit 303 and a recognition unit 304, wherein:

[0079] A description text acquisition unit 301 is used to acquire the description text generated by the artificial intelligence large model for recognizing the target image;

[0080] A verification unit 302, configured to verify the accuracy of the description text according to a preset verification rule;

[0081] A prompt word generating unit 303, configured to generate a prompt word of the target image by modifying the description text if the verification fails;

[0082] The recognition unit 304 is used to perform the next round of recognition on the target image using the artificial intelligence large model based on the prompt word of the target image.

[0083] The device 30 provided in the embodiment of the present application is adopted. Since the device 30 adopts the same inventive concept as the method provided in the embodiment of the present application, on the premise that the method can solve the technical problem, the device 30 can also solve the technical problem, which will not be repeated here.

[0084] In practical applications, the device 30 may further include a second recognition unit, which is used to obtain a new description text generated by the next round of recognition; verify the accuracy of the new description text according to a preset verification rule, wherein, if the verification is passed, the loop is terminated and the new description text is used as the recognition result of the target image; or, if the verification is not passed, the new description text is corrected to generate a new prompt word for the target image, and based on the new prompt word for the target image, the target image is recognized again in the next round using the artificial intelligence large model.

[0085] The device 30 may further include a recognition result determination unit, which is used to determine the description text as a recognition result of the target image when the verification is passed.

[0086] The step of verifying the accuracy of the description text according to a preset verification rule may specifically include:

[0087] Determining a first classification category of the target image and estimated elements contained in the target image according to the description text;

[0088] Acquire the actual classification category of the target image and the elements actually contained in the target image;

[0089] The first classification category is compared with the actual classification category of the target image, and the estimated elements contained in the target image are compared with the actual elements contained therein, and the accuracy of the description text is verified based on the comparison results.

[0090] The first classification category is compared with the actual classification category of the target image, and the estimated elements contained in the target image are compared with the actual elements contained in the target image, and the accuracy of the description text is verified according to the comparison result, which may specifically include:

[0091] By comparing the first classification category with the actual classification category, determining whether the first classification category matches the actual classification category;

[0092] If they do not match, the verification fails;

[0093] If they match, then comparing the estimated elements contained in the target image with the actual elements contained therein to determine whether the estimated elements contained in the target image match the actual elements contained therein;

[0094] If they do not match, the verification fails;

[0095] If they match, the verification passes.

[0096] Wherein, in the case of failure to pass the verification, modifying the description text to generate a prompt word of the target image may specifically include:

[0097] In the case of failure to pass the verification, the description text is corrected using the actual classification category and the elements actually contained in the target image;

[0098] Keywords are extracted from the modified description text to serve as prompt words for the target image.

[0099] The step of modifying the description text by using the actual classification category and the elements actually contained in the target image may specifically include:

[0100] Adding a first annotation including the actual classification category to the description text;

[0101] Determining missing elements and redundant elements in the description text according to the elements actually contained in the target image;

[0102] A second annotation is generated in the description text according to the missing element and the redundant element.

[0103] Among them, based on the prompt word of the target image, the artificial intelligence big model is used to perform the next round of recognition on the target image, which specifically includes: inputting the prompt word and the target image into the artificial intelligence big model, so as to use the artificial intelligence big model to perform the next round of recognition on the target image.

[0104] The embodiment of the present invention further provides a storage medium, including: a program, which, when running on an electronic device, enables the electronic device to execute all or part of the process of the method in the above embodiment. The storage medium may be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk (HDD) or a solid-state drive (SSD). The storage medium may also include a combination of the above types of memories.

[0105] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. An image recognition method, characterized in that: The method comprises: Obtain the description text generated by the artificial intelligence large model for identifying the target image; Verifying the accuracy of the description text according to preset verification rules; If the verification fails, the description text is modified to generate a prompt word of the target image; Based on the prompt words of the target image, the artificial intelligence large model is used to perform the next round of recognition on the target image.

2. The method according to claim 1, characterized in that The method further comprises: Obtain the new description text generated by the next round of recognition; The accuracy of the new description text is verified according to preset verification rules. If the verification is passed, the loop is terminated and the new description text is used as the recognition result of the target image; or, if the verification is not passed, the new description text is corrected to generate a new prompt word for the target image, and based on the new prompt word for the target image, the artificial intelligence large model is used to perform the next round of recognition on the target image.

3. The method according to claim 1, characterized in that The method further includes: in a case where verification is passed, determining the description text as a recognition result of the target image.

4. The method according to claim 1, characterized in that: Verifying the accuracy of the description text according to preset verification rules, specifically including: Determining a first classification category of the target image and estimated elements contained in the target image according to the description text; Acquire the actual classification category of the target image and the elements actually contained in the target image; The first classification category is compared with the actual classification category of the target image, and the estimated elements contained in the target image are compared with the actual elements contained therein, and the accuracy of the description text is verified based on the comparison results.

5. The method according to claim 4, characterized in that The first classification category is compared with the actual classification category of the target image, and the estimated elements contained in the target image are compared with the actual elements contained therein, and the accuracy of the description text is verified according to the comparison results, specifically including: By comparing the first classification category with the actual classification category, determining whether the first classification category matches the actual classification category; If they do not match, the verification fails; If they match, then comparing the estimated elements contained in the target image with the actual elements contained therein to determine whether the estimated elements contained in the target image match the actual elements contained therein; If they do not match, the verification fails; If they match, the verification passes.

6. The method according to claim 4 or 5, characterized in that: In the case of failure to pass the verification, the description text is modified to generate a prompt word of the target image, specifically including: In the case of failure to pass the verification, the description text is corrected using the actual classification category and the elements actually contained in the target image; Keywords are extracted from the modified description text to serve as prompt words for the target image.

7. The method according to claim 6, characterized in that The description text is modified using the actual classification category and the elements actually contained in the target image, specifically including: Adding a first annotation including the actual classification category to the description text; Determining missing elements and redundant elements in the description text according to the elements actually contained in the target image; A second annotation is generated in the description text according to the missing element and the redundant element.

8. The method according to claim 1, characterized in that Based on the prompt word of the target image, the target image is recognized by using the artificial intelligence big model in the next round, specifically including: inputting the prompt word and the target image into the artificial intelligence big model, so as to recognize the target image in the next round by using the artificial intelligence big model.

9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to execute the method according to any one of claims 1 to 8.

10. A storage medium, characterized in that: The invention comprises: a program, which, when running on an electronic device, enables the electronic device to execute the method as claimed in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Image description method and device, equipment, storage medium and product

    CN118467776A

Cited By

  • Multi-modal large model retrieval method and apparatus for field of security checks

    WO2026129607A1