CN113240565A - Target identification method, device and equipment based on quantitative model and storage medium - Google Patents

Target identification method, device and equipment based on quantitative model and storage medium Download PDF

Info

Publication number
CN113240565A
CN113240565A CN202110611190.0A CN202110611190A CN113240565A CN 113240565 A CN113240565 A CN 113240565A CN 202110611190 A CN202110611190 A CN 202110611190A CN 113240565 A CN113240565 A CN 113240565A
Authority
CN
China
Prior art keywords
model
student
loss function
target
student model
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.)
Granted
Application number
CN202110611190.0A
Other languages
Chinese (zh)
Other versions
CN113240565B (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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN202110611190.0A priority Critical patent/CN113240565B/en
Publication of CN113240565A publication Critical patent/CN113240565A/en
Application granted granted Critical
Publication of CN113240565B publication Critical patent/CN113240565B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/20Education
    • G06Q50/205Education administration or guidance
    • 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
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/067Enterprise or organisation modelling

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Human Resources & Organizations (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Tourism & Hospitality (AREA)
  • Educational Administration (AREA)
  • Economics (AREA)
  • Physics & Mathematics (AREA)
  • Marketing (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Educational Technology (AREA)
  • General Business, Economics & Management (AREA)
  • Data Mining & Analysis (AREA)
  • Development Economics (AREA)
  • Operations Research (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Game Theory and Decision Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Primary Health Care (AREA)
  • Image Analysis (AREA)

Abstract

The application relates to the technical field of target identification and discloses a target identification method, a device, equipment and a storage medium based on a quantitative model, wherein a teacher model trained in advance is used for identifying a plurality of objects to be identified to obtain label information and probability information of each object to be identified, wherein the label information and the probability information belong to a target object; inputting the label information and the probability information into a student model corresponding to the teacher model, and performing reverse training on the student model based on the label information and the probability information to obtain a target identification model; and identifying the objects to be identified according to the target identification model to respectively obtain identification results of the objects to be identified. By reversely introducing the label information and probability information of the target object based on the distillation knowledge in the training process of the target recognition model, the recognition efficiency and precision of the target recognition model to the large-scale similar target can be effectively improved.

Description

Target identification method, device and equipment based on quantitative model and storage medium
Technical Field
The present application relates to the field of target identification technologies, and in particular, to a target identification method, apparatus, device, and storage medium based on a quantization model.
Background
At present, a quantization algorithm is mostly applied to the problem of target detection and classification so as to improve the training efficiency and precision of a target recognition model. However, in a relatively complex application scenario, for example, when the target objects have high similarity, or the target objects have a plurality of small changes correspondingly, the accuracy of the quantization algorithm often does not meet the identification requirement of the target objects with high similarity on a large scale.
Disclosure of Invention
The application provides a target identification method, a device, equipment and a storage medium based on a quantitative model, and the efficiency and the precision of the target identification model for identifying large-scale similar targets can be effectively improved by introducing label information and probability information of target objects in the training process of the target identification model.
In a first aspect, the present application provides a target identification method based on a quantization model, the method including:
identifying a plurality of objects to be identified through an iterative network search space of a pre-trained teacher model to obtain label information of each object to be identified, which belongs to a preset class target, and probability information of each object to be identified, which belongs to the preset class target;
inputting the label information and the probability information into a student model corresponding to the teacher model, and performing reverse training on the student model based on the label information and the probability information;
according to the variation of the loss function value of the student model, after the completion of reverse training of the student model is determined, setting the trained student model as the target recognition model;
and identifying the objects to be identified based on the target identification model to respectively obtain identification results of the objects to be identified.
In a second aspect, the present application further provides a target identification apparatus based on a quantization model, including:
the first obtaining module is used for identifying a plurality of objects to be identified through an iterative network search space of a teacher model which is trained in advance to obtain label information of each object to be identified, wherein the label information belongs to a preset class target, and probability information of each object to be identified belongs to the preset class target;
the training module is used for inputting the label information and the probability information into a student model corresponding to the teacher model and carrying out reverse training on the student model based on the label information and the probability information;
the determining module is used for determining that the reverse training of the student model is finished according to the variation of the loss function value of the student model, and setting the student model which is finished in training as the target recognition model;
and the second obtaining module is used for identifying the objects to be identified based on the target identification model and respectively obtaining the identification result of each object to be identified.
In a third aspect, the present application further provides a target identification device based on a quantization model, including:
a memory and a processor;
the memory is used for storing a computer program;
the processor is configured to execute the computer program and to implement the steps of the quantitative model-based object recognition method according to the first aspect when executing the computer program.
In a fourth aspect, the present application further provides a computer-readable storage medium storing a computer program, which when executed by a processor causes the processor to implement the steps of the quantization model-based object recognition method according to the first aspect.
The application discloses a target identification method, a device, equipment and a storage medium based on a quantitative model, wherein a teacher model trained in advance is used for identifying a plurality of objects to be identified to obtain label information and probability information of each object to be identified, wherein the object to be identified belongs to a target object; inputting the label information and the probability information into a student model corresponding to the teacher model, and performing reverse training on the student model based on the label information and the probability information to obtain a target identification model; and identifying the objects to be identified according to the target identification model to respectively obtain identification results of the objects to be identified. By reversely introducing the label information and probability information of the target object based on the distillation knowledge in the training process of the target recognition model, the recognition efficiency and precision of the target recognition model to the large-scale similar target can be effectively improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic flow chart diagram of a target identification method based on a quantization model according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating an implementation of S102 in FIG. 1;
FIG. 3 is a flowchart of an implementation of a target identification method based on a quantization model according to another embodiment of the present application;
FIG. 4 is a schematic structural diagram of a target recognition apparatus based on a quantization model according to an embodiment of the present application;
fig. 5 is a schematic block diagram of a structure of a target identification device based on a quantization model according to an embodiment of the present application.
Detailed Description
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, but not all, embodiments of the present 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.
The flow diagrams depicted in the figures are merely illustrative and do not necessarily include all of the elements and operations/steps, nor do they necessarily have to be performed in the order depicted. For example, some operations/steps may be decomposed, combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
It is to be understood that the terminology used in the description of the present application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
The embodiment of the application provides a target identification method, a target identification device, target identification equipment and a storage medium based on a quantitative model. According to the target identification method based on the quantitative model, a teacher model trained in advance is used for identifying a plurality of objects to be identified to obtain label information and probability information of each object to be identified, wherein the object to be identified belongs to a target object; inputting the label information and the probability information into a student model corresponding to the teacher model, and performing reverse training on the student model based on the label information and the probability information to obtain a target identification model; and identifying the objects to be identified according to the target identification model to respectively obtain identification results of the objects to be identified. By reversely introducing the label information and probability information of the target object based on the distillation knowledge in the training process of the target recognition model, the recognition efficiency and precision of the target recognition model to the large-scale similar target can be effectively improved.
Some embodiments of the present application will be described in detail below with reference to the accompanying drawings. The embodiments described below and the features of the embodiments can be combined with each other without conflict.
Referring to fig. 1, fig. 1 is a schematic flow chart of a target identification method based on a quantization model according to an embodiment of the present application. The target identification method based on the quantitative model can be realized by a server or a terminal, and the server can be a single server or a server cluster. The terminal can be a handheld terminal, a notebook computer, a wearable device or a robot and the like.
As shown in fig. 1, fig. 1 is a flowchart illustrating an implementation of a target identification method based on a quantization model according to an embodiment of the present application. The method specifically comprises the following steps: step S101 to step S104. The details are as follows:
s101, identifying a plurality of objects to be identified through an iterative network search space of a teacher model which is trained in advance to obtain label information of each object to be identified, wherein the label information belongs to a preset class target, and probability information belongs to the preset class target.
The teacher model is a model with a more complex network structure compared with the student model; specifically, compared with the student model, the teacher model has very good performance and generalization capability, and can guide another simpler network to learn, so that the simpler network with less parameter calculation amount can have performance similar to that of the teacher model. Wherein the more simple network being guided is the student model corresponding to the teacher model.
In this embodiment, the pre-trained teacher model includes an iterative network search space that includes an iterative network element and two output branches. The iterative network unit is used for identifying an object to be identified, one of the two output branches is used for outputting label information of the identified target object, and the other output branch is used for outputting probability information obtained by identification. Specifically, the tag information indicating that the identification object belongs to the target object is used to indicate whether the object to be identified belongs to the preset category target, and the probability information is used to indicate the probability that the object to be identified belongs to the preset category target.
For example, taking a pick-up hill with different degrees of ghost faces as an example when the object to be recognized is a batch of pick-up hills, when the object to be recognized is recognized by the existing target recognition model, the output result is the label information of whether the object is the pick-up hill, and the label information is only used for indicating whether the recognition result is the pick-up hill or not; for example, 1 output label information represents a pick-up hill, and 0 output label information represents a pick-up hill; however, the pick-up domes with different degrees of ghosting have many different features, which makes it difficult for the target recognition model to output an accurate recognition result. In the embodiment of the application, the teacher model with double output branches outputs the label information and the probability information corresponding to the identification result, so that not only can the type of the object to be identified be determined, but also the probability that the object to be identified belongs to the target can be determined, and if multiple images containing the object to be identified are identified, the probability that the object contained in the multiple images belongs to the target is higher, and the accuracy of identifying the target object is improved.
Illustratively, if an arbitrary image including an object to be recognized is recognized and the output data tag information is (0.9999,0.97), it indicates that the object to be recognized is a pick-up hill and the probability of being a pick-up hill is 0.97, and if the output data tag information is (0.4131,0.25), it indicates that the object to be recognized is not a pick-up hill and the probability of being a pick-up hill is 0.25, and so on.
And S102, inputting the label information and the probability information into a student model corresponding to the teacher model, and performing reverse training on the student model based on the label information and the probability information.
Specifically, the label information may be referred to as a hard target output of the teacher model, and the probability information may be referred to as a soft target output of the teacher model. And the hard target output corresponds to the output of class identification, and the soft target output is the probability of further judging the hard target.
In the embodiment of the application, after the label information and the probability information are obtained, the label information and the probability information are input into a student model, and a process of performing reverse iteration updating on parameters of the student model based on the label information and the probability information is called as performing reverse training on the student model based on the label information and the probability information.
Illustratively, as shown in fig. 2, fig. 2 is a flowchart of a specific implementation of S102 in fig. 1. As shown in fig. 2, S102 includes S1021 and S1022. The details are as follows:
and S1021, inputting the label information and the probability information into a student model corresponding to the teacher model, and quantizing a loss function value of the student model after parameter updating based on the label information and the probability information according to the gradient change and the learning rate of the loss function of the student model to obtain the quantized loss function value of the student model.
And S1022, determining that the reverse training process of the student model is finished according to the magnitude of the quantized loss function value of the student model.
Wherein the loss function of the target recognition model comprises a distillation loss function for target classification recognition and a probability loss function for target class probability calculation.
Illustratively, the distillation loss function for target classification identification may be expressed as:
Figure BDA0003095828580000061
wherein k represents the number of the base models integrated by the teacher model, yi represents the output structure of the ith base model, j represents the training unit contained in the base models,
Figure BDA0003095828580000062
representing a base model.
The probability loss function for the target class probability calculation can be expressed as:
Figure BDA0003095828580000063
where M is the number of layers to be lost, N is the parameter quantity for that layer, ytiIs the teacher model corresponding positionSet output value, ysiIs the output value of the corresponding position of the student model.
The loss function of the target recognition model may be expressed as:
L(x)=αLarcloss+βLdistill
wherein, alpha and beta are both hyper-parameters and are used for adjusting the parameter updating precision in the training process of the target recognition model.
In an embodiment, the inputting the label information and the probability information into a student model corresponding to the teacher model, and quantizing the loss function value of the student model after parameter updating based on the label information and the probability information according to a gradient change and a learning rate of a loss function of the student model may include:
inputting the label information and the probability information into a student model corresponding to the teacher model respectively, and updating parameters of the teacher model based on gradient change and learning rate of a loss function of the student model; reversely reasoning the label information and probability information output by the teacher model according to the updating result of the parameters of the teacher model; retraining the student model according to the label information and the probability information obtained through reasoning, determining a loss function value of the student model after parameter updating based on the label information and the probability information after reasoning, repeatedly executing the steps of inputting the label information and the probability information into the student model corresponding to the teacher model respectively, and determining the loss function value of the student model after quantification based on gradient change and learning rate of the loss function of the student model until the loss function value of the student model after parameter updating based on the label information and the probability information after reasoning is smaller than a preset loss function threshold.
Optionally, when training the student model, training an optimal student model for ensuring; whether the capacities between the teacher model and the student models are greatly different or not can be determined, if the capacities between the teacher model and the student models are greatly different, a TA model (the TA model can also be called as an assistant teaching model) with the capacity between the teacher model and the student models can be introduced, the TA model is introduced to help the smooth transition of the capacities between the teacher model and the student models, and the accuracy of the TA model is preferably higher than the average value level of the accuracy of the teacher model and the accuracy of the student models (lower than the accuracy of the teacher model and higher than the accuracy of the student models); specifically, the network structure of the TA model may be simpler than that of the teacher model and more complex than that of the student model, and the specific network structure may be an existing open-source TA model structure, which is not described herein again.
S103, determining that the reverse training of the student model is finished according to the variation of the loss function value of the student model, and setting the student model after the training as the target recognition model.
Wherein the loss function of the student model is the distillation loss function for target classification identification. From the analysis of the previous step S102, the value of the distillation loss function is determined by the parameters of the teacher model; and the quantitative target loss function of the student model is a loss function of the target recognition model.
For example, the variation of the loss function value of the student model may be represented by the quantized loss function value of the student model. Specifically, the determining, according to the variation of the loss function value of the student model, that the reverse training of the student model is completed, and then setting the trained student model as the target recognition model may include:
and according to the magnitude relation between the quantized loss function value of the student model and a preset loss function threshold value, after the completion of the directional training of the student model is determined, setting the trained student model as the target recognition model. Specifically, if the quantized loss function value of the student model is less than or equal to a preset loss function threshold, determining that reverse training of the student model is completed; if the quantized loss function value of the student model is larger than a preset loss function threshold value, determining that reverse training of the student model is not completed, and repeatedly executing the reverse training step of the student model until the quantized loss function value of the student model is smaller than or equal to the preset loss function threshold value.
And S104, identifying the objects to be identified based on the target identification model, and respectively obtaining identification results of the objects to be identified.
Because the parameter quantity of the student model is smaller than that of the teacher model, the corresponding operation speed is faster than that of the teacher model, and if the student model with the smaller parameter quantity is subjected to conventional quantitative training, the precision of the trained model is seriously reduced. In the implementation, the target recognition model obtained by the method of training the student model by using the teacher model does not have high recognition accuracy (the same recognition accuracy as the teacher model), and can ensure the running speed (the same operation speed as the student model).
As can be known from the above analysis, in the target identification method based on the quantization model provided in this embodiment, a teacher model trained in advance is used to identify a plurality of objects to be identified, so as to obtain tag information and probability information of each object to be identified, where the object to be identified belongs to a target object; inputting the label information and the probability information into a student model corresponding to the teacher model, and performing reverse training on the student model based on the label information and the probability information to obtain a target identification model; and identifying the objects to be identified according to the target identification model to respectively obtain identification results of the objects to be identified. By reversely introducing the label information and probability information of the target object based on the distillation knowledge in the training process of the target recognition model, the recognition efficiency and precision of the target recognition model to the large-scale similar target can be effectively improved.
Referring to fig. 3, fig. 3 is a flowchart illustrating an implementation of a target identification method based on a quantization model according to another embodiment of the present application. As can be seen from fig. 3, in this embodiment, compared with the embodiment shown in fig. 1, the specific implementation processes of S303 to S306 are the same as those of S101 to S104, except that S301 to S302 are further included before S303. The details are as follows:
s301, training a plurality of predetermined base models respectively based on a preset number of training samples to obtain training units corresponding to the base models respectively; wherein each training unit comprises a plurality of iteration layers.
S302, obtaining the iterative network search space of the teacher model according to the iterative layers included in the training units.
Illustratively, in the process of training the teacher model, in order to train to obtain a teacher model with higher performance, a regular expression can be introduced into the network structure of the teacher model, and the regular expression can control the teacher model to train to an optimal state and end the training process of the whole teacher model in advance. Although only a few iterative layers of the network are trained so that the teacher model is structured like a small network, the teacher model still contains a larger search space than a small network. The method can improve the performance precision of the teacher model and can also improve the training speed of the teacher model.
And S303, identifying a plurality of objects to be identified through an iterative network search space of the teacher model to obtain label information of each object to be identified, which belongs to a preset category target, and probability information of each object to be identified, which belongs to the preset category target.
S304, inputting the label information and the probability information into a student model corresponding to the teacher model, and performing reverse training on the student model based on the label information and the probability information.
S305, determining that the reverse training of the student model is finished according to the variation of the loss function value of the student model, and setting the student model after the training as the target recognition model.
S306, identifying the objects to be identified based on the target identification model, and respectively obtaining identification results of the objects to be identified.
As can be known from the above analysis, in the target identification method based on the quantization model provided in this embodiment, a teacher model trained in advance is used to identify a plurality of objects to be identified, so as to obtain tag information and probability information of each object to be identified, where the object to be identified belongs to a target object; inputting the label information and the probability information into a student model corresponding to the teacher model, and performing reverse training on the student model based on the label information and the probability information to obtain a target identification model; and identifying the objects to be identified according to the target identification model to respectively obtain identification results of the objects to be identified. By reversely introducing the label information and probability information of the target object based on the distillation knowledge in the training process of the target recognition model, the recognition efficiency and precision of the target recognition model to the large-scale similar target can be effectively improved.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a target recognition apparatus based on a quantization model according to an embodiment of the present application. The target identification device based on the quantization model is used for executing the steps of the target identification method based on the quantization model shown in the embodiment of fig. 1 or fig. 3. The target recognition device based on the quantization model can be a single server or a server cluster, or the target recognition device based on the quantization model can be a terminal, and the terminal can be a handheld terminal, a notebook computer, a wearable device or a robot.
As shown in fig. 4, the object recognition apparatus 400 based on the quantization model includes:
a first obtaining module 401, configured to identify a plurality of objects to be identified through an iterative network search space of a teacher model that is trained in advance, to obtain tag information that each object to be identified belongs to a preset category target and probability information that each object to be identified belongs to the preset category target;
a training module 402, configured to input the label information and the probability information into a student model corresponding to the teacher model, and perform reverse training on the student model based on the label information and the probability information;
a determining module 403, configured to determine that reverse training of the student model is completed according to a variation of a loss function value of the student model, and set the trained student model as the target recognition model;
a second obtaining module 404, configured to identify the objects to be identified based on the target identification model, and obtain an identification result for each object to be identified respectively.
In one embodiment, the method further comprises:
a third obtaining module, configured to train a plurality of predetermined base models based on a preset number of training samples, respectively, to obtain training units corresponding to the base models, respectively; each training unit comprises a plurality of iteration layers respectively;
and the fourth obtaining module is used for obtaining the iterative network search space of the teacher model according to the iterative layers contained in the training units.
In one embodiment, the loss function of the student model is a distillation loss function determined from parameters of the teacher model;
the training module 402 is specifically configured to:
respectively inputting the label information and the probability information into a student model corresponding to the teacher model, and quantizing a loss function value of the student model after parameter updating based on the label information and the probability information according to the gradient change and the learning rate of the loss function of the student model to obtain the quantized loss function value of the student model;
and determining that the reverse training process of the student model is finished according to the magnitude of the quantized loss function value of the student model.
In an embodiment, the inputting the label information and the probability information into a student model corresponding to the teacher model, and quantizing the loss function value of the student model after parameter updating based on the label information and the probability information according to a gradient change and a learning rate of a loss function of the student model includes:
inputting the label information and the probability information into a student model corresponding to the teacher model respectively, and updating parameters of the teacher model based on gradient change and learning rate of a loss function of the student model;
reversely reasoning the label information and probability information output by the teacher model according to the updating result of the parameters of the teacher model;
retraining the student model according to the label information and the probability information obtained by inference, and determining a loss function value of the student model after parameter updating based on the label information and the probability information after inference;
and repeatedly executing the steps of inputting the label information and the probability information into the student models corresponding to the teacher model respectively, and based on the gradient change and the learning rate of the loss functions of the student models, determining the loss function value smaller than the preset loss function threshold value as the quantized loss function value of the student models until the loss function value of the student models after parameter updating based on the label information and the probability information after reasoning is smaller than the preset loss function threshold value.
In one embodiment, the variation size of the loss function value of the student model is represented by the quantized loss function value of the student model;
after determining that the reverse training of the student model is completed according to the variation of the loss function value of the student model, setting the student model after the completion of the training as the target recognition model, including:
and if the quantized loss function value of the student model is smaller than or equal to a preset loss function threshold value, determining that reverse training of the student model is finished, and setting the trained student model as the target recognition model.
In one embodiment, the loss functions of the object recognition model include distillation loss functions for object classification recognition and probability loss functions for object class probability calculation.
In an embodiment, the setting the trained student model as the target recognition model after determining that the reverse training of the student model is completed according to the quantized loss function value of the student model comprises:
if the quantized loss function value of the student model is smaller than or equal to a preset function threshold value, determining that the reverse training of the student model is finished;
and the student model after the reverse training is the target recognition model.
It should be noted that, as will be clear to those skilled in the art, for convenience and brevity of description, the specific working processes of the speech synthesis apparatus and the modules described above may refer to corresponding processes in the target identification method embodiment based on the quantization model described in the embodiment of fig. 1 or fig. 3, and are not described herein again.
The above-described object recognition method based on a quantitative model may be implemented in the form of a computer program that can be run on an apparatus as shown in fig. 4.
Referring to fig. 5, fig. 5 is a schematic block diagram illustrating a structure of a target recognition device based on a quantization model according to an embodiment of the present application. The target recognition device based on the quantitative model comprises a processor, a memory and a network interface which are connected through a system bus, wherein the memory can comprise a nonvolatile storage medium and an internal memory.
The non-volatile storage medium may store an operating system and a computer program. The computer program includes program instructions that, when executed, cause a processor to perform any one of the quantitative model-based object recognition methods.
The processor is used for providing calculation and control capability and supporting the operation of the whole computer equipment.
The internal memory provides an environment for the execution of a computer program on a non-volatile storage medium, which when executed by the processor, causes the processor to perform any one of the quantitative model based object recognition methods.
The network interface is used for network communication, such as sending assigned tasks and the like. Those skilled in the art will appreciate that the configuration shown in fig. 5 is a block diagram of only a portion of the configuration associated with the present application and does not constitute a limitation on the terminal to which the present application is applied, and that a particular terminal may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
It should be understood that the Processor may be a Central Processing Unit (CPU), and the Processor may be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, etc. Wherein a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Wherein, in one embodiment, the processor is configured to execute a computer program stored in the memory to implement the steps of:
identifying a plurality of objects to be identified through an iterative network search space of a pre-trained teacher model to obtain label information of each object to be identified, which belongs to a preset class target, and probability information of each object to be identified, which belongs to the preset class target;
inputting the label information and the probability information into a student model corresponding to the teacher model, and performing reverse training on the student model based on the label information and the probability information;
according to the variation of the loss function value of the student model, after the completion of reverse training of the student model is determined, setting the trained student model as the target recognition model;
and identifying the objects to be identified based on the target identification model to respectively obtain identification results of the objects to be identified.
In an embodiment, before the step of identifying the object to be identified through the iterative network search space of the pre-trained teacher model to obtain the label information of the object to be identified, which belongs to the preset category target, and the probability information of the object to be identified, the method includes:
training a plurality of predetermined base models respectively based on a preset number of training samples to obtain training units corresponding to the base models respectively; each training unit comprises a plurality of iteration layers respectively;
and obtaining the iterative network search space of the teacher model according to the iterative layers contained in the training units.
In one embodiment, the loss function of the student model is a distillation loss function determined from parameters of the teacher model;
the inputting the label information and the probability information into a student model corresponding to the teacher model, and performing reverse training on the student model based on the label information and the probability information comprises:
respectively inputting the label information and the probability information into a student model corresponding to the teacher model, and quantizing a loss function value of the student model after parameter updating based on the label information and the probability information according to the gradient change and the learning rate of the loss function of the student model to obtain the quantized loss function value of the student model;
and determining that the reverse training process of the student model is finished according to the magnitude of the quantized loss function value of the student model.
In an embodiment, the inputting the label information and the probability information into a student model corresponding to the teacher model, and quantizing the loss function value of the student model after parameter updating based on the label information and the probability information according to a gradient change and a learning rate of a loss function of the student model includes:
inputting the label information and the probability information into a student model corresponding to the teacher model respectively, and updating parameters of the teacher model based on gradient change and learning rate of a loss function of the student model;
reversely reasoning the label information and probability information output by the teacher model according to the updating result of the parameters of the teacher model;
retraining the student model according to the label information and the probability information obtained by inference, and determining a loss function value of the student model after parameter updating based on the label information and the probability information after inference;
and repeatedly executing the steps of inputting the label information and the probability information into the student models corresponding to the teacher model respectively, and based on the gradient change and the learning rate of the loss functions of the student models, determining the loss function value smaller than the preset loss function threshold value as the quantized loss function value of the student models until the loss function value of the student models after parameter updating based on the label information and the probability information after reasoning is smaller than the preset loss function threshold value.
In one embodiment, the variation size of the loss function value of the student model is represented by the quantized loss function value of the student model;
after determining that the reverse training of the student model is completed according to the variation of the loss function value of the student model, setting the student model after the completion of the training as the target recognition model, including:
and if the quantized loss function value of the student model is smaller than or equal to a preset loss function threshold value, determining that reverse training of the student model is finished, and setting the trained student model as the target recognition model.
In one embodiment, the loss functions of the object recognition model include distillation loss functions for object classification recognition and probability loss functions for object class probability calculation.
In an embodiment, the obtaining the target recognition model after determining that the reverse training of the student model is completed according to the quantized loss function value of the student model includes:
if the quantized loss function value of the student model is smaller than or equal to a preset function threshold value, determining that the reverse training of the student model is finished;
and the student model after the reverse training is the target recognition model.
A computer-readable storage medium is further provided in an embodiment of the present application, where the computer-readable storage medium stores a computer program, where the computer program includes program instructions, and the processor executes the program instructions to implement the steps of the quantization model-based object identification method provided in the embodiment of fig. 1 or fig. 3 of the present application.
The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiment, for example, a hard disk or a memory of the computer device. The computer readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the computer device.
While the invention has been described with reference to specific embodiments, the scope of the invention is not limited thereto, and those skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the invention. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A method for identifying an object based on a quantization model, the method comprising:
identifying a plurality of objects to be identified through an iterative network search space of a pre-trained teacher model to obtain label information of each object to be identified, which belongs to a preset class target, and probability information of each object to be identified, which belongs to the preset class target;
inputting the label information and the probability information into a student model corresponding to the teacher model, and performing reverse training on the student model based on the label information and the probability information;
according to the variation of the loss function value of the student model, after the completion of reverse training of the student model is determined, setting the trained student model as the target recognition model;
and identifying the objects to be identified based on the target identification model to respectively obtain identification results of the objects to be identified.
2. The method for identifying the target based on the quantitative model as claimed in claim 1, wherein before the step of identifying the target to be identified through the iterative network search space of the teacher model trained in advance to obtain the label information of the target to be identified belonging to the preset category and the probability information of the target belonging to the preset category, the method comprises the following steps:
training a plurality of predetermined base models respectively based on a preset number of training samples to obtain training units corresponding to the base models respectively; each training unit comprises a plurality of iteration layers respectively;
and obtaining the iterative network search space of the teacher model according to the iterative layers contained in the training units.
3. The quantization model-based target recognition method of claim 1 or 2, wherein the loss function of the student model is a distillation loss function determined from parameters of the teacher model;
the inputting the label information and the probability information into a student model corresponding to the teacher model, and performing reverse training on the student model based on the label information and the probability information comprises:
respectively inputting the label information and the probability information into a student model corresponding to the teacher model, and quantizing a loss function value of the student model after parameter updating based on the label information and the probability information according to the gradient change and the learning rate of the loss function of the student model to obtain the quantized loss function value of the student model;
and determining that the reverse training process of the student model is finished according to the magnitude of the quantized loss function value of the student model.
4. The method of claim 3, wherein the inputting the label information and the probability information into a student model corresponding to the teacher model, respectively, and quantifying a loss function value of the student model after parameter updating based on the label information and the probability information according to a gradient change and a learning rate of a loss function of the student model, comprises:
inputting the label information and the probability information into a student model corresponding to the teacher model respectively, and updating parameters of the teacher model based on gradient change and learning rate of a loss function of the student model;
reversely reasoning the label information and probability information output by the teacher model according to the updating result of the parameters of the teacher model;
retraining the student model according to the label information and the probability information obtained by inference, and determining a loss function value of the student model after parameter updating based on the label information and the probability information after inference;
and repeatedly executing the steps of inputting the label information and the probability information into the student models corresponding to the teacher model respectively, and based on the gradient change and the learning rate of the loss functions of the student models, determining the loss function value smaller than the preset loss function threshold value as the quantized loss function value of the student models until the loss function value of the student models after parameter updating based on the label information and the probability information after reasoning is smaller than the preset loss function threshold value.
5. The quantization model-based object recognition method according to claim 4, wherein the variation of the loss function value of the student model is represented by the quantized loss function value of the student model;
after determining that the reverse training of the student model is completed according to the variation of the loss function value of the student model, setting the student model after the completion of the training as the target recognition model, including:
and if the quantized loss function value of the student model is smaller than or equal to a preset loss function threshold value, determining that reverse training of the student model is finished, and setting the trained student model as the target recognition model.
6. The quantization model-based target recognition method of claim 5, wherein the loss function of the target recognition model comprises a distillation loss function for target classification recognition and a probability loss function for target class probability calculation.
7. The method for identifying an object based on a quantized model according to any one of claims 5 or 6, wherein the determining, according to the quantized values of the loss function of the student model, that the object identification model is obtained after the completion of the reverse training of the student model comprises:
if the quantized loss function value of the student model is smaller than or equal to a preset function threshold value, determining that the reverse training of the student model is finished;
and the student model after the reverse training is the target recognition model.
8. An apparatus for identifying a target based on a quantization model, comprising:
the first obtaining module is used for identifying a plurality of objects to be identified through an iterative network search space of a teacher model which is trained in advance to obtain label information of each object to be identified, wherein the label information belongs to a preset class target, and probability information of each object to be identified belongs to the preset class target;
the training module is used for inputting the label information and the probability information into a student model corresponding to the teacher model and carrying out reverse training on the student model based on the label information and the probability information;
the determining module is used for determining that the reverse training of the student model is finished according to the variation of the loss function value of the student model, and setting the student model which is finished in training as the target recognition model;
and the second obtaining module is used for identifying the objects to be identified based on the target identification model and respectively obtaining the identification result of each object to be identified.
9. An object recognition device based on a quantization model, comprising:
a memory and a processor;
the memory is used for storing a computer program;
the processor for executing the computer program and for implementing the steps of the quantitative model based object recognition method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, causes the processor to carry out the steps of the quantitative model-based object recognition method of any one of claims 1 to 7.
CN202110611190.0A 2021-06-01 2021-06-01 Target identification method, device, equipment and storage medium based on quantization model Active CN113240565B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110611190.0A CN113240565B (en) 2021-06-01 2021-06-01 Target identification method, device, equipment and storage medium based on quantization model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110611190.0A CN113240565B (en) 2021-06-01 2021-06-01 Target identification method, device, equipment and storage medium based on quantization model

Publications (2)

Publication Number Publication Date
CN113240565A true CN113240565A (en) 2021-08-10
CN113240565B CN113240565B (en) 2024-05-07

Family

ID=77136260

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110611190.0A Active CN113240565B (en) 2021-06-01 2021-06-01 Target identification method, device, equipment and storage medium based on quantization model

Country Status (1)

Country Link
CN (1) CN113240565B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110472681A (en) * 2019-08-09 2019-11-19 北京市商汤科技开发有限公司 The neural metwork training scheme and image procossing scheme of knowledge based distillation
CN111639710A (en) * 2020-05-29 2020-09-08 北京百度网讯科技有限公司 Image recognition model training method, device, equipment and storage medium
CN112801215A (en) * 2021-03-17 2021-05-14 腾讯科技(深圳)有限公司 Image processing model search, image processing method, image processing apparatus, and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110472681A (en) * 2019-08-09 2019-11-19 北京市商汤科技开发有限公司 The neural metwork training scheme and image procossing scheme of knowledge based distillation
CN111639710A (en) * 2020-05-29 2020-09-08 北京百度网讯科技有限公司 Image recognition model training method, device, equipment and storage medium
CN112801215A (en) * 2021-03-17 2021-05-14 腾讯科技(深圳)有限公司 Image processing model search, image processing method, image processing apparatus, and storage medium

Also Published As

Publication number Publication date
CN113240565B (en) 2024-05-07

Similar Documents

Publication Publication Date Title
CN112633419B (en) Small sample learning method and device, electronic equipment and storage medium
CN112559784B (en) Image classification method and system based on incremental learning
CN111985229B (en) Sequence labeling method and device and computer equipment
CN111382248B (en) Question replying method and device, storage medium and terminal equipment
JP7178513B2 (en) Chinese word segmentation method, device, storage medium and computer equipment based on deep learning
CN111914085A (en) Text fine-grained emotion classification method, system, device and storage medium
KR102250728B1 (en) Sample processing method and device, related apparatus and storage medium
CN112509600A (en) Model training method and device, voice conversion method and device and storage medium
CN112906865B (en) Neural network architecture searching method and device, electronic equipment and storage medium
CN113723618B (en) SHAP optimization method, equipment and medium
CN115080749B (en) Weak supervision text classification method, system and device based on self-supervision training
CN116822651A (en) Large model parameter fine adjustment method, device, equipment and medium based on incremental learning
CN113762508A (en) Training method, device, equipment and medium for image classification network model
CN112307048A (en) Semantic matching model training method, matching device, equipment and storage medium
CN112988840A (en) Time series prediction method, device, equipment and storage medium
JP2022049141A (en) Computation device, computer system, and computation method
CN111611796A (en) Hypernym determination method and device for hyponym, electronic device and storage medium
CN114528391A (en) Method, device and equipment for training question-answer pair scoring model and storage medium
CN112560463B (en) Text multi-labeling method, device, equipment and storage medium
WO2020215581A1 (en) Chinese coding method and apparatus based on bidirectional long short-term memory network model
CN111931841A (en) Deep learning-based tree processing method, terminal, chip and storage medium
CN113450764B (en) Text voice recognition method, device, equipment and storage medium
CN111582302A (en) Vehicle identification method, device, equipment and storage medium
CN113240565B (en) Target identification method, device, equipment and storage medium based on quantization model
CN113010687B (en) Exercise label prediction method and device, storage medium and computer equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant