CN111488939A - Model training method, classification method, device and equipment - Google Patents

Model training method, classification method, device and equipment Download PDF

Info

Publication number
CN111488939A
CN111488939A CN202010293448.2A CN202010293448A CN111488939A CN 111488939 A CN111488939 A CN 111488939A CN 202010293448 A CN202010293448 A CN 202010293448A CN 111488939 A CN111488939 A CN 111488939A
Authority
CN
China
Prior art keywords
classification
sample
training
image set
block
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.)
Pending
Application number
CN202010293448.2A
Other languages
Chinese (zh)
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.)
Tianjin Meiteng Technology Co Ltd
Original Assignee
Tianjin Meiteng Technology 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 Tianjin Meiteng Technology Co Ltd filed Critical Tianjin Meiteng Technology Co Ltd
Priority to CN202010293448.2A priority Critical patent/CN111488939A/en
Publication of CN111488939A publication Critical patent/CN111488939A/en
Pending legal-status Critical Current

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

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 application provides a model training method, a classification method, a device and equipment, and belongs to the technical field of object block recognition. The method comprises the following steps: performing model training by adopting a plurality of sample object block images in the sample image set to obtain an object block classification model; classifying each sample image according to the object classification model to obtain an object classification result of each sample object image; if the object block classification result indicates that the classification result of the corresponding sample object block image is wrong, modifying the object block type marked by the sample object block image with the wrong classification according to the judging type of the received sample object block image with the wrong classification; and retraining according to the modified sample image set to obtain a target object block classification model. According to the method and the device, the accuracy of the object classification model can be improved through modification of the object type labeled by the sample.

Description

Model training method, classification method, device and equipment
Technical Field
The application relates to the technical field of object block identification, in particular to a model training method, a classification method, a device and equipment.
Background
In industrial production, collected pieces are generally classified in order to process different pieces. The main classification mode that adopts at present passes through image identification's mode, catches the thing piece information in the image, and then discerns these thing piece information, however in the actual production application, because the camera can only follow the fixed collection image of a certain angle, consequently, can have some images and can't specifically discern the classification in its thing piece information, hardly categorizes this type of data.
At present, the processing mode of the block information is mainly to remove the part of data which cannot be identified, however, in the actual industrial production, the block information does exist, the removal of the data often causes the waste of the block, and because a deep learning mode is adopted in the classification process, the neural network is trained through the block information, and the lack of the sample also causes the result of the classification through the neural network to be inaccurate.
Disclosure of Invention
The application aims to provide a model training method, a classification method, a device and equipment, which can improve the accuracy of a block classification model by modifying the type of a block marked on a sample.
The embodiment of the application is realized as follows:
in one aspect of the embodiments of the present application, a method for training a block classification model is provided, including:
performing model training by adopting a plurality of sample object block images in the sample image set to obtain an object block classification model;
classifying each sample image in the sample image set according to the object block classification model to obtain an object block classification result of each sample object block image;
if the object block classification result indicates that the classification result of the corresponding sample object block image is wrong, modifying the object block type marked by the sample object block image with the wrong classification in the sample image set according to the judging type of the received sample object block image with the wrong classification;
and retraining according to the modified sample image set to obtain a target object block classification model, wherein the target object block classification model is used for classifying the object blocks to be sorted based on the images of the object blocks to be sorted.
Optionally, the sample image set comprises: training image set and test image set, training image set and test image set respectively include: sample mass images of a plurality of mass types;
carrying out model training by adopting a plurality of sample object block images in a sample image set to obtain an object block classification model, wherein the model training comprises the following steps:
performing model training according to the sample object images in the training image set to obtain a first classification model;
testing the first classification model by adopting the sample object image in the test image set to obtain the classification recall rate of the first classification model;
according to the classification recall rate, the proportion of sample object images of a plurality of object types in the training image set is adjusted;
carrying out model training again according to the adjusted training image set to obtain a second classification model; the object classification model is a second classification model.
Optionally, the classification recall comprises: a classification recall of a plurality of parcel types; according to the classification recall rate, the proportion of the sample object images of the multiple object types in the training image set is adjusted, and the method comprises the following steps:
according to the classification recall rate of preset object types in the object types and preset image classification indexes, the proportion of sample object images of the object types in a training image set is adjusted, wherein the preset image classification indexes comprise: and (3) index of classification recall rate of the object sample image of the preset object type.
Optionally, the method further comprises:
and adjusting parameters of the first classification model according to the classification recall rate.
And carrying out model training again according to the adjusted training image set to obtain a second classification model, wherein the method comprises the following steps:
and carrying out model training again according to the adjusted parameters of the first classification model and the adjusted training image set to obtain a second classification model.
Optionally, the method further comprises:
acquiring the field classification accuracy of the target object block classification model for classifying the image of the object block to be classified in production;
collecting a plurality of material images in the production process and updating a sample image set according to the condition that the field classification accuracy does not meet the preset field classification requirement;
and (4) carrying out model training again according to the updated sample image set until the field classification accuracy of the obtained target object block classification model in production meets the field classification requirement.
Optionally, before performing model training by using a plurality of sample object images in the sample image set to obtain the object classification model, the method further includes:
determining the proportion of a training image set and a testing image set in a sample image set according to the number of the sample block images; wherein the training image set is greater than or equal to the test image set.
In another aspect of the embodiments of the present application, there is provided a training apparatus for a block classification model, the apparatus including: the device comprises a training module, a classification module and a modification module.
And the training module is used for carrying out model training by adopting a plurality of sample object block images in the sample image set to obtain an object block classification model.
And the classification module is used for classifying each sample image in the sample image set according to the object block classification model to obtain an object block classification result of each sample object block image.
And the modification module is used for modifying the type of the object block marked by the sample object block image with the wrong classification in the sample image set according to the judging type of the received sample object block image with the wrong classification if the object block classification result indicates that the classification result of the corresponding sample object block image is wrong.
And the training module is also used for retraining according to the modified sample image set to obtain a target object block classification model, and the target object block classification model is used for classifying the object blocks to be sorted based on the images of the object blocks to be sorted.
Optionally, the sample image set comprises: training image set and test image set, training image set and test image set respectively include: sample mass images of a plurality of mass types; the training module is specifically configured to: performing model training according to the sample object images in the training image set to obtain a first classification model; testing the first classification model by adopting the sample object image in the test image set to obtain the classification recall rate of the first classification model; according to the classification recall rate, the proportion of sample object images of a plurality of object types in the training image set is adjusted; carrying out model training again according to the adjusted training image set to obtain a second classification model; the object classification model is a second classification model.
Optionally, the classification recall comprises: a classification recall of a plurality of parcel types; the training module is specifically further configured to: according to the classification recall rate of preset object types in the object types and preset image classification indexes, the proportion of sample object images of the object types in a training image set is adjusted, wherein the preset image classification indexes comprise: and (3) index of classification recall rate of the object sample image of the preset object type.
Optionally, the training module is further configured to: and adjusting parameters of the first classification model according to the classification recall rate. The training module is specifically configured to: and carrying out model training again according to the adjusted parameters of the first classification model and the adjusted training image set to obtain a second classification model.
Optionally, the training module is further configured to: acquiring the field classification accuracy of the target object block classification model for classifying the image of the object block to be classified in production; collecting a plurality of material images in the production process and updating a sample image set according to the condition that the field classification accuracy does not meet the preset field classification requirement; and (4) carrying out model training again according to the updated sample image set until the field classification accuracy of the obtained target object block classification model in production meets the field classification requirement.
Optionally, the training module is further configured to: determining the proportion of a training image set and a testing image set in a sample image set according to the number of the sample block images; wherein the training image set is greater than or equal to the test image set.
In another aspect of the embodiments of the present application, a method for classifying an object block is provided, where the method includes: acquiring a block image of a block to be sorted; classifying the object block images of the object blocks to be classified according to the target object block classification model to obtain a classification result; the target object block classification model is obtained by adopting the object block classification model training method.
In another aspect of the embodiments of the present application, there is provided an object sorting apparatus, including: the device comprises an acquisition module and a block classification module.
And the acquisition module is used for acquiring the object block image of the object block to be sorted.
And the object block classification module is used for classifying the object block images of the object blocks to be classified according to the target object block classification model to obtain a classification result.
In another aspect of the embodiments of the present application, there is provided a computer device, including: the object block classification model training method comprises a first memory and a first processor, wherein a computer program capable of running on the first processor is stored in the first memory, and when the computer program is executed by the first processor, the steps of the object block classification model training method are realized.
In addition, another aspect of the embodiments of the present application provides an object sorting apparatus including: the second processor executes the computer program to realize the steps of the object block classification method.
In another aspect of the embodiments of the present application, a storage medium is provided, where a computer program is stored on the storage medium, and when the computer program is executed by a processor, the steps of the method for training a classification model of an object block are implemented.
The beneficial effects of the embodiment of the application include:
the embodiment of the application provides a method and a device for training a block classification model, a method and equipment for classifying blocks, model training can be carried out by adopting a plurality of sample object block images in the sample image set to obtain an object block classification model, and further according to the object block classification model, classifying each sample image in the sample image set to obtain a block classification result of each sample block image, if the block classification result indicates that the classification result of the corresponding sample block image is wrong, judging the type of the received sample block image aiming at the classification error, modifying the type of the object block marked by the sample object block image with the wrong classification in the sample image set, retraining according to the modified sample image set to obtain a target object block classification model, and then can improve the training accuracy of thing piece classification model to improve and adopt this thing piece classification model to carry out the categorised accuracy of thing piece.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a schematic flowchart of a method for training a block classification model according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of obtaining a classification model of an object block according to an embodiment of the present disclosure;
fig. 3 is another schematic flow chart of a method for training a classification model of an object provided in the present application;
fig. 4 is a schematic flowchart of a method for classifying an object block according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a training apparatus for a block classification model according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a block sorting device according to an embodiment of the present application;
FIG. 7 is a schematic structural diagram of a computer device according to an embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of a piece classifying device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Furthermore, the terms "first," "second," "third," and the like are used solely to distinguish one from another and are not to be construed as indicating or implying relative importance.
The method for training the object classification model and the method for classifying the object provided by this embodiment can be specifically applied to a scene in which one or more types of objects are classified:
for example, in the field of industrial and mining, the object classification model training method and the object classification method may be used to separate multiple types of objects, such as a first type of object, a second type of object, and the like from a large number of objects, and the classification result of each type of object satisfies a certain recall ratio; alternatively, the above-described object classification model training method and object classification method may be used to select a predetermined object from a large number of objects, and the selected object may satisfy a certain recall rate. Of course, the method is not limited to the above-described scenarios, and can be applied to various scenarios requiring object block classification.
In addition, the mass in the embodiment of the present application may be a mass made of any one of coal, crushed stone, copper, iron, and the like, or a mass made of a mixture of multiple materials, and is not limited herein.
Embodiments of the present application relate to a large number of related applications of neural network model training, and in order to better understand the solution of the embodiments of the present application, the following describes related terms and concepts of neural network model training that may be related to the embodiments of the present application.
Training set, verification set and test set: during neural network training, samples may be divided into a training set, a validation set, and a test set. The training set is used to train the model, the validation set is used to adjust and select the model, and the test set is used to evaluate the final model. That is, firstly, training a model with a training set, then verifying the model with a verification set (at this time, the optimal model is not selected), continuously adjusting the model according to the situation, selecting the optimal model (selected according to the verification error obtained by verification of the verification set), recording each setting of the optimal model, then training a new model with the training set and the verification set data according to the situation, using the new model as a final model, and finally evaluating the final model with a test set. In the training process of the neural network, the proportion of a training set, a verification set and a test set can be adjusted according to actual requirements.
The recall ratio is as follows: for the original sample, it is indicated how many positive examples in the original sample are predicted correctly. That is, if a function of a neural network is to divide the original data into the first type data and the second type data, the recall rate of the first type data is the proportion of the data amount divided into the first type data by the neural network to the actual data amount of the first type data in the original data. Accordingly, the recall rate of the second type data is the ratio of the data amount divided into the second type data by the neural network to the actual data amount of the second type data in the original data.
Model generalization ability: during model training, if the model performs well for known data, the model also performs well for unknown data. If the generalization ability is strong, the neural network has strong ability of giving reasonable response to newly input data. In the training process of the neural network, the neural network is generally expected to have higher generalization capability.
Overfitting: overfitting refers to the situation that the data volume in the training set is smaller than that in the test set in the model training process, so that the generalization capability of the model is low.
A specific implementation process of the method for training the classification model of the object block is explained below by using a specific embodiment, fig. 1 is a schematic flow chart of the method for training the classification model of the object block provided by the embodiment of the present application, please refer to fig. 1, and the method includes:
s10: and performing model training by adopting a plurality of sample object block images in the sample image set to obtain an object block classification model.
It should be noted that the sample image set may be a set of a large number of sample images acquired in the field, and these sample images may be characteristic images of the object, and may be images of the object acquired by an image acquisition device such as a camera, a sensor, or the like. The model training may be a convolutional neural network, a deep neural network, or any neural network set according to actual requirements, and is not limited herein, and a convolutional neural network is preferred. The object block classification model is a model obtained by training a neural network by adopting the sample image set. In addition, the neural network is not limited to any loss function and any deep learning framework in the using process, and other methods such as machine learning and supervised learning are included.
S20: and classifying each sample image in the sample image set according to the object block classification model to obtain an object block classification result of each sample object block image.
It should be noted that, after the object classification model is obtained, the object classification model may be used to classify each sample image in the sample image set, and a corresponding classification result is obtained, where the classification result may be a category into which each sample image is classified by the object classification model. For example, the sample image includes: after the coal block images, the iron block images, the copper block images and the like are classified by the object block classification model, each sample image in the sample image set can be classified according to the class to which the sample image belongs, and the sample image belongs to the images. In addition, the classification of the sample images may be not only for the images of different categories, but also for images having different features in the same category, such as a first-type coal briquette image and a second-type coal briquette image, where the first-type coal briquette image and the second-type coal briquette image may be coal briquette images corresponding to coal briquettes with different sizes, densities, colors, and the like.
S30: and if the object block classification result indicates that the classification result of the corresponding sample object block image is wrong, modifying the object block type marked by the sample object block image with the wrong classification in the sample image set according to the judging type of the received sample object block image with the wrong classification.
Before each sample image in the sample image set is classified, the sample image often cannot completely represent all information of the object block, and the sample image is generally acquired from a fixed angle in the acquisition process, and the acquired sample image often cannot represent internal information of the object block, so that a user can pre-judge each sample image in the sample image set, the pre-judged content can be a category for predicting and classifying the sample image in advance, the object block image can be labeled according to the pre-judged judging type, and the labeled content is used for reflecting the object block type. After the classification result is obtained, the relationship between the classification result and the judgment type which is judged by the user in advance can be compared, and if the classification result is the same as the judgment type, the classification result is considered to be correct; if the two are different, the classification result is considered to be wrong.
When the classification result is correct, the type of the object block marked by the sample image is not modified; when the classification result is wrong, modifying the object block type marked by the sample object block image with the wrong classification in the sample image set according to the judging type of the received sample object block image with the wrong classification, namely, modifying the mark of the sample object block image with the wrong classification into the corresponding class in the classification result.
S40: and retraining according to the modified sample image set to obtain a target object block classification model.
The target object block classification model is used for classifying the object blocks to be sorted based on the images of the object blocks to be sorted.
It should be noted that after the type of the object block marked by the sample object block image with the wrong classification in the sample image set is modified, the neural network can be retrained according to the modified sample image set to obtain a target object block classification model, and the target object block classification model is the neural network model obtained by retraining the modified sample image set of the object block classification model. In addition, the target object block classification model can be used for classifying the object blocks to be sorted according to the images of the object blocks to be sorted, so that the object blocks are classified. The target object classification model can be applied to a recognition system in an object sorting system and is used for classifying based on an object image before object sorting.
The method for training the object classification model provided by the embodiment of the application can adopt a plurality of sample object images in a sample image set to perform model training to obtain the object classification model, and further can obtain the object classification model according to the object classification model, classifying each sample image in the sample image set to obtain a block classification result of each sample block image, if the block classification result indicates that the classification result of the corresponding sample block image is wrong, judging the type of the received sample block image aiming at the classification error, modifying the type of the object block marked by the sample object block image with the wrong classification in the sample image set, retraining according to the modified sample image set to obtain a target object block classification model, and then can improve the training accuracy of thing piece classification model to improve and adopt this thing piece classification model to carry out the categorised accuracy of thing piece.
A specific process of obtaining the object classification model is explained below by a specific embodiment, fig. 2 is a schematic flowchart of a process of obtaining the object classification model according to the embodiment of the present application, please refer to fig. 2, where the sample image set includes: training image set and test image set, training image set and test image set respectively include: sample mass images of a plurality of mass types; s10: carrying out model training by adopting a plurality of sample object block images in a sample image set to obtain an object block classification model, wherein the model training comprises the following steps:
s110: and carrying out model training according to the sample object block images in the training image set to obtain a first classification model.
It should be noted that the training image set is a training set in the neural network sample, and is used for training the neural network model, and in addition, the sample image set may further include: and verifying the model in the process of training the neural network to determine the complexity of the neural network or parameters for controlling the complexity of the model and the like, and obtaining a first classification model after the training and verification of the neural network by the training image set and the verification image set.
S120: and testing the first classification model by adopting the sample object image in the test image set to obtain the classification recall rate of the first classification model.
It should be noted that the test image set is a test set in the neural network sample, and is used for checking the performance effect of the trained neural network model. The first classification model is tested through the test image set, and the classification recall rate of the first classification model can be calculated, wherein the classification recall rate is the recall rate of each type or multiple types. For example, if the sample block image can be classified into two types, there may be a classification recall rate for each type, or there may be a corresponding classification recall rate for the whole of the two types.
S130: and adjusting the proportion of the sample object images of the multiple object types in the training image set according to the classification recall rate.
It should be noted that, the proportion of the sample block images of the multiple block types in the training image set may be adjusted according to the classification recall rate obtained through the above calculation, for example, if the classification recall rate of the block types of the coal block images is low, the proportion of the block types marked in the training image set may be increased, so as to improve the classification recall rate of the block types of the coal block images.
S140: and carrying out model training again according to the adjusted training image set to obtain a second classification model.
And the object block classification model is a second classification model.
It should be noted that, after the type ratio of the object blocks in the training image set is adjusted, the modified training image set may be used to train the first classification model, and accordingly, the verification sample set is used to verify the model, and finally, the second classification model is obtained.
In the embodiment of the application, the proportion of the data types in the training set can be continuously updated through means of repeated training of the training set on the model, repeated study and judgment of the test set, re-labeling of the wrongly labeled samples and the like, so that the accuracy of model judgment is improved.
Optionally, the classification recall ratio includes: a classification recall of a plurality of parcel types; s130: according to the classification recall rate, the proportion of the sample object images of the multiple object types in the training image set is adjusted, and the method comprises the following steps:
and adjusting the proportion of the sample object block images of the plurality of object block types in the training image set according to the classification recall rate of the preset object block types in the plurality of object block types and the preset image classification indexes.
Wherein, the preset image classification index comprises: and (3) index of classification recall rate of the object sample image of the preset object type.
It should be noted that the classification recall rates of the multiple object types may be, when the sample object image may be divided into multiple types, a recall rate of one object type or a recall rate of two or more object types, and specific object types may be determined according to actual needs, which is not limited herein.
In addition, the preset image classification index is a required recall ratio, and the required recall ratio can be compared with the calculated classification recall ratio according to the required recall ratio, if the calculated classification recall ratio does not reach the required recall ratio, the proportion of the sample object images of a plurality of object types in the training image set can be adjusted, for example, if the sample object images can be classified into two types, and the first type of classification recall ratio does not reach the required recall ratio, the proportion of marking the object type as the first type can be increased in the training image set; correspondingly, if the classification recall rate of the second type does not reach the required recall rate, the proportion that the type of the label block is the second type can be increased in the training image set.
Optionally, the method for training the object classification model further includes: and adjusting parameters of the first classification model according to the classification recall rate.
It should be noted that the parameter of the first classification model may be a neural network parameter corresponding to the first classification model, for example: the number of network nodes, the initial weight, the minimum training rate, and the like, in the actual training process, the network parameters in the neural network can be adjusted according to the specific requirements on the object block classification model and the classification recall rate, for example: when the classification recall rate is low, the number of network nodes in the neural network is properly increased, the initial weight is adjusted, and the like.
In addition, in the actual training process, a "context deep learning framework" (a deep learning framework with both expressiveness, speed, and thinking modularity) and a "rest 18" (residual neural network 18 with a weight of 18 layers) network may be used for training and reasoning, and the optimal neural network parameters may be selected by comparing parameters such as different initial learning rates, learning rate reduction strategies, and iteration times.
Accordingly, S140: and carrying out model training again according to the adjusted training image set to obtain a second classification model, wherein the method comprises the following steps:
and carrying out model training again according to the adjusted parameters of the first classification model and the adjusted training image set to obtain a second classification model.
It should be noted that, after the parameters of the first classification model are adjusted, model training may be performed again according to the adjusted parameters of the first classification model and the adjusted training image set, so as to obtain a second classification model. In addition, if the model obtained by performing the model training again through the test sample set test still does not satisfy the preset image classification index, the method of S130 may be continuously and cyclically adopted to adjust the proportion, and the second classification model, that is, the above-mentioned block classification model, may not be obtained until the calculated classification recall ratio satisfies the preset image classification index.
Another process of the method for training the classification model of the object block is explained below by using an embodiment, fig. 3 is another schematic flow chart of the method for training the classification model of the object block provided in the embodiment of the present application, please refer to fig. 3, and the method for training the classification model of the object block further includes:
s50: and acquiring the field classification accuracy of the target object block classification model for classifying the image of the object block to be sorted in production.
It should be noted that the field classification accuracy may be an accuracy of a classification result obtained by classifying the object blocks in the current work field using the target object block classification model. The accuracy may be the accuracy of the classification of a certain class or classes of the object, or the accuracy of the classification of all the objects as a whole.
S60: and acquiring a plurality of material images in the production process according to the condition that the field classification accuracy does not meet the preset field classification requirement, and updating the sample image set.
It should be noted that the field classification requirement may be the accuracy of classification of actual blocks corresponding to one or more sample block images, for example, the current work field is a coal block factory, the blocks to be classified are multiple types of coal blocks, and the obtained field classification requirement may be that the accuracy of classification of a first type of coal block reaches 90%, and the accuracy of classification of other types of coal blocks reaches 80%. The accuracy can be set according to different requirements for each type of object block respectively according to field classification requirements, and the accuracy can also be set for all classification results on the field. And if the field classification accuracy does not meet the preset field classification requirement, the material images can be collected again, preferably, more material images relative to the number of images in the previous sample image set can be collected as sample images, and then the sample image set is updated.
S70: and (4) carrying out model training again according to the updated sample image set until the field classification accuracy of the obtained target object block classification model in production meets the field classification requirement.
After the sample image set is updated, the steps S10-S40 may be repeated to obtain an updated target object classification model, and if the condition is still not satisfied, the step S60 may be repeated to update the sample image set again until the accuracy of the on-site classification of the target object classification model in production satisfies the on-site classification requirement.
Alternatively, S10: before model training is performed by adopting a plurality of sample object block images in a sample image set to obtain an object block classification model, the method further comprises the following steps:
and determining the proportion of the training image set and the test image set in the sample image set according to the number of the sample block images.
Wherein the training image set is greater than or equal to the test image set.
Before model training, the proportion of the training image set and the test image set in the sample image set can be determined according to the number of the sample block images. It should be noted that, when determining the proportion, the proportion of each sample set may be set according to actual requirements, wherein, the proportion of the verification sample set generally does not need to be specially adjusted in the training process, and all the verification conditions can be met, the proportion of the training image set and the test image set needs to be noticed when setting, and in order to prevent the over-fitting, the data amount in the training image set may be generally set to be greater than or equal to the data amount in the test image set. For example, the number of training image sets is preferably guaranteed in the process of adjusting the proportion, if the data amount is small, the proportion of the training image sets can be increased appropriately, or other data augmentation modes are used.
A specific flow of the method for classifying an object is explained below by a specific embodiment, and fig. 4 is a schematic flow chart of the method for classifying an object provided in the embodiment of the present application, where the method for classifying an object may be implemented by a control device in an identification system in an object sorting system. Referring to fig. 4, the method includes:
s100: and acquiring a block image of the block to be sorted.
It should be noted that the object image of the object to be sorted may be a feature image of the object collected in the industrial and mining field. In field applications, this can be obtained by means of an identification system in the machine transporting the block or in the machine picking up the block, for example: cameras, sensors, etc.
S200: and classifying the object block images of the object blocks to be sorted according to the target object block classification model to obtain a classification result.
The target object block classification model is obtained by adopting the object block classification model training method.
The object block classification model provided by the embodiment of the application is adopted to classify the object blocks, so that the accuracy of object block classification can be improved.
The following explains the specific structure of the training apparatus for a classification model of an object by a specific embodiment, fig. 5 is a schematic structural diagram of the training apparatus for a classification model of an object provided in the embodiment of the present application, please refer to fig. 5, and the apparatus includes: training module 100, classification module 200, modification module 300.
The training module 100 is configured to perform model training by using a plurality of sample block images in the sample image set to obtain a block classification model.
And the classification module 200 is configured to classify each sample image in the sample image set according to the object block classification model to obtain an object block classification result of each sample object block image.
The modifying module 300 is configured to modify, if the block classification result indicates that the classification result of the corresponding sample block image is incorrect, the type of the block marked by the sample block image with the incorrect classification in the sample image set according to the judging type of the received sample block image with the incorrect classification.
The training module 100 is further configured to retrain according to the modified sample image set to obtain a target object classification model, where the target object classification model is used to classify the object to be sorted based on the image of the object to be sorted.
Optionally, the sample image set comprises: training image set and test image set, training image set and test image set respectively include: sample mass images of a plurality of mass types; the training module 100 is specifically configured to: performing model training according to the sample object images in the training image set to obtain a first classification model; testing the first classification model by adopting the sample object image in the test image set to obtain the classification recall rate of the first classification model; according to the classification recall rate, the proportion of sample object images of a plurality of object types in the training image set is adjusted; carrying out model training again according to the adjusted training image set to obtain a second classification model; the object classification model is a second classification model.
Optionally, the classification recall comprises: a classification recall of a plurality of parcel types; the training module 100 is further specifically configured to: according to the classification recall rate of preset object types in the object types and preset image classification indexes, the proportion of sample object images of the object types in a training image set is adjusted, wherein the preset image classification indexes comprise: and (3) index of classification recall rate of the object sample image of the preset object type.
Optionally, the training module 100 is further configured to: and adjusting parameters of the first classification model according to the classification recall rate. Accordingly, training module 100 is specifically configured to: and carrying out model training again according to the adjusted parameters of the first classification model and the adjusted training image set to obtain a second classification model.
Optionally, the training module 100 is further configured to: acquiring the field classification accuracy of the target object block classification model for classifying the image of the object block to be classified in production; collecting a plurality of material images in the production process and updating a sample image set according to the condition that the field classification accuracy does not meet the preset field classification requirement; and (4) carrying out model training again according to the updated sample image set until the field classification accuracy of the obtained target object block classification model in production meets the field classification requirement.
Optionally, the training module 100 is further configured to: determining the proportion of a training image set and a testing image set in a sample image set according to the number of the sample block images; wherein the training image set is greater than or equal to the test image set.
The object block classification model training device provided by the embodiment of the application can adopt a plurality of sample object block images in a sample image set to carry out model training to obtain the object block classification model, and further can carry out model training according to the object block classification model, classifying each sample image in the sample image set to obtain a block classification result of each sample block image, if the block classification result indicates that the classification result of the corresponding sample block image is wrong, judging the type of the received sample block image aiming at the classification error, modifying the type of the object block marked by the sample object block image with the wrong classification in the sample image set, retraining according to the modified sample image set to obtain a target object block classification model, and then can improve the accuracy of thing piece classification model, can also improve the accuracy of thing piece classification when adopting this thing piece classification model to carry out the thing piece classification.
The specific structure of the object sorting device is explained below by a specific embodiment, and fig. 6 is a schematic structural diagram of the object sorting device according to the embodiment of the present application. Referring to fig. 6, the apparatus includes: an acquisition module 600 and an object classification module 700.
The acquiring module 600 is configured to acquire a block image of a block to be sorted.
And the object block classification module 700 is configured to classify the object block images of the object blocks to be classified according to the target object block classification model to obtain a classification result.
Fig. 7 is a schematic structural diagram of a computer device according to an embodiment of the present application, please refer to fig. 7, where the computer device includes: the first memory 400 and the first processor 500, wherein the first memory 400 stores a computer program operable on the first processor 500, and the first processor 500 implements the steps of the object classification model training method when executing the computer program.
In addition, fig. 8 is a schematic structural diagram of an object sorting apparatus provided in an embodiment of the present application, please refer to fig. 8, the object sorting apparatus includes: a second memory 800 and a second processor 900, wherein the second memory 800 stores a computer program operable on the second processor 900, and the second processor 900 implements the steps of the above-mentioned object classification method when executing the computer program.
In another aspect of the embodiments of the present application, a storage medium is further provided, where a computer program is stored on the storage medium, and when the computer program is executed by a processor, the method for training a block classification model or the method for classifying a block is implemented.
Optionally, the present application further provides a program product, such as a computer-readable storage medium, comprising a program, which when executed by a processor, is configured to perform any of the above-described embodiments of the object classification model training method or object classification method.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a unit is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the methods according to the embodiments of the present invention. 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.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (10)

1. A method for training a block classification model is characterized by comprising the following steps:
performing model training by adopting a plurality of sample object block images in the sample image set to obtain an object block classification model;
classifying each sample image in the sample image set according to the object classification model to obtain an object classification result of each sample object image;
if the object block classification result indicates that the classification result of the corresponding sample object block image is wrong, modifying the object block type marked by the sample object block image with the wrong classification result in the sample image set according to the judging type of the received sample object block image with the wrong classification result;
and retraining according to the modified sample image set to obtain a target object block classification model, wherein the target object block classification model is used for classifying the object block to be sorted based on the image of the object block to be sorted.
2. The method of claim 1, wherein the sample image set comprises: a training image set and a testing image set, the training image set and the testing image set respectively comprising: sample mass images of a plurality of mass types;
the method for carrying out model training by adopting a plurality of sample object block images in a sample image set to obtain an object block classification model comprises the following steps:
performing model training according to the sample object images in the training image set to obtain a first classification model;
testing the first classification model by adopting the sample object image in the test image set to obtain the classification recall rate of the first classification model;
adjusting the proportion of the sample object images of the plurality of object types in the training image set according to the classification recall rate;
model training is carried out again according to the adjusted training image set to obtain a second classification model; the object classification model is the second classification model.
3. The method of claim 2, wherein the classification recall comprises: a classification recall rate for the plurality of chunk types; the adjusting, according to the classification recall rate, a proportion of sample patch images of the plurality of patch types in the training image set includes:
adjusting the proportion of the sample block images of the plurality of block types in the training image set according to the classification recall rate of the preset block types in the plurality of block types and preset image classification indexes, wherein the preset image classification indexes comprise: and the index of the classification recall rate of the object sample image of the preset object type.
4. The method of claim 2, further comprising:
adjusting parameters of the first classification model according to the classification recall rate;
and performing model training again according to the adjusted training image set to obtain a second classification model, wherein the method comprises the following steps:
and carrying out model training again according to the adjusted parameters of the first classification model and the adjusted training image set to obtain the second classification model.
5. The method of claim 1, further comprising:
acquiring the field classification accuracy of the target object block classification model for classifying the image of the object block to be classified in production;
collecting a plurality of material images in the production process according to the condition that the field classification accuracy does not meet the preset field classification requirement, and updating the sample image set;
and carrying out model training again according to the updated sample image set until the field classification accuracy of the obtained target object block classification model in production meets the field classification requirement.
6. The method according to any one of claims 2-5, wherein before performing model training using a plurality of sample block images in the sample image set to obtain the block classification model, the method further comprises:
determining the proportion of a training image set and a testing image set in the sample image set according to the number of the sample block images; wherein the training image set is greater than or equal to the test image set.
7. A training device for a block classification model is characterized by comprising: the system comprises a training module, a classification module and a modification module;
the training module is used for carrying out model training by adopting a plurality of sample object block images in the sample image set to obtain an object block classification model;
the classification module is used for classifying each sample image in the sample image set according to the object block classification model to obtain an object block classification result of each sample object block image;
the modification module is used for modifying the type of the object block marked by the sample object block image with the wrong classification result in the sample image set according to the judging type of the received sample object block image with the wrong classification result if the object block classification result indicates that the classification result of the corresponding sample object block image is wrong;
the training module is further configured to retrain the modified sample image set to obtain a target object classification model, and the target object classification model is used to classify the object to be sorted based on the image of the object to be sorted.
8. A method of sorting a mass, the method comprising:
acquiring a block image of a block to be sorted;
classifying the object block images of the object blocks to be classified according to the target object block classification model to obtain a classification result; the target object classification model is obtained by the object classification model training method according to any one of claims 1 to 6.
9. A computer device, comprising: a first memory and a first processor, wherein the first memory stores a computer program operable on the first processor, and the first processor implements the steps of the method for training the classification model of the object according to any one of claims 1 to 6 when executing the computer program.
10. A storage medium having stored thereon a computer program for performing the steps of the method of training a classification model of an object as claimed in any one of claims 1 to 6 when executed by a processor.
CN202010293448.2A 2020-04-15 2020-04-15 Model training method, classification method, device and equipment Pending CN111488939A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010293448.2A CN111488939A (en) 2020-04-15 2020-04-15 Model training method, classification method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010293448.2A CN111488939A (en) 2020-04-15 2020-04-15 Model training method, classification method, device and equipment

Publications (1)

Publication Number Publication Date
CN111488939A true CN111488939A (en) 2020-08-04

Family

ID=71811677

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010293448.2A Pending CN111488939A (en) 2020-04-15 2020-04-15 Model training method, classification method, device and equipment

Country Status (1)

Country Link
CN (1) CN111488939A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111861737A (en) * 2020-08-06 2020-10-30 深圳壹账通智能科技有限公司 Block chain-based wind control model optimization method and device and computer equipment
CN113420836A (en) * 2021-07-30 2021-09-21 平安资产管理有限责任公司 Target product classification method, device, equipment and medium based on classification model
WO2022032471A1 (en) * 2020-08-11 2022-02-17 香港中文大学(深圳) Method and apparatus for training neural network model, and storage medium and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109389136A (en) * 2017-08-08 2019-02-26 上海为森车载传感技术有限公司 Classifier training method
CN110059715A (en) * 2019-03-12 2019-07-26 平安科技(深圳)有限公司 Floristic recognition methods and device, storage medium, computer equipment
CN110399933A (en) * 2019-07-31 2019-11-01 北京字节跳动网络技术有限公司 Data mark modification method, device, computer-readable medium and electronic equipment
CN110399927A (en) * 2019-07-26 2019-11-01 玖壹叁陆零医学科技南京有限公司 Identification model training method, target identification method and device
CN110766062A (en) * 2019-10-15 2020-02-07 广州织点智能科技有限公司 Commodity recognition model training method and device, electronic equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109389136A (en) * 2017-08-08 2019-02-26 上海为森车载传感技术有限公司 Classifier training method
CN109389142A (en) * 2017-08-08 2019-02-26 上海为森车载传感技术有限公司 Classifier training method
CN110059715A (en) * 2019-03-12 2019-07-26 平安科技(深圳)有限公司 Floristic recognition methods and device, storage medium, computer equipment
CN110399927A (en) * 2019-07-26 2019-11-01 玖壹叁陆零医学科技南京有限公司 Identification model training method, target identification method and device
CN110399933A (en) * 2019-07-31 2019-11-01 北京字节跳动网络技术有限公司 Data mark modification method, device, computer-readable medium and electronic equipment
CN110766062A (en) * 2019-10-15 2020-02-07 广州织点智能科技有限公司 Commodity recognition model training method and device, electronic equipment and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111861737A (en) * 2020-08-06 2020-10-30 深圳壹账通智能科技有限公司 Block chain-based wind control model optimization method and device and computer equipment
CN111861737B (en) * 2020-08-06 2022-09-20 深圳壹账通智能科技有限公司 Block chain-based wind control model optimization method and device and computer equipment
WO2022032471A1 (en) * 2020-08-11 2022-02-17 香港中文大学(深圳) Method and apparatus for training neural network model, and storage medium and device
CN113420836A (en) * 2021-07-30 2021-09-21 平安资产管理有限责任公司 Target product classification method, device, equipment and medium based on classification model

Similar Documents

Publication Publication Date Title
CN111488939A (en) Model training method, classification method, device and equipment
CN109189767B (en) Data processing method and device, electronic equipment and storage medium
CN111353549B (en) Image label verification method and device, electronic equipment and storage medium
CN110211119B (en) Image quality evaluation method and device, electronic equipment and readable storage medium
CN111310850B (en) License plate detection model construction method and system, license plate detection method and system
CN112241494B (en) Key information pushing method and device based on user behavior data
CN109993201A (en) A kind of image processing method, device and readable storage medium storing program for executing
CN112132014B (en) Target re-identification method and system based on non-supervised pyramid similarity learning
CN109816043B (en) Method and device for determining user identification model, electronic equipment and storage medium
CN109598307A (en) Data screening method, apparatus, server and storage medium
CN112256881B (en) User information classification method and device
Thielen et al. A machine learning based approach to detect false calls in SMT manufacturing
CN111898129B (en) Malicious code sample screener and method based on Two-Head anomaly detection model
CN113988044B (en) Method for judging error question reason type
CN113764034B (en) Method, device, equipment and medium for predicting potential BGC in genome sequence
CN108345942B (en) Machine learning identification method based on embedded code learning
CN111414930A (en) Deep learning model training method and device, electronic equipment and storage medium
CN109934352B (en) Automatic evolution method of intelligent model
CN108345943B (en) Machine learning identification method based on embedded coding and contrast learning
CN110716778A (en) Application compatibility testing method, device and system
CN113240213B (en) Method, device and equipment for selecting people based on neural network and tree model
CN112990350B (en) Target detection network training method and target detection network-based coal and gangue identification method
CN116868185A (en) Method, data processing device, computer program product and data carrier signal
CN112559589A (en) Remote surveying and mapping data processing method and system
JP6786364B2 (en) Learning device and learning method

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200804