CN110245700B - Classification model construction method, classification model and object identification method - Google Patents

Classification model construction method, classification model and object identification method Download PDF

Info

Publication number
CN110245700B
CN110245700B CN201910498516.6A CN201910498516A CN110245700B CN 110245700 B CN110245700 B CN 110245700B CN 201910498516 A CN201910498516 A CN 201910498516A CN 110245700 B CN110245700 B CN 110245700B
Authority
CN
China
Prior art keywords
level
categories
classification
tree
clustering
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910498516.6A
Other languages
Chinese (zh)
Other versions
CN110245700A (en
Inventor
朱晓雅
南一冰
廉士国
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Cloudminds Shanghai Robotics Co Ltd
Original Assignee
Cloudminds Robotics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Cloudminds Robotics Co Ltd filed Critical Cloudminds Robotics Co Ltd
Priority to CN201910498516.6A priority Critical patent/CN110245700B/en
Publication of CN110245700A publication Critical patent/CN110245700A/en
Application granted granted Critical
Publication of CN110245700B publication Critical patent/CN110245700B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/243Classification techniques relating to the number of classes
    • G06F18/24323Tree-organised classifiers

Landscapes

  • Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Image Analysis (AREA)

Abstract

The embodiment of the invention relates to the technical field of deep learning, and discloses a classification model construction method, which comprises the following steps: acquiring a feature vector of each category in known images of N categories; clustering the N categories according to the feature vectors to form a multi-layer classification level tree; and taking the inner nodes of the multi-layer classification level tree as the nodes of the classification model, and training each node to obtain the classification model. According to the classification model construction method, the classification model and the object identification method provided by the embodiment of the invention, the constructed classification model has multiple levels and high classification performance.

Description

Classification model construction method, classification model and object identification method
Technical Field
The embodiment of the invention relates to the technical field of deep learning, in particular to a classification model construction method, a classification model and an object identification method.
Background
In recent years, the classification method based on deep learning has a significant breakthrough in classification effect and higher classification accuracy compared with the conventional classification method, and with the continuous introduction of deep learning networks such as ResNet, DenseNet and the like, the classification method based on deep learning gradually becomes a main trend of classification application.
However, the inventors found that at least the following problems exist in the prior art: when a classification model is trained, all classes are usually placed in the same level to train the classification model, and the obtained classification model has only one level and is not high in classification performance.
Disclosure of Invention
The embodiment of the invention aims to provide a classification model construction method, a classification model and an object identification method, so that the constructed classification model has multiple levels and high classification performance.
In order to solve the above technical problem, an embodiment of the present invention provides a classification model construction method, including: acquiring a feature vector of each category in known images of N categories; clustering the N categories according to the feature vectors to form a multi-layer classification level tree; and taking the inner nodes of the multi-layer classification level tree as the nodes of the classification model, and training each node to obtain the classification model.
The embodiment of the invention also provides a classification model, and the classification model is constructed by using the classification model construction method.
The embodiment of the invention also provides an object identification method, which comprises the following steps: and inputting the image of the object to be recognized into the classification model to obtain a recognition result and the confidence coefficient of the recognition result.
Compared with the prior art, the embodiment of the invention provides a classification model construction method, which comprises the following steps: acquiring a feature vector of each category in known images of N categories; clustering the N categories according to the feature vectors to form a multi-layer classification level tree; and taking the inner nodes of the multi-layer classification level tree as the nodes of the classification model, and training each node to obtain the classification model. In the embodiment, a clustering method is adopted for N categories to form a multi-layer classification level tree, so that the similarity between different categories of the same level is relatively more uniform, the trained classifier has better performance, and a high-performance classification model with the multi-layer classification level tree is obtained.
In addition, clustering the N categories according to the feature vectors to form a multi-layer classification level tree, which specifically comprises the following steps: judging whether a divided hierarchical tree exists or not; and if the divided hierarchical tree does not exist, performing clustering hierarchical division on the N categories according to the characteristic vector to obtain a multi-layer classification hierarchical tree.
In addition, the method for obtaining the multilayer classification level tree by carrying out clustering level division on the N categories according to the feature vector specifically comprises the following steps: s11: selecting a category from the N categories; s12: calculating the distance between the selected category and all other categories; s13: calculating a distance threshold value and a clustering termination threshold value according to the obtained distance; s14: judging whether the distance threshold is smaller than a clustering termination threshold or not; s15: if the distance threshold is smaller than the clustering termination threshold, the distance between every two of all the N categories is obtained; s16: merging classes less than or equal to the distance threshold into a new class; s17: classifying the new class and other classes larger than the distance threshold into the same level; s18: selecting a category from the new category and other categories greater than the distance threshold; s19: the steps S12 to S18 are re-executed until the distance threshold is greater than the cluster end threshold. The scheme provides a specific implementation mode for directly clustering the N categories.
Further, step S13 specifically includes: drawing a curve according to the obtained distance, and fitting an inflection point of the curve by utilizing a polynomial equation; the value at the inflection point of the curve is used as a distance threshold; calculating the average value and the standard deviation of the distance; and solving a clustering termination threshold value according to the average value and the standard deviation. The scheme provides a specific solving method of a distance threshold and a clustering termination threshold.
In addition, after determining whether there is a hierarchical tree that has already been divided, the method further includes: and if the divided hierarchical tree exists, integrating the N categories and the divided hierarchical tree according to the feature vector to obtain a multi-layer classification hierarchical tree.
In addition, the method integrates the hierarchical tree with the divided hierarchical tree according to the feature vector to obtain a multi-layer classification hierarchical tree, and specifically comprises the following steps: s21: calculating the distance between every two categories of each level in the divided level tree, and calculating a clustering threshold corresponding to each level; s22: calculating the distance between each category in the N categories and each category of the last level in the divided level tree; s23: judging whether at least one clustering category with the distance smaller than the clustering threshold of the last level exists in the N categories; s24: if the clustering type exists, the clustering type is merged into the last level in the divided level tree, and other types except the clustering type in the N types are merged with other levels of the divided level tree in sequence; s26: judging whether all the N categories are merged into the divided hierarchical tree or not; s27: if the N categories are not all merged into the divided hierarchical tree, performing clustering hierarchical division on the categories which are not merged into the divided hierarchical tree and the divided hierarchical tree in the N categories to form a multi-layer classification hierarchical tree; s28: if all the N categories are merged into the divided hierarchical tree, taking the merged divided hierarchical tree as a multi-layer classification hierarchical tree; s29: and if the clustering categories do not exist, carrying out clustering hierarchy division on the N categories and the divided hierarchical tree to form a multi-layer classification hierarchical tree. The scheme provides a specific implementation mode for integrating N categories and the divided hierarchical tree to form a multi-layer classification hierarchical tree.
In addition, the internal nodes of the multi-layer classification level tree are used as the nodes of the classification model, and each node is trained to obtain the classification model, which specifically comprises the following steps: acquiring a training sample image and a test image containing the category of each node; inputting training sample images into a multi-layer classification level tree, and training internal nodes of each level of the multi-layer classification level tree; inputting the test image into the trained multilayer classification level tree to obtain a test precision value; training the inner node of each level of the multi-level classification level tree until the variation amplitude of the test precision value is within a preset range; and taking the trained multilayer classification level tree as a classification model.
In addition, the confidence of the recognition result is obtained by the following steps: predicting a confidence value of each internal node in each level of a multi-level classification level tree of the classification model; and taking the maximum confidence value in each level as the parent confidence of the level, and taking the product of all parent confidence of the node in which the recognition result is positioned as the confidence of the recognition result. In the scheme, a layer-by-layer calculation method is adopted, and the product of the confidences of all parents of the node where the recognition result is located is used as the confidence of the recognition result, so that the confidence of the recognition result of the final object recognition is more credible.
Drawings
One or more embodiments are illustrated by way of example in the accompanying drawings, which correspond to the figures in which like reference numerals refer to similar elements and which are not to scale unless otherwise specified.
FIG. 1 is a schematic flow chart of a classification model construction method according to a first embodiment of the present invention;
FIG. 2 is a flow chart illustrating a clustering method in which there is no partitioned hierarchical tree according to a first embodiment of the present invention;
FIG. 3 is a flowchart illustrating a clustering method in which a partitioned hierarchical tree exists according to a first embodiment of the present invention;
fig. 4 is a flowchart illustrating a classification model construction method according to a second embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, it will be appreciated by those of ordinary skill in the art that numerous technical details are set forth in order to provide a better understanding of the present application in various embodiments of the present invention. However, the technical solution claimed in the present application can be implemented without these technical details and various changes and modifications based on the following embodiments.
The first embodiment of the present invention relates to a classification model construction method, and the core of the present embodiment is to provide a classification model construction method, including: acquiring a feature vector of each category in known images of N categories; clustering the N categories according to the feature vectors to form a multi-layer classification level tree; and taking the inner nodes of the multi-layer classification level tree as the nodes of the classification model. In the embodiment, a clustering method is adopted for N categories to form a multi-layer classification level tree, so that the similarity between different categories of the same level is relatively more uniform, the trained classifier has better performance, and a high-performance classification model with the multi-layer classification level tree is obtained.
The following describes implementation details of the classification model construction method according to the present embodiment in detail, and the following is only provided for easy understanding and is not necessary for implementing the present embodiment.
A flow diagram of the classification model construction method in the present embodiment is shown in fig. 1:
step 101: feature vectors for each of the N classes of known images are obtained.
Specifically, images of N categories are acquired, and a feature vector capable of representing each category is calculated. Preferably, the number of the images of each category is multiple, the feature vector of each image in each category is obtained, and the average value of the feature vectors of all the images in the category is calculated and used as the feature vector of the category.
Step 102: and judging whether the divided hierarchical tree exists. If not, go to step 103; if so, step 104 is entered.
Specifically, before constructing the classification model, it is determined whether a divided hierarchical tree exists, and if yes, the step 103 is performed only by integrating N classes into the divided hierarchical tree; if not, step 104 is performed, and a multi-level classification level tree is formed according to the N classes to obtain a classification model.
Step 103: and performing clustering hierarchy division on the N categories according to the feature vectors to obtain a multi-layer classification hierarchy tree.
Specifically, as shown in fig. 3, step 103 specifically includes steps S11 through S18.
S11: a category is selected from the N categories.
S12: the distance between the selected category and all other categories is calculated.
Specifically, in the above steps S11 to S12, if there is no classification tree into which the hierarchy is divided, it is necessary to form a classification hierarchy tree directly from the N classes. And randomly selecting one category from the N categories, calculating the distance between the selected category and all other categories, and then obtaining a distance threshold value and a clustering termination threshold value according to the obtained distance. The method for calculating the distance between the selected category and all other categories is the same as the above-mentioned method for calculating the distance, and is not described herein again.
S13: and solving a distance threshold value and a clustering termination threshold value according to the obtained distance.
Step S13 specifically includes: drawing a curve according to the obtained distance, and fitting an inflection point of the curve by utilizing a polynomial equation; the value at the inflection point of the curve is used as a distance threshold; calculating the average value and the standard deviation of the distance; and solving a clustering termination threshold value according to the average value and the standard deviation.
Specifically, when the distance threshold is determined according to the obtained distances, the first determined distances are sorted from small to large and a curve is drawn, so that the similarity between the class similar to the class and the class dissimilar to the class is obviously different on the whole, that is, the drawn curve has an inflection point, and the value of the inflection point is set as the distance threshold for the first clustering. The curve may be fitted by a polynomial equation such as a cubic equation, and the distance threshold may be obtained by solving an inflection point of the polynomial equation. When the clustering termination threshold is obtained according to the obtained distance, the size of the clustering termination threshold λ is set to be λ ═ μ + θ × δ, where μ denotes an average value of distances from the selected category to all other categories, δ denotes a standard deviation of distances from the selected category to all other categories, θ is an empirical value, and θ has a value in a range of 0 to 1.
S14: judging whether the distance threshold is smaller than the clustering termination threshold;
s15: and if the distance threshold is smaller than the clustering termination threshold, the distance between every two of all the N categories is obtained.
S16: the classes that are less than or equal to the distance threshold are merged into a new class.
S17: and classifying the new class and other classes larger than the distance threshold into the same level.
S18: a category is selected from the new category and other categories that are greater than the distance threshold.
S19: the steps S12 to S17 are re-executed until the distance threshold is greater than the cluster end threshold.
Specifically, in the foregoing steps S14 to S18, when the distance threshold is smaller than the clustering termination threshold, the distance between every two of all the N categories is obtained, the categories smaller than or equal to the distance threshold are merged into a new category, the merged categories in the new category are in the same hierarchy, all the new categories and other categories not merged are in the same hierarchy, and one category is selected from the new category and the other categories larger than the distance threshold, and the next clustering is continued. When the distance threshold is larger than the clustering termination threshold, clustering is terminated, and a multi-layer classification level tree formed by clustering is automatically obtained;
step 104: and integrating the N categories and the divided hierarchical tree according to the feature vector to obtain a multi-layer classification hierarchical tree.
Specifically, as shown in fig. 2, step 104 specifically includes steps S21 through S29.
S21: and calculating the distance between every two categories in the large class of each level in the divided level tree, and calculating a clustering threshold corresponding to each level.
Specifically, since a divided hierarchical tree is known, assuming that the known divided hierarchical tree is a D-level tree, when clustering the N categories, it is first considered whether the N categories can be merged into a certain class of a certain level of the D-level tree. Firstly, the distance between every two categories in the large category of each level in the divided level tree is obtained, the maximum value of the distance between every two categories in the large category is taken as the distance threshold value of the large category, the distance threshold values of all the large categories of the level are compared, and the maximum distance threshold value is taken as the clustering threshold value of the level. The distance between every two categories in the large category of each level in the divided level tree is obtained, the distance represents the similarity between every two categories, and the distance is smaller when the similarity between every two categories is higher; the lower the similarity between two categories, the greater the "distance". How to obtain the distance between two categories according to the feature vectors of the two categories belongs to the prior art, and the embodiment will not be described in detail.
S22: and calculating the distance between each of the N categories and each category of the last level in the divided hierarchical tree.
S23: and judging whether at least one clustering category with the distance smaller than the clustering threshold of the last level exists in the N categories.
S24: if there are clusterable categories, the clusterable categories are merged into the last level in the partitioned hierarchical tree.
S25: and sequentially merging other classes except the clustering class in the N classes and other levels of the divided level tree.
S26: and judging whether all the N categories are merged into the divided hierarchical tree.
S27: and if the N categories are not all merged into the divided hierarchical tree, performing cluster hierarchical division on the categories which are not merged into the divided hierarchical tree and the divided hierarchical tree in the N categories to form a multi-layer classification hierarchical tree.
S28: and if all the N categories are merged into the divided hierarchical tree, taking the merged divided hierarchical tree as a multi-layer classification hierarchical tree.
S29: and if the clustering categories do not exist, carrying out clustering hierarchy division on the N categories and the divided hierarchical tree to form a multi-layer classification hierarchical tree.
Specifically, in the above steps S22 to S28, since there are inevitably a plurality of categories in the last level in the divided hierarchical tree, distances between the N categories and each category in the last level in the divided hierarchical tree are calculated, respectively, and there are inevitably a plurality of distances, and if there is at least one clusterable category whose distance is smaller than the clustering threshold of the last level among the N categories, the clusterable category is merged into a similar category in the last level in the divided hierarchical tree; and combining the other classes except the clusterable class in the N classes with the other levels of the divided level tree in sequence, that is, calculating the distance between the other uncombined classes and each class in the previous level of the divided level tree, and comparing the distance with the clustering threshold of the previous level, which is the same as steps S21 to S23, except that the corresponding levels and classes are changed. If not, the N categories and the well-divided hierarchical tree are clustered and hierarchically divided to form a multi-layer classification hierarchical tree.
After sequentially merging other classes except the clustering classes in the N classes with other levels of the divided level tree, judging whether the N classes are all merged into the divided level tree or not, and if the N classes are all merged into the divided level tree, directly taking the merged divided level tree as a multi-layer classification level tree; if the classes which are not merged into the divided hierarchical tree exist in the N classes, placing the rest classes and the divided hierarchical tree at the same level, and carrying out cluster hierarchical division on the N classes and the divided hierarchical tree to form the multilayer classification hierarchical tree.
Step 105: and taking the inner nodes of the multi-layer classification level tree as the nodes of the classification model, and training each node to obtain the classification model.
Specifically, the inner nodes of the multi-layer classification level tree are used as the nodes of the classification model, a classifier is trained on each node, and the classification model is obtained after training is completed.
Compared with the prior art, the multi-layer classification level tree is formed by adopting a clustering method for the N categories in the embodiment, so that the similarity between different categories of the same level is relatively more uniform, the trained classifier has better performance, and the high-performance classification model with the multi-layer classification level tree is obtained.
A second embodiment of the present invention relates to a classification model construction method. The second embodiment is substantially the same as the first embodiment, and mainly differs in that: in the embodiment, a specific implementation manner of training the classification model is given.
As shown in fig. 3, the method for constructing a classification model in this embodiment specifically includes:
step 201: feature vectors for each of the N classes of known images are obtained.
Step 202: and judging whether the divided hierarchical tree exists. If yes, go to step 203; if not, go to step 204.
Step 203: and integrating the N categories and the divided hierarchical tree according to the feature vector to obtain a multi-layer classification hierarchical tree.
Step 204: and performing clustering hierarchy division on the N categories according to the feature vectors to obtain a multi-layer classification hierarchy tree.
Steps 201 to 204 are substantially the same as steps 101 to 104 in the first embodiment, and are not repeated herein to avoid repetition.
Step 205: training sample images and test images containing the class of each node are acquired.
Step 206: and inputting the training sample image into the multi-layer classification level tree, and training the internal node of each level of the multi-layer classification level tree.
Step 207: and inputting the test image into the trained multilayer classification level tree to obtain a test precision value.
Step 208: and training the inner nodes of each level of the multi-level classification level tree until the variation amplitude of the test precision value is within a preset range.
Step 209: and taking the trained multilayer classification level tree as a classification model.
Specifically, in step 205 to step 209, a training sample image and a test image including a category of each internal node of the multi-layered classification level tree are acquired, the training sample image is input into the multi-layered classification level tree, and the internal node of each level of the multi-layered classification level tree is trained using the training sample image; after training for a certain time, testing the multi-layer classification level tree after training by using a test image to obtain a test precision value (such as classification accuracy); and continuing to train the multi-layer classification level tree by using the training sample image until the variation amplitude of the test precision value is within a preset range, wherein the preset range can be set by a user, and the test precision value is represented to be changed only in a small amplitude and is not changed obviously any more. At this time, the training is considered to be completed, and the multi-layered classification level tree after the training is completed is used as the classification model.
Compared with the prior art, the embodiment of the invention provides a classification model construction method, which takes inner nodes of a multi-layer classification level tree as nodes of a classification model, trains each node to obtain the classification model, and specifically comprises the following steps: acquiring a training sample image and a test image containing the category of each node; inputting training sample images into a multi-layer classification level tree, and training internal nodes of each level of the multi-layer classification level tree; inputting the test image into the trained multilayer classification level tree to obtain a test precision value; training the inner node of each level of the multi-level classification level tree until the variation amplitude of the test precision value is within a preset range; the multi-layer classification level tree after training is used as a classification model, and a specific implementation mode of training the classification model is provided in the embodiment.
The steps of the above methods are divided for clarity, and the implementation may be combined into one step or split some steps, and the steps are divided into multiple steps, so long as the same logical relationship is included, which are all within the protection scope of the present patent; it is within the scope of the patent to add insignificant modifications to the algorithms or processes or to introduce insignificant design changes to the core design without changing the algorithms or processes.
A third embodiment of the present invention relates to a classification model constructed by the classification model construction method according to the first or second embodiment.
The fourth embodiment of the present invention also provides an object identification method, including: the image of the object to be recognized is input into the classification model in the third embodiment to obtain the recognition result and the confidence coefficient of the recognition result, and the classification model constructed by the first or second embodiment has a plurality of levels, so that the recognition result is more accurate when the object recognized by the classification model is used.
The confidence of the recognition result in the present embodiment is obtained by the following steps: predicting a confidence value of each internal node in each level of a multi-level classification level tree of the classification model; and taking the maximum confidence value in each level as the parent confidence of the level, and taking the product of all parent confidence of the node in which the recognition result is positioned as the confidence of the recognition result.
Specifically, in order to obtain a more accurate recognition result, a multi-level sequential recognition method is used to output a final recognition result, and the confidence is obtained by a layer-by-layer calculation method.
Assuming that the formed multi-level classification level tree is a K-level classification tree, for each internal node of each level of the K-level classification tree, respectively training a classifier, Lk represents the number of classifiers in each level, M represents the total number of classifiers, where L1 is 1, and the relationship between M and Lk is shown in the following formula (1):
M=L1+L2+…+Lk (1)
inputting an image of an object to be recognized, and classifying the image layer by using the classifier of each layer until the final classification result is obtained by the last layer. And regarding the confidence coefficient of the final recognition result, adopting a layer-by-layer calculation method. First, a first-layer classifier M1 is used for prediction, and the confidence of each internal node in the first layer is respectively P21, P22 and P23, and falseSetting the maximum confidence value in the first layer as P21'; then, the confidence maximum predicted by L2 classifiers in the second layer is multiplied by the parent confidence of the layer to be the confidence result of the layer, the confidence of each inner node in the second layer is P31, P32, P33, and the like, and assuming that the confidence maximum in the second layer is P31, the parent confidence of the layer is P31 ═ P21 ═ P31. And each layer is analogized in the same way until the K layer, and the maximum confidence value of the K layer is assumed to be PK1The parent confidence of the K-12 th layer is P(K-1)1The confidence value P of the final recognition result is obtainedK1`=P(K-1)1`*PK1That is, the confidence of a certain node in the last layer is the product of the confidence of the node and the confidences of all parents of the node.
In the embodiment, a layer-by-layer calculation method is adopted, and the product of the confidence degrees of all parents of the node where the recognition result is located is used as the confidence degree of the recognition result, so that the confidence degree of the final recognition result of the image of the object to be recognized is more credible.
The fifth embodiment of the present invention also provides a computer-readable storage medium storing a computer program, which when executed by a processor implements the classification model construction method of the first or second embodiment.
That is, as can be understood by those skilled in the art, all or part of the steps in the method for implementing the embodiments described above may be implemented by a program instructing related hardware, where the program is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It will be understood by those of ordinary skill in the art that the foregoing embodiments are specific examples for carrying out the invention, and that various changes in form and details may be made therein without departing from the spirit and scope of the invention in practice.

Claims (7)

1. A classification model construction method is characterized by comprising the following steps:
acquiring a feature vector of each category in known images of N categories;
clustering the N categories according to the feature vectors to form a multi-layer classification level tree;
taking the inner nodes of the multilayer classification level tree as the nodes of a classification model, and training each node to obtain the classification model;
the clustering the N categories according to the feature vector to form a multi-layered classification level tree specifically includes:
judging whether a divided hierarchical tree exists or not;
if the divided hierarchical tree does not exist, performing clustering hierarchical division on the N categories according to the feature vector to form the multilayer classification hierarchical tree;
the performing, according to the feature vector, clustering hierarchy division on the N categories to form the multi-layered classification hierarchy tree specifically includes:
s11: selecting a category from the N categories;
s12: calculating the distance between the selected category and all other categories;
s13: calculating a distance threshold value and a clustering termination threshold value according to the obtained distance;
s14: judging whether the distance threshold is smaller than the clustering termination threshold;
s15: if the distance threshold is smaller than the clustering termination threshold, the distance between every two of all the N categories is obtained;
s16: merging categories that are less than or equal to the distance threshold into a new category;
s17: classifying the new class as the same level as other classes that are greater than the distance threshold;
s18: selecting a category from the new category and other categories greater than the distance threshold;
s19: re-executing steps S12-S19 until the distance threshold is greater than the cluster termination threshold;
the step S13 specifically includes:
drawing a curve according to the obtained distance, and fitting an inflection point of the curve by utilizing a polynomial equation;
taking a value at an inflection point of the curve as the distance threshold;
calculating the average value and the standard deviation of the distance;
and solving the clustering termination threshold value according to the average value and the standard deviation.
2. The method of constructing a classification model according to claim 1, wherein after the determining whether there is a hierarchical tree that has been divided, the method further comprises:
and if the divided hierarchical tree exists, integrating the N categories and the divided hierarchical tree according to the feature vector to obtain the multilayer classification hierarchical tree.
3. The method for constructing a classification model according to claim 2, wherein the integrating the N classes and the partitioned hierarchical tree according to the feature vector to obtain the multi-layered classification hierarchical tree specifically includes:
s21: calculating the distance between every two categories of each level in the divided level tree, and calculating a clustering threshold corresponding to each level;
s22: calculating a distance between each of the N categories and each category of a last level in the divided level tree;
s23: judging whether at least one clustering category with the distance smaller than the clustering threshold of the last level exists in the N categories;
s24: if the clustering type exists, the clustering type is merged into the last level in the divided level tree, and other types except the clustering type in the N types are merged with other levels of the divided level tree in sequence;
s26: judging whether all the N categories are merged into the divided hierarchical tree or not;
s27: if the N categories are not all merged into the divided hierarchical tree, performing cluster hierarchical division on the categories which are not merged into the divided hierarchical tree in the N categories and the divided hierarchical tree to form the multi-layer classification hierarchical tree;
s28: if all the N categories are merged into the divided hierarchical tree, taking the merged divided hierarchical tree as the multi-layer classification hierarchical tree;
s29: and if the clustering categories do not exist, clustering hierarchy division is carried out on the N categories and the divided hierarchical tree to form the multilayer classification hierarchical tree.
4. The method for constructing a classification model according to claim 1, wherein the training of each node to obtain the classification model by using the internal nodes of the multi-layered classification hierarchical tree as the nodes of the classification model specifically comprises:
acquiring a training sample image and a test image containing the category of each node;
inputting the training sample image into the multi-layer classification level tree, and training the inner node of each level of the multi-layer classification level tree;
inputting the test image into the trained multilayer classification level tree to obtain a test precision value;
training the inner node of each level of the multi-level classification level tree until the variation amplitude of the test precision value is within a preset range;
and taking the trained multi-layer classification level tree as the classification model.
5. A classification model, which is constructed by the classification model construction method according to any one of claims 1 to 4.
6. An object recognition method, comprising: an image of an object to be recognized is input into the classification model as claimed in claim 5 resulting in a recognition result and a confidence of the recognition result.
7. The object recognition method according to claim 6, wherein the confidence of the recognition result is obtained by:
predicting a confidence value for each of the internal nodes in each level of a multi-level classification level tree of the classification model;
and taking the maximum confidence value in each level as the parent confidence of the level, and taking the product of all parent confidence of the node in which the recognition result is positioned as the confidence of the recognition result.
CN201910498516.6A 2019-06-10 2019-06-10 Classification model construction method, classification model and object identification method Active CN110245700B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910498516.6A CN110245700B (en) 2019-06-10 2019-06-10 Classification model construction method, classification model and object identification method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910498516.6A CN110245700B (en) 2019-06-10 2019-06-10 Classification model construction method, classification model and object identification method

Publications (2)

Publication Number Publication Date
CN110245700A CN110245700A (en) 2019-09-17
CN110245700B true CN110245700B (en) 2022-04-08

Family

ID=67886472

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910498516.6A Active CN110245700B (en) 2019-06-10 2019-06-10 Classification model construction method, classification model and object identification method

Country Status (1)

Country Link
CN (1) CN110245700B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112766389B (en) * 2021-01-26 2022-11-29 北京三快在线科技有限公司 Image classification method, training method, device and equipment of image classification model
CN112836041B (en) * 2021-01-29 2023-07-28 北京海卓飞网络科技有限公司 Personnel relationship analysis method, device, equipment and storage medium
CN114090556B (en) * 2021-10-27 2022-12-13 中能浦慧(上海)能源技术有限公司 Electric power marketing data acquisition method and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105447504A (en) * 2015-11-06 2016-03-30 中国科学院计算技术研究所 Traffic mode behavior recognition method and corresponding recognition model construction method
CN106096748A (en) * 2016-04-28 2016-11-09 武汉宝钢华中贸易有限公司 Entrucking forecast model in man-hour based on cluster analysis and decision Tree algorithms
JP2017168057A (en) * 2016-03-18 2017-09-21 株式会社Spectee Device, system, and method for sorting images

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102402508A (en) * 2010-09-07 2012-04-04 华东师范大学 Similar image search device and search method thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105447504A (en) * 2015-11-06 2016-03-30 中国科学院计算技术研究所 Traffic mode behavior recognition method and corresponding recognition model construction method
JP2017168057A (en) * 2016-03-18 2017-09-21 株式会社Spectee Device, system, and method for sorting images
CN106096748A (en) * 2016-04-28 2016-11-09 武汉宝钢华中贸易有限公司 Entrucking forecast model in man-hour based on cluster analysis and decision Tree algorithms

Also Published As

Publication number Publication date
CN110245700A (en) 2019-09-17

Similar Documents

Publication Publication Date Title
US11301637B2 (en) Methods, devices, and systems for constructing intelligent knowledge base
CN108920654B (en) Question and answer text semantic matching method and device
CN105960647B (en) Compact face representation
US10783451B2 (en) Ensemble machine learning for structured and unstructured data
CN110245700B (en) Classification model construction method, classification model and object identification method
CN107480143A (en) Dialogue topic dividing method and system based on context dependence
CN109858015B (en) Semantic similarity calculation method and device based on CTW (computational cost) and KM (K-value) algorithm
CN110704601A (en) Method for solving video question-answering task requiring common knowledge by using problem-knowledge guided progressive space-time attention network
CN110969020A (en) CNN and attention mechanism-based Chinese named entity identification method, system and medium
US20190317965A1 (en) Methods and apparatus to facilitate generation of database queries
US20200334410A1 (en) Encoding textual information for text analysis
CN112861522B (en) Aspect-level emotion analysis method, system and model based on dual-attention mechanism
KR20200052453A (en) Apparatus and method for training deep learning model
Li et al. Simultaneous localized feature selection and model detection for Gaussian mixtures
WO2018083804A1 (en) Analysis program, information processing device, and analysis method
KR20220045424A (en) Method and apparatus of compressing artificial neural network
CN113761868A (en) Text processing method and device, electronic equipment and readable storage medium
KR101747783B1 (en) Two class classification method for predicting class of specific item and computing apparatus using the same
CN115392357A (en) Classification model training and labeled data sample spot inspection method, medium and electronic equipment
CN112749737A (en) Image classification method and device, electronic equipment and storage medium
CN105740916B (en) Characteristics of image coding method and device
US11176327B2 (en) Information processing device, learning method, and storage medium
US20230259761A1 (en) Transfer learning system and method for deep neural network
CN111708745B (en) Cross-media data sharing representation method and user behavior analysis method and system
CN114898184A (en) Model training method, data processing method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20210204

Address after: 200245 2nd floor, building 2, no.1508, Kunyang Road, Minhang District, Shanghai

Applicant after: Dalu Robot Co.,Ltd.

Address before: 518000 Room 201, building A, No. 1, Qian Wan Road, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong (Shenzhen Qianhai business secretary Co., Ltd.)

Applicant before: Shenzhen Qianhaida Yunyun Intelligent Technology Co.,Ltd.

GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 200245 Building 8, No. 207, Zhongqing Road, Minhang District, Shanghai

Patentee after: Dayu robot Co.,Ltd.

Address before: 200245 2nd floor, building 2, no.1508, Kunyang Road, Minhang District, Shanghai

Patentee before: Dalu Robot Co.,Ltd.