Image recognition method and device, equipment, storage medium and computer program product
By building an agent network and determining the agent scheduling path based on the capability probability, the problems of low image recognition efficiency and poor generalization in the prior art are solved, and efficient and accurate image recognition is achieved.
Patent Information
- Application Number
- CN202411509058.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-02-14
AI Technical Summary
The existing image recognition methods based on agent scheduling are relatively low overall efficiency and cannot be fully applied to complex and diverse task scenarios, and lack better generalization.
By constructing an agent network constructed by multiple agents based on collaborative relationships, the agent scheduling path is determined based on the probability of the agent's ability to recognize image data, and the agent is scheduled for image recognition based on the path.
It realizes efficient identification of image data in complex and diverse task scenarios, improves the overall efficiency and accuracy of image recognition, and has better generalization.
Smart Images

Figure CN119445329A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of artificial intelligence technology, and in particular, relates to an image recognition method, device, equipment, storage medium and computer program product. Background Art
[0002] Agent is a basic concept in the field of artificial intelligence, which refers to a system that can perceive its environment and make decisions based on the perceived information to achieve specific goals. Agents can be simple, such as rule-based systems, or complex, such as artificial intelligence models with learning capabilities.
[0003] In the field of computer vision, a fixed visual model is often used for image recognition applications for a single scene. In some complex application scenarios, the industry has proposed the concept of ensemble learning, which combines the recognition results of multiple agents to improve the accuracy and robustness of image recognition. Achieving efficient and high-quality scheduling of multiple agents has become a key research area for realizing large-scale model applications based on agents.
[0004] The existing image recognition method based on agent scheduling is to decompose the recognition task into subtasks, call the agent corresponding to the subtask according to the decomposed subtasks, and realize agent scheduling from the perspective of the recognition task to perform image recognition. The overall efficiency of image recognition is low, and the method cannot be fully applied to complex and diverse task scenarios and does not have better generalization. Summary of the invention
[0005] The embodiments of the present application provide an image recognition method, apparatus, device, storage medium and computer program product, which can be fully applicable to complex and diverse task scenarios and have better generalization.
[0006] In a first aspect, an embodiment of the present application provides an image recognition method, the method comprising:
[0007] Acquire first image data and an agent network; the agent network is a network constructed by directing connections between multiple agents based on a collaborative relationship between the agents;
[0008] Determining at least one agent scheduling path for identifying the first image data in the agent network according to the ability probability of the agent for identifying the first image data; the agent scheduling path represents the calling order of the agent for identifying the first image data;
[0009] For each agent scheduling path, according to the agent scheduling path, calling the corresponding agent in the agent network to recognize the first image data, and obtaining at least one image recognition result corresponding to the agent scheduling path;
[0010] A target image recognition result is determined according to at least one image recognition result.
[0011] In a second aspect, an embodiment of the present application provides an image recognition device, the device comprising:
[0012] An acquisition module, used to acquire first image data and an agent network; the agent network is a network constructed by connecting multiple agents in a directed manner based on the collaborative relationship between the agents;
[0013] A scheduling module, configured to determine at least one agent scheduling path for identifying the first image data in the agent network according to the ability probability of the agent for identifying the first image data; the agent scheduling path represents a calling order of the agent for identifying the first image data;
[0014] The scheduling module is further used to call a corresponding agent in the agent network to identify the first image data for each agent scheduling path according to the agent scheduling path, and obtain at least one image recognition result corresponding to the agent scheduling path;
[0015] The scheduling module is further used to determine a target image recognition result based on at least one image recognition result.
[0016] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the image recognition method of the first aspect is implemented.
[0017] In a fourth aspect, an embodiment of the present application provides a computer storage medium having computer program instructions stored thereon, and when the computer program instructions are executed by a processor, an image recognition method as in the first aspect is implemented.
[0018] In a fifth aspect, an embodiment of the present application provides a computer program product. When instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the image recognition method of the first aspect.
[0019] The image recognition method, apparatus, device, storage medium and computer program product of the embodiments of the present application, the agent network constructed by multiple agents can call the corresponding agents to perform image recognition in the face of multiple image data, and can be applied to a variety of complex task scenarios. In addition, since the agent network is a network constructed by direct connection of multiple agents based on the collaborative relationship between the agents, at least one agent scheduling path for identifying the first image data can be quickly determined in the agent network according to the ability probability of the agent to identify the first image data, and the agent is scheduled to identify the image data based on the agent scheduling path, which can greatly improve the overall efficiency of image data recognition. At the same time, at least one image recognition result corresponding to the agent scheduling path is obtained for each agent scheduling path, and the target image recognition result is determined based on the at least one image recognition result, which can also improve the accuracy of image recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0021] Figure 1 is a schematic diagram of the structure of an image recognition system provided by an embodiment of the present application;
[0022] Figure 2 is a schematic diagram of the structure of an intelligent agent network provided by an embodiment of the present application;
[0023] Figure 3 is a flowchart of an image recognition method provided by an embodiment of the present application;
[0024] Figure 4 is a flowchart of an image recognition method provided by another embodiment of the present application;
[0025] Figure 5 is a structural schematic diagram of an image recognition device provided by an embodiment of the present application;
[0026] Figure 6 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0027] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.
[0028] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or equipment. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the existence of other identical elements in the process, method, article or equipment including the elements.
[0029] Agent is a basic concept in the field of artificial intelligence, which refers to a system that can perceive its environment and make decisions based on the perceived information to achieve specific goals. Agents can be simple, such as rule-based systems, or complex, such as artificial intelligence models with learning capabilities.
[0030] Ensemble learning is a machine learning technique that improves the overall prediction performance by combining the prediction results of multiple models. The basic idea of ensemble learning is to use multiple weak learners to form a strong learner.
[0031] In the field of computer vision, a fixed visual model is often used for image recognition applications for a single scene. In some complex application scenarios, the industry has proposed the concept of ensemble learning, which combines the recognition results of multiple agents to improve the accuracy and robustness of image recognition. Achieving efficient and high-quality scheduling of multiple agents has become a key research area for realizing large-scale model applications based on agents.
[0032] The existing image recognition method based on agent scheduling is to decompose the recognition task into subtasks, call the agent corresponding to the subtask according to the decomposed subtasks, and realize agent scheduling from the perspective of the recognition task to perform image recognition. The overall efficiency of image recognition is low, and the method cannot be fully applied to complex and diverse task scenarios and does not have better generalization.
[0033] In order to solve the problems of the prior art, the embodiments of the present application provide an image recognition method, device, equipment, storage medium and computer program product. In the embodiments of the present application, an agent network constructed by multiple agents can call the corresponding agents to perform image recognition in the face of multiple image data, and can be applied to a variety of complex task scenarios. In addition, since the agent network is a network constructed by direct connection of multiple agents based on the collaborative relationship between agents, at least one agent scheduling path for identifying the first image data can be quickly determined in the agent network according to the ability probability of the agent to identify the first image data, and the agent is scheduled to identify the image data based on the agent scheduling path, which can greatly improve the overall efficiency of image data recognition. At the same time, at least one image recognition result corresponding to the agent scheduling path is obtained for each agent scheduling path, and the target image recognition result is determined according to the at least one image recognition result, which can also improve the accuracy of image recognition.
[0034] It should be noted that the embodiments of the present application have multi-purpose adaptability. In addition to being used in security inspection scenarios, it can also be used in multiple fields such as industrial Internet safety monitoring, target detection and recognition, and can even be used in wider fields such as audio and language by replacing the intelligent body.
[0035] The following first introduces the image recognition system provided in the embodiment of the present application.
[0036] Figure 1 FIG. 1 is a schematic diagram showing the structure of an image recognition system provided by an embodiment of the present application. Figure 1 As shown, the image recognition system may include a data source 101, a scheduling subsystem 102, an agent network 103, and an application subsystem 104. The scheduling subsystem 102 may include a scheduling scheduler 1021 and a super agent 1022.
[0037] The data source 101 may include an image capturing device, such as a security inspection machine, a camera device, a scanning device, etc. The data source 101 may be connected to the scheduling subsystem 102 for communication, and is used to obtain image data to be identified in an actual application scenario and send it to the scheduling subsystem 102 .
[0038] The scheduling subsystem 102 is used to obtain the image data sent by the data source 101, and send the image data to the agent network 103 for recognition through the scheduling scheduler 1021. The scheduling subsystem 102 receives at least one image recognition result returned by the agent network 103 after recognizing the image data, and determines the target image recognition result according to the at least one image recognition result through the super agent 1022.
[0039] The agent network 103 may be a network formed by interconnecting multiple agents, such as Figure 2 As shown in the figure, each agent is a node in the agent network, and the agent network can be presented as a directed acyclic graph (DAG). A directed acyclic graph is a data structure in graph theory, consisting of nodes and directed edges. Each directed edge has a clear direction, that is, it points to a specific node, and there is no loop in the whole graph, that is, there is no path in the graph that can start from a node and return to the node after passing through a series of edges.
[0040] The agents in the agent network can be platforms that integrate data training and recognition, or they can be application programming interfaces (APIs) of open source platforms. Each agent is adapted to different reasoning models and is used to handle different image recognition tasks. In the agent network, agents are connected in a directed manner through network interfaces, and image data can be transmitted to different agents in an orderly manner through the network for processing.
[0041] The application subsystem 104 can be connected to the scheduling subsystem 102 in communication, and receive the target image recognition result sent by the scheduling subsystem 102. The user can obtain the target image recognition result through the application subsystem 104, manually identify it, and feed back the identification result to the scheduling subsystem 102. The scheduling subsystem 102 adjusts and optimizes the intelligent agent network according to the manual identification result. Among them, manual identification means that the user observes the image data such as pictures or videos through human eyes to perform image recognition, obtains the manual recognition result, and compares the manual recognition result with the target image recognition result sent by the scheduling subsystem 102. Since the accuracy of the manually identified image is percentage, the accuracy of the target image recognition result can be judged by comparison.
[0042] In the image recognition system, the data source 101 sends the image data to the scheduling subsystem 102, and the scheduling subsystem 102 sends the image data to the agent network 103 for recognition. The agent network 103 outputs at least one image recognition result, and sends at least one image recognition result to the scheduling subsystem 102 so that the scheduling subsystem 102 determines the target image recognition result according to the at least one image recognition result. Then the scheduling subsystem 102 sends the target image recognition result to the application subsystem 104, and the user manually identifies the target image recognition result and feeds back the identification result to the scheduling subsystem 102. The scheduling subsystem 102 can automatically optimize the agent network according to the manual identification result, and continuously improve the efficiency and accuracy of the agent network in image recognition.
[0043] The following is an introduction to the image recognition method provided in the embodiments of the present application.
[0044] Figure 3 FIG. 1 is a flow chart of an image recognition method provided by an embodiment of the present application. Figure 3 As shown, the method may include the following steps: S301 to S304.
[0045] S301: Acquire first image data and an agent network; the agent network is a network constructed by connecting multiple agents in a directed manner based on the collaborative relationship between the agents.
[0046] The first image data represents one type of image data among the image data to be identified. For example, the first image data may be controlled tool image data, or the first image data may be bottled liquid image data, etc.
[0047] An agent network constructed by directing connections between multiple agents based on the collaborative relationship between the agents can be presented as a directed acyclic graph.
[0048] S302: Determine at least one agent scheduling path for identifying the first image data in the agent network according to the ability probability of the agent to identify the first image data.
[0049] The ability probability represents the ability of the agent to recognize the first image data, or the accuracy probability.
[0050] The agent scheduling path may characterize the order of calling the agents for identifying the first image data.
[0051] Since the agent network can be presented as a directed acyclic graph, at least one agent scheduling path for identifying the first image data can be quickly determined in the agent network based on the probability of the agent's ability to identify the first image data in the directed acyclic graph, so that the agent can be called to identify the image data according to the agent scheduling path, which can improve the overall efficiency of image data recognition.
[0052] S303: For each agent scheduling path, according to the agent scheduling path, calling the corresponding agent in the agent network to identify the first image data, and obtaining at least one image recognition result corresponding to the agent scheduling path.
[0053] Calling an agent to recognize image data based on an agent scheduling path can greatly improve the overall efficiency of image data recognition. At the same time, since the agent network integrates multiple agents, at least one agent scheduling path can be determined in the agent network. By calling the corresponding agent according to different scheduling paths to perform first image data recognition, at least one image recognition result corresponding to each agent scheduling path can be generated to determine the optimal target image recognition result.
[0054] Through the integrated processing of intelligent agents, the overfitting of a single visual model can be reduced and the generalization ability of the model can be improved. By introducing diversity, the different features hidden in the data can be accurately captured, thereby improving the accuracy and robustness of image recognition.
[0055] S304: Determine a target image recognition result according to at least one image recognition result.
[0056] Based on multiple image recognition results, the optimal target image recognition result is determined, which can improve the accuracy of image recognition.
[0057] In this embodiment, the agent network constructed by multiple agents can call the corresponding agents to perform image recognition in the face of multiple image data, and can be applied to a variety of complex task scenarios. In addition, since the agent network is a network constructed by direct connection of multiple agents based on the collaborative relationship between the agents, at least one agent scheduling path for identifying the first image data can be quickly determined in the agent network according to the ability probability of the agent to identify the first image data, and the agent is scheduled to identify the image data based on the agent scheduling path, which can greatly improve the overall efficiency of image data recognition. At the same time, at least one image recognition result corresponding to the agent scheduling path is obtained for each agent scheduling path, and the target image recognition result is determined based on the at least one image recognition result, which can also improve the accuracy of image recognition.
[0058] In some embodiments, step S304: determining a target image recognition result according to at least one image recognition result includes:
[0059] Get the preset weight of each agent's scheduling path;
[0060] Determine the weight of the image recognition result corresponding to each agent scheduling path according to the preset weight of each agent scheduling path;
[0061] According to the weight of the image recognition result, the target image recognition result is determined.
[0062] The super agent assigns a preset weight to each agent scheduling path, and the weight of each agent scheduling path determines the weight of the image recognition results corresponding to it.
[0063] According to the weight of the image recognition result, determining the target image recognition result can be achieved by the super intelligent agent based on preset rules.
[0064] Specifically, according to the weight of the image recognition result, the target image recognition result can be determined in the following way:
[0065] In the case where multiple image recognition results are different, the target image recognition result is determined according to the weights of the image recognition results, and the image recognition result with the largest weight may be used as the target image recognition result.
[0066] When some of the multiple image recognition results are the same, the same image recognition results are weighted and summed, and the values after the weighted summation of each image recognition result are compared. The image recognition result corresponding to the maximum value can be used as the target image recognition result.
[0067] As an example, determining the target image recognition result according to the weight of the image recognition result can be achieved through a super agent based on a voting method.
[0068] Based on the weight of the agent's scheduling path, the weight of the image recognition result obtained by each scheduling path is determined, and then according to the weight of the image recognition result, the final target recognition result is determined among multiple image recognition results, which can improve the accuracy of image recognition.
[0069] In some embodiments, after determining the target image recognition result according to at least one image recognition result in step S304, the image recognition method may further include:
[0070] Compare the target image recognition result with the preset image recognition result;
[0071] When the difference between the target image recognition result and the preset image recognition result is greater than a preset threshold, the weight of the target agent scheduling path corresponding to the target image recognition result is reduced, and the probability of the ability of the agent on the target agent scheduling path to recognize the first image data is reduced.
[0072] The preset image recognition result may be an artificial recognition result obtained by observing image data such as pictures or videos with human eyes. Since the accuracy of artificial recognition images is percentage, the accuracy of the target image recognition result can be judged by comparison.
[0073] The preset threshold value may indicate the degree of difference between the target image recognition result and the preset image recognition result. The preset threshold value may be set manually, which will not be described in detail here.
[0074] The difference between the target image recognition result and the preset image recognition result is greater than the preset threshold, indicating that the accuracy of the target image recognition result is low. Therefore, by reducing the probability of the ability of the agent on the target agent scheduling path to recognize the first image data, when the agent network recognizes the first image data again, it will select an agent scheduling path that is more suitable for recognizing the first image data, that is, an agent scheduling path different from the previous one to recognize the first image data, and by reducing the weight of the target agent scheduling path corresponding to the target image recognition result, the target image recognition result determined based on multiple image recognition results will tend to be more accurate.
[0075] As an example, in the agent scheduling path agent 2 → agent 3 → agent 6, the probability that agent 3 is capable of identifying the contour of a controlled tool in an image is 99%. When the difference between the target image recognition result and the preset image recognition result is greater than a preset threshold, the probability that agent 3 is capable of identifying the contour of a controlled tool in an image can be reduced to 98%.
[0076] By comparing the target image recognition result with the preset image recognition result to determine the accuracy of the target image recognition result, if there is a certain difference between the target recognition result and the preset recognition result, the weight of the agent scheduling path that obtains the target image recognition result and the ability probability of the agent on the path are reduced, so that the agent scheduling path that can be used to identify this type of image data can be updated in time. In this way, the agent network can be continuously self-optimized and iterated, thereby gradually improving the accuracy of image recognition.
[0077] In some embodiments, when the difference between the target image recognition result and the preset image recognition result is less than a preset threshold, the weight of the target agent scheduling path corresponding to the target image recognition result can be increased, and the probability of the ability of the agent on the target agent scheduling path to recognize the first image data can be increased.
[0078] In some embodiments, in order to realize rapid construction of an agent network and improve the accuracy of image recognition based on the agent network, in step S302: before determining at least one agent scheduling path for identifying the first image data in the agent network according to the ability probability of the agent to identify the first image data, the image recognition method may further include:
[0079] According to the cooperative relationship between multiple intelligent agents, multiple intelligent agents are constructed into a directed acyclic graph;
[0080] A Bayesian network is constructed with the probability of each agent's ability to recognize the first image data as a variable to obtain an agent network.
[0081] The collaborative relationship between the agents may represent a dependency relationship between the agents used to process the first image data on the processing order of the first image data.
[0082] As an example, there are existing agents a, b, and c, where agent a is used to enhance the first image data, agent b is used to identify the contour of the first image data, and agent c is used to determine the image recognition result of the first image data. Then, agents a, b, and c have a collaborative relationship, and agents a, b, and c can form an agent scheduling path for identifying the first image data. In the agent network, it can be represented as: agent a→agent b→agent c.
[0083] Bayesian Network, also known as Probabilistic Directed Acyclic Graph (PDAG), is a method of representing probability models with graphs. It uses directed acyclic graphs to represent dependencies between variables. The nodes in the graph represent random variables, and the directed edges represent causal or dependency relationships between variables. Bayesian Network performs probabilistic inference based on Bayes' theorem, and can be used to calculate the probability distribution of variables given observed data, or to predict the probability distribution of new data.
[0084] Taking the probability of each agent's ability to recognize the first image data as a variable, a Bayesian network is constructed. The joint probability distribution of n agents in the Bayesian network can be shown as follows:
[0085] P(x1,x2,...,xn )=P(x1)P(x2∣x1)P(x3∣x1,x2)...P(x n |x1,x2,...,x n-1 ) (1)
[0086] Among them, x1, x2, ..., xn represent agent 1, agent 2, ... agent n.
[0087] The above formula (1) can be simplified as follows:
[0088] P(x1,x2,...,x n )= i=1 ∏ n P(x i ∣Parent(x i )) (2)
[0089] Among them, Parent represents the union of the direct predecessor nodes of agent i.
[0090] In some embodiments, step S302: determining at least one agent scheduling path for identifying the first image data in the agent network according to the ability probability of the agent to identify the first image data may include:
[0091] Based on the Bayesian formula, the ability probability of each intelligent agent for recognizing the first image data is calculated on the Bayesian network;
[0092] At least one agent scheduling path is determined on the Bayesian network according to the size of the ability probability of the agent used to identify the first image data.
[0093] The Bayesian formula is used to describe the relationship between two conditional probabilities, and its formula can be expressed as: posterior probability = (likelihood * prior probability) / normalized constant. In the agent network, some agents used to identify the first image data have a prior probability, and the posterior probability of the agents connected to them can be calculated based on these agents, so that the ability probability of each agent used to identify the first image data can be calculated.
[0094] In one embodiment, based on the Bayesian formula, calculating the ability probability of each agent for identifying the first image data on the Bayesian network can be completed by the scheduling orchestrator of the scheduling subsystem.
[0095] The scheduling orchestrator can determine one or more optimal agent scheduling paths for identifying the first image data in the Bayesian network based on the probability distribution of the capabilities of the agent used to identify the first image data in the above-mentioned Bayesian network, and can implement efficient agent scheduling based on these agent scheduling paths to effectively complete the image recognition task of the first image data.
[0096] In the Bayesian network, at least one agent scheduling path for identifying the first image data can be quickly determined. According to the agent scheduling path, the agent can be quickly and efficiently called to identify the image data, which can improve the overall efficiency of image data recognition.
[0097] In order to better describe the solutions in the present application, some specific examples are given based on the above embodiments.
[0098] For example, a flowchart of another image recognition method provided in an embodiment of the present application can be as follows: Figure 4 shown.
[0099] like Figure 4 As shown, the image recognition method may include steps S401 to S408, which are described in detail below.
[0100] S401: The data source pushes first image data to the scheduling subsystem.
[0101] S402: The scheduling scheduler establishes an agent network based on the Bayesian network.
[0102] S403: The first image data is recognized and processed through at least one agent scheduling path in the agent network, and at least one image recognition result is output to the super agent.
[0103] S404: The super intelligent agent uses a voting method to arbitrate at least one image recognition result to determine a target image recognition result.
[0104] S405: The scheduling subsystem pushes the target image recognition result to the application subsystem.
[0105] S406: The user manually identifies the target image recognition result through the application subsystem.
[0106] S407: The application subsystem feeds back the manual identification result to the scheduling subsystem.
[0107] S408: If there is a difference between the manual identification result and the target image recognition result, reduce the weight of the target agent scheduling path corresponding to the target image recognition result, and reduce the probability of the ability of the agent on the target agent scheduling path to recognize the first image data.
[0108] Figure 5is a schematic diagram of the structure of an image recognition device 500 provided in an embodiment of the present application. Figure 5 As shown, the device may include an acquisition module 510 and a scheduling module 520 .
[0109] An acquisition module 510 is used to acquire first image data and an agent network; the agent network is a network constructed by directing connections between multiple agents based on the collaborative relationship between the agents;
[0110] The scheduling module 520 is used to determine at least one agent scheduling path for identifying the first image data in the agent network according to the ability probability of the agent for identifying the first image data; the agent scheduling path represents the calling order of the agent for identifying the first image data;
[0111] The scheduling module 520 is further used to call a corresponding agent in the agent network to identify the first image data for each agent scheduling path according to the agent scheduling path, and obtain at least one image recognition result corresponding to the agent scheduling path;
[0112] The scheduling module 520 is further configured to determine a target image recognition result according to at least one image recognition result.
[0113] In this embodiment, the agent network constructed by multiple agents can call the corresponding agents to perform image recognition in the face of multiple image data, and can be applied to a variety of complex task scenarios. In addition, since the agent network is a network constructed by direct connection of multiple agents based on the collaborative relationship between the agents, at least one agent scheduling path for identifying the first image data can be quickly determined in the agent network according to the ability probability of the agent to identify the first image data, and the agent is scheduled to identify the image data based on the agent scheduling path, which can greatly improve the overall efficiency of image data recognition. At the same time, at least one image recognition result corresponding to the agent scheduling path is obtained for each agent scheduling path, and the target image recognition result is determined based on the at least one image recognition result, which can also improve the accuracy of image recognition.
[0114] In some embodiments, the image recognition device 500 further includes a determination module;
[0115] The acquisition module 510 is also used to obtain the preset weight of each agent scheduling path;
[0116] A determination module, used to determine the weight of the image recognition result corresponding to each agent scheduling path according to the preset weight of each agent scheduling path;
[0117] The determination module is also used to determine the target image recognition result according to the weight of the image recognition result.
[0118] In some embodiments, the image recognition device 500 further includes an application module;
[0119] An application module, used for comparing the target image recognition result with the preset image recognition result;
[0120] The scheduling module 520 is also used to reduce the weight of the target agent scheduling path corresponding to the target image recognition result and reduce the probability of the ability of the agent on the target agent scheduling path to recognize the first image data when the difference between the target image recognition result and the preset image recognition result is greater than a preset threshold.
[0121] In some embodiments, the image recognition device 500 further includes a construction module;
[0122] A construction module, used for constructing multiple intelligent agents into a directed acyclic graph according to the cooperative relationship between the multiple intelligent agents;
[0123] The construction module is also used to construct a Bayesian network with the probability of each agent's ability to recognize the first image data as a variable to obtain an agent network.
[0124] In some embodiments, the image recognition device 500 further includes a computing module;
[0125] A calculation module, used for calculating the ability probability of each intelligent agent for identifying the first image data on the Bayesian network based on the Bayesian formula;
[0126] The determination module is also used to determine at least one agent scheduling path on the Bayesian network according to the size of the ability probability of the agent used to identify the first image data.
[0127] Figure 5 The various modules in the device shown can be implemented Figure 3 Each step in the above steps can achieve the corresponding technical effect, which will not be repeated here for the sake of brevity.
[0128] Figure 6 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application is shown.
[0129] The electronic device may include a processor 601 and a memory 602 storing computer program instructions.
[0130] Specifically, the processor 601 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0131] The memory 602 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 602 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 602 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 602 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 602 is a non-volatile solid-state memory.
[0132] In certain embodiments, the memory may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Thus, typically, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to one aspect of the present application.
[0133] The processor 601 implements any one of the image recognition methods in the above embodiments by reading and executing computer program instructions stored in the memory 602 .
[0134] In one example, the electronic device may further include a communication interface 603 and a bus 610. Figure 6 As shown, the processor 601, the memory 602, and the communication interface 603 are connected via a bus 610 and communicate with each other.
[0135] The communication interface 603 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0136] Bus 610 includes hardware, software or both, and the parts of electronic equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front side bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 610 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the application considers any suitable bus or interconnection.
[0137] In addition, in combination with the image recognition method in the above embodiment, the embodiment of the present application can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any one of the image recognition methods in the above embodiment is implemented.
[0138] An embodiment of the present application also provides a computer program product, including a computer program, which implements any one of the image recognition methods in the above embodiments when the computer program is processed and executed.
[0139] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.
[0140] The functional blocks shown in the above block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0141] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or devices based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.
[0142] The above reference is to the flowchart and / or block diagram of the method, device, equipment, storage medium and computer program product according to the embodiment of the present application. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0143] The above is only a specific implementation of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the above-described devices, modules and units can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application.
Claims
1. An image recognition method, characterized in that: include: Acquire first image data and an agent network; The agent network is a network constructed by directing connections between multiple agents based on the cooperative relationship between the agents; Determining at least one agent scheduling path for identifying the first image data in the agent network according to the ability probability of the agent for identifying the first image data; the agent scheduling path represents a calling order of the agent for identifying the first image data; For each of the agent scheduling paths, according to the agent scheduling path, calling a corresponding agent in the agent network to identify the first image data, and obtaining at least one image recognition result corresponding to the agent scheduling path; A target image recognition result is determined based on at least one of the image recognition results.
2. The method according to claim 1, characterized in that Determining a target image recognition result according to at least one of the image recognition results includes: Obtaining a preset weight for each of the agent's scheduling paths; Determining the weight of the image recognition result corresponding to each of the agent scheduling paths according to the preset weight of each of the agent scheduling paths; A target image recognition result is determined according to the weight of the image recognition result.
3. The method according to claim 2, characterized in that After determining the target image recognition result according to at least one of the image recognition results, the method further includes: Comparing the target image recognition result with a preset image recognition result; When the difference between the target image recognition result and the preset image recognition result is greater than a preset threshold, the weight of the target agent scheduling path corresponding to the target image recognition result is reduced, and the probability of the ability of the agent on the target agent scheduling path to recognize the first image data is reduced.
4. The method according to claim 1, characterized in that Before determining at least one agent scheduling path for identifying the first image data in the agent network based on the ability probability of the agent to identify the first image data, the method further includes: According to the cooperation relationship between the multiple intelligent agents, the multiple intelligent agents are constructed into a directed acyclic graph; A Bayesian network is constructed using the probability of each agent's ability to recognize the first image data as a variable to obtain an agent network.
5. The method according to claim 4, characterized in that The step of determining at least one agent scheduling path for identifying the first image data in the agent network according to the ability probability of the agent to identify the first image data comprises: Based on the Bayesian formula, calculating the ability probability of each intelligent agent for identifying the first image data on the Bayesian network; At least one agent scheduling path is determined on the Bayesian network according to the size of the ability probability of the agent used to identify the first image data.
6. An image recognition device, characterized in that: The device comprises: An acquisition module, used for acquiring first image data and an agent network; the agent network is a network constructed by directing connections between multiple agents based on the cooperative relationship between the agents; a scheduling module, configured to determine at least one agent scheduling path for identifying the first image data in the agent network according to the ability probability of the agent for identifying the first image data; the agent scheduling path represents a calling order of the agent for identifying the first image data; The scheduling module is further used to call a corresponding agent in the agent network to identify the first image data for each agent scheduling path according to the agent scheduling path, and obtain at least one image recognition result corresponding to the agent scheduling path; The scheduling module is further used to determine a target image recognition result based on at least one of the image recognition results.
7. The device according to claim 6, characterized in that The device also includes a determination module; The acquisition module is further used to obtain the preset weight of each agent scheduling path; The determination module is used to determine the weight of the image recognition result corresponding to each of the agent scheduling paths according to the preset weight of each of the agent scheduling paths; The determination module is further used to determine the target image recognition result according to the weight of the image recognition result.
8. The device according to claim 7, characterized in that The device also includes an application module; The application module is used to compare the target image recognition result with a preset image recognition result; The scheduling module is also used to reduce the weight of the target agent scheduling path corresponding to the target image recognition result and reduce the probability of the ability of the agent on the target agent scheduling path to recognize the first image data when the difference between the target image recognition result and the preset image recognition result is greater than a preset threshold.
9. An electronic device, characterized in that: The device comprises: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the image recognition method according to any one of claims 1 to 5 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the image recognition method according to any one of claims 1 to 5 is implemented.
11. A computer program product, characterized in that When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the image recognition method as described in any one of claims 1 to 5.
Citation Information
Cited By
Object processing method, electronic equipment, storage medium and program product
CN121257717A