CN112182269B - Training of image classification model, image classification method, device, equipment and medium - Google Patents

Training of image classification model, image classification method, device, equipment and medium Download PDF

Info

Publication number
CN112182269B
CN112182269B CN202011035268.0A CN202011035268A CN112182269B CN 112182269 B CN112182269 B CN 112182269B CN 202011035268 A CN202011035268 A CN 202011035268A CN 112182269 B CN112182269 B CN 112182269B
Authority
CN
China
Prior art keywords
image
classification
classification model
image classification
classified
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
CN202011035268.0A
Other languages
Chinese (zh)
Other versions
CN112182269A (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.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information 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 Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202011035268.0A priority Critical patent/CN112182269B/en
Publication of CN112182269A publication Critical patent/CN112182269A/en
Application granted granted Critical
Publication of CN112182269B publication Critical patent/CN112182269B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/55Clustering; Classification
    • 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/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2413Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on distances to training or reference patterns
    • G06F18/24133Distances to prototypes
    • G06F18/24137Distances to cluster centroïds
    • G06F18/2414Smoothing the distance, e.g. radial basis function networks [RBFN]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2415Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on parametric or probabilistic models, e.g. based on likelihood ratio or false acceptance rate versus a false rejection rate
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Probability & Statistics with Applications (AREA)
  • Image Analysis (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The disclosure relates to training of an image classification model, an image classification method, an image classification device and a medium, wherein the training method of the image classification model comprises the following steps: acquiring a sample set; inputting the current input sample set into a current image classification model for training to obtain a current image classification model set corresponding to the current image classification model; classifying and identifying a current input sample set by adopting a current image classification model set; screening the current input sample set according to the classification result, and taking a sample with the classification result not meeting the recognition requirement as the input sample set of the next image classification model until the classification result meets the recognition requirement; and taking each trained image classification model set as a target image classification model. The method and the device can solve the problem that a single image classification model only pays attention to feature learning of a simple sample and ignores feature learning of a difficult sample, improve the discrimination capability of the difficult sample and improve the accuracy of the image classification model.

Description

Training of image classification model, image classification method, device, equipment and medium
Technical Field
The disclosure relates to the technical field of image processing, and in particular relates to training of an image classification model, an image classification method, an image classification device, image classification equipment and a medium.
Background
With the continuous development of science and technology, image processing techniques are widely used to solve various problems, such as image classification, pedestrian detection, and medical diagnosis, through a deep learning model.
In the related technology, training a sample set (training set) through the same image classification model to obtain a single image classification model; and classifying and identifying all the images (test sets) to be classified according to the single image classification model to obtain classification results.
However, the image classification model obtained by the method has different classification accuracy rates on images to be classified with different complexity degrees, for example, the classification accuracy rate is higher for a simple sample (the image to be classified), but the classification accuracy rate is poorer for a complex sample, so that the accuracy rate of the obtained image classification model is lower.
Disclosure of Invention
The disclosure provides a training method, an image classification device and a medium for solving the problem that a single image classification model in the related technology only pays attention to feature learning of a simple sample and ignores feature learning of a difficult sample, so that the discrimination capability of the difficult sample can be improved, and the accuracy of the image classification model can also be improved. The technical scheme of the present disclosure is as follows:
According to a first aspect of embodiments of the present disclosure, there is provided a training method of an image classification model, including;
acquiring a sample set, wherein a sample in the sample set comprises an image and category characteristics; the sample set is an input sample set of the first image classification model;
inputting a current input sample set into a current image classification model for training to obtain a current image classification model set corresponding to the current image classification model; classifying and identifying the current input sample set by adopting the current image classification model set; wherein, the network parameters, optimization algorithm or iteration times of each current image classification model in the current image classification model set are different;
screening the current input sample set according to the classification result, and taking a sample with the classification result not meeting the recognition requirement as the input sample set of the next image classification model until the classification result meets the recognition requirement;
taking each trained image classification model set as a target image classification model;
the number of the image classification models in each image classification model set is decreased, the feature extraction dimension is increased, and the image classification models trained for each time are different.
Optionally, the step of inputting the current input sample set to the current image classification model for training includes:
the method comprises the steps of inputting a current input sample set into a current image classification model to train, and obtaining at least two trained current image classification models according to at least two network parameters, at least two optimization algorithms or at least two iteration times, wherein each trained current image classification model is a trained current image classification model set.
Optionally, the step of screening the current input sample set according to the classification result, and taking the sample with the classification result not meeting the recognition requirement as the input sample set of the next image classification model until the classification result meets the recognition requirement includes:
determining the number of target classification results which are classified identically and have classification prediction probabilities greater than or equal to a first set threshold value in the classification results;
and if the number of the target classification results is smaller than a second set threshold value, determining each sample corresponding to each target classification result as a sample which does not meet the identification requirement.
Optionally, the classifying the result to meet the identification requirement includes:
and if the number of the target classification results which are classified identically and have the prediction probability larger than or equal to the first set threshold value in the classification results is larger than the second set threshold value, determining that the classification results meet the recognition requirement.
According to a second aspect of embodiments of the present disclosure, there is provided an image classification method, including:
inputting an image to be classified into any current image classification model set in a target image classification model for classification and identification, wherein the target image classification model is trained by adopting the training method of the image classification model in the first aspect;
if the classification result of the current image classification model set on the image to be classified meets the preset recognition condition, stopping inputting the image to be classified into the next image classification model set;
and determining the target classification of the image to be classified according to the classification result meeting the preset recognition condition.
Optionally, the step of inputting the image to be classified into any current image classification model set in the target image classification model for classification and identification includes:
inputting the images to be classified into the current image classification model set for classification and identification to obtain a plurality of classification results;
and if the classification results do not meet the preset recognition conditions, triggering the operation of inputting the images to be classified into the next image classification model set.
Optionally, the step of triggering the image to be classified to be input into the next image classification model set if each classification result does not meet a preset recognition condition includes:
Determining the number of target classification results which are the same in classification and have classification probabilities larger than a first set threshold value in the classification results;
if the number of the target classification results is smaller than a second set threshold, determining that each classification result does not meet a preset recognition condition, and triggering the image to be classified to be continuously input into a next image classification model set.
Optionally, the step of determining the target classification of the image to be classified according to the classification result satisfying the preset recognition condition includes:
and taking the target classification result of which the classification result is larger than a set threshold value as the class of the image to be classified, and taking the average value of the prediction probabilities of the target classification results as the final prediction probability of the image to be classified.
According to a third aspect of embodiments of the present disclosure, there is provided a training apparatus of an image classification model, including;
an acquisition module configured to acquire a sample set, a sample in the sample set comprising an image and a category feature; the sample set is an input sample set of the first image classification model;
the training module is configured to input a current input sample set into a current image classification model for training to obtain a current image classification model set corresponding to the current image classification model; classifying and identifying the current input sample set by adopting the current image classification model set; wherein, the network parameters, optimization algorithm or iteration times of each current image classification model in the current image classification model set are different;
The screening module is configured to screen the sample set according to the classification result, and takes the sample with the classification result not meeting the recognition requirement as the input sample set of the next image classification model set until the classification result meets the recognition requirement;
a determining module configured to take each image classification model set after training as a target image classification model;
the image classification models in each image classification model set are decreased in number, feature extraction dimensions are increased in number, and the image classification models obtained through each training are different.
Optionally, the training module is specifically configured to
The method comprises the steps of inputting a current input sample set into a current image classification model to train, and obtaining at least two trained current image classification models according to at least two network parameters, at least two optimization algorithms or at least two iteration times, wherein each trained current image classification model is a trained current image classification model set.
Optionally, the screening module is specifically configured to
Determining the number of target classification results which are classified identically and have classification prediction probabilities greater than or equal to a first set threshold value in the classification results;
And if the number of the target classification results is smaller than a second set threshold value, determining each sample corresponding to each target classification result as a sample which does not meet the identification requirement.
Optionally, the classifying the result to meet the identification requirement includes:
and if the number of the target classification results which are classified identically and have the prediction probability larger than or equal to the first set threshold value in the classification results is larger than the second set threshold value, determining that the classification results meet the recognition requirement.
According to a fourth aspect of embodiments of the present disclosure, there is provided an image classification apparatus, comprising:
the identification module is configured to input an image to be classified into any image classification model set in the target image classification model for classification identification, wherein the target image classification model is trained by the training method of the image classification model in the first aspect;
a stopping module configured to stop inputting the image to be classified into a next image classification model set if the classification result of the image classification model on the image to be classified meets a preset recognition condition;
and the determining module is configured to determine the target classification of the image to be classified according to the classification result meeting the preset recognition condition.
Optionally, the identification module includes: an identification sub-module and an input sub-module;
the identification submodule is configured to input the image to be classified into the current image classification model set for classification identification to obtain a plurality of classification results;
the input sub-module is configured to trigger the operation of inputting the image to be classified into the next image classification model set if each classification result does not meet a preset recognition condition.
Optionally, the input sub-module is specifically configured to
Determining the number of target classification results which are the same in classification and have classification probabilities larger than a first set threshold value in the classification results;
if the number of the target classification results is smaller than a second set threshold, determining that each classification result does not meet a preset recognition condition, and triggering the image to be classified to be continuously input into a next image classification model set.
Optionally, the determining module is specifically configured to
And taking the target classification result of which the classification result is larger than a set threshold value as the class of the image to be classified, and taking the average value of the prediction probabilities of the target classification results as the final prediction probability of the image to be classified.
According to a fifth aspect of embodiments of the present disclosure, there is provided an electronic device, comprising:
a processor;
a memory for storing the processor-executable commands;
wherein the processor is configured to execute the command to implement a training method of an image classification model, or an image classification method, as described in any of the embodiments of the present disclosure.
According to a sixth aspect of embodiments of the present disclosure, there is provided a storage medium, which when executed by a processor of an electronic device, enables the electronic device to perform a training method of an image classification model, or an image classification method, as described in any of the embodiments of the present disclosure.
According to a seventh aspect of embodiments of the present disclosure, there is provided a computer program product for use in connection with an electronic device, the computer program product comprising a computer readable storage medium and a computer program mechanism embedded therein, the program being loaded via a computer and executed to enable a training method of an image classification model, or an image classification method, according to any of the embodiments of the present disclosure.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects: acquiring a sample set, wherein samples in the sample set comprise images and category characteristics; the sample set is an input sample set of the first image classification model; inputting the current input sample set into a current image classification model for training to obtain a current image classification model set corresponding to the current image classification model; classifying and identifying a current input sample set by adopting a current image classification model set; wherein, the network parameters, optimization algorithm or iteration times of each current image classification model in the current image classification model set are different; screening the current input sample set according to the classification result, and taking a sample with the classification result not meeting the recognition requirement as the input sample set of the next image classification model until the classification result meets the recognition requirement; the trained image classification model sets are used as target image classification models, so that the problem that a single image classification model only pays attention to feature learning of a simple sample and ignores feature learning of a difficult sample can be solved, the discrimination capability of the difficult sample is improved, and the accuracy of the image classification model is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure and do not constitute an undue limitation on the disclosure.
FIG. 1 is a flowchart illustrating a method of training an image classification model according to an exemplary embodiment.
FIG. 2 is a flowchart illustrating a method of training an image classification model according to an exemplary embodiment.
Fig. 3 is a flow chart illustrating a method of image classification according to an exemplary embodiment.
Fig. 4 is a flow chart illustrating a method of image classification according to an exemplary embodiment.
FIG. 5 is a block diagram illustrating a training apparatus for an image classification model according to an exemplary embodiment.
Fig. 6 is a block diagram illustrating an image classification apparatus according to an exemplary embodiment.
Fig. 7 is a block diagram of an electronic device, according to an example embodiment.
Detailed Description
In order to enable those skilled in the art to better understand the technical solutions of the present disclosure, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the foregoing figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the disclosure described herein may be capable of operation in sequences other than those illustrated or described herein. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
Fig. 1 is a flowchart illustrating a training method of an image classification model according to an exemplary embodiment, and as shown in fig. 1, the training method of the image classification model may be performed by a training apparatus of the image classification model, which may be implemented in software and/or hardware, and used in an electronic device, which may be a computer, a server, a smart phone, or the like, and the method includes the following steps.
In step S11, a sample set is acquired, the samples in the sample set including the image and the class features, the sample set being an input sample set of the first image model.
Wherein the sample set is a set of a plurality of samples, each sample can comprise an image and a category feature for labeling the image; the labeling category features, namely common labeling, are usually a closed set by selecting a label corresponding to data from established labels. Each image may have one or more category features or labels; for example, adults, women, yellow breeds, long hair, and the like. Note that the sample set referred to in this embodiment may also be referred to as a training set.
For example, one sample in the sample set matched with the animal classification task can be any image, and further, classification characteristics of the image can be marked by a marking person or a marking algorithm: if the image does not contain animals, the category characteristic of the image can be marked as category 0; if the image contains animals such as dogs, the category characteristic of the image can be marked as category 1; alternatively, if the image contains an animal "cat," the category characteristic of the image may be labeled as category "1," or the like.
It should be noted that, the image classification task related to the embodiment may also be a semantic segmentation task, and it is understood that semantic segmentation is classification at the pixel level, and pixels belonging to the same class are classified into one class, so that the semantic segmentation task may also be regarded as an image classification task.
In step S12, the current input sample set is input to the current image classification model for training, so as to obtain a current image classification model set corresponding to the current image classification model; and classifying and identifying the current input sample set by adopting the current image classification model set.
The network parameters, the optimization algorithm or the iteration times of each current image classification model in the current image classification model set are different.
The current input sample set may be the sample set obtained in the above step, or may be a sample set obtained by screening the sample set obtained in the above step, which is not limited in this embodiment.
In an optional implementation manner of this embodiment, after a sample set including an image and an image class feature is obtained, the obtained sample set may be input into a first image classification model to perform training, and the number of network times, an optimization algorithm, or the number of iterations of the first image classification model may be adjusted, so as to obtain a first image classification model set; for example, the sample set may be input into the resnet50 network for training, 2 ten thousand iterations may output one image classification model, 2.2 ten thousand iterations may output another image classification model, 2.4 ten thousand iterations may output one image classification model, and so on; in this embodiment, the image classification models may form a set of image classification models.
In an optional implementation manner of this embodiment, after the first image classification model set is obtained, the sample set input to the first image classification model may be classified and identified through the first image classification model set, that is, each image in the sample set is identified by using a classification feature, so as to obtain an identification result.
Note that, the current image classification model in this embodiment may be the first image classification model, or may be another image classification model, which is not limited in this embodiment. Illustratively, if the first image classification model is a resnet50 network, the second image classification model may be an acceptance-v 3 network, and the third image classification model may be an xception network, etc.; it will be appreciated that the image classification models referred to in this embodiment are different, and the feature extraction dimensions of the image classification models are also different. It should be further noted that in this embodiment, the number of image classification models in each image classification model set is decreased, the feature extraction dimension is increased, and the image classification models trained each time are different. By way of example, if the first image classification model set includes 100 models, the second and third image classification model sets may include 50 and 25 models, respectively.
In another optional implementation manner of this embodiment, if the current image classification model is not the first image classification model (for example, the second image classification model or the third image classification model, etc.), the filtered sample set may be input into the current image classification model for training, and the network number, the optimization algorithm or the iteration number of the current image classification model may be adjusted, so as to obtain the current image classification model set; further, the sample set input to the current image classification model can be classified and identified through the current image classification model set, so that an identification result is obtained. It should be noted that, how to obtain the sample set after screening will be described in detail later, and will not be described in detail here.
Optionally, in this embodiment, the first image classification model, the second image classification model, and the nth image classification model may be trained sequentially through the obtained sample set, where N is any positive integer greater than or equal to three, and in this embodiment, the N is not limited.
In step S13, the current input sample set is screened according to the classification result, and the sample whose classification result does not meet the recognition requirement is used as the input sample set of the next image classification model until the classification result meets the recognition requirement.
It should be noted that, in this embodiment, the input sample sets of any two image classification models are different. For example, if the input samples of the first deep learning model are a sample set containing 100 image samples, the input samples of the second deep learning model may be a sample set containing 50 image samples, the input samples of the third deep learning model may be a sample set containing 20 image samples, and so on.
In an optional implementation manner of this embodiment, after the current input sample set is classified and identified by using the current image classification model set, the current input sample set may be further screened according to the classification and identification result, and a sample with the classification result not meeting the identification requirement may be used as the input sample of the next image classification model until the classification result meets the identification requirement, where the identification requirement may be a classification accuracy requirement or the like, and in this embodiment, the classification accuracy requirement is not limited.
For example, if the obtained sample set is heard, training the first image classification model to obtain 100 first image classification model sets; further, the sample set is classified and identified through the 100 first image classification model sets, and if 200 samples are determined to not meet the identification requirement, the 200 samples can be further input into the second image classification model for training until all classification results meet the identification requirement.
In step S14, each image classification model set after training is set as a target image classification model.
In an optional implementation manner of this embodiment, if the image classification model set obtained by training the current classification model is used to perform classification recognition on the current input sample set, and it is further determined that all classification results meet the recognition requirement, the current image classification model is the last image classification model. At this time, the current image classification model set and all image classification model sets before the current time may be taken as the target image classification model. It will be appreciated that the target image classification model includes a plurality of image classification model sets.
For example, if the current image classification model is the fifth image classification model, the fifth image classification model set obtained by training the fifth image classification model is used for classifying and identifying the sample set input into the fifth image classification model, the classification results are screened, all classification results can be determined to meet the identification requirement from the screening results, at this time, the training of the image classification model can be stopped, and the first to fifth image classification model sets are included in the final target image classification model.
According to the scheme of the embodiment, a sample set is obtained, and the samples in the sample set comprise images and category characteristics; the sample set is an input sample set of the first image classification model; inputting the current input sample set into a current image classification model for training to obtain a current image classification model set corresponding to the current image classification model; classifying and identifying a current input sample set by adopting a current image classification model set; wherein, the network parameters, optimization algorithm or iteration times of each current image classification model in the current image classification model set are different; screening the current input sample set according to the classification result, and taking a sample with the classification result not meeting the recognition requirement as the input sample set of the next image classification model until the classification result meets the recognition requirement; the trained image classification model sets are used as target image classification models, so that the problem that a single image classification model only pays attention to feature learning of a simple sample and ignores feature learning of a difficult sample can be solved, the discrimination capability of the difficult sample is improved, and the accuracy of the image classification model is improved.
Fig. 2 is a flowchart illustrating a training method of an image classification model according to an exemplary embodiment, which is a further refinement of the above-described technical solution, where the technical solution in the present embodiment may be combined with each of the alternatives in one or more embodiments described above. As shown in fig. 2, the training method of the image classification model includes the following steps.
In step S21, a sample set is acquired, the samples in the sample set including images and category features; the sample set is an input sample set of the first image classification model.
In step S22, the current input sample set is input to the current image classification model for training, and a current image classification model set corresponding to the current image classification model is obtained.
Optionally, after the sample set including the image and the category feature is acquired, the image classification model may be further trained by the acquired sample set.
In an optional implementation manner of this embodiment, inputting the current input sample set into the current image classification model for training may include: the method comprises the steps of inputting a current input sample set into a current image classification model to train, and obtaining at least two trained current image classification models according to at least two network parameters, at least two optimization algorithms or at least two iteration times, wherein each trained current image classification model is a trained current image classification model set.
The current input sample set may be input to the current image classification model for training after the current input sample set is determined, and a plurality of different models may be further obtained according to different learning rate parameters, different loss functions and different iteration times; for example, training the current network model according to the learning rate of 0.1, the loss function of the cross entropy function and the iteration number of 1 ten thousand to obtain a model; the current network model can be trained according to the learning rate of 0.01, the loss function of the cross entropy function and the iteration number of 1 ten thousand to obtain another model, and the like, and the description thereof is omitted in this embodiment.
In step S23, the current input sample set is classified and identified using the current image classification model set.
In an optional implementation manner of this embodiment, the input sample set may be classified and identified by using the image classification model set obtained by training, so as to obtain multiple classification results of each sample image, where the classification result of each sample image may include the classification of the sample and the prediction probability. For example, the classification result of any sample may be "0" for the classification of the sample, and the prediction probability is "0.99", which means that the sample has a probability of 0.99 and is a category corresponding to the label "0", where the label "0" is a preset label rule, and may represent any category such as "person", "flower" or "cat", and the present embodiment is not limited thereto.
In step S24, the current input sample set is screened according to the classification result, and the sample whose classification result does not meet the recognition requirement is used as the input sample set of the next image classification model until the classification result meets the recognition requirement.
The identification requirement may be a classification identification accuracy requirement. It should be noted that, for any sample image, when the classification feature is the same as the classification result, the classification recognition result is correct. In this embodiment, each sample image in the sample set may be sequentially identified, and the classification recognition accuracy may be determined according to the recognition result of each sample image.
In a specific implementation, the screening the sample set according to the classification result, and determining the sample whose classification result does not meet the identification requirement may include: determining the number of target classification results which are the same in classification and have classification prediction probabilities greater than or equal to a first set threshold value in the classification results; and if the number of the target classification results is smaller than the second set threshold value, determining that each sample corresponding to each target classification result is a sample which does not meet the identification requirement.
Wherein, the classification of each classification result is the same, i.e. the classification of each classification result is the same. The first set threshold may be any probability value such as 0.8 or 0.9, which is not limited in this embodiment; the second set threshold may be any value, for example, if the depth classification model set includes N image classification models, the second set threshold may be a value of 2/3N or 3/4N, which is not limited in this embodiment. Wherein N is any positive integer greater than 2, which is not limited in this embodiment.
It can be understood that, a certain sample image input into the current image classification model is identified by using the current training image classification model set, and the number of the obtained identification results is equal to that of the current image classification model set, for example, the current image classification model set includes 9 image classification models, and the sample image a is identified by using the current image classification model set, so that 9 classification results can be obtained, wherein each classification result includes the classification of the sample image a and the classification prediction probability. The classification result of each classification model on the sample image a may be the same or different, which is not limited in this embodiment.
Further, the number of target classification results having the same classification and a classification prediction probability greater than or equal to the first set threshold among the classification results may be determined. For example, in the above example, it may be determined that, out of the 9 classification results for the sample image a, the number of classification results that are the same in classification and have a classification prediction probability of 0.8 or more (first set threshold value) is 5, and the number of target classification results is 5; further, it is determined whether the number of target classification results 5 is smaller than 6 (second set threshold), and in this example, it can be clearly seen that the number of target classification results 5 is smaller than the second set threshold 6, and at this time, it can be determined that the sample image a is a sample that does not satisfy the recognition requirement.
Optionally, the classification result meeting the recognition requirement may include: and if the number of the target classification results which are classified identically and have the prediction probability larger than or equal to the first set threshold value in the classification results is larger than the second set threshold value, determining that the classification results meet the recognition requirement.
For example, if it is determined that the number of classification results, of the 9 classification results of the sample image B, for which the classification is the same and the classification prediction probability is greater than or equal to 0.8 (first set threshold value), is 8, the number of target classification results is 8; further, it is determined whether the number 8 of the target classification results is greater than 6 (second set threshold), and in this example, it can be clearly seen that the number 8 of the target classification results is greater than the second set threshold 6, and at this time, it can be determined that the sample image B is a sample satisfying the recognition requirement.
It should be noted that, according to the above method, it is possible to determine whether each sample image in the sample set is a sample that does not satisfy the recognition requirement or a sample that satisfies the recognition requirement.
In an optional implementation manner of this embodiment, after determining sample images that do not meet the recognition requirement through the steps above, the sample images that do not meet the recognition requirement are continuously input into a next image classification model for training, so as to obtain a next image classification model set.
Optionally, in this embodiment, the feature extraction dimension of the image classification model in each image classification model is increased. That is, in a specific implementation, the network depth of the image classification model in each image classification model is continuously increased, and it can be understood that in the field of deep learning, the deeper the network model is, the larger the dimensional features extracted by the model are, and the more features are learned.
Optionally, the first image classification model is a resnet50 model; the second image classification model is an xception model; wherein the number of layers of the next image classification model is greater than the number of layers of the previous image classification model.
It should be noted that, in this embodiment, the number of image classification models in each image classification model set decreases. For example, the first set of image classification models may include 8 image classification models, the second set of image classification models may include 4 image classification models, the third set of image classification models may include 2 image classification models, and the fourth set of image classification models may include 1 image classification model.
The advantage of this arrangement is that, due to the increase of the number of layers, the stronger the capability of the image classification model to extract features, the greater the number of model parameters, and the sequentially decreasing the acquired image classification models with the increase of the number of layers, the calculation amount can be reduced, and the number of final image classification models is reduced to one, so that the target image classification model can be rapidly determined, and the phenomenon that training is still performed when the number of samples which do not meet the recognition requirement is small (for example, 3 samples or 2 samples or the like) is prevented.
In step S25, each image classification model set after training is set as a target image classification model.
In the scheme of the embodiment, a sample set is obtained; the method comprises the steps of sequentially inputting a sample set into a current image classification model for training, classifying and identifying the current sample set by adopting the image classification model set obtained by training, screening the current sample set according to a classification result, determining samples with classification results not meeting the identification requirement, taking the samples with classification results not meeting the identification requirement as input sample sets of next image classification models, and finally taking each image classification model set obtained by training as a target image classification model, so that the problem that a single image classification model only pays attention to feature learning of a simple sample and ignores feature learning of a difficult sample can be solved, the discrimination capability of the difficult sample is improved, and the accuracy of the image classification model is improved.
Fig. 3 is a flowchart illustrating an image classification method according to an exemplary embodiment, and as shown in fig. 3, the image classification method may be performed by an image classification apparatus, which may be implemented in software and/or hardware, and used in an electronic device, which may be a computer, a server, a smart phone, or the like, and the method includes the following steps.
In step S31, the image to be classified is input to any one of the current image classification model sets in the target image classification model for classification recognition.
The images to be classified are test sets, and the number of the images to be classified may be one or more, which is not limited in this embodiment. It should be noted that, the image to be classified in this embodiment and the sample set related to each embodiment should belong to the same data set. The target image classification model is the image classification model set obtained by training according to the training method of the image classification model in each embodiment.
In step S32, if the classification result of the image to be classified by the current image classification model set satisfies the preset recognition condition, the input of the image to be classified to the next image classification model set is stopped.
The current image classification model set may be the second image classification model set, the third image classification model set, or the like, which is not limited in this embodiment.
In a specific implementation, after an image to be classified is input into one image classification model set and classified and identified, the image classification model set can verify that the classification results of the image to be classified all meet preset identification conditions, wherein the preset identification conditions can be classification and identification accuracy requirements, and if the preset identification conditions are met, the input of the image to be classified into the next image classification model is stopped, namely the classification and identification of the image to be classified are stopped.
In another specific example of this embodiment, if the current image classification model set is the last image classification model set of the target image classification model, after the last image classification model set performs classification recognition on the image to be classified, the input of the image to be classified into the next image classification model is stopped, that is, the classification recognition of the image to be classified is stopped.
For example, in this embodiment, the image a to be classified may be input into a first image classification model set of the target image classification model to perform classification recognition, and determine whether the classification result of the first image classification model set on the image a to be classified is accurate; if not, continuing to input the image A to be classified into a fifth image classification model set for classification and identification, and determining whether the classification result of the image A to be classified by the fifth image classification model set is accurate; if the image to be classified A is inaccurate, the image to be classified A is continuously input into a fifth image classification model set for classification recognition until the classification result of the image to be classified A is accurate or the last image classification model set of the target image classification model is determined for classification recognition, and the input of the image to be classified A into the target image classification model is stopped.
In step S33, the target classification of the image to be classified is determined according to the classification result satisfying the preset recognition condition.
In a specific implementation, after a classification result of an image to be classified by a certain image classification model set meets a preset recognition condition and an image to be classified is stopped from being input into a next image classification model, the classification result of the image to be classified by the certain image classification model set can be used as a target classification of the image to be classified.
For example, if the image B to be classified is input to the second image classification model set for classification and identification, and it is determined that the classification result of the image B to be classified by the second image classification model set meets the preset identification condition, the classification result of the image B to be classified by the second image classification model set may be used as the target classification of the image B to be classified.
According to the scheme, an image to be classified is input into any current image classification model set in the target image classification model to be classified and identified; if the classification result of the image to be classified meets the preset recognition condition, stopping inputting the image to be classified into the next image classification model set; according to the classification result meeting the preset recognition condition, the target classification of the image to be classified is determined, the problem that a single model is inaccurate in classifying the more complex image to be classified can be solved, and when the image to be classified is more complex, the target classification of the image to be classified can be accurately determined.
Fig. 4 is a flowchart illustrating an image classification method according to an exemplary embodiment, which is a further refinement of the above-described technical solution, and the technical solution in this embodiment may be combined with each of the alternatives in one or more embodiments described above. As shown in fig. 4, the image classification method includes the following steps.
In step S41, the image to be classified is input to the current image classification model set for classification and identification, and a plurality of classification results are obtained.
The current image classification model set may be any one of image classification model sets in the target image classification model, for example, a first image classification model set obtained by training a first image classification model, or a second image classification model set obtained by training a second image classification model, which is not limited in this embodiment.
In an optional implementation of this embodiment, an image to be classified is input into a current image classification model set, and each depth image classification model in the current image classification model set performs classification recognition on the image to be input, so as to obtain a plurality of classification results. It can be understood that, in this embodiment, the number of classification results is the same as the number of image classification models included in the current image classification model set, for example, the current image classification model set includes 10 image classification models, and then the image to be classified is input into the current image classification model set for classification and identification, so that 10 classification results can be obtained.
In step S42, if each classification result does not meet the preset recognition condition, the operation of inputting the image to be classified into the next image classification model set is triggered.
In an optional implementation manner of this embodiment, if a plurality of classification results obtained by classifying and identifying the image to be classified by the current image classification model set determined in step S41 do not satisfy a preset identification condition, an operation of inputting the image to be classified into the next image classification model set is triggered.
Optionally, if each classification result does not meet the preset recognition condition, the step of triggering the input of the image to be classified into the next image classification model set may include: determining the number of target classification results which are the same in classification and have classification probabilities larger than a first set threshold value in the classification results; if the number of the target classification results is smaller than the second set threshold, determining that each classification result does not meet the preset recognition condition, and triggering the image to be classified to be continuously input into the next image classification model set.
The first set threshold and the second set threshold related to the embodiment are the same as the first set threshold and the second set threshold related to each embodiment in the training method of the image classification model, and the core ideas of specific operation steps are also the same, which will not be described in detail herein.
In step S43, the target classification of the image to be classified is determined according to the classification result satisfying the preset recognition condition.
In an optional implementation manner of this embodiment, after determining the classification result that satisfies the preset recognition condition, the target classification of the image to be classified may be further determined.
Optionally, the step of determining the target classification of the image to be classified according to the classification result satisfying the preset recognition condition includes: and taking the target classification result of which the classification result is larger than the set threshold value as the class of the image to be classified, and taking the average value of the prediction probabilities of the target classification results as the final prediction probability of the target image to be classified.
The threshold may be any value, for example, 2/3N or 3/4N, which is not limited in this embodiment. Where N is the number of classification results.
In a specific implementation, when determining the classification result satisfying the preset recognition condition, statistics may be performed on each classification result, for example, the category of each classification result and the prediction probability of each classification result are counted. Specifically, the target classification result of which the classification result is larger than the set threshold value is used as the class of the image to be classified, and the average value of the prediction probabilities of the target classification results is used as the final prediction probability of the target image to be classified.
For example, if the number of classification results is 6 and the threshold is set to be 6, the target classification result of the 10 classification results greater than the set threshold 6 may be used as the category of the image to be classified, and the average value of the prediction probabilities of the target classification results may be used as the final prediction probability of the target image to be classified.
In another specific example of this embodiment, if the number of classification results is 1, that is, the classification result is a classification result obtained by classifying and identifying the image to be classified through the last image classification model set, at this time, the class of the one classification result is the class of the image to be classified, and the prediction probability of the one classification result is the prediction probability of the image to be classified.
According to the scheme, an image to be classified is input into a current image classification model set for classification and identification, and a plurality of classification results are obtained; if each classification result does not meet the preset recognition condition, triggering the operation of inputting the image to be classified into the next image classification model set; according to the classification result meeting the preset recognition condition, the target classification of the image to be classified is determined, the problem that a single model is inaccurate in classifying the more complex image to be classified can be solved, and when the image to be classified is more complex, the target classification of the image to be classified can be accurately determined.
For a better understanding of the disclosed embodiments, a specific example is described below, which includes: model training phase and usage phase.
Wherein, the model training stage includes:
1. training data used by the image classification model, i.e., a sample set (for example, we need to identify "dogs", and then collect many pictures of "dogs" and not "dogs") and labels label (not "dogs") corresponding to the training data, are prepared.
2. The resnet50 deep learning classification network is used to generate a model of N (N > =2) different parameter configurations (including network architecture, iterative training optimizer, iterative training steps) for the batch of data until the value of the loss function (the common loss function of the deep learning classification network, such as cross entropy loss) is hardly reduced any more, which proves that the network converges at this time, and the classification model is trained.
3. And respectively predicting the training data sets by the N classification models to obtain prediction probability and prediction label. Where label = label corresponding to maximum probability is predicted. The prediction results of the N models are integrated as follows:
on single data, judging whether more than 2/3N labels predicted by the N classification models are consistent or not, wherein the prediction probability is greater than or equal to 0.8.
If so, the N models are judged to have consistency on the data. Otherwise, the N models do not have consistency in the data. We therefore preserve inconsistent data to form a new training set.
4. Based on the inconsistent data, we use either xception or acceptance-v 3 to train the second stage to get N/2 models of the second stage.
Based on the data of the inconsistency, the N/(2++x-1)) models of stage x are derived.
This iterates until only one last model makes the final decision.
In the above example, the number of the models of each stage may be dynamically adjusted according to the actual situation.
The using stage comprises the following steps:
for the same test image, firstly, N models generated in the first stage are used for making decisions, and when the decisions in the first stage are inconsistent (i.e. no more than 2/3N models predict the image as the same label and the prediction probability > =0.8), the second stage is only entered; when the second phase is inconsistent (as above), the decision of the third phase is made until the last phase is entered or the decisions of the same phase are consistent. If there are more than 2/3N predicted label=l and the prediction probability P > =0.8 at the current decision stage, the final prediction label=l for the image, the predicted probability is the average of the prediction probabilities P of these consensus models. Where R is the number of models for the current stage.
The core idea of the embodiment of the disclosure is that a simple sample is learned in the first stage, and a slightly difficult sample is learned in the second stage, so that the problem that a single model only pays attention to the learning of the simple sample and ignores the learning of the difficult sample can be well avoided, the identification capability of the difficult sample is better improved, and the improvement of the overall accuracy is ensured.
FIG. 5 is a block diagram illustrating a training apparatus for an image classification model according to an exemplary embodiment. Referring to fig. 5, the apparatus includes an acquisition module 51, a training module 52, a screening module 53, and a determination module 54.
Wherein the acquisition module 51 is configured to acquire a sample set, the samples in the sample set comprising images and category features; the sample set is an input sample set of the first image classification model;
the training module 52 is configured to input the current input sample set to the current image classification model for training, so as to obtain a current image classification model set corresponding to the current image classification model; classifying and identifying a current input sample set by adopting a current image classification model set; wherein, the network parameters, optimization algorithm or iteration times of each current image classification model in the current image classification model set are different;
A screening module 53, configured to screen the sample set according to the classification result, and take the sample with the classification result not meeting the recognition requirement as the input sample set of the next image classification model set until the classification result meets the recognition requirement;
a determining module 54 configured to take each of the trained image classification model sets as a target image classification model;
the image classification models in each image classification model set are decreased in number, feature extraction dimensions are increased in number, and the image classification models obtained through each training are different.
Optionally, the training module 52 is configured to input the current input sample set to the current image classification model for training, and obtain at least two trained current image classification models according to at least two network parameters, at least two optimization algorithms or at least two iteration times, where each trained current image classification model is a trained current image classification model set.
Optionally, the screening module 53 is specifically configured to
Determining the number of target classification results which are the same in classification and have classification prediction probabilities greater than or equal to a first set threshold value in the classification results;
and if the number of the target classification results is smaller than the second set threshold value, determining that each sample corresponding to each target classification result is a sample which does not meet the identification requirement.
Optionally, the classification result that is referred to in this embodiment meets the identification requirement includes:
and if the number of the target classification results which are classified identically and have the prediction probability larger than or equal to the first set threshold value in the classification results is larger than the second set threshold value, determining that the classification results meet the recognition requirement.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
Fig. 6 is a block diagram illustrating an image classification apparatus according to an exemplary embodiment. Referring to fig. 6, the apparatus includes an identification module 61, a stopping module 62, and a determining module 63.
The recognition module 61 is configured to input an image to be classified into any one of image classification model sets in a target image classification model for classification recognition, wherein the target image classification model is trained by the training method of any one of the image classification models in the embodiment;
a stopping module 62 configured to stop inputting the image to be classified into the next image classification model set if the image classification model satisfies a preset recognition condition;
A determining module 63 configured to determine a target classification of the image to be classified according to the classification result satisfying the preset recognition condition.
Optionally, the recognition module 61 includes a recognition sub-module and an input sub-module.
The identification sub-module is configured to input the images to be classified into the current image classification model set for classification identification to obtain a plurality of classification results;
and the input sub-module is configured to trigger the operation of inputting the image to be classified into the next image classification model set if each classification result does not meet the preset recognition condition.
Optionally, the input sub-module is specifically configured to
Determining the number of target classification results which are the same in classification and have classification probabilities larger than a first set threshold value in the classification results;
if the number of the target classification results is smaller than the second set threshold, determining that each classification result does not meet the preset recognition condition, and triggering the image to be classified to be continuously input into the next image classification model set.
Optionally, the determining module 63 is specifically configured to
And taking the target classification result of which the classification result is larger than the set threshold value as the class of the image to be classified, and taking the average value of the prediction probabilities of the target classification results as the final prediction probability of the target image to be classified.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
Fig. 7 is a block diagram of an electronic device, according to an example embodiment. As shown in fig. 7, the electronic device includes a processor 71; a Memory 72 for storing executable instructions of the processor 71, the Memory 72 may include a random access Memory (Random Access Memory, RAM) and a Read-Only Memory (ROM); wherein the processor 71 is configured to execute instructions to implement the training method of the image classification model described above, or the image classification method.
In an exemplary embodiment, a storage medium is also provided, such as a memory 72 storing executable instructions that are executable by the processor 71 of the electronic device (server or smart terminal) to perform the training method of the image classification model described above, or the image classification method.
Alternatively, the storage medium may be a non-transitory computer readable storage medium, for example, a ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, and the like.
In an exemplary embodiment, a computer program product is also provided, which when executed by a processor of an electronic device (server or intelligent terminal) implements the training method of the image classification model, or the image classification method, described above.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (14)

1. The training method of the image classification model is characterized by comprising the following steps of;
acquiring a sample set, wherein a sample in the sample set comprises an image and category characteristics; the sample set is an input sample set of the first image classification model;
Inputting a current input sample set into a current image classification model for training to obtain a current image classification model set corresponding to the current image classification model; classifying and identifying the current input sample set by adopting the current image classification model set; wherein, the network parameters, optimization algorithm or iteration times of each current image classification model in the current image classification model set are different;
screening the current input sample set according to the classification result, and taking a sample with the classification result not meeting the recognition requirement as the input sample set of the next image classification model until the classification result meets the recognition requirement;
taking each trained image classification model set as a target image classification model;
the number of the image classification models in each image classification model set is decreased, the feature extraction dimension is increased, and the image classification models trained for each time are different;
the step of screening the current input sample set according to the classification result, and taking the sample with the classification result not meeting the recognition requirement as the input sample set of the next image classification model until the classification result meets the recognition requirement comprises the following steps:
Determining the number of target classification results which are classified identically and have classification prediction probabilities greater than or equal to a first set threshold value in the classification results;
if the number of the target classification results is smaller than a second set threshold value, determining each sample corresponding to each target classification result as a sample which does not meet the identification requirement;
the classification result meeting the recognition requirement comprises:
and if the number of the target classification results which are classified identically and have the prediction probability larger than or equal to the first set threshold value in the classification results is larger than the second set threshold value, determining that the classification results meet the recognition requirement.
2. The method of claim 1, wherein the step of inputting the current input sample set into the current image classification model for training comprises:
the method comprises the steps of inputting a current input sample set into a current image classification model to train, and obtaining at least two trained current image classification models according to at least two network parameters, at least two optimization algorithms or at least two iteration times, wherein each trained current image classification model is a trained current image classification model set.
3. An image classification method, comprising:
Inputting an image to be classified into any current image classification model set in a target image classification model for classification and identification, wherein the target image classification model is obtained by training by adopting the training method of the image classification model in any one of claims 1-2;
if the classification result of the current image classification model set on the image to be classified meets the preset recognition condition, stopping inputting the image to be classified into the next image classification model set;
and determining the target classification of the image to be classified according to the classification result meeting the preset recognition condition.
4. A method according to claim 3, wherein the step of classifying and identifying the image to be classified into any current image classification model set in the target image classification model comprises:
inputting the images to be classified into the current image classification model set for classification and identification to obtain a plurality of classification results;
and if the classification results do not meet the preset recognition conditions, triggering the operation of inputting the images to be classified into the next image classification model set.
5. The method according to claim 4, wherein the step of triggering the input of the image to be classified into the next image classification model set if each classification result does not satisfy a preset recognition condition comprises:
Determining the number of target classification results which are the same in classification and have classification probabilities larger than a first set threshold value in the classification results;
if the number of the target classification results is smaller than a second set threshold, determining that each classification result does not meet a preset recognition condition, and triggering the image to be classified to be continuously input into a next image classification model set.
6. The method according to any one of claims 3 to 5, wherein the step of determining the target classification of the image to be classified according to the classification result satisfying a preset recognition condition includes:
and taking the target classification result of which the classification result is larger than a set threshold value as the class of the image to be classified, and taking the average value of the prediction probabilities of the target classification results as the final prediction probability of the image to be classified.
7. A training device for an image classification model, comprising;
an acquisition module configured to acquire a sample set, a sample in the sample set comprising an image and a category feature; the sample set is an input sample set of the first image classification model;
the training module is configured to input a current input sample set into a current image classification model for training to obtain a current image classification model set corresponding to the current image classification model; classifying and identifying the current input sample set by adopting the current image classification model set; wherein, the network parameters, optimization algorithm or iteration times of each current image classification model in the current image classification model set are different;
The screening module is configured to screen the sample set according to the classification result, and takes the sample with the classification result not meeting the recognition requirement as the input sample set of the next image classification model set until the classification result meets the recognition requirement;
a determining module configured to take each image classification model set after training as a target image classification model;
the image classification models in each image classification model set are decreased in number, feature extraction dimensions are increased in number, and the image classification models obtained by training are different;
the screening module is specifically configured to
Determining the number of target classification results which are classified identically and have classification prediction probabilities greater than or equal to a first set threshold value in the classification results;
if the number of the target classification results is smaller than a second set threshold value, determining each sample corresponding to each target classification result as a sample which does not meet the identification requirement;
the classification result meeting the recognition requirement comprises:
and if the number of the target classification results which are classified identically and have the prediction probability larger than or equal to the first set threshold value in the classification results is larger than the second set threshold value, determining that the classification results meet the recognition requirement.
8. The device according to claim 7, wherein the training module is specifically configured to
The method comprises the steps of inputting a current input sample set into a current image classification model to train, and obtaining at least two trained current image classification models according to at least two network parameters, at least two optimization algorithms or at least two iteration times, wherein each trained current image classification model is a trained current image classification model set.
9. An image classification apparatus, comprising:
the identification module is configured to input an image to be classified into any image classification model set in a target image classification model for classification identification, wherein the target image classification model is trained by the training method of the image classification model according to any one of claims 1-2;
a stopping module configured to stop inputting the image to be classified into a next image classification model set if the classification result of the image classification model on the image to be classified meets a preset recognition condition;
and the determining module is configured to determine the target classification of the image to be classified according to the classification result meeting the preset recognition condition.
10. The apparatus of claim 9, wherein the identification module comprises: an identification sub-module and an input sub-module;
the identification submodule is configured to input the image to be classified into a current image classification model set for classification identification to obtain a plurality of classification results;
the input sub-module is configured to trigger the operation of inputting the image to be classified into the next image classification model set if each classification result does not meet a preset recognition condition.
11. The apparatus according to claim 10, wherein the input sub-module is specifically configured to
Determining the number of target classification results which are the same in classification and have classification probabilities larger than a first set threshold value in the classification results;
if the number of the target classification results is smaller than a second set threshold, determining that each classification result does not meet a preset recognition condition, and triggering the image to be classified to be continuously input into a next image classification model set.
12. The apparatus according to any of claims 9-11, wherein the determination module is in particular configured to
And taking the target classification result of which the classification result is larger than a set threshold value as the class of the image to be classified, and taking the average value of the prediction probabilities of the target classification results as the final prediction probability of the image to be classified.
13. An electronic device, comprising:
a processor;
a memory for storing the processor-executable commands;
wherein the processor is configured to execute the command to implement the training method of the image classification model according to any one of claims 1 to 2 or the image classification method according to any one of claims 3 to 6.
14. A storage medium, which when executed by a processor of an electronic device, enables the electronic device to perform the training method of an image classification model according to any one of claims 1 to 2, or the image classification method according to any one of claims 3 to 6.
CN202011035268.0A 2020-09-27 2020-09-27 Training of image classification model, image classification method, device, equipment and medium Active CN112182269B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011035268.0A CN112182269B (en) 2020-09-27 2020-09-27 Training of image classification model, image classification method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011035268.0A CN112182269B (en) 2020-09-27 2020-09-27 Training of image classification model, image classification method, device, equipment and medium

Publications (2)

Publication Number Publication Date
CN112182269A CN112182269A (en) 2021-01-05
CN112182269B true CN112182269B (en) 2023-11-28

Family

ID=73943757

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011035268.0A Active CN112182269B (en) 2020-09-27 2020-09-27 Training of image classification model, image classification method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN112182269B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113344890B (en) * 2021-06-18 2024-04-12 北京百度网讯科技有限公司 Medical image recognition method, recognition model training method and device
CN114170463A (en) * 2021-12-06 2022-03-11 上海坤扫环境科技股份有限公司 Non-contact type wide outer wall cleaning method and system
CN114519404B (en) * 2022-04-20 2022-07-12 四川万网鑫成信息科技有限公司 Image sample classification labeling method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109815991A (en) * 2018-12-29 2019-05-28 北京城市网邻信息技术有限公司 Training method, device, electronic equipment and the storage medium of machine learning model
WO2019154262A1 (en) * 2018-02-07 2019-08-15 腾讯科技(深圳)有限公司 Image classification method, server, user terminal, and storage medium
WO2019169700A1 (en) * 2018-03-08 2019-09-12 平安科技(深圳)有限公司 Data classification method and device, equipment, and computer readable storage medium
WO2020108474A1 (en) * 2018-11-30 2020-06-04 广州市百果园信息技术有限公司 Picture classification method, classification identification model generation method and apparatus, device, and medium
CN111507407A (en) * 2020-04-17 2020-08-07 腾讯科技(深圳)有限公司 Training method and device of image classification model

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019154262A1 (en) * 2018-02-07 2019-08-15 腾讯科技(深圳)有限公司 Image classification method, server, user terminal, and storage medium
WO2019169700A1 (en) * 2018-03-08 2019-09-12 平安科技(深圳)有限公司 Data classification method and device, equipment, and computer readable storage medium
WO2020108474A1 (en) * 2018-11-30 2020-06-04 广州市百果园信息技术有限公司 Picture classification method, classification identification model generation method and apparatus, device, and medium
CN109815991A (en) * 2018-12-29 2019-05-28 北京城市网邻信息技术有限公司 Training method, device, electronic equipment and the storage medium of machine learning model
CN111507407A (en) * 2020-04-17 2020-08-07 腾讯科技(深圳)有限公司 Training method and device of image classification model

Also Published As

Publication number Publication date
CN112182269A (en) 2021-01-05

Similar Documents

Publication Publication Date Title
CN112182269B (en) Training of image classification model, image classification method, device, equipment and medium
CN109934293B (en) Image recognition method, device, medium and confusion perception convolutional neural network
CN108280477A (en) Method and apparatus for clustering image
CN110909618B (en) Method and device for identifying identity of pet
CN110135231A (en) Animal face recognition methods, device, computer equipment and storage medium
CN111428448B (en) Text generation method, device, computer equipment and readable storage medium
CN110135505B (en) Image classification method and device, computer equipment and computer readable storage medium
CN111160959B (en) User click conversion prediction method and device
CN113780243B (en) Training method, device, equipment and storage medium for pedestrian image recognition model
JP2020053073A (en) Learning method, learning system, and learning program
CN112115996B (en) Image data processing method, device, equipment and storage medium
CN109271957B (en) Face gender identification method and device
CN115187772A (en) Training method, device and equipment of target detection network and target detection method, device and equipment
CN114648680A (en) Training method, device, equipment, medium and program product of image recognition model
CN111753775A (en) Fish growth assessment method, device, equipment and storage medium
CN113177554B (en) Thyroid nodule identification and segmentation method, system, storage medium and equipment
CN114328942A (en) Relationship extraction method, apparatus, device, storage medium and computer program product
EP4318395A1 (en) A training method and an image instance segmentation method for an image mask generator
CN109657710B (en) Data screening method and device, server and storage medium
CN109033078B (en) The recognition methods of sentence classification and device, storage medium, processor
CN112766387B (en) Training data error correction method, device, equipment and storage medium
CN115240647A (en) Sound event detection method and device, electronic equipment and storage medium
CN112507912B (en) Method and device for identifying illegal pictures
CN114330542A (en) Sample mining method and device based on target detection and storage medium
CN112711703B (en) User tag acquisition method, device, server and storage medium

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
GR01 Patent grant
GR01 Patent grant