Object classification method, device, and electronic device
By calculating the recognition probability of the object and setting a threshold before classification, only objects that meet the conditions are further classified, the problem of unrecognition of the objects to be classified is solved, and the accuracy and efficiency of classification are improved.
Patent Information
- Application Number
- CN201910493583.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-06-06
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2039-06-06
AI Technical Summary
In the prior art, the object to be classified cannot be identified or forced classification results in inaccurate classification results and may waste time.
First, the recognition probability of the object to be classified is obtained through the recognizer of the object classification model, and only objects whose recognition probability reaches or exceeds the threshold are further classified, and the recognition and classification probability is calculated using feature information matching.
It improves the accuracy and efficiency of classification and reduces the waste of classification time for unidentified objects.
Smart Images

Figure CN112052867B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and more particularly to an object classification method. The present application also relates to a processing method for an object classification model. Background Art
[0002] With the advancement of science and technology and the development of computer technology, new objects and data are appearing in our daily lives at an increasingly rapid rate. To manage the growing number and variety of objects and data, it is often necessary to identify and classify these objects or data. For example, image recognition technology is used to identify and classify products, and data attributes are used to classify data objects. When using computer technology to classify physical objects, it is necessary to first convert the objects into recognizable data objects, then classify the data objects, and finally output the classification results. For example, in facial recognition technology, facial images must first be captured, then identified and classified, and finally the facial recognition or classification results are output.
[0003] In existing object classification methods, multiple categories can be pre-determined, and then the objects to be classified can be assigned to the corresponding categories to obtain classification results. However, some objects to be classified may not be recognized, such as those that do not belong to any of the pre-determined categories. Forcibly classifying these objects will lead to inaccurate classification results. Summary of the Invention
[0004] The present application provides an object classification method to improve the accuracy of classifying objects to be classified. The present application also provides an object classification device, an electronic device, and a computer device.
[0005] This application provides an object classification method, including:
[0006] Obtain the object to be classified;
[0007] Inputting the object to be classified into a recognizer of an object classification model to obtain a recognition probability that the object to be classified can be recognized by the object classification model, wherein the object classification model is used to determine the category to which the object to be classified belongs based on the object to be classified;
[0008] If the recognition probability reaches or exceeds the recognition probability threshold, the object to be classified is input into the classifier of the object classification model to obtain a recognition result.
[0009] Optionally, the object to be classified is an image to be classified, the object classification model is an image classification model, and the image classification model is used to determine the category to which the image to be classified belongs based on the image to be classified.
[0010] Optionally, inputting the object to be classified into a recognizer of an object classification model to obtain a recognition probability that the object to be classified can be recognized by the object classification model includes:
[0011] Extracting feature information of the object to be classified;
[0012] The identifier is used to match the feature information of the object to be classified with the feature information pre-stored in the object identifier, and the recognition probability is obtained according to the matching result.
[0013] Optionally, using the identifier to match the feature information of the object to be classified with feature information pre-stored in the object identifier, and obtaining the recognition probability based on the matching result includes:
[0014] respectively calculating a first similarity between at least one feature information of the object to be classified and at least one pre-stored feature information;
[0015] Obtaining an evaluation value of feature information of at least one image to be classified whose first similarity is not less than a first similarity threshold;
[0016] The recognition probability is obtained according to the evaluation value.
[0017] Optionally, obtaining at least one evaluation value of the feature information of the image to be classified whose first similarity is not less than a first similarity threshold includes:
[0018] Calculating a first ratio between the amount of feature information of the image to be classified having at least one first similarity not less than a first similarity threshold and the total amount of feature information of the image to be classified;
[0019] Obtaining the recognition probability according to the evaluation value includes: determining the first ratio as the recognition probability.
[0020] Optionally, inputting the object to be classified into a classifier of the object classification model to obtain a recognition result includes:
[0021] Inputting the object to be classified into the classifier of the object classification model to obtain a classification probability that the object to be classified belongs to the target category;
[0022] The target category whose classification probability meets a predetermined classification probability condition is determined as the category to which the object to be classified belongs.
[0023] Optionally, inputting the object to be classified into a classifier of the object classification model to obtain a classification probability that the object to be classified belongs to a target category includes:
[0024] Acquiring feature information of the object to be classified;
[0025] Use the classifier to
[0026] The feature information of the object to be classified is compared with the feature information of the target category to obtain a second similarity between the feature information of the object to be classified and the feature information of the target category. The classification probability is obtained based on the second similarity, and the amount of feature information of the target category is not less than the amount of feature information of the object to be classified.
[0027] Optionally, obtaining the classification probability according to the second similarity includes:
[0028] Calculating a second ratio between the amount of feature information of the to-be-classified object and the amount of feature information of the target category, wherein at least one second similarity is not less than a second similarity threshold;
[0029] The second ratio is determined as the classification probability.
[0030] Optionally, determining the target category whose classification probability satisfies a predetermined classification probability condition as the category to which the object to be classified belongs includes:
[0031] The target category whose classification probability reaches or exceeds a preset classification probability threshold is determined as the category to which the object to be classified belongs.
[0032] Optionally, determining the target category whose classification probability meets a predetermined classification probability condition as the category to which the object to be classified belongs includes: determining the target category with the largest classification probability as the category to which the object to be classified belongs.
[0033] Optionally, the method further includes: if the recognition probability does not reach the recognition probability threshold, outputting a result that the object to be classified cannot be recognized.
[0034] Optionally, the method further includes: outputting the recognition result.
[0035] The present application further provides an object classification device, comprising:
[0036] An object-to-be-classified obtaining unit, configured to obtain an object to be classified;
[0037] a recognition probability obtaining unit, inputting the object to be classified into a recognizer of an object classification model to obtain a recognition probability that the object to be classified can be recognized by the object classification model, wherein the object classification model is used to determine the category to which the object to be classified belongs based on the object to be classified;
[0038] The recognition result obtaining unit is configured to input the object to be classified into the classifier of the object classification model to obtain a recognition result if the recognition probability reaches or exceeds a recognition probability threshold.
[0039] Optionally, the object to be classified is an image to be classified, the object classification model is an image classification model, and the image classification model is used to determine the category to which the image to be classified belongs based on the image to be classified.
[0040] Optionally, the recognition probability obtaining unit is specifically used to extract feature information of the object to be classified;
[0041] The identifier is used to match the feature information of the object to be classified with the feature information pre-stored in the object identifier, and the recognition probability is obtained according to the matching result.
[0042] Optionally, the recognition probability obtaining unit includes:
[0043] A first similarity calculation subunit, configured to respectively calculate a first similarity between the at least one feature information of the object to be classified and the at least one feature information stored in advance;
[0044] an evaluation value obtaining subunit, configured to obtain an evaluation value of feature information of at least one image to be classified whose first similarity is not less than a first similarity threshold;
[0045] The recognition probability obtaining subunit is configured to obtain the recognition probability according to the evaluation value.
[0046] Optionally, the evaluation value obtaining subunit is specifically configured to calculate a first ratio between the amount of feature information of the image to be classified having at least one first similarity not less than a first similarity threshold and the total amount of feature information of the image to be classified;
[0047] Obtaining the recognition probability according to the evaluation value includes: determining the first ratio as the recognition probability.
[0048] Optionally, the recognition result obtaining unit is specifically configured to input the object to be classified into a classifier of the object classification model to obtain a classification probability that the object to be classified belongs to a target category;
[0049] The target category whose classification probability meets a predetermined classification probability condition is determined as the category to which the object to be classified belongs.
[0050] Optionally, inputting the object to be classified into a classifier of the object classification model to obtain a classification probability that the object to be classified belongs to a target category includes:
[0051] Acquiring feature information of the object to be classified;
[0052] The classifier is used to compare the feature information of the object to be classified with the feature information of the target category to obtain a second similarity between the feature information of the object to be classified and the feature information of the target category. Based on the second similarity, the classification probability is obtained, and the amount of feature information of the target category is not less than the amount of feature information of the object to be classified.
[0053] Optionally, the recognition result obtaining unit includes:
[0054] A second ratio calculation subunit, configured to calculate a second ratio between the amount of feature information of the to-be-classified object and the amount of feature information of the target category, the amount of feature information of the to-be-classified object having at least one second similarity not less than a second similarity threshold;
[0055] The classification probability determination subunit is configured to determine the second ratio as the classification probability.
[0056] Optionally, the recognition result obtaining unit includes: a category determining subunit, configured to determine the target category whose classification probability reaches or exceeds a preset classification probability threshold as the category to which the object to be classified belongs.
[0057] Optionally, the recognition result obtaining unit includes: a category determining subunit, configured to determine a target category with the highest classification probability as the category to which the object to be classified belongs.
[0058] Optionally, the method further includes: an unrecognizable output unit, configured to output a result indicating that the object to be classified is unrecognizable if the recognition probability does not reach the recognition probability threshold.
[0059] Optionally, it further includes: a recognition result output unit, used to output the recognition result.
[0060] The present application also provides an electronic device, comprising:
[0061] processor; and
[0062] The memory is used to store a program of the object classification method. After the device is powered on and the program of the object classification method is run by the processor, the following steps are performed:
[0063] Obtain the object to be classified;
[0064] Inputting the object to be classified into a recognizer of an object classification model to obtain a recognition probability that the object to be classified can be recognized by the object classification model, wherein the object classification model is used to determine the category to which the object to be classified belongs based on the object to be classified;
[0065] If the recognition probability reaches or exceeds the recognition probability threshold, the object to be classified is input into the classifier of the object classification model to obtain a recognition result.
[0066] The present application provides a storage device storing a program of an object classification method. The program is executed by a processor to perform the following steps:
[0067] Obtain the object to be classified;
[0068] Inputting the object to be classified into a recognizer of an object classification model to obtain a recognition probability that the object to be classified can be recognized by the object classification model, wherein the object classification model is used to determine the category to which the object to be classified belongs based on the object to be classified;
[0069] If the recognition probability reaches or exceeds the recognition probability threshold, the object to be classified is input into the classifier of the object classification model to obtain a recognition result.
[0070] In another aspect, the present application provides a processing method for an object classification model, comprising:
[0071] Get the target category;
[0072] For the target category, obtaining object samples and classification probabilities that the object samples belong to the target category;
[0073] generating a classifier for the target category based on the object sample and the classification probability that the object sample belongs to the target category, the classifier being configured to obtain the classification probability that the object to be classified belongs to the target category based on the object to be classified;
[0074] The classifier is added to an object classification model, and the object classification model is used to determine the category to which the object to be classified belongs based on the object to be classified.
[0075] Optionally, for the target category, obtaining an object sample and a classification probability that the object sample belongs to the target category includes:
[0076] Obtaining characteristic information of the target category;
[0077] obtaining a sample of the subject;
[0078] Obtaining characteristic information of the object sample;
[0079] According to the feature information of the object sample and the feature information of the target category, a classification probability that the object sample belongs to the target category is obtained.
[0080] Optionally, obtaining the classification probability that the object sample belongs to the target category based on the feature information of the object sample and the feature information of the target category includes:
[0081] Obtaining a third similarity between the feature information of the object sample and the feature information of the target category;
[0082] calculating a third ratio between the number of third similarities not less than a third similarity threshold and the total number of third similarities;
[0083] The third ratio is determined as the classification probability that the object sample belongs to the target category.
[0084] The present application also provides a processing device for an object classification model, comprising:
[0085] A target category obtaining unit, used for obtaining a target category;
[0086] a classification probability obtaining unit, configured to obtain, for the target category, an object sample and a classification probability that the object sample belongs to the target category;
[0087] a classifier generating unit, configured to generate a classifier for the target category based on the object sample and the classification probability that the object sample belongs to the target category, wherein the classifier is configured to obtain the classification probability that the object to be classified belongs to the target category based on the object to be classified;
[0088] The classifier adding unit is used to add the classifier to the object classification model, and the object classification model is used to determine the category to which the object to be classified belongs based on the object to be classified.
[0089] Optionally, the classification probability obtaining unit includes:
[0090] A target category feature information obtaining subunit, configured to obtain the feature information of the target category;
[0091] a subject sample obtaining subunit, configured to obtain the subject sample;
[0092] The object sample characteristic information obtaining subunit is used to obtain the characteristic information of the object sample;
[0093] The classification probability obtaining subunit of the target category is used to obtain the classification probability that the object sample belongs to the target category based on the feature information of the object sample and the feature information of the target category.
[0094] Optionally, the classification probability obtaining subunit of the target category is specifically configured to obtain a third similarity between the feature information of the object sample and the feature information of the target category;
[0095] Calculating a third ratio between the amount of feature information of the object samples and the amount of feature information of the target category, wherein at least one third similarity is not less than a third similarity threshold;
[0096] The third ratio is determined as the classification probability that the object sample belongs to the target category.
[0097] The present application further provides an electronic device, comprising:
[0098] processor; and
[0099] A memory is used to store a program for a processing method for an object classification model. After the device is powered on and the program for the processing method for the object classification model is run by the processor, the following steps are performed:
[0100] Get the target category;
[0101] For the target category, obtaining object samples and classification probabilities that the object samples belong to the target category;
[0102] generating a classifier for the target category based on the object sample and the classification probability that the object sample belongs to the target category, the classifier being configured to obtain the classification probability that the object to be classified belongs to the target category based on the object to be classified;
[0103] The classifier is added to an object classification model, and the object classification model is used to determine the category to which the object to be classified belongs based on the object to be classified.
[0104] The present application also provides a storage device storing a program of a processing method for an object classification model, wherein the program is executed by a processor to perform the following steps:
[0105] Get the target category;
[0106] For the target category, obtaining object samples and classification probabilities that the object samples belong to the target category;
[0107] generating a classifier for the target category based on the object sample and the classification probability that the object sample belongs to the target category, the classifier being configured to obtain the classification probability that the object to be classified belongs to the target category based on the object to be classified;
[0108] The classifier is added to an object classification model, and the object classification model is used to determine the category to which the object to be classified belongs based on the object to be classified.
[0109] Compared with the prior art, this application has the following advantages:
[0110] The object classification method provided in this application first determines the probability that an object to be classified can be recognized by an object classification model. It then classifies objects whose recognition probabilities meet a recognition probability threshold to obtain a recognition result. This classification method only further classifies objects whose recognition probabilities meet or exceed the recognition probability threshold, thereby improving the accuracy of object classification. BRIEF DESCRIPTION OF THE DRAWINGS
[0111] Figure 1 This is a schematic diagram of the first application scenario embodiment provided by this application.
[0112] Figure 2 This is a schematic diagram of the second application scenario embodiment provided by this application.
[0113] Figure 3 This is a flow chart of the object classification method provided in the first embodiment of the present application.
[0114] Figure 4 This is a flow chart of the method for obtaining recognition probability provided in the first embodiment of the present application.
[0115] Figure 5 This is a flowchart of another object classification method provided in the first embodiment of the present application.
[0116] Figure 6 A schematic diagram of an object classification device provided in the second embodiment of the present application.
[0117] Figure 7 A flowchart of a processing method for an object classification model provided in the third embodiment of the present application.
[0118] Figure 8 A schematic diagram of a processing device for an object classification model provided in the fourth embodiment of the present application.
[0119] Figure 9 A schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0120] The following description sets forth many specific details to facilitate a thorough understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the scope of the present application. Therefore, the present application is not limited to the specific implementations disclosed below.
[0121] In order to more clearly illustrate this application, we first introduce the application scenario of the object classification method provided by the first embodiment of this application. Some embodiments provided by this application can be applied to scenarios where the merchant terminal interacts with the server, such as Figure 1, which is a schematic diagram of the first application scenario embodiment provided by this application. The object to be classified can refer to data objects such as files, data, variables, and images, such as images, sounds, and text. In this first embodiment, the object to be classified is a product image, and the object classification method provided by this application is described in detail. A merchant wants to classify products so that customers can easily understand the products and their categories. In this case, the merchant terminal needs to first establish a connection with a server. After the connection is established, the merchant terminal sends the product image to the server. The server receives the product image and identifies and classifies it, obtaining the category to which the product image belongs. The server then sends the category to the merchant terminal, which receives the category to which the product image belongs, thereby determining the category to which the product image belongs. The merchant terminal can be a mobile terminal (mobile phone, iPad, etc.) APP (Application) merchant terminal, or a web application merchant terminal, and the server can be the server of the APP or web application. In this first embodiment, the object classification model identifier is first used to obtain the probability that the object to be classified can be recognized by the object classification model. Then, based on the recognition probability, it is selected whether to use the classifier of the object classification model to obtain the classification probability that the object to be classified belongs to the target category, and further the target category whose classification probability meets the predetermined classification probability condition is determined as the category to which the object to be classified belongs. The object classification model is used to determine the category to which the object to be classified belongs based on the object to be classified. In addition, the third embodiment provided by the present application can be applied to the internal processing of the server, such as Figure 2 As shown, it is a schematic diagram of the second application scenario embodiment provided by the present application. After the server obtains a large number of commodity images, it identifies and classifies the commodity images to determine the classification probability that the object sample belongs to the target category. Based on a large number of object samples and the classification probability that the object samples belong to the target category, a classifier is trained to obtain the classification probability that the object to be classified belongs to the target category based on the object to be classified. The classifier is then added to the object classification model, and the object classification model is used to determine the category to which the object to be classified belongs based on the object to be classified. It should be noted that the above two application scenarios are merely two embodiments of application scenarios. The purpose of providing these two application scenario embodiments is to facilitate understanding of the object classification method of the present application and the processing method for the object classification model, and is not intended to limit the object classification method and the processing method for the object classification model provided by the present application.
[0122] The first embodiment of the present application provides an object classification method, which is combined with Figure 3 、 Figure 4 、 Figure 5 Provide explanation.
[0123] like Figure 3As shown, in step S301, an object to be classified is obtained.
[0124] The object to be classified can refer to data objects such as files, data, variables, and images, sounds, and text. In the first embodiment of this application, the object to be classified is a product image, and the object classification method provided by this application is described in detail. If the object to be classified is other objects, the classification process and principles are the same as those for product images.
[0125] There are two different ways to obtain product images for classification. The first is for the server to collect product images through a data acquisition terminal that has established a transmission relationship with the server, such as through a smart mobile terminal, visual sensor, or camera. The second is for merchants or other personnel to upload product images for classification to the server through the merchant terminal.
[0126] like Figure 3 As shown, in step S302, the object to be classified is input into the identifier of the object classification model to obtain the recognition probability that the object to be classified can be recognized by the object classification model.
[0127] The object classification model is used to determine the category to which the object to be classified belongs based on the object to be classified. In the first embodiment of the present application, since the object to be classified is an image to be classified, the object classification model is an image classification model, which is used to determine the category to which the image to be classified belongs based on the image to be classified. The image classification model in the embodiment of the present application is a model that has been pre-trained using a large number of product images. After the product image to be classified is input into the model, the category to which the product image to be classified belongs can be ultimately determined.
[0128] During the image acquisition and transmission process, the quality of the product images obtained by the server may be poor due to human factors, data loss during transmission, noise, etc., resulting in the image being unrecognizable. In addition, sometimes due to the release of new products, there is no category corresponding to the new product in the original image classification model, resulting in the product being unrecognizable. If the products are directly classified, the product images that cannot be recognized will be forcibly classified, which will not only reduce the accuracy of the product image classification, but also waste a lot of unnecessary time in classifying the product images that cannot be recognized. In order to solve the above problems, the product image classification method provided in the first embodiment of the present application first obtains the probability that the product image can be recognized before classifying the product, and then decides whether to perform further classification based on the recognition probability.
[0129] Inputting the commodity image to be classified into a recognizer of an object classification model to obtain a recognition probability that the commodity image to be classified can be recognized by the object classification model includes:
[0130] Extracting feature information of the object to be classified;
[0131] The identifier is used to match the feature information of the object to be classified with the feature information pre-stored in the object identifier, and the recognition probability is obtained according to the matching result.
[0132] The characteristic information of product images includes color, shape, grayscale, and texture. When extracting the characteristic information of product images, algorithms such as fully convolutional neural networks or scale-invariant feature transform (SIFT) can be used.
[0133] Specifically, the identifier matches the feature information of the object to be classified with the feature information pre-stored in the object identifier, and obtains the recognition probability according to the matching result, including:
[0134] like Figure 4 As shown, in step S401, a first similarity between at least one feature information of the object to be classified and at least one feature information stored in advance is calculated respectively.
[0135] There will be at least one feature information extracted from the commodity image to be classified. In the first embodiment of the present application, there are 10 feature information extracted from the commodity image, which are respectively recorded as A1, A2, A3...A10. There are 100 image features pre-stored in the classifier, namely B1, B2, B3...B100. The first similarity between the feature information of the object to be classified and the subset of the pre-stored specified feature information set is calculated respectively, including: comparing A1, A2, A3...A10 with B1, B2, B3...B100 respectively, and obtaining the first similarity between A1 and B1, B2, B3...B100, the first similarity between A2 and B1, B2, B3...B100...the first similarity between A100 and B1, B2, B3...B100.
[0136] like Figure 4 As shown, in step S402, an evaluation value of the feature information of the image to be classified is obtained, wherein the first similarity is not lower than a first similarity threshold.
[0137] The evaluation value is the ratio of feature information of at least one image to be classified having a first similarity not less than a first similarity threshold to the total feature information of the images to be classified, or the number of feature information of at least one image to be classified having a first similarity not less than the first similarity threshold. When the evaluation value is the ratio of feature information of at least one image to be classified having a first similarity not less than the first similarity threshold to the total feature information of the images to be classified, obtaining the evaluation value of the feature information of at least one image to be classified having a first similarity not less than the first similarity threshold is performed by calculating a first ratio between the number of feature information of at least one image to be classified having a first similarity not less than the first similarity threshold and the total number of feature information of the images to be classified.
[0138] If at least one of the 100 first similarities between A1 and B1, B2, B3…B100 is not less than a first similarity threshold, then A1 is considered to be feature information of the image to be classified whose first similarity is not less than the first similarity threshold. Using the same method, the number of feature information of at least one image to be classified whose first similarity is not less than the first similarity threshold is determined in sequence among A1-A10. A first ratio is calculated between the number of feature information of at least one image to be classified whose first similarity is not less than the first similarity threshold and the total number of feature information of the image to be classified. In the first embodiment of the present application, each feature information of the image to be classified A1-A10 corresponds to 100 first similarities, and each similarity is determined by a determined similarity value, generally between 0 and 1. If the first similarity threshold is selected as 0.6 in the first embodiment of the present application, if at least one of the 100 first similarity values corresponding to each of A1-A10 in the first embodiment of the present application is greater than or equal to 0.6, then the feature information of the image to be classified is considered to be feature information of the image to be classified whose first similarity is not less than the first similarity threshold. If the number of feature information of the image to be classified for which at least one first similarity is not lower than the first similarity threshold is 8, then the first ratio is 4 / 5.
[0139] like Figure 4 As shown, in step S403, the recognition probability is obtained according to the evaluation value.
[0140] The evaluation value has been obtained in step S402 above. In step S403, the evaluation value needs to be converted into a corresponding recognition probability. If the evaluation value is the first ratio, then the recognition probability is obtained based on the evaluation value, including: determining the first ratio as the recognition probability. If the first ratio is 4 / 5, then the recognition probability is determined to be 0.8.
[0141] After obtaining the recognition probability of the product image to be classified, it is necessary to compare the recognition probability of the product image to the recognition probability threshold. The product images whose recognition probability reaches or exceeds the recognition probability threshold are obtained, and then the product images are further classified. This improves the accuracy of the classification of the product images to be classified and saves classification time.
[0142] In step S401, if the value of the first ratio is 4 / 5, the first ratio is determined to be a recognition probability of 0.8. At this time, the recognition probability of 0.8 is compared with the recognition probability threshold. If the recognition probability threshold is less than or equal to 0.8, the recognition probability reaches or exceeds the recognition probability threshold.
[0143] After comparing the recognition probability with the recognition probability threshold, further processing is performed on the product to be classified based on the comparison result. If the recognition probability does not reach the recognition probability threshold, a result indicating that the object to be classified is unrecognizable is output. That is, if the recognition probability threshold in the first embodiment of the present application is 0.85, the server will output a result indicating that the object to be classified is unrecognizable and will no longer classify the product image to be classified.
[0144] like Figure 3 As shown, in step S303, if the recognition probability reaches or exceeds the recognition probability threshold, the object to be classified is input into the classifier of the object classification model to obtain a recognition result.
[0145] In the first embodiment of the present application, the object to be classified is input into the classifier of the object classification model to obtain a recognition result, which specifically includes: inputting the object to be classified into the classifier of the object classification model to obtain the classification probability that the object to be classified belongs to the target category; determining the target category whose classification probability meets the predetermined classification probability condition as the category to which the object to be classified belongs.
[0146] When the object to be classified is input into the classifier of the object classification model to obtain the classification probability that the object to be classified belongs to the target category, if the recognition probability threshold in the first embodiment of the present application is 0.7, the product image to be classified is input into the classifier of the object classification model to obtain the classification probability that the object to be classified belongs to the target category.
[0147] Inputting the object to be classified into the classifier of the object classification model to obtain the classification probability that the object to be classified belongs to the target category includes:
[0148] Acquiring feature information of the object to be classified;
[0149] The classifier is used to compare the feature information of the object to be classified with the feature information of the target category to obtain a second similarity between the feature information of the object to be classified and the feature information of the target category. Based on the second similarity, the classification probability is obtained, and the amount of feature information of the target category is not less than the amount of feature information of the object to be classified.
[0150] The characteristic information of the product image includes its color, shape, grayscale, and texture. When extracting the characteristic information of the product image, algorithms such as a fully convolutional neural network or the Scale-Invariant Feature Transform (SIFT) can be used. Furthermore, since the characteristic information of the product image to be classified has already been obtained in step S302, in step S303, feature information extraction can be omitted and the characteristic information of the product image to be classified can be directly obtained.
[0151] Specifically, obtaining the classification probability according to the second similarity includes:
[0152] Calculating a second ratio between the amount of feature information of the to-be-classified object and the amount of feature information of the target category, wherein at least one second similarity is not less than a second similarity threshold;
[0153] The second ratio is determined as the classification probability.
[0154] The classifier in the image classification model pre-stores a large number of target categories and the feature information corresponding to these target categories. After the classifier obtains 10 feature information of the image to be classified, it needs to compare the feature information of these 10 images to all the feature information corresponding to all the target categories. A second similarity between the feature information of the object to be classified and the feature information of the target category is obtained. Specifically, the classifier first obtains the amount of feature information of the image to be classified, then selects a target category whose number of feature information of the target category is greater than or equal to the number of feature information of the image to be classified, and compares it with the feature information of the image to be classified. If the classifier obtains 10 feature information of the image to be classified, it needs to select the feature information corresponding to the target category whose number of feature information of the target category is greater than or equal to the number of feature information of the target category as the object to be classified feature information comparison target. A second ratio is then calculated between the number of feature information of the object to be classified and the number of feature information of the target category for which at least one second similarity is not less than a second similarity threshold. The second ratio is then determined as the classification probability, using the same method as that used to determine the recognition probability based on the first ratio. If there are 1000 target categories whose number of feature information of the target category is greater than or equal to the number of feature information of the object to be classified, then the second ratio between the number of feature information of the object to be classified and the number of feature information of the target category whose second similarity is not less than the second similarity threshold is calculated 1000 times. The second similarity is calculated as follows:
[0155] Compare the feature information of the image to be classified with the feature information of the target category one by one;
[0156] Determine whether there is at least one second similarity in the feature information of each image to be classified that is higher than a second similarity threshold;
[0157] If so, the feature information of the image to be classified is feature information of at least one object to be classified whose second similarity is not lower than a second similarity threshold.
[0158] In the first embodiment of the present application, in order to obtain a recognition result, after obtaining the classification probability that the object to be classified belongs to the target category, it is necessary to further determine the target category whose classification probability meets the predetermined classification probability condition as the category to which the object to be classified belongs.
[0159] The recognition result can be specifically: the category to which the object to be classified belongs, and the classification probability corresponding to the category to which the object to be classified belongs; or, simply, the category to which the object to be classified belongs. That is, the category to which the image to be classified belongs, and the classification probability corresponding to the category to which the image to be classified belongs; or, simply, the category to which the image to be classified belongs.
[0160] Specifically, after obtaining the classification probability that the object to be classified belongs to the target category, the target category to which the object to be classified belongs and the classification probability of the target category can be determined. However, the client may eventually obtain that the object to be classified belongs to many target categories, and the classification probabilities of many target categories are relatively small, and cannot be used as the category to which the object to be classified belongs. In this case, it is necessary to filter the target category to which the object to be classified belongs. Specifically, in the first embodiment of the present application, there are two ways to determine the target category whose classification probability meets the predetermined classification probability condition as the category to which the object to be classified belongs:
[0161] The first method is to sort the target categories from highest to lowest classification probability and determine the target category whose classification probability reaches or exceeds a preset classification probability threshold as the category to which the object to be classified belongs. This method may determine that the object to be classified belongs to only one, two or more, or no category.
[0162] The second method is to sort the target categories according to the classification probability from large to small, and determine the target category with the largest classification probability as the category to which the object to be classified belongs. This method determines at least one category to which the object to be classified belongs.
[0163] After the server obtains the recognition result, it is necessary to output the recognition result. In the first embodiment of the present application, the output recognition result involved in the first embodiment of the present application is specifically taken as an example of the recognition result: the category to which the object to be classified belongs, and the classification probability corresponding to the category to which the object to be classified belongs. Specifically, after the server obtains the category to which the object to be classified belongs, and the classification probability corresponding to the category to which the object to be classified belongs, it is necessary to output the category to which the object to be classified belongs, and the classification probability corresponding to the category to which the object to be classified belongs to the merchant end, so that the merchant can know the type of commodity corresponding to the commodity image to be classified based on the classification result of the commodity image.
[0164] The object classification method provided in this application first determines the probability that an object to be classified can be recognized by an object classification model. It then classifies objects whose recognition probabilities meet a recognition probability threshold to obtain a recognition result. This classification method further classifies only objects whose recognition probabilities meet or exceed the recognition probability threshold, improving the accuracy of object classification and reducing classification time.
[0165] When the classification probability of the object to be classified meets the predetermined classification probability condition, the category to which the object to be classified belongs can be further obtained, and a classifier is needed at this time. Before the object to be classified is input into the identifier of the object classification model, a classifier for the target category can be generated according to the requirements. Figure 5As shown, in step S501, the object to be classified is input into the recognizer of the object classification model to obtain the recognition probability that the object to be classified can be recognized by the object classification model. In step S502, the object to be classified is input into the classifier of the object classification model to obtain the classification probability that the object to be classified belongs to the target category. In step S503, the target category whose classification probability meets the predetermined classification probability condition is determined as the category to which the object to be classified belongs. The object classification method provided in the first embodiment of the present application can also generate a classifier for the target category as needed, and add the classifier to the object classification model to dynamically adjust the number and content of the target category. That is, in step S501-1, a classifier for the target category is generated, and the classifier is added to the object classification model.
[0166] In the first embodiment described above, a method for object classification is provided. Accordingly, the second embodiment of the present application provides an object classification device. Since the device embodiment is substantially similar to the method embodiment, the description is relatively brief. For relevant details, please refer to the description of the method embodiment. The device embodiment described below is merely illustrative.
[0167] Please refer to Figure 6 , which shows a schematic diagram of an object classification device provided in the second embodiment of the present application.
[0168] The object classification device comprises:
[0169] The object to be classified obtaining unit 601 is used to obtain the object to be classified;
[0170] The recognition probability obtaining unit 602 inputs the object to be classified into the recognizer of the object classification model to obtain the recognition probability that the object to be classified can be recognized by the object classification model, wherein the object classification model is used to determine the category to which the object to be classified belongs based on the object to be classified;
[0171] The recognition result obtaining unit 603 is configured to input the object to be classified into the classifier of the object classification model to obtain the object if the recognition probability reaches or exceeds the recognition probability threshold.
[0172] Optionally, the object to be classified is an image to be classified, the object classification model is an image classification model, and the image classification model is used to determine the category to which the image to be classified belongs based on the image to be classified.
[0173] Optionally, the recognition probability obtaining unit 602 is specifically configured to extract feature information of the object to be classified;
[0174] The identifier is used to match the feature information of the object to be classified with the feature information pre-stored in the object identifier, and the recognition probability is obtained according to the matching result.
[0175] Optionally, the recognition probability obtaining unit 602 includes:
[0176] A first similarity calculation subunit, configured to respectively calculate a first similarity between the at least one feature information of the object to be classified and the at least one feature information stored in advance;
[0177] an evaluation value obtaining subunit, configured to obtain an evaluation value of feature information of at least one image to be classified whose first similarity is not less than a first similarity threshold;
[0178] The recognition probability obtaining subunit is configured to obtain the recognition probability according to the evaluation value.
[0179] Optionally, the evaluation value obtaining subunit is specifically configured to calculate a first ratio between the amount of feature information of the image to be classified having at least one first similarity not less than a first similarity threshold and the total amount of feature information of the image to be classified;
[0180] Obtaining the recognition probability according to the evaluation value includes: determining the first ratio as the recognition probability.
[0181] Optionally, the recognition result obtaining unit 603 is specifically configured to input the object to be classified into a classifier of the object classification model to obtain a classification probability that the object to be classified belongs to a target category;
[0182] The target category whose classification probability meets a predetermined classification probability condition is determined as the category to which the object to be classified belongs.
[0183] Optionally, inputting the object to be classified into a classifier of the object classification model to obtain a classification probability that the object to be classified belongs to a target category includes:
[0184] Acquiring feature information of the object to be classified;
[0185] The classifier is used to compare the feature information of the object to be classified with the feature information of the target category to obtain a second similarity between the feature information of the object to be classified and the feature information of the target category. Based on the second similarity, the classification probability is obtained, and the amount of feature information of the target category is not less than the amount of feature information of the object to be classified.
[0186] Optionally, the recognition result obtaining unit 603 includes:
[0187] A second ratio calculation subunit, configured to calculate a second ratio between the amount of feature information of the to-be-classified object and the amount of feature information of the target category, the amount of feature information of the to-be-classified object having at least one second similarity not less than a second similarity threshold;
[0188] The classification probability determination subunit is configured to determine the second ratio as the classification probability.
[0189] Optionally, the recognition result obtaining unit 603 includes: a category determining subunit, configured to determine the target category whose classification probability reaches or exceeds a preset classification probability threshold as the category to which the object to be classified belongs.
[0190] Optionally, the recognition result obtaining unit 603 includes: a category determining subunit, configured to determine the target category with the highest classification probability as the category to which the object to be classified belongs.
[0191] Optionally, the method further includes: an unrecognizable output unit, configured to output a result indicating that the object to be classified is unrecognizable if the recognition probability does not reach the recognition probability threshold.
[0192] Optionally, it also includes: a recognition result output unit, which is used to output the recognition result.
[0193] The third embodiment of the present application provides a processing method for an object classification model, which is as follows: Figure 7 The processing method for the object classification model provided in the third embodiment of the present application is introduced.
[0194] like Figure 7 As shown, in step S701, the target category is obtained.
[0195] The number and types of target categories are pre-set as needed. After the target categories are set, training is performed on the object samples to generate an object classification model that determines the category to which the object to be classified belongs based on the object to be classified. The execution subject of this application is recorded as a server, and the object sample can refer to data objects such as files, data, variables, such as images, sounds, text, etc. In the third embodiment of this application, the object sample is specifically a commodity image, and the object classification method provided by this application is described in detail. If the object sample is other objects, the principle of training and generating the object classification model is the same as the principle of training and generating the commodity image object classification model.
[0196] like Figure 7 As shown, in step S702, for the target category, object samples and the classification probability that the object samples belong to the target category are obtained.
[0197] Image classification is an image processing technique that distinguishes different categories of objects based on the different features reflected in the image information. Therefore, in the third embodiment of the present application, for a target category, object samples and the classification probability that the object samples belong to the target category are obtained. Generally, the object samples and the classification probability that the object samples belong to the target category are obtained based on the feature information of the target category.
[0198] After obtaining the characteristic information of the target category, a large number of object samples need to be obtained. Since the object samples in the third embodiment of the present application are product images, there are two different ways to obtain product images. The first way is that the server collects product images through a data acquisition terminal that has established a transmission relationship with the server, such as obtaining product images through a smart mobile terminal, a visual sensor, or a camera device. The second way is that the merchant or other personnel uploads the product images to the server through the merchant terminal. In the third embodiment of the present application, the second way is preferably adopted to obtain product images.
[0199] After obtaining the product image, it is necessary to further obtain the feature information of the product image. That is, based on the feature information of the product image and the feature information of the target category, the classification probability of the product image belonging to the target category is obtained. Specifically, based on the feature information of the product image and the feature information of the target category, the classification probability of the product image belonging to the target category is obtained, including:
[0200] Obtaining a third similarity between the feature information of the product image and the feature information of the target category;
[0201] Calculating a third ratio between the amount of feature information of at least one product image having a third similarity not less than a third similarity threshold and the amount of feature information of the target category;
[0202] The third ratio is determined as the classification probability that the product image belongs to the target category.
[0203] like Figure 7 As shown, in step S703, the classification probability of the object sample and the target category is determined based on the object sample.
[0204] According to the above steps, a large number of product images and the classification probability that the product images belong to the target category can be obtained. Based on the product images and the classification probability that the product images belong to the target category, a classifier for the target category can be generated. The generated classifier is used to obtain the classification probability that the object to be classified belongs to the target category based on the object to be classified.
[0205] like Figure 7 As shown, in step S704, the classifier is added to the object classification model.
[0206] After the classifier is generated, it is also necessary to add the classifier to the object classification model. The object classification model is used to determine the category to which the object to be classified belongs based on the object to be classified.
[0207] In the third embodiment described above, a method for processing an object classification model is provided. Correspondingly, the fourth embodiment of the present application provides an apparatus for processing an object classification model. Since the apparatus embodiment is substantially similar to the third method embodiment, the description is relatively brief. For relevant details, please refer to the description of the method embodiment. The apparatus embodiment described below is merely illustrative.
[0208] Please refer to Figure 8 , which shows a schematic diagram of a processing device for an object classification model provided in the fourth embodiment of the present application.
[0209] The processing device for the object classification model includes:
[0210] The target category obtaining unit 801 is used to obtain the target category;
[0211] A classification probability obtaining unit 802 is configured to obtain, for the target category, an object sample and a classification probability that the object sample belongs to the target category;
[0212] A classifier generating unit 803 is configured to generate a classifier for the target category based on the object sample and the classification probability that the object sample belongs to the target category, wherein the classifier is configured to obtain the classification probability that the object to be classified belongs to the target category based on the object to be classified;
[0213] The classifier adding unit 804 is configured to add the classifier to an object classification model, wherein the object classification model is configured to determine the category to which the object to be classified belongs based on the object to be classified.
[0214] Optionally, the classification probability obtaining unit 802 includes:
[0215] A target category feature information obtaining subunit, configured to obtain the feature information of the target category;
[0216] a subject sample obtaining subunit, configured to obtain the subject sample;
[0217] The object sample characteristic information obtaining subunit is used to obtain the characteristic information of the object sample;
[0218] The classification probability obtaining subunit of the target category is used to obtain the classification probability that the object sample belongs to the target category based on the feature information of the object sample and the feature information of the target category.
[0219] Optionally, the classification probability obtaining subunit of the target category is specifically configured to obtain a third similarity between the feature information of the object sample and the feature information of the target category;
[0220] Calculating a third ratio between the amount of feature information of the object samples and the amount of feature information of the target category, wherein at least one third similarity is not less than a third similarity threshold;
[0221] The third ratio is determined as the classification probability that the object sample belongs to the target category.
[0222] Corresponding to the object classification method provided in the first embodiment of the present application, the fifth embodiment of the present application provides an electronic device.
[0223] like Figure 9 As shown, the electronic device includes:
[0224] Processor 901; and
[0225] Memory 902, used to obtain objects to be classified;
[0226] Inputting the object to be classified into a recognizer of an object classification model to obtain a recognition probability that the object to be classified can be recognized by the object classification model, wherein the object classification model is used to determine the category to which the object to be classified belongs based on the object to be classified;
[0227] If the recognition probability reaches or exceeds the recognition probability threshold, the object to be classified is input into the classifier of the object classification model to obtain a recognition result.
[0228] Optionally, the object to be classified is an image to be classified, the object classification model is an image classification model, and the image classification model is used to determine the category to which the image to be classified belongs based on the image to be classified.
[0229] Optionally, inputting the object to be classified into a recognizer of an object classification model to obtain a recognition probability that the object to be classified can be recognized by the object classification model includes:
[0230] Extracting feature information of the object to be classified;
[0231] The identifier is used to match the feature information of the object to be classified with the feature information pre-stored in the object identifier, and the recognition probability is obtained according to the matching result.
[0232] Optionally, using the identifier to match the feature information of the object to be classified with feature information pre-stored in the object identifier, and obtaining the recognition probability based on the matching result includes:
[0233] respectively calculating a first similarity between at least one feature information of the object to be classified and at least one pre-stored feature information;
[0234] Obtaining an evaluation value of feature information of at least one image to be classified whose first similarity is not less than a first similarity threshold;
[0235] The recognition probability is obtained according to the evaluation value.
[0236] Optionally, obtaining at least one evaluation value of the feature information of the image to be classified whose first similarity is not less than a first similarity threshold includes:
[0237] Calculating a first ratio between the amount of feature information of the image to be classified having at least one first similarity not less than a first similarity threshold and the total amount of feature information of the image to be classified;
[0238] Obtaining the recognition probability according to the evaluation value includes: determining the first ratio as the recognition probability.
[0239] Optionally, inputting the object to be classified into a classifier of the object classification model to obtain a recognition result includes:
[0240] Inputting the object to be classified into the classifier of the object classification model to obtain a classification probability that the object to be classified belongs to the target category;
[0241] The target category whose classification probability meets a predetermined classification probability condition is determined as the category to which the object to be classified belongs.
[0242] Optionally, inputting the object to be classified into a classifier of the object classification model to obtain a classification probability that the object to be classified belongs to a target category includes:
[0243] Acquiring feature information of the object to be classified;
[0244] Use the classifier to
[0245] The feature information of the object to be classified is compared with the feature information of the target category to obtain a second similarity between the feature information of the object to be classified and the feature information of the target category. The classification probability is obtained based on the second similarity, and the amount of feature information of the target category is not less than the amount of feature information of the object to be classified.
[0246] Optionally, obtaining the classification probability according to the second similarity includes:
[0247] Calculating a second ratio between the amount of feature information of the to-be-classified object and the amount of feature information of the target category, wherein at least one second similarity is not less than a second similarity threshold;
[0248] The second ratio is determined as the classification probability.
[0249] Optionally, determining the target category whose classification probability satisfies a predetermined classification probability condition as the category to which the object to be classified belongs includes:
[0250] The target category whose classification probability reaches or exceeds a preset classification probability threshold is determined as the category to which the object to be classified belongs.
[0251] Optionally, determining the target category whose classification probability meets a predetermined classification probability condition as the category to which the object to be classified belongs includes: determining the target category with the largest classification probability as the category to which the object to be classified belongs.
[0252] Optionally, the method further includes: if the recognition probability does not reach the recognition probability threshold, outputting a result that the object to be classified cannot be recognized.
[0253] Optionally, the method further includes: outputting the recognition result.
[0254] Corresponding to the object classification method provided in the first embodiment of the present application, the sixth embodiment of the present application provides a storage device storing a program for the object classification method, which is executed by a processor to perform the following steps:
[0255] Obtain the object to be classified;
[0256] Inputting the object to be classified into a recognizer of an object classification model to obtain a recognition probability that the object to be classified can be recognized by the object classification model, wherein the object classification model is used to determine the category to which the object to be classified belongs based on the object to be classified;
[0257] If the recognition probability reaches or exceeds the recognition probability threshold, the object to be classified is input into the classifier of the object classification model to obtain a recognition result.
[0258] It should be noted that for the detailed description of the storage device provided in the sixth embodiment of the present application, reference can be made to the relevant description of the first embodiment of the present application, and no further details will be given here.
[0259] Corresponding to the processing method for the object classification model provided in the third embodiment of the present application, the seventh embodiment of the present application provides an electronic device.
[0260] like Figure 9 As shown, the electronic device includes:
[0261] Processor 901; and
[0262] Memory 902, used to obtain target categories;
[0263] For the target category, obtaining object samples and classification probabilities that the object samples belong to the target category;
[0264] generating a classifier for the target category based on the object sample and the classification probability that the object sample belongs to the target category, the classifier being configured to obtain the classification probability that the object to be classified belongs to the target category based on the object to be classified;
[0265] The classifier is added to an object classification model, and the object classification model is used to determine the category to which the object to be classified belongs based on the object to be classified.
[0266] Optionally, for the target category, obtaining an object sample and a classification probability that the object sample belongs to the target category includes:
[0267] Obtaining characteristic information of the target category;
[0268] obtaining a sample of the subject;
[0269] Obtaining characteristic information of the object sample;
[0270] According to the feature information of the object sample and the feature information of the target category, a classification probability that the object sample belongs to the target category is obtained.
[0271] Optionally, obtaining the classification probability that the object sample belongs to the target category based on the feature information of the object sample and the feature information of the target category includes:
[0272] Obtaining a third similarity between the feature information of the object sample and the feature information of the target category;
[0273] calculating a third ratio between the number of third similarities not less than a third similarity threshold and the total number of third similarities;
[0274] The third ratio is determined as the classification probability that the object sample belongs to the target category.
[0275] Corresponding to the processing method for the object classification model provided in the third embodiment of the present application, the eighth embodiment of the present application provides a storage device storing a program for the processing method for the object classification model, the program being executed by a processor to perform the following steps:
[0276] Get the target category;
[0277] For the target category, obtaining object samples and classification probabilities that the object samples belong to the target category;
[0278] generating a classifier for the target category based on the object sample and the classification probability that the object sample belongs to the target category, the classifier being configured to obtain the classification probability that the object to be classified belongs to the target category based on the object to be classified;
[0279] The classifier is added to an object classification model, and the object classification model is used to determine the category to which the object to be classified belongs based on the object to be classified.
[0280] It should be noted that for the detailed description of the storage device provided in the eighth embodiment of the present application, reference can be made to the relevant description of the third embodiment of the present application, which will not be repeated here.
[0281] Although the present application is disclosed as above with reference to preferred embodiments, it is not intended to limit the present application. Any person skilled in the art may make possible changes and modifications without departing from the spirit and scope of the present invention. Therefore, the scope of protection of the present application shall be based on the scope defined by the claims of the present application.
[0282] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0283] Memory may include non-permanent storage in a computer-readable medium, in the form of random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0284] 1. Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include non-transitory media such as modulated data signals and carrier waves.
[0285] 2. Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROMs, optical storage, etc.) containing computer-usable program code.
Claims
1. A method for object classification, characterized in that: include: Obtain the object to be classified; Inputting the object to be classified into a recognizer of an object classification model to obtain a recognition probability that the object to be classified can be recognized by the object classification model, wherein the object classification model is used to determine the category to which the object to be classified belongs based on the object to be classified; If the recognition probability reaches or exceeds the recognition probability threshold, the object to be classified is input into the classifier of the object classification model to obtain a recognition result; The method further includes: if the recognition probability does not reach the recognition probability threshold, outputting a result that the object to be classified cannot be recognized, and no longer classifying the object to be classified; The classifier pre-stores a plurality of target categories and feature information corresponding to the plurality of target categories, and inputting the object to be classified into the classifier of the object classification model to obtain a recognition result, including: inputting the object to be classified into the classifier of the object classification model to select a target category whose amount of feature information is greater than or equal to the amount of feature information of the object to be classified from the plurality of target categories, and comparing the feature information of the object to be classified with the feature information of the selected target category to obtain the recognition result; The object to be classified is at least an image to be classified, the object classification model is at least an image classification model, and the image classification model is used to determine the category to which the image to be classified belongs based on the image to be classified.
2. The object classification method according to claim 1, characterized in that Inputting the object to be classified into the recognizer of the object classification model to obtain the recognition probability that the object to be classified can be recognized by the object classification model includes: Extracting feature information of the object to be classified; The identifier is used to match the feature information of the object to be classified with the feature information pre-stored in the identifier, and the recognition probability is obtained according to the matching result.
3. The object classification method according to claim 2, characterized in that: The using the identifier to match the feature information of the object to be classified with the feature information pre-stored in the identifier, and obtaining the recognition probability according to the matching result, includes: respectively calculating a first similarity between at least one feature information of the object to be classified and at least one pre-stored feature information; Obtaining an evaluation value of feature information of at least one image to be classified whose first similarity is not less than a first similarity threshold; The recognition probability is obtained according to the evaluation value.
4. The object classification method according to claim 3, characterized in that: The obtaining of the evaluation value of the feature information of at least one image to be classified whose first similarity is not less than a first similarity threshold comprises: Calculating a first ratio between the amount of feature information of the image to be classified having at least one first similarity not less than a first similarity threshold and the total amount of feature information of the image to be classified; Obtaining the recognition probability according to the evaluation value includes: determining the first ratio as the recognition probability.
5. The object classification method according to claim 1, characterized in that: Inputting the object to be classified into the classifier of the object classification model to obtain a recognition result includes: Inputting the object to be classified into the classifier of the object classification model to obtain a classification probability that the object to be classified belongs to the target category; The target category whose classification probability meets a predetermined classification probability condition is determined as the category to which the object to be classified belongs.
6. The object classification method according to claim 5, characterized in that: Inputting the object to be classified into the classifier of the object classification model to obtain the classification probability that the object to be classified belongs to the target category includes: Acquiring feature information of the object to be classified; The classifier is used to compare the feature information of the object to be classified with the feature information of the target category to obtain a second similarity between the feature information of the object to be classified and the feature information of the target category. Based on the second similarity, the classification probability is obtained, and the amount of feature information of the target category is not less than the amount of feature information of the object to be classified.
7. The object classification method according to claim 6, characterized in that: Obtaining the classification probability according to the second similarity includes: Calculating a second ratio between the amount of feature information of the to-be-classified object and the amount of feature information of the target category, wherein at least one second similarity is not less than a second similarity threshold; The second ratio is determined as the classification probability.
8. The object classification method according to claim 5, characterized in that: Determining the target category whose classification probability meets a predetermined classification probability condition as the category to which the object to be classified belongs includes: determining the target category whose classification probability reaches or exceeds a preset classification probability threshold as the category to which the object to be classified belongs.
9. The object classification method according to claim 8, characterized in that: Determining the target category whose classification probability meets a predetermined classification probability condition as the category to which the object to be classified belongs includes: determining the target category with the largest classification probability as the category to which the object to be classified belongs.
10. The object classification method according to claim 1, wherein: Also includes: The recognition result is output.
11. An object classification device, characterized in that: include: An object-to-be-classified obtaining unit, configured to obtain an object to be classified; a recognition probability obtaining unit, inputting the object to be classified into a recognizer of an object classification model to obtain a recognition probability that the object to be classified can be recognized by the object classification model, wherein the object classification model is used to determine the category to which the object to be classified belongs based on the object to be classified; a recognition result obtaining unit, configured to input the object to be classified into the classifier of the object classification model to obtain a recognition result if the recognition probability reaches or exceeds a recognition probability threshold; The device is further configured to, if the recognition probability does not reach the recognition probability threshold, output a result that the object to be classified cannot be recognized, and no longer classify the object to be classified; The classifier pre-stores a plurality of target categories and feature information corresponding to the plurality of target categories, and the recognition result obtaining unit is further configured to input the object to be classified into the classifier of the object classification model to obtain a recognition result by: inputting the object to be classified into the classifier of the object classification model to select a target category whose amount of feature information is greater than or equal to the amount of feature information of the object to be classified from the plurality of target categories, and comparing the feature information of the object to be classified with the feature information of the selected target category to obtain the recognition result; The object to be classified is at least an image to be classified, the object classification model is at least an image classification model, and the image classification model is used to determine the category to which the image to be classified belongs based on the image to be classified.
12. An electronic device, characterized in that: include: processor; as well as The memory is used to store a program of the object classification method. After the device is powered on and the program of the object classification method is run by the processor, the following steps are performed: Obtain the object to be classified; Inputting the object to be classified into a recognizer of an object classification model to obtain a recognition probability that the object to be classified can be recognized by the object classification model, wherein the object classification model is used to determine the category to which the object to be classified belongs based on the object to be classified; If the recognition probability reaches or exceeds the recognition probability threshold, the object to be classified is input into the classifier of the object classification model to obtain a recognition result; If the recognition probability does not reach the recognition probability threshold, a result indicating that the object to be classified cannot be recognized is output, and the object to be classified is no longer classified; The classifier pre-stores a plurality of target categories and feature information corresponding to the plurality of target categories, and inputting the object to be classified into the classifier of the object classification model to obtain a recognition result, including: inputting the object to be classified into the classifier of the object classification model to select a target category whose amount of feature information is greater than or equal to the amount of feature information of the object to be classified from the plurality of target categories, and comparing the feature information of the object to be classified with the feature information of the selected target category to obtain the recognition result; The object to be classified is at least an image to be classified, the object classification model is at least an image classification model, and the image classification model is used to determine the category to which the image to be classified belongs based on the image to be classified.
13. A storage device, characterized in that: A program storing an object classification method is executed by a processor to perform the following steps: Obtain the object to be classified; Inputting the object to be classified into a recognizer of an object classification model to obtain a recognition probability that the object to be classified can be recognized by the object classification model, wherein the object classification model is used to determine the category to which the object to be classified belongs based on the object to be classified; If the recognition probability reaches or exceeds the recognition probability threshold, the object to be classified is input into the classifier of the object classification model to obtain a recognition result; If the recognition probability does not reach the recognition probability threshold, a result indicating that the object to be classified cannot be recognized is output, and the object to be classified is no longer classified; The classifier pre-stores a plurality of target categories and feature information corresponding to the plurality of target categories, and inputting the object to be classified into the classifier of the object classification model to obtain a recognition result, including: inputting the object to be classified into the classifier of the object classification model to select a target category whose amount of feature information is greater than or equal to the amount of feature information of the object to be classified from the plurality of target categories, and comparing the feature information of the object to be classified with the feature information of the selected target category to obtain the recognition result; The object to be classified is at least an image to be classified, the object classification model is at least an image classification model, and the image classification model is used to determine the category to which the image to be classified belongs based on the image to be classified.
14. A processing method for an object classification model, characterized in that: include: Get the target category; For the target category, obtaining object samples and classification probabilities that the object samples belong to the target category; generating a classifier for the target category based on the object sample and the classification probability that the object sample belongs to the target category, the classifier being configured to obtain the classification probability that the object to be classified belongs to the target category based on the object to be classified; adding the classifier to an object classification model, wherein the object classification model is used to determine the category to which the object to be classified belongs based on the object to be classified; The method further includes: if the recognition probability corresponding to the object to be classified does not reach the recognition probability threshold, outputting a result that the object to be classified cannot be recognized, and no longer classifying the object to be classified, wherein the recognition probability is obtained by the identifier of the object classification model identifying the object to be classified, and the recognition probability is used to represent the probability that the object to be classified can be recognized by the object classification model; The classifier is configured to obtain a classification probability that the object to be classified belongs to the target category based on the object to be classified by: obtaining the amount of feature information of the object to be classified, selecting a target category from the target categories whose amount of feature information is greater than or equal to the amount of feature information of the object to be classified, and comparing the feature information of the object to be classified with the feature information of the selected target category to obtain a classification probability that the object to be classified belongs to the target category; The object to be classified is at least an image to be classified, the object classification model is at least an image classification model, and the image classification model is used to determine the category to which the image to be classified belongs based on the image to be classified.
15. The processing method for an object classification model according to claim 14, characterized in that: Obtaining, for the target category, an object sample and a classification probability that the object sample belongs to the target category, includes: Obtaining characteristic information of the target category; obtaining a sample of the subject; Obtaining characteristic information of the object sample; According to the feature information of the object sample and the feature information of the target category, a classification probability that the object sample belongs to the target category is obtained.
16. The processing method for an object classification model according to claim 15, characterized in that: Obtaining a classification probability that the object sample belongs to the target category based on the feature information of the object sample and the feature information of the target category includes: Obtaining a third similarity between the feature information of the object sample and the feature information of the target category; Calculating a third ratio between the amount of feature information of the object samples and the amount of feature information of the target category, wherein at least one third similarity is not less than a third similarity threshold; The third ratio is determined as the classification probability that the object sample belongs to the target category.
17. A processing device for an object classification model, characterized in that: include: A target category obtaining unit, used for obtaining a target category; a classification probability obtaining unit, configured to obtain, for the target category, an object sample and a classification probability that the object sample belongs to the target category; a classifier generating unit, configured to generate a classifier for the target category based on the object sample and the classification probability that the object sample belongs to the target category, wherein the classifier is configured to obtain the classification probability that the object to be classified belongs to the target category based on the object to be classified; a classifier adding unit, configured to add the classifier to an object classification model, wherein the object classification model is configured to determine the category to which the object to be classified belongs based on the object to be classified; The device is further configured to output a result indicating that the object to be classified cannot be identified and no longer classify the object to be classified if the recognition probability corresponding to the object to be classified does not reach the recognition probability threshold, wherein the recognition probability is obtained by the identifier of the object classification model identifying the object to be classified, and the recognition probability is used to represent the probability that the object to be classified can be identified by the object classification model; The classifier is configured to obtain a classification probability that the object to be classified belongs to the target category based on the object to be classified by: obtaining the amount of feature information of the object to be classified, selecting a target category from the target categories whose amount of feature information is greater than or equal to the amount of feature information of the object to be classified, and comparing the feature information of the object to be classified with the feature information of the selected target category to obtain a classification probability that the object to be classified belongs to the target category; The object to be classified is at least an image to be classified, the object classification model is at least an image classification model, and the image classification model is used to determine the category to which the image to be classified belongs based on the image to be classified.
18. An electronic device, characterized in that: include: processor; as well as A memory is used to store a program for a processing method for an object classification model. After the device is powered on and the program for the processing method for the object classification model is run by the processor, the following steps are performed: Get the target category; For the target category, obtaining object samples and classification probabilities that the object samples belong to the target category; generating a classifier for the target category based on the object sample and the classification probability that the object sample belongs to the target category, the classifier being configured to obtain the classification probability that the object to be classified belongs to the target category based on the object to be classified; adding the classifier to an object classification model, wherein the object classification model is used to determine the category to which the object to be classified belongs based on the object to be classified; If the recognition probability corresponding to the object to be classified does not reach the recognition probability threshold, a result indicating that the object to be classified cannot be recognized is output, and the object to be classified is no longer classified, wherein the recognition probability is obtained by the identifier of the object classification model identifying the object to be classified, and the recognition probability is used to represent the probability that the object to be classified can be recognized by the object classification model; The classifier is configured to obtain a classification probability that the object to be classified belongs to the target category based on the object to be classified by: obtaining the amount of feature information of the object to be classified, selecting a target category from the target categories whose amount of feature information is greater than or equal to the amount of feature information of the object to be classified, and comparing the feature information of the object to be classified with the feature information of the selected target category to obtain a classification probability that the object to be classified belongs to the target category; The object to be classified is at least an image to be classified, the object classification model is at least an image classification model, and the image classification model is used to determine the category to which the image to be classified belongs based on the image to be classified.
19. A storage device, characterized in that: A program storing a processing method for an object classification model is executed by a processor to perform the following steps: Get the target category; For the target category, obtaining object samples and classification probabilities that the object samples belong to the target category; generating a classifier for the target category based on the object sample and the classification probability that the object sample belongs to the target category, the classifier being configured to obtain the classification probability that the object to be classified belongs to the target category based on the object to be classified; adding the classifier to an object classification model, wherein the object classification model is used to determine the category to which the object to be classified belongs based on the object to be classified; Wherein, if the recognition probability corresponding to the object to be classified does not reach the recognition probability threshold, a result that the object to be classified cannot be recognized is output, and the object to be classified is no longer classified, wherein the recognition probability is obtained by the identifier of the object classification model identifying the object to be classified, and the recognition probability is used to represent the probability that the object to be classified can be recognized by the object classification model; wherein the classifier is used to obtain the classification probability that the object to be classified belongs to the target category according to the object to be classified through the following steps: obtaining the amount of feature information of the object to be classified, and selecting a target category from the target category whose amount of feature information is greater than or equal to the amount of feature information of the object to be classified, and comparing the feature information of the object to be classified with the feature information of the selected target category to obtain the classification probability that the object to be classified belongs to the target category; The object to be classified is at least an image to be classified, the object classification model is at least an image classification model, and the image classification model is used to determine the category to which the image to be classified belongs based on the image to be classified.
Citation Information
Patent Citations
Method and apparatus for identifying fruits and vegetables
CN108256476A