Method, device, equipment and computer-readable storage medium for establishing correction model

Through the loss function training of grid distribution and Markov random field, a correction model is generated to solve the problem of incorrect recognition of the product category recognition model, which improves the recognition accuracy and training efficiency.

CN113361511BActive Publication Date: 2024-10-01SF TECH CO LTD
View PDF 14 Cites 0 Cited by

Patent Information

Application Number
CN202010147659.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-03-05
Publication Date
2024-10-01
Estimated Expiration
2040-03-05

AI Technical Summary

Technical Problem

Existing product category recognition models have problems with misrecognition in practical applications, especially in cluttered actual scenes where adjacent products are highly similar, obscured or reflected, and the recognition accuracy is insufficient.

Method used

By obtaining the product category recognition result set, grid distribution is performed according to the placement position of the product, a grid image is generated, and the Markov random field is used to calculate the potential energy as a loss function, the initial model is trained, and a correction model is generated to correct the misidentification. result.

Benefits of technology

It improves the recognition accuracy of product category recognition results, reduces the amount of data processing, improves the model's pertinence to product placement, and enhances training speed and correction accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113361511B_ABST
    Figure CN113361511B_ABST
Patent Text Reader

Abstract

The embodiments of the present application provide a method, device, equipment and computer-readable storage medium for establishing a correction model. The generated correction model can correct the erroneous recognition results in the commodity type recognition results given by the commodity category recognition model. The method provided by the embodiments of the present application includes: obtaining a commodity category recognition result set, wherein the commodity category recognition result set includes commodity category recognition results of commodities contained in different images to be recognized, and the commodity category recognition results include marked erroneous commodity category recognition results and commodity category recognition results after the erroneous commodity category recognition results are corrected; the commodity category recognition results of the commodities contained in each image to be recognized are distributed in a grid according to the placement of the commodities in turn to obtain multiple grid images; with the goal of correcting the erroneous commodity category recognition results in the input grid image, the initial model is trained through multiple grid images, and the trained model is used as the correction model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image recognition technology, and in particular to a method, device, equipment and computer-readable storage medium for establishing a correction model. Background Art

[0002] In recent years, artificial intelligence (AI) has experienced explosive growth in various fields. From the perspective of technology, the application of AI technology is more focused on voice and vision, such as intelligent driving, drones, augmented reality (AR), virtual reality (VR), big data and data services. At the same time, it can also be seen that AI technology has the problem of improving its accuracy. In some application fields, it is still in the "weak AI" stage, and there is still a long way to go before it can be fully integrated into the technology field and widely promoted and applied.

[0003] Taking the commodity category recognition scenario in image recognition as an example, in the existing related technologies, a large number of commodity images can be collected based on AI technology to train the commodity category recognition model. However, when the trained model is put into practical application, there is still the problem of misidentifying commodities, especially when the actual scene is cluttered, adjacent commodities are highly similar, or commodities are obscured or reflective. The recognition processing of the commodity category recognition model is still a huge challenge.

[0004] Therefore, if the accuracy of identifying product categories can be improved, AI technology can play a more powerful role in product category identification, supermarket management and even supply chain management. Summary of the invention

[0005] The embodiments of the present application provide a method, device, equipment and computer-readable storage medium for establishing a correction model. The generated correction model can correct the erroneous recognition results in the commodity type recognition results given by the commodity category recognition model, thereby improving the recognition accuracy of the commodity category recognition results.

[0006] In a first aspect, an embodiment of the present application provides a method for establishing a correction model, the method comprising:

[0007] Obtaining a commodity category recognition result set, wherein the commodity category recognition result set includes commodity category recognition results of commodities contained in different to-be-recognized images, and the commodity category recognition results include marked erroneous commodity category recognition results and commodity category recognition results after the erroneous commodity category recognition results are corrected;

[0008] The commodity category recognition results of the commodities contained in each image to be recognized are sequentially distributed in a grid according to the placement positions of the commodities to obtain a plurality of grid images;

[0009] With the goal of correcting the erroneous product category recognition results in the input grid image, the initial model is trained through multiple grid images, and the trained model is used as the corrected model.

[0010] In combination with the first aspect of the embodiment of the present application, in a first possible implementation manner of the first aspect of the embodiment of the present application, the commodity category recognition results of the commodities contained in each image to be recognized are sequentially distributed in a grid according to the placement position of the commodities, and the obtained multiple grid images include:

[0011] Extracting product category labels from the product category recognition results of the products contained in each image to be recognized;

[0012] Multiple groups of commodity category labels are distributed in a grid according to the placement positions of the commodities to obtain multiple grid images.

[0013] In combination with the first aspect of the embodiment of the present application, in a second possible implementation manner of the first aspect of the embodiment of the present application, training the initial model through multiple grid images includes:

[0014] Based on the commodity category recognition results corrected by the erroneous commodity category recognition results in each grid image, a first potential energy is calculated by using a Markov random field and used as a first loss function, wherein the first potential energy is used to indicate the degree of difference between different commodity category recognition results;

[0015] The initial model is trained using multiple grid images and a first loss function.

[0016] In combination with the second possible implementation of the first aspect of the embodiment of the present application, in a third possible implementation of the first aspect of the embodiment of the present application, training the initial model through multiple grid images also includes:

[0017] Based on the commodity category recognition results other than the commodity category recognition results corrected by the erroneous commodity category recognition results in each grid image, a second potential energy is calculated by using a Markov random field and used as a second loss function, wherein the second potential energy is used to indicate the degree of difference between different commodity category recognition results;

[0018] Model training of the initial model using multiple grid images and a first loss function includes:

[0019] The initial model is trained using a plurality of grid images, a first loss function, and a second loss function.

[0020] In combination with the third possible implementation of the first aspect of the embodiment of the present application, in a fourth possible implementation of the first aspect of the embodiment of the present application, in the process of calculating the first potential energy and / or the second potential energy by using a Markov random field, the process includes:

[0021] The first potential energy and / or the second potential energy is calculated by a first-order neighborhood system in a Markov random field, wherein the first-order neighborhood system is used to indicate a range of commodity category recognition results directly adjacent to the target commodity category recognition result when calculating the potential energy.

[0022] In combination with the third possible implementation manner of the first aspect of the embodiment of the present application, in a fifth possible implementation manner of the first aspect of the embodiment of the present application, with the goal of correcting an erroneous commodity category recognition result in an input grid image, before training the initial model using multiple grid images, the method further includes:

[0023] Convert each commodity category recognition result in the plurality of grid images into a corresponding digital identifier; or,

[0024] Each commodity category recognition result in the commodity category recognition result set is converted into a corresponding digital identifier, and the digital identifier is used to identify different commodity category recognition results.

[0025] In combination with the first aspect of the embodiment of the present application, in a sixth possible implementation manner of the first aspect of the embodiment of the present application, after the trained model is used as the revised model, the method further includes:

[0026] Obtaining a target commodity category recognition result, wherein the target commodity category recognition result is a commodity category recognition result of different commodities included in the target image;

[0027] According to the locations of different commodities contained in the target image in the target image, the commodity category recognition results of different commodities contained in the target image are distributed in a grid to obtain a target grid image;

[0028] Inputting the target grid image into the correction model to correct the erroneous commodity category recognition result in the target grid image, wherein the correction model is obtained by training the initial model with the erroneous commodity category recognition result set, and the erroneous commodity category recognition result set includes different erroneous commodity category recognition results in different grid images;

[0029] Extract the correction result of the target mesh image output by the correction model.

[0030] In a second aspect, an embodiment of the present application provides a device for establishing a correction model, the device comprising:

[0031] an acquisition unit, configured to acquire a commodity category recognition result set, wherein the commodity category recognition result set includes commodity category recognition results of commodities contained in different images to be recognized, and the commodity category recognition results include marked erroneous commodity category recognition results and commodity category recognition results after the erroneous commodity category recognition results are corrected;

[0032] A distribution unit is used to distribute the commodity category recognition results of each commodity contained in each image to be recognized in a grid according to the placement position of the commodity to obtain a plurality of grid images;

[0033] The training unit is used to train the initial model through multiple grid images with the goal of correcting the erroneous commodity category recognition results in the input grid image, and use the trained model as the corrected model.

[0034] In conjunction with the second aspect of the embodiment of the present application, in a first possible implementation manner of the second aspect of the embodiment of the present application, the distribution unit is specifically configured to:

[0035] Extracting product category labels from the product category recognition results of the products contained in each image to be recognized;

[0036] Multiple groups of commodity category labels are distributed in a grid according to the placement positions of the commodities to obtain multiple grid images.

[0037] In conjunction with the second aspect of the embodiment of the present application, in a second possible implementation manner of the second aspect of the embodiment of the present application, the training unit is specifically used to:

[0038] Based on the commodity category recognition results corrected by the erroneous commodity category recognition results in each grid image, a first potential energy is calculated by using a Markov random field and used as a first loss function, wherein the first potential energy is used to indicate the degree of difference between different commodity category recognition results;

[0039] The initial model is trained using multiple grid images and a first loss function.

[0040] In conjunction with the second possible implementation manner of the second aspect of the embodiment of the present application, in a third possible implementation manner of the second aspect of the embodiment of the present application, the training unit is further used to:

[0041] Based on the commodity category recognition results other than the commodity category recognition results corrected by the erroneous commodity category recognition results in each grid image, a second potential energy is calculated by using a Markov random field and used as a second loss function, wherein the second potential energy is used to indicate the degree of difference between different commodity category recognition results;

[0042] Model training of the initial model using multiple grid images and a first loss function includes:

[0043] The initial model is trained using a plurality of grid images, a first loss function, and a second loss function.

[0044] In combination with the third possible implementation manner of the second aspect of the embodiment of the present application, in a fourth possible implementation manner of the second aspect of the embodiment of the present application, the training unit is specifically used to:

[0045] The first potential energy and / or the second potential energy is calculated by a first-order neighborhood system in a Markov random field, wherein the first-order neighborhood system is used to indicate a range of commodity category recognition results directly adjacent to the target commodity category recognition result when calculating the potential energy.

[0046] In combination with the third possible implementation of the second aspect of the embodiment of the present application, in a fifth possible implementation of the second aspect of the embodiment of the present application, the device further includes a conversion unit, which is used to:

[0047] Convert each commodity category recognition result in the plurality of grid images into a corresponding digital identifier; or,

[0048] Each commodity category recognition result in the commodity category recognition result set is converted into a corresponding digital identifier, and the digital identifier is used to identify different commodity category recognition results.

[0049] In combination with the second aspect of the embodiment of the present application, in a sixth possible implementation manner of the second aspect of the embodiment of the present application, the apparatus further includes an application unit, which is configured to:

[0050] Obtaining a target commodity category recognition result, wherein the target commodity category recognition result is a commodity category recognition result of different commodities included in the target image;

[0051] According to the locations of different commodities contained in the target image in the target image, the commodity category recognition results of different commodities contained in the target image are distributed in a grid to obtain a target grid image;

[0052] Inputting the target grid image into the correction model to correct the erroneous commodity category recognition result in the target grid image, wherein the correction model is obtained by training the initial model with the erroneous commodity category recognition result set, and the erroneous commodity category recognition result set includes different erroneous commodity category recognition results in different grid images;

[0053] Extract the correction result of the target mesh image output by the correction model.

[0054] In a third aspect, an embodiment of the present application further provides a training device for correcting a model, including a processor and a memory, wherein a computer program is stored in the memory, and when the processor calls the computer program in the memory, the steps of any method provided in the embodiment of the present application are executed.

[0055] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, which stores a plurality of instructions suitable for loading by a processor to execute the steps of any method provided in an embodiment of the present application.

[0056] From the above content, it can be concluded that the embodiments of the present application have the following beneficial effects:

[0057] On the one hand, by training a correction model for commodity category recognition results, when the commodity category recognition model is applied, the correction model can be combined to correct the erroneous recognition results in the commodity type recognition results given by the commodity category recognition model, thereby improving the recognition accuracy of the commodity category recognition results.

[0058] On the other hand, the commodity category recognition results are distributed in a grid according to the placement of the commodities to obtain a grid image, which is used in the training process of the correction model to further reduce the amount of data processing and improve the model's specificity for the placement of commodities, thereby improving the model's training speed and the subsequent model correction accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0060] Figure 1 A flow chart of a method for establishing a correction model according to an embodiment of the present application;

[0061] Figure 2 A schematic diagram of a grid image according to an embodiment of the present application;

[0062] Figure 3 A partial schematic diagram of the commodity category recognition result of the embodiment of the present application;

[0063] Figure 4 A schematic diagram of a neighborhood system according to an embodiment of the present application;

[0064] Figure 5 For this application Figure 1 A flow chart of step S103 of the corresponding embodiment;

[0065] Figure 6 A schematic diagram of a grid image after correcting an erroneous commodity category recognition result in an embodiment of the present application;

[0066] Figure 7A schematic diagram of the structure of a device for establishing a correction model according to an embodiment of the present application;

[0067] Figure 8 A structural schematic diagram of a device for establishing a correction model according to an embodiment of the present application. DETAILED DESCRIPTION

[0068] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0069] In the following description, the specific embodiments of the present application will be described with reference to the steps and symbols performed by one or more computers, unless otherwise stated. Therefore, these steps and operations will be mentioned several times as being performed by a computer, and the computer execution referred to herein includes the operation of a computer processing unit by an electronic signal representing data in a structured form. This operation converts the data or maintains it at a location in the memory system of the computer, which can be reconfigured or otherwise change the operation of the computer in a manner familiar to testers in the field. The data structure maintained by the data is a physical location in the memory, which has specific characteristics defined by the data format. However, the principles of the present application are described in the above text, which does not represent a limitation, and testers in the field will understand that the various steps and operations described below can also be implemented in hardware.

[0070] The principles of the present application may be operated using many other general or specific purpose computing, communication environments or configurations. Examples of well-known computing systems, environments and configurations suitable for use with the present application may include, but are not limited to, handheld phones, personal computers, servers, multiprocessor systems, microcomputer-based systems, mainframe computers, and distributed computing environments, including any of the above systems or devices.

[0071] The terms "first", "second", and "third" in this application are used to distinguish different objects rather than to describe a specific order. In addition, the terms "include", "have", and any variations thereof are intended to cover non-exclusive inclusions.

[0072] First of all, before introducing the embodiments of the present application, the relevant content about the application background of the embodiments of the present application is introduced.

[0073] In the existing related technologies, when AI technology is used to monitor goods in supermarkets, especially unmanned supermarkets, although a large number of product images with product category annotations can be combined to train a product category recognition model to identify goods in images collected on-site, there is still a problem of misidentification of goods, especially when the actual scene is cluttered, adjacent goods are highly similar, or goods are obscured or reflective, the problem of misidentification is more prominent.

[0074] Based on the above-mentioned defects in the existing related technologies, the embodiments of the present application provide a method for establishing a correction model, which at least overcomes the defects in the existing related technologies to a certain extent.

[0075] The method for establishing a correction model mentioned in the embodiment of the present application may be executed by a device for establishing a correction model, or different types of correction model establishing devices such as a server device, a physical host or a user equipment (UE) that integrates the device for establishing a correction model. The device for establishing a correction model may be implemented in hardware or software. The UE may specifically be a terminal device such as a smart phone, a tablet computer, a laptop computer, a PDA, a desktop computer or a personal digital assistant (PDA). The device for establishing a correction model may also be divided into multiple devices and jointly execute the method for establishing a correction model provided in the embodiment of the present application.

[0076] Figure 1 A schematic diagram of a process for establishing a correction model in an embodiment of the present application is shown, Figure 1 As shown, the method for establishing the correction model provided in the embodiment of the present application may specifically include the following steps:

[0077] Step S101, obtaining a commodity category recognition result set, wherein the commodity category recognition result set includes commodity category recognition results of commodities contained in different images to be recognized, and the commodity category recognition results include marked erroneous commodity category recognition results and commodity category recognition results after the erroneous commodity category recognition results are corrected;

[0078] Step S102, sequentially distributing the commodity category recognition results of the commodities contained in each image to be recognized into a grid according to the placement positions of the commodities to obtain a plurality of grid images;

[0079] Step S103, with the goal of correcting the erroneous commodity category recognition results in the input grid image, the initial model is trained using multiple grid images, and the trained model is used as a corrected model.

[0080] exist Figure 1In the technical solution proposed in the illustrated embodiment, it can be seen that, on the one hand, by training a correction model for commodity category recognition results, when the commodity category recognition model is applied, the correction model can be combined to correct erroneous recognition results in commodity type recognition results given by the commodity category recognition model, thereby improving the recognition accuracy of the commodity category recognition results.

[0081] On the other hand, the commodity category recognition results are distributed in a grid according to the placement of the commodities to obtain a grid image, which is used in the training process of the correction model to further reduce the amount of data processing and improve the model's specificity for the placement of commodities, thereby improving the model's training speed and the subsequent model correction accuracy.

[0082] The following continues Figure 1 The specific implementation methods of each step of the illustrated embodiment are described in detail:

[0083] In the embodiment of the present application, among the different commodity category recognition results in the commodity category recognition result set, the correct commodity category recognition result may be the original commodity category recognition result recognized by the existing commodity category recognition model and confirmed by the staff, and a correct mark may be added to indicate that the specific commodity category recognition result is correctly recognized;

[0084] The incorrect product category recognition result can be a product category recognition result identified by a product category recognition model that has been confirmed by staff to have errors. An error mark can be added to indicate that the specific product category recognition result is an identification error. In addition, for the incorrect product category recognition result, the corresponding product category recognition result corrected by staff can also be configured in the product category recognition result set to facilitate the subsequent training of the correction model.

[0085] The different product category recognition results in the product category recognition result set can directly assign corresponding product category labels to each product based on the original image. The product category label is used to identify the product category corresponding to the product. In this way, the product category recognition result of each image can be the image obtained by adding the product category label to the original image, or the original image can be understood as obtaining the product category label through product category recognition processing.

[0086] Among them, if the product category label in the product category recognition result is embedded in the original image in the form of an image, such as Figure 3 A partial schematic diagram of the commodity category recognition result of the embodiment of the present application is shown, and the display position of the commodity category label can be set at the shelf carrying the commodity, and cover the shelf or partially cover the shelf.

[0087] At this time, due to the influence of actual conditions such as limited shooting space and limited shooting angle, the original image collected on site often still has certain distortion and tilt. Therefore, the embodiment of the present application introduces grid distribution processing, that is, the commodity category recognition results of the commodities contained in the image to be recognized are distributed in a grid according to the placement positions of the commodities to obtain a corresponding grid image. For example, Figure 2 A schematic diagram of a grid image of an embodiment of the present application is shown, such as Figure 2 As shown, after the grid distribution processing, the distribution arrangement of the commodity category recognition results is more neat and standardized, and has more obvious commodity placement characteristics. Therefore, the subsequent model training can be simpler, reduce the amount of data processing and improve the model's pertinence to the commodity placement.

[0088] The grid distribution refers to mapping each product into grids according to its placement in the original image and the size of the space it occupies, forming a grid image, and assigning a product category recognition result to the product corresponding to each grid in the image. For products displayed in similar positions, the products are often the same or similar, and the size of the space they occupy is also the same or similar, so the converted grids can be of the same size, such as Figure 2 As shown, the grids are arranged in squares of the same size; however, for commodities that are arranged in a disorderly manner or commodities of different categories, the converted grids are large or small, depending on the arrangement of the commodities in the original image.

[0089] As an exemplary embodiment, the grid distribution processing can be specifically targeted at commodity category labels, that is, the commodity category labels can be extracted from the commodity category recognition results of each image to be identified in turn; multiple groups of commodity category labels can be distributed in a grid according to the placement of the commodities to obtain multiple grid images.

[0090] If the commodity category labels in the commodity category recognition result are embedded in the original image in the form of images, the commodity category labels in the current image may be extracted and subjected to grid distribution processing.

[0091] Since the grid image only contains product category labels but not product images, it is easy to understand that under this setting, the training efficiency and training effect of subsequent models can be significantly improved, that is, the model has a higher precision correction effect.

[0092] Further, to facilitate the subsequent model training, as another exemplary embodiment, Figure 2 The product category labels (product category identification results) are in digital form and are easy to understand. The product category labels in digital form are also convenient for data processing.

[0093] Correspondingly, for the grid images, each commodity category recognition result in the plurality of grid images may be converted into a corresponding digital identification; or,

[0094] For the commodity category recognition result set before the grid image is obtained, each commodity category recognition result in the commodity category recognition result set can be converted into a corresponding digital identifier, and the digital identifier is used to identify different commodity category recognition results.

[0095] In an embodiment of the present application, the initial model is an initialized neural network model, which includes an input layer, a convolutional layer and a fully connected layer. The input layer converts the input image into an image vector, and the convolutional layer extracts different feature vectors from the input image vector. The fully connected layer then classifies the feature vectors output by the convolutional layer and maps them to the sample label space as the recognition result of the model.

[0096] During the training process of the model, different grid images can be input into the model in turn for forward propagation, and then the loss function can be calculated based on the correction results output by the model, and back propagation can be performed to adjust and optimize the model parameters. After repeated propagation and optimization, the trained model is a cultivation model that can be put into practical application, and the establishment of the correction model is completed.

[0097] During the training process, as another exemplary embodiment, the Markov random field can be used as the basis for identifying incorrect product category recognition results, which may involve the calculation of potential energy. The potential energy is used to indicate the degree of difference between different product category recognition results. The larger the potential energy, the greater the difference, and the more likely it is that they do not belong to the same product. The smaller the potential energy, the more likely it is that they belong to the same product.

[0098] The specific calculation process of the potential energy can be referred to as follows:

[0099] After converting the product category recognition results into a grid image, the Maximum A Posterior Probability Estimation (MAP) algorithm can be used to convert the correction problem of the recognition result into the problem of solving the MAP of the image.

[0100] The MAP estimator can be described as:

[0101] Formula 1, ω MAP =Arg max ω∈Ω P X|F (ω|f);

[0102] Formula 2,

[0103] Among them, X is the required product category label, called PX (ω) is the prior probability of labeling ω.

[0104] For the denominator of Formula 2, P F (f) is the probability of observing value f, because the observed data f is given, so P F (f) is a constant. Therefore, the denominator in Formula 2 is a determinable value in subsequent calculations.

[0105] For the first half of the numerator in Formula 2, P F|X (f,ω) is the conditional probability density function (also called likelihood function) of the observation value f, which is the probability description of the observed image F obtained from the labeled image X. According to the law of large numbers, suppose the probability density function P(f s |ω s ) obeys a Gaussian distribution, its mean μ can be used λ and σ λ To express its distribution law. In this way, the likelihood energy function can be expressed as follows:

[0106] Formula 3,

[0107] For the second half of the numerator of Formula 2, that is, the prior probability P X (ω), assuming it is a Markov random field, the key to solving it is to define its potential group potential energy. Considering the computational efficiency, the first-order neighborhood system (3-neighborhood system) and the second-order neighborhood system (8-neighborhood system) are generally used in the Markov model. The first-order and second-order neighborhood systems and their corresponding atomic groups can be referred to Figure 4 A schematic diagram of a neighborhood system according to an embodiment of the present application is shown.

[0108] The first-order neighborhood system is used to indicate the range of commodity category recognition results that are directly adjacent to the target commodity category recognition result when calculating potential energy.

[0109] As another exemplary embodiment, considering the common rules of shelf merchandise placement, the correlation between two horizontally adjacent merchandise is the greatest, the correlation between vertically adjacent merchandise is average, and the correlation between 45° adjacent merchandise, 135° adjacent merchandise, and more than three adjacent merchandise is relatively weak. Therefore, only the first-order neighborhood system can be selected, and the influence of the consistency of merchandise categories in the horizontal direction on the energy function can be strengthened.

[0110] The first-order atomic group potential energy can be expressed as follows:

[0111] Formula 4,

[0112] Among them, ω s and ω ris the category of two adjacent commodities in the first-order atomic cluster. α and β are model parameters, which are set to 0<α<β<1.0 according to actual conditions. They control the isomorphism of the region. In the correction of commodity identification results, they are the penalty amount when the predicted categories of two adjacent commodities are different. The single-point atomic cluster in the first-order neighborhood system is not considered in the above formula because for a single isolated commodity, its surrounding commodities are either vacancies (marked as -1) or other commodities, and its double-point atomic cluster potential energy must be positive. That is, the single-point atomic cluster can be reflected by the double-point atomic cluster potential energy.

[0113] After defining the potential energy of the atomic group, we can define the second half of the numerator of Formula 2, namely the prior probability P X The energy function of (ω) is:

[0114] Formula 5, U 2 (ω)=∑ c∈C V 2 (ω c )

[0115] According to formulas 2, 3, and 5, the posterior energy can be expressed as:

[0116] U(ω,f)=U 1 (ω,f)+U 2 (ω)

[0117] In this way, the calculated U(ω,f) is used as the potential energy of the product category recognition result.

[0118] In the specific process of model training based on potential energy, the corresponding potential energy can be calculated for the corrected commodity category recognition result of the erroneous commodity category recognition result in each grid image, so as to determine the range of potential energy of the corrected commodity category recognition result when the commodity category recognition result is corrected. The potential energy is used as a loss function for model training. Specifically, it can be iteratively solved using methods such as simulated annealing and deterministic annealing, so as to obtain a more accurate commodity category recognition result that is more in line with the shelf commodity placement rules.

[0119] Correspondingly, the above Figure 1 Corresponding to step S103 of the embodiment, as Figure 5 This application shown Figure 1 A flowchart of step S103 of the corresponding embodiment may include:

[0120] Step S501, based on the commodity category recognition result corrected by the erroneous commodity category recognition result in each grid image, a first potential energy is calculated by using a Markov random field, and used as a first loss function, wherein the first potential energy is used to indicate the degree of difference between different commodity category recognition results;

[0121] Step S502: Perform model training on the initial model using multiple grid images and a first loss function.

[0122] It can be understood that combining the potential energy calculated by Markov random field as the loss function can further provide more powerful data support for identifying and correcting erroneous product category recognition results. In the process of correction, the connection between adjacent products is strengthened, thereby continuing to effectively improve the correction accuracy of the model on the basis of the model.

[0123] See also Figure 6 A schematic diagram of a grid image after correcting an erroneous commodity category recognition result according to an embodiment of the present application is shown. Figure 2 In the 3rd row and 4th column, and the 5th row and 2nd column, because the initial product category recognition result is different from the product category recognition category of the left and right adjacent products, and is also different from the product category recognition category of the upper and lower adjacent products, it will be corrected in the process of optimizing the posterior energy and become Figure 5 The correct product category identification result is shown.

[0124] Furthermore, in addition to considering the incorrect product category recognition results, the potential energy of all product category recognition results can also be considered from an overall level to train the model. Figure 1 The corresponding embodiment step S103 may also include:

[0125] Based on the commodity category recognition results other than the commodity category recognition results corrected by the erroneous commodity category recognition results in each grid image, a second potential energy is calculated by using a Markov random field;

[0126] at the same time, Figure 5 The corresponding embodiment step S502 may include:

[0127] The initial model is trained using a plurality of grid images, a first loss function, and a second loss function.

[0128] Under this setting, starting from the overall level, the connection between adjacent products is strengthened again, and efforts are made to correct the correction results of the model with the lowest potential energy, thus ensuring the recognition accuracy of product categories with a high probability.

[0129] After completing the training of the model, the obtained corrected model can be put into practical application to realize the correction method of the commodity category recognition result. Correspondingly, its application can be realized through the following steps:

[0130] Obtaining a target commodity category recognition result, wherein the target commodity category recognition result is a commodity category recognition result of different commodities included in the target image;

[0131] According to the locations of different commodities contained in the target image in the target image, the commodity category recognition results of different commodities contained in the target image are distributed in a grid to obtain a target grid image;

[0132] Inputting the target grid image into the correction model to correct the erroneous commodity category recognition result in the target grid image, wherein the correction model is obtained by training the initial model with the erroneous commodity category recognition result set, and the erroneous commodity category recognition result set includes different erroneous commodity category recognition results in different grid images;

[0133] Extract the correction result of the target mesh image output by the correction model.

[0134] It should be noted that the correction model established by the correction model establishment method provided in the embodiment of the present application can not only exist independently, but also be embedded in the existing commodity category recognition model, so as to further improve the recognition accuracy of the commodity category recognition model by combining the correction processing of the correction model.

[0135] Similarly, the method for establishing the correction model provided in the embodiment of the present application can also be embedded in the process of establishing the existing commodity category recognition model. The commodity category recognition model thus established can also have the functions that the correction model established by the method for establishing the correction model provided in the embodiment of the present application should have.

[0136] In order to better implement the training method of the correction model provided in the embodiment of the present application, the embodiment of the present application also provides a device for establishing the correction model.

[0137] See also Figure 7 , Figure 7 This is a schematic diagram of a structure of a device for establishing a correction model in an embodiment of the present application. In the embodiment of the present application, the device for establishing a correction model 700 may specifically include the following structure:

[0138] The acquisition unit 701 is used to acquire a commodity category recognition result set, wherein the commodity category recognition result set includes commodity category recognition results of commodities contained in different images to be recognized, and the commodity category recognition results include marked erroneous commodity category recognition results and commodity category recognition results after the erroneous commodity category recognition results are corrected;

[0139] A distribution unit 702 is used to distribute the commodity category recognition results of each commodity contained in each image to be recognized in a grid according to the placement position of the commodity to obtain a plurality of grid images;

[0140] The training unit 703 is used to train the initial model through multiple grid images with the goal of correcting the erroneous commodity category recognition results in the input grid image, and use the trained model as the corrected model.

[0141] As an exemplary embodiment, the distribution unit 702 is specifically configured to:

[0142] Extracting product category labels from the product category recognition results of the products contained in each image to be recognized;

[0143] Multiple groups of commodity category labels are distributed in a grid according to the placement positions of the commodities to obtain multiple grid images.

[0144] As another exemplary embodiment, the training unit 703 is specifically configured to:

[0145] Based on the commodity category recognition results corrected by the erroneous commodity category recognition results in each grid image, a first potential energy is calculated by using a Markov random field and used as a first loss function, wherein the first potential energy is used to indicate the degree of difference between different commodity category recognition results;

[0146] The initial model is trained using multiple grid images and a first loss function.

[0147] As another exemplary embodiment, the training unit 703 is further configured to:

[0148] Based on the commodity category recognition results other than the commodity category recognition results corrected by the erroneous commodity category recognition results in each grid image, a second potential energy is calculated by using a Markov random field and used as a second loss function, wherein the second potential energy is used to indicate the degree of difference between different commodity category recognition results;

[0149] Model training of the initial model using multiple grid images and a first loss function includes:

[0150] The initial model is trained using a plurality of grid images, a first loss function, and a second loss function.

[0151] As another exemplary embodiment, the training unit 703 is specifically configured to:

[0152] The first potential energy and / or the second potential energy is calculated by a first-order neighborhood system in a Markov random field, wherein the first-order neighborhood system is used to indicate a range of commodity category recognition results directly adjacent to the target commodity category recognition result when calculating the potential energy.

[0153] As another exemplary embodiment, the apparatus further includes a conversion unit 704, which is used to:

[0154] Convert each commodity category recognition result in the plurality of grid images into a corresponding digital identifier; or,

[0155] Each commodity category recognition result in the commodity category recognition result set is converted into a corresponding digital identifier, and the digital identifier is used to identify different commodity category recognition results.

[0156] As another exemplary embodiment, the apparatus further includes an application unit 705, configured to:

[0157] Obtaining a target commodity category recognition result, wherein the target commodity category recognition result is a commodity category recognition result of different commodities included in the target image;

[0158] According to the locations of different commodities contained in the target image in the target image, the commodity category recognition results of different commodities contained in the target image are distributed in a grid to obtain a target grid image;

[0159] Inputting the target grid image into the correction model to correct the erroneous commodity category recognition result in the target grid image, wherein the correction model is obtained by training the initial model with the erroneous commodity category recognition result set, and the erroneous commodity category recognition result set includes different erroneous commodity category recognition results in different grid images;

[0160] Extract the correction result of the target mesh image output by the correction model.

[0161] The present application also provides a device for establishing a correction model, see Figure 8 , Figure 8 A schematic diagram of a structure of a device for establishing a correction model according to an embodiment of the present application is shown. Specifically, the device for establishing a correction model provided by the present application includes a processor 801, and the processor 801 is used to execute a computer program stored in a memory 802 to implement the following Figures 1 to 6 Corresponding to each step of the method for establishing a correction model in any embodiment; or, the processor 801 is used to execute the computer program stored in the memory 802 to implement the following Figure 7 The functions of each unit in the corresponding embodiment.

[0162] Exemplarily, the computer program may be divided into one or more modules / units, one or more modules / units are stored in the memory 802, and executed by the processor 801 to complete the present application. One or more modules / units may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program in the computer device.

[0163] The device for establishing the correction model may include, but is not limited to, the processor 801 and the memory 802. Those skilled in the art will appreciate that the illustration is merely an example of the device for establishing the correction model, and does not constitute a limitation on the device for establishing the correction model, and may include more or fewer components than those shown in the illustration, or a combination of certain components, or different components, for example, the device for establishing the correction model may also include input and output devices, network access devices, buses, etc., and the processor 801, the memory 802, the input and output devices, and the network access devices, etc. are connected via a bus.

[0164] The processor 801 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the correction model establishment device, and uses various interfaces and lines to connect various parts of the entire device.

[0165] The memory 802 can be used to store computer programs and / or modules. The processor 801 implements various functions of the computer device by running or executing the computer programs and / or modules stored in the memory 802 and calling the data stored in the memory 802. The memory 802 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data (such as audio data, video data, etc.) created by using the establishment device of the correction model. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0166] Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the above-described correction model establishment device, equipment and corresponding units can refer to the following. Figures 1 to 6The description of the method in any embodiment will not be repeated here in detail.

[0167] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0168] To this end, an embodiment of the present application provides a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the present application as follows: Figures 1 to 6 Corresponding to the steps in the method for establishing the correction model in any embodiment, the specific operations can be referred to as follows Figures 1 to 6 The description of the method for establishing the correction model in any embodiment will not be repeated here.

[0169] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0170] Due to the instructions stored in the computer-readable storage medium, the present application can be executed. Figures 1 to 6 Corresponding to the steps in the method for establishing the correction model in any embodiment, the present application can be implemented as follows Figures 1 to 6 The beneficial effects that can be achieved by the method for establishing the correction model in any embodiment are detailed in the previous description and will not be repeated here.

[0171] The above is a detailed introduction to the method, device, equipment and computer-readable storage medium for establishing the correction model provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and scope of application. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for establishing a correction model, characterized in that: The method comprises: Acquire a commodity category recognition result set, wherein the commodity category recognition result set includes commodity category recognition results of commodities contained in different images to be recognized, and the commodity category recognition results include marked erroneous commodity category recognition results and commodity category recognition results after the erroneous commodity category recognition results are corrected; Sequentially distributing the commodity category recognition results of the commodities contained in each of the to-be-recognized images in a grid according to the placement positions of the commodities to obtain a plurality of grid images; With the goal of correcting the erroneous commodity category recognition results in the input grid image, the initial model is trained using a plurality of the grid images, and the trained model is used as a corrected model; The performing model training on the initial model by using a plurality of the grid images comprises: Based on the commodity category recognition result corrected by the erroneous commodity category recognition result in each of the grid images, a first potential energy is calculated by a Markov random field and used as a first loss function, wherein the first potential energy is used to indicate the degree of difference between different commodity category recognition results; The initial model is trained using the plurality of grid images and the first loss function.

2. The method according to claim 1, characterized in that The step of sequentially distributing the commodity category recognition results of the commodities contained in each of the to-be-recognized images into grids according to the placement positions of the commodities to obtain a plurality of grid images includes: Extracting product category labels from the product category recognition results of the products contained in each image to be recognized; The multiple groups of commodity category labels are distributed in a grid according to the placement positions of the commodities to obtain the multiple grid images.

3. The method according to claim 1, characterized in that: The performing model training on the initial model by using a plurality of the grid images further comprises: Based on the commodity category recognition results other than the commodity category recognition results corrected by the erroneous commodity category recognition results in each of the grid images, a second potential energy is calculated by the Markov random field and used as a second loss function, wherein the second potential energy is used to indicate the degree of difference between different commodity category recognition results; Performing model training on the initial model using the plurality of grid images and the first loss function comprises: The initial model is trained using the plurality of grid images, the first loss function, and the second loss function.

4. The method according to claim 3, characterized in that The process of calculating the first potential energy and / or the second potential energy by using the Markov random field includes: The first potential energy and / or the second potential energy are calculated by a first-order neighborhood system in the Markov random field, wherein the first-order neighborhood system is used to indicate a range of commodity category recognition results directly adjacent to the target commodity category recognition result when calculating the potential energy.

5. The method according to claim 3, characterized in that: Before the initial model is trained by using the plurality of grid images with the goal of correcting the erroneous commodity category recognition results in the input grid images, the method further includes: Convert each commodity category recognition result in the plurality of grid images into a corresponding digital identifier; or, Each commodity category identification result in the commodity category identification result set is converted into a corresponding digital identifier, and the digital identifier is used to identify different commodity category identification results.

6. The method according to claim 1, characterized in that After using the trained model as a revised model, the method further includes: Obtaining a target commodity category recognition result, wherein the target commodity category recognition result is a commodity category recognition result of different commodities included in the target image; According to the locations of different commodities contained in the target image in the target image, the commodity category recognition results of different commodities contained in the target image are distributed in a grid to obtain a target grid image; Inputting the target grid image into the correction model to correct the incorrect commodity category recognition result in the target grid image, wherein the correction model is obtained by training the initial model with the incorrect commodity category recognition result set, and the incorrect commodity category recognition result set includes different incorrect commodity category recognition results in different grid images; The correction result of the target grid image output by the correction model is extracted.

7. A device for establishing a correction model, characterized in that: The device comprises: an acquisition unit, configured to acquire a commodity category recognition result set, wherein the commodity category recognition result set includes commodity category recognition results of commodities contained in different images to be recognized, and the commodity category recognition results include marked erroneous commodity category recognition results and commodity category recognition results after the erroneous commodity category recognition results are corrected; A distribution unit, used to sequentially distribute the commodity category recognition results of each commodity contained in the image to be recognized in a grid according to the placement position of the commodity, so as to obtain a plurality of grid images; A training unit, for training an initial model through a plurality of grid images with the goal of correcting an erroneous commodity category recognition result in an input grid image, and using the trained model as a corrected model; The performing model training on the initial model by using a plurality of the grid images comprises: Based on the commodity category recognition result corrected by the erroneous commodity category recognition result in each of the grid images, a first potential energy is calculated by a Markov random field and used as a first loss function, wherein the first potential energy is used to indicate the degree of difference between different commodity category recognition results; The initial model is trained using the plurality of grid images and the first loss function.

8. A device for establishing a correction model, characterized in that: The method comprises a processor and a memory, wherein the memory stores a computer program, and when the processor calls the computer program in the memory, the method according to any one of claims 1 to 6 is executed.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Pattern recognition method based on self-adaptation correction neural network

    CN103489009A

  • Image management method and device

    CN107239203A

  • Sample data processing method and device and computer readable storage medium

    CN108009589A

  • Automatic correction method and device for handwritten composition

    CN108595410A

  • Training method and device of classification model, mobile terminal, and readable storage medium

    CN108875821A