CN113240565B - Target identification method, device, equipment and storage medium based on quantization model - Google Patents

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

Info

Publication number
CN113240565B
CN113240565B CN202110611190.0A CN202110611190A CN113240565B CN 113240565 B CN113240565 B CN 113240565B CN 202110611190 A CN202110611190 A CN 202110611190A CN 113240565 B CN113240565 B CN 113240565B
Authority
CN
China
Prior art keywords
model
loss function
student
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.)
Active
Application number
CN202110611190.0A
Other languages
Chinese (zh)
Other versions
CN113240565A (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

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

Abstract

The application relates to the technical field of target recognition, and discloses a target recognition method, device, equipment and storage medium based on a quantization model, wherein a plurality of objects to be recognized are recognized through a teacher model which is trained in advance, so that tag information and probability information of the objects to be recognized belonging to the target objects are obtained; inputting the tag 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 tag information and the probability information to obtain a target recognition model; and identifying the objects to be identified according to the target identification model, and respectively obtaining identification results of the objects to be identified. In the training process of the target recognition model, the label information and the probability information of the target object are reversely introduced based on the distillation knowledge, so that the recognition efficiency and the recognition precision of the target recognition model on a large scale of similar targets can be effectively improved.

Description

Target identification method, device, equipment and storage medium based on quantization model
Technical Field
The present application relates to the field of target recognition technologies, and in particular, to a target recognition method, apparatus, device, and storage medium based on a quantization model.
Background
At present, quantization algorithms are mostly applied to the problems of target detection and classification so as to improve the training efficiency and accuracy of a target recognition model. However, in a relatively complex application scenario, for example, there is a high degree of similarity between the target objects, or when the target objects have multiple small changes corresponding to each other, the accuracy of the quantization algorithm often cannot meet the requirement of identifying the target objects with high large-scale similarity.
Disclosure of Invention
The application provides a target recognition method, device, equipment and storage medium based on a quantization model, which can effectively improve the recognition efficiency and accuracy of the target recognition model on large-scale similar targets by introducing label information and probability information of the target objects in the training process of the target recognition model.
In a first aspect, the present application provides 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 teacher model which is trained in advance, and obtaining tag information of each object to be identified belonging to a preset category target and probability information of each object to be identified belonging to the preset category 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;
Determining that the reverse training of the student model is finished according to the change of the loss function value of the student model, and setting the student model after the training is finished as the target recognition model;
and identifying the objects to be identified based on the target identification model, and respectively obtaining identification results of the objects to be identified.
In a second aspect, the present application further provides an object recognition device 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 the teacher model which is trained in advance, and obtaining tag information of each object to be identified belonging to a preset category target and probability information of each object to be identified belonging to the preset category 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 after the reverse training of the student model is completed, the student model after the training is completed is set as the target recognition model according to the change of the loss function value of the student 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 results of the objects to be identified.
In a third aspect, the present application also provides an object recognition 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 implement the steps of the object recognition method based on a quantization model as described in the first aspect above when the computer program is executed.
In a fourth aspect, the present application also 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 object recognition method based on a quantization model as described in the first aspect above.
The application discloses a target identification method, device, equipment and storage medium based on a quantization model, which are characterized in that a plurality of objects to be identified are identified through a teacher model which is trained in advance, so that label information and probability information of the objects to be identified belonging to the target object are obtained; inputting the tag 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 tag information and the probability information to obtain a target recognition model; and identifying the objects to be identified according to the target identification model, and respectively obtaining identification results of the objects to be identified. In the training process of the target recognition model, the label information and the probability information of the target object are reversely introduced based on the distillation knowledge, so that the recognition efficiency and the recognition precision of the target recognition model on a large scale of similar targets can be effectively improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a target recognition method based on a quantization model according to an embodiment of the present application;
FIG. 2 is a flowchart of a specific implementation of S102 in FIG. 1;
FIG. 3 is a flowchart of an implementation of a quantization model-based object recognition method according to another embodiment of the present application;
Fig. 4 is a schematic structural diagram of an object recognition device based on a quantization model according to an embodiment of the present application;
Fig. 5 is a schematic block diagram of a target recognition device based on a quantization model according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The flow diagrams depicted in the figures are merely illustrative and not necessarily all of the elements and operations/steps are included or performed in the order described. For example, some operations/steps may be further divided, combined, or partially combined, so that the order of actual execution may be changed according to actual situations.
It is to be understood that the terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this specification 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 the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
The embodiment of the application provides a target identification method, device and equipment based on a quantization model and a storage medium. According to the target recognition method based on the quantitative model, a plurality of objects to be recognized are recognized through a teacher model which is trained in advance, and tag information and probability information of the objects to be recognized belonging to the target object are obtained; inputting the tag 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 tag information and the probability information to obtain a target recognition model; and identifying the objects to be identified according to the target identification model, and respectively obtaining identification results of the objects to be identified. In the training process of the target recognition model, the label information and the probability information of the target object are reversely introduced based on the distillation knowledge, so that the recognition efficiency and the recognition precision of the target recognition model on a large scale of similar targets can be effectively improved.
Some embodiments of the present application are described in detail below with reference to the accompanying drawings. The following embodiments and features of the embodiments may be combined with each other without conflict.
Referring to fig. 1, fig. 1 is a schematic flowchart of a quantization model-based object recognition method according to an embodiment of the present application. The object recognition method based on the quantization model can be implemented by a server or a terminal, and the server can be a single server or a server cluster. The terminal may be a handheld terminal, a notebook computer, a wearable device, a robot, or the like.
As shown in fig. 1, fig. 1 is a flowchart of an implementation of a quantization model-based object recognition method 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, and obtaining tag information of each object to be identified belonging to a preset category target and probability information of each object to be identified belonging to the preset category target.
Wherein the teacher model is a model with a more complex network structure than the student model; specifically, compared with a 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 operation can also have performance similar to the teacher model. Wherein the simpler network being guided is the student model corresponding to the teacher model.
In this embodiment, the pre-trained teacher model includes an iterative web search space that includes an iterative network element and two output branches. The iteration network unit is used for identifying the object to be identified, one of the two output branches is used for outputting label information of the target object obtained through identification, and the other output branch is used for outputting probability information obtained through identification. Specifically, the tag information of the object to be identified belongs to the target object is used for indicating whether the object to be identified belongs to a preset category target, and the probability information is used for indicating the probability that the object to be identified belongs to the preset category target.
For example, taking the object to be identified as a group to do the pilocarb with different degrees of ghost faces as an example, when the existing target identification model identifies the object to be identified, the output result is the label information of whether the target object is the pilocarb or not, which is only used for indicating that the identification result is the pilocarb or not. For example, a label information output of 1 represents a skin-up, and a label information output of 0 represents a skin-up; however, the skin-card of the face with different degrees has many different characteristics, so that the target recognition model is difficult to output accurate recognition results. In the embodiment of the application, the type of the object to be identified and the probability of the object to be identified can be determined by outputting the label information and the probability information corresponding to the identification result through the teacher model with double output branches, and the probability of the object to be identified belonging to the object is correspondingly higher if a plurality of images containing the object to be identified are identified, so that the identification of the object contained in the plurality of images is facilitated, and the accuracy of identifying the object is facilitated.
For example, if an image including an object to be identified is identified, the output data tag information is (0.9999,0.97), it indicates that the object to be identified is a pilchard and the probability of corresponding to the pilchard is 0.97, and if the output data tag information is (0.4131,0.25), it indicates that the object to be identified is not a pilchard and the probability of corresponding to the pilchard is 0.25, etc.
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 tag 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. Wherein the hard target output corresponds to an output for category identification, and the soft target output is a probability of further judging belonging to the hard target.
In the embodiment of the application, after the tag information and the probability information are obtained, the tag information and the probability information are input into a student model, and the process of carrying out reverse iterative update on the parameters of the student model based on the tag information and the probability information is called as carrying out reverse training on the student model based on the tag information and the probability information.
Illustratively, as shown in FIG. 2, FIG. 2 is a flow chart of a specific implementation of S102 in FIG. 1. As shown in fig. 2, S102 includes S1021 and S1022. The details are as follows:
S1021, 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 gradient change and 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 recognition may be expressed as:
Wherein k represents the number of 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 model, Representing the base model.
The probability loss function for target class probability calculation can be expressed as:
Wherein M is the number of layers lost in calculation, N is the parameter quantity of the layer, y ti is the output value of the corresponding position of the teacher model, and y si is the output value of the corresponding position of the student model.
The loss function of the object recognition model can be expressed as:
L(x)=αLarcloss+βLdistill
Wherein, alpha and beta are super parameters for adjusting the parameter updating precision in the training process of the target recognition model.
In an embodiment, the inputting the tag information and the probability information into the student model corresponding to the teacher model, and quantifying the loss function value of the student model after parameter updating based on the tag information and the probability information according to the gradient change and the learning rate of the loss function of the student model may include:
Respectively inputting the label information and the probability information into a student model corresponding to the teacher model, and updating parameters of the teacher model based on gradient change and learning rate of a loss function of the student model; according to the updating result of the parameters of the teacher model, reversely reasoning the label information and the probability information output by the teacher model; retraining the student model according to the label information and the probability information obtained by reasoning, determining a loss function value after the student model is subjected to parameter updating based on the label information and the probability information obtained by reasoning, repeatedly executing steps of respectively inputting the label information and the probability information into the student model corresponding to the teacher model, and determining the quantized loss function value of the student model based on gradient change and learning rate of the loss function of the student model until the loss function value after the student model is subjected to parameter updating based on the label information and the probability information obtained by reasoning is smaller than a preset loss function threshold value.
Optionally, in training the student model, to ensure that an optimal student model is trained; it may be first determined whether there is a large difference in capacity between the teacher model and the student model, if there is a large difference in capacity between the teacher model and the student model, a TA model (TA model may also be called a teaching aid model) with a capacity between the teacher model and the student model may be introduced, the introduction of the TA model helps to help smooth transition of the capacity between the teacher model and the student model, and the accuracy of the TA model is above (lower than the accuracy of the teacher model, higher than the accuracy of the student model) preferably at the average of the accuracy of the teacher model and the accuracy of the student model; specifically, the network structure of the TA model may be simpler than the teacher model and more complex than the student model, and the specific network structure may be the existing open-source TA model structure, which is not described herein.
And S103, after the reverse training of the student model is determined to be completed according to the change of the loss function value of the student model, setting the trained student model as the target recognition model.
Wherein the loss function of the student model is the distillation loss function for target classification recognition. From the analysis in the previous step S102, the value of the distillation loss function is determined by the parameters of the teacher model; the quantized target loss function of the student model is the loss function of the target recognition model.
Illustratively, the magnitude of the change in the loss function value of the student model may be represented by the quantized loss function value of the student model. Specifically, after determining that the reverse training of the student model is completed according to the magnitude of the change of the loss function value of the student model, setting the student model after the training is completed as the target recognition model may include:
And after the direction training of the student model is determined to be completed according to the magnitude relation between the quantized loss function value of the student model and a preset loss function threshold, setting the trained student model as the target recognition model. Specifically, if the quantized loss function value of the student model is smaller than or equal to a preset loss function threshold, determining that the 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, determining that the 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.
S104, identifying the objects to be identified based on the target identification model, and respectively obtaining identification results of the objects to be identified.
Wherein, 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 smaller parameter quantity is subjected to conventional quantization training, the model accuracy after training is seriously reduced. In this embodiment, the method of training the student model by using the teacher model can obtain the target recognition model which does not have a 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).
According to the analysis, in the target recognition method based on the quantization model, a plurality of objects to be recognized are recognized through a teacher model which is trained in advance, so that tag information and probability information of the objects to be recognized belonging to the target object are obtained; inputting the tag 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 tag information and the probability information to obtain a target recognition model; and identifying the objects to be identified according to the target identification model, and respectively obtaining identification results of the objects to be identified. In the training process of the target recognition model, the label information and the probability information of the target object are reversely introduced based on the distillation knowledge, so that the recognition efficiency and the recognition precision of the target recognition model on a large scale of similar targets can be effectively improved.
Referring to fig. 3, fig. 3 is a flowchart illustrating an implementation of a quantization model-based object recognition method according to another embodiment of the present application. As can be seen from fig. 3, compared with the embodiment shown in fig. 1, the specific implementation procedures of S303 to S306 and S101 to S104 are the same, except that S301 to S302 are further included before S303. The details are as follows:
S301, training 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.
S302, obtaining the iterative network search space of the teacher model according to the iterative layers contained in each training unit.
For example, in the process of training the teacher model, in order to train to obtain the teacher model with higher performance, a regularization expression may be introduced into the network structure of the teacher model, where the regularization expression may control the teacher model to train to the optimal state, and the training process of the whole teacher model is finished in advance. Although only some networks of iterative layers 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 not only can improve the performance precision of the teacher model, but also can improve the training speed of the teacher model.
S303, identifying a plurality of objects to be identified through the iterative network search space of the teacher model to obtain tag information of each object to be identified belonging to a preset category target and probability information of each object to be identified belonging 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, after the reverse training of the student model is determined to be completed according to the change of the loss function value of the student model, setting the student model after the training is completed 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.
According to the analysis, in the target recognition method based on the quantization model, a plurality of objects to be recognized are recognized through a teacher model which is trained in advance, so that tag information and probability information of the objects to be recognized belonging to the target object are obtained; inputting the tag 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 tag information and the probability information to obtain a target recognition model; and identifying the objects to be identified according to the target identification model, and respectively obtaining identification results of the objects to be identified. In the training process of the target recognition model, the label information and the probability information of the target object are reversely introduced based on the distillation knowledge, so that the recognition efficiency and the recognition precision of the target recognition model on a large scale of similar targets can be effectively improved.
Referring to fig. 4, fig. 4 is a schematic structural diagram of an object recognition device based on a quantization model according to an embodiment of the application. The object recognition device based on the quantization model is used for executing the steps of the object recognition method based on the quantization model shown in the embodiment of fig. 1 or fig. 3. The object recognition device based on the quantization model may be a single server or a server cluster, or the object recognition device based on the quantization model may be a terminal, which may be a handheld terminal, a notebook computer, a wearable device, a robot, or the like.
As shown in fig. 4, the object recognition apparatus 400 based on the quantization model includes:
The first obtaining module 401 is 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, so as to obtain tag information of each object to be identified belonging to a preset category target and probability information of each object to be identified belonging to the preset category target;
a training module 402, configured to input the tag 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 tag information and the probability information;
A determining module 403, configured to determine, according to a magnitude of a change in a loss function value of the student model, that after the reverse training of the student model is completed, set the student model after the training is completed as the target recognition model;
and a second obtaining module 404, configured to identify the objects to be identified based on the target identification model, and obtain identification results of the objects to be identified respectively.
In an embodiment, further comprising:
The third obtaining module is used for training 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; wherein each training unit comprises a plurality of iteration layers;
and a fourth obtaining module, configured to obtain the iterative network search space of the teacher model according to the iterative layers included in each training unit.
In one embodiment, the loss function of the student model is a distillation loss function determined by parameters of the teacher model;
The training module 402 is specifically configured to:
respectively inputting the tag 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 of the student model based on the tag information and the probability information according to gradient change and 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 tag information and the probability information into a student model corresponding to the teacher model respectively, quantifying the loss function value of the student model after parameter update based on the tag information and the probability information according to the gradient change and the learning rate of the loss function of the student model, includes:
respectively inputting the label information and the probability information into a student model corresponding to the teacher model, and updating parameters of the teacher model based on gradient change and learning rate of a loss function of the student model;
According to the updating result of the parameters of the teacher model, reversely reasoning the label information and the probability information output by the teacher model;
Retraining the student model according to the label information and the probability information obtained by reasoning, and determining a loss function value of the student model after parameter updating based on the label information and the probability information obtained by reasoning;
And repeatedly executing the steps of respectively inputting the label information and the probability information into a student model corresponding to the teacher model, and changing the gradient and learning rate of the loss function based on 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 value, and determining the loss function value smaller than the preset loss function threshold value as the quantized loss function value of the student model.
In an embodiment, the magnitude of the change in the loss function value of the student model is represented by the quantized loss function value of the student model;
After the reverse training of the student model is determined to be completed according to the change of the loss function value of the student model, setting the student model after the training is completed 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, determining that the reverse training of the student model is completed, and setting the student model after the training is completed as the target recognition model.
In an embodiment, the loss function of the target recognition model includes a distillation loss function for target class recognition and a probability loss function for target class probability calculation.
In an embodiment, after determining that the reverse training of the student model is completed according to the quantized loss function value of the student model, setting the student model after training as the target recognition model includes:
if the quantized loss function value of the student model is smaller than or equal to a preset function threshold, determining that the reverse training of the student model is completed;
the student model after reverse training is the target recognition model.
It should be noted that, for convenience and brevity of description, specific working procedures of the above-described voice synthesis apparatus and each module may refer to corresponding procedures in the embodiment of the quantization model-based object recognition method described in the embodiment of fig. 1 or fig. 3, and are not repeated herein.
The above-described object recognition method based on a quantization model may be implemented in the form of a computer program which can be run on an apparatus as shown in fig. 4.
Referring to fig. 5, fig. 5 is a schematic block diagram of a quantization model-based object recognition apparatus according to an embodiment of the present application. The object recognition device based on the quantization model comprises a processor, a memory and a network interface which are connected by 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 comprises program instructions that, when executed, cause the processor to perform any of a number of quantization model-based methods of object identification.
The processor is used to provide computing and control capabilities to support the operation of the entire computer device.
The internal memory provides an environment for the execution of a computer program in a non-volatile storage medium that, when executed by a processor, causes the processor to perform any of a number of quantization model-based methods of object identification.
The network interface is used for network communication such as transmitting assigned tasks and the like. It will be appreciated by those skilled in the art that the structure shown in fig. 5 is merely a block diagram of a portion of the structure associated with the present inventive arrangements and is not limiting of the terminal to which the present inventive arrangements are applied, and that a particular terminal may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
It should be appreciated that the Processor may be a central processing unit (Central Processing Unit, CPU), it may also be other general purpose processors, digital signal processors (DIGITAL SIGNAL Processor, DSP), application SPECIFIC INTEGRATED Circuit (ASIC), field-Programmable gate array (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like. Wherein the 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 run 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 teacher model which is trained in advance, and obtaining tag information of each object to be identified belonging to a preset category target and probability information of each object to be identified belonging to the preset category 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;
Determining that the reverse training of the student model is finished according to the change of the loss function value of the student model, and setting the student model after the training is finished as the target recognition model;
and identifying the objects to be identified based on the target identification model, and respectively obtaining identification results of the objects to be identified.
In an embodiment, before the identifying the object to be identified in the iterative network search space of the teacher model that is completed through the pre-training to obtain the tag information of the object to be identified belonging to the preset category target and the probability information of the object to be identified belonging to the preset category target, the method includes:
Training 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; wherein each training unit comprises a plurality of iteration layers;
And obtaining the iterative network search space of the teacher model according to the iterative layers contained in each training unit.
In one embodiment, the loss function of the student model is a distillation loss function determined by parameters of the teacher model;
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, wherein the reverse training comprises the following steps:
respectively inputting the tag 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 of the student model based on the tag information and the probability information according to gradient change and 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 tag information and the probability information into a student model corresponding to the teacher model respectively, quantifying the loss function value of the student model after parameter update based on the tag information and the probability information according to the gradient change and the learning rate of the loss function of the student model, includes:
respectively inputting the label information and the probability information into a student model corresponding to the teacher model, and updating parameters of the teacher model based on gradient change and learning rate of a loss function of the student model;
According to the updating result of the parameters of the teacher model, reversely reasoning the label information and the probability information output by the teacher model;
Retraining the student model according to the label information and the probability information obtained by reasoning, and determining a loss function value of the student model after parameter updating based on the label information and the probability information obtained by reasoning;
And repeatedly executing the steps of respectively inputting the label information and the probability information into a student model corresponding to the teacher model, and changing the gradient and learning rate of the loss function based on 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 value, and determining the loss function value smaller than the preset loss function threshold value as the quantized loss function value of the student model.
In an embodiment, the magnitude of the change in the loss function value of the student model is represented by the quantized loss function value of the student model;
After the reverse training of the student model is determined to be completed according to the change of the loss function value of the student model, setting the student model after the training is completed 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, determining that the reverse training of the student model is completed, and setting the student model after the training is completed as the target recognition model.
In an embodiment, the loss function of the target recognition model includes a distillation loss function for target class recognition and a probability loss function for target class probability calculation.
In an embodiment, the determining, according to the quantized loss function value of the student model, that the reverse training of the student model is completed, to obtain the target recognition model includes:
if the quantized loss function value of the student model is smaller than or equal to a preset function threshold, determining that the reverse training of the student model is completed;
the student model after reverse training is the target recognition model.
In an embodiment of the present application, there is further provided a computer readable storage medium, where a computer program is stored, where the computer program includes program instructions, and the processor executes the program instructions to implement the steps of the quantization model-based object recognition 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 according to 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 memory card (SMART MEDIA CARD, SMC), a Secure Digital (SD) card, a flash memory card (FLASH CARD), or the like, which are provided on the computer device.
While the application has been described with reference to certain preferred embodiments, it will be understood by those skilled in the art that various changes and substitutions of equivalents may be made and equivalents will be apparent to those skilled in the art without departing from the scope of the application. Therefore, the protection scope of the application is subject to the protection scope of the claims.

Claims (8)

1. A method for identifying a target based on a quantization model, the method comprising:
Identifying a plurality of objects to be identified through an iterative network search space of a teacher model which is trained in advance, and obtaining tag information of each object to be identified belonging to a preset category target and probability information of each object to be identified belonging to the preset category target;
respectively inputting the label information and the probability information into a student model corresponding to the teacher model, and updating parameters of the teacher model based on gradient change and learning rate of a loss function of the student model;
According to the updating result of the parameters of the teacher model, reversely reasoning the label information and the probability information output by the teacher model;
Retraining the student model according to the label information and the probability information obtained by reasoning, and determining a loss function value of the student model after parameter updating based on the label information and the probability information obtained by reasoning;
repeatedly executing the steps of respectively inputting the label information and the probability information into a student model corresponding to the teacher model, and changing the gradient and learning rate of a loss function based on 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 value, determining the loss function value smaller than the preset loss function threshold value as the quantized loss function value of the student model, and obtaining the quantized loss function value of the student model;
Determining that the reverse training of the student model is finished according to the change of the loss function value of the student model, and setting the student model after the training is finished as a target recognition model;
and identifying the objects to be identified based on the target identification model, and respectively obtaining identification results of the objects to be identified.
2. The method for identifying a target based on a quantization model according to claim 1, wherein before the target to be identified is identified in the iterative network search space of the teacher model completed through pre-training, tag information of the target to be identified belonging to a preset category target and probability information of the target belonging to the preset category target are obtained, the method comprises:
Training 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; wherein each training unit comprises a plurality of iteration layers;
And obtaining the iterative network search space of the teacher model according to the iterative layers contained in each training unit.
3. The quantization model-based object recognition method according to claim 1 or 2, wherein the loss function of the student model is a distillation loss function determined by parameters of the teacher model.
4. The quantization model-based object recognition method according to claim 1, wherein the magnitude of the change in the loss function value of the student model is represented by the quantized loss function value of the student model;
after the reverse training of the student model is determined to be completed according to the change of the loss function value of the student model, setting the student model after the training is completed as a target recognition model, which comprises the following steps:
and if the quantized loss function value of the student model is smaller than or equal to a preset loss function threshold, determining that the reverse training of the student model is completed, and setting the student model after the training is completed as the target recognition model.
5. The quantization model-based object recognition method of claim 4, wherein the loss function of the object recognition model includes a distillation loss function for object classification recognition and a probability loss function for object class probability calculation.
6. An object recognition device 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 the teacher model which is trained in advance, and obtaining tag information of each object to be identified belonging to a preset category target and probability information of each object to be identified belonging to the preset category target;
The training module is used for respectively inputting the label information and the probability information into a student model corresponding to the teacher model, and updating parameters of the teacher model based on gradient change and learning rate of a loss function of the student model; according to the updating result of the parameters of the teacher model, reversely reasoning the label information and the probability information output by the teacher model; retraining the student model according to the label information and the probability information obtained by reasoning, and determining a loss function value of the student model after parameter updating based on the label information and the probability information obtained by reasoning; repeatedly executing the steps of respectively inputting the label information and the probability information into a student model corresponding to the teacher model, and changing the gradient and learning rate of a loss function based on 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 value, determining the loss function value smaller than the preset loss function threshold value as the quantized loss function value of the student model, and obtaining the quantized loss function value of the student model;
The determining module is used for determining that the student model is set as a target recognition model after the reverse training of the student model is completed according to the change of the loss function value of the student 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 results of the objects to be identified.
7. 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 quantization model based object identification method according to any of claims 1 to 5 when the computer program is executed.
8. A computer readable storage medium, characterized in that it stores a computer program which, when executed by a processor, causes the processor to implement the steps of the object recognition method based on a quantization model according to any one of claims 1 to 5.
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 CN113240565A (en) 2021-08-10
CN113240565B true 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
CN113240565A (en) 2021-08-10

Similar Documents

Publication Publication Date Title
CN111985229B (en) Sequence labeling method and device and computer equipment
CN111275175B (en) Neural network training method, device, image classification method, device and medium
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
CN110598869B (en) Classification method and device based on sequence model and electronic equipment
CN114925320B (en) Data processing method and related device
TWI831016B (en) Machine learning method, machine learning system and non-transitory computer-readable storage medium
CN113723618B (en) SHAP optimization method, equipment and medium
CN112906865B (en) Neural network architecture searching method and device, electronic equipment and storage medium
CN112149809A (en) Model hyper-parameter determination method and device, calculation device and medium
CN113762508A (en) Training method, device, equipment and medium for image classification network model
US11580393B2 (en) Method and apparatus with neural network data input and output control
CN114330588A (en) Picture classification method, picture classification model training method and related device
CN111611796A (en) Hypernym determination method and device for hyponym, electronic device and storage medium
CN112988964B (en) Text prosody boundary prediction method, device, equipment and storage medium
CN114266252A (en) Named entity recognition method, device, equipment and storage medium
CN112560463B (en) Text multi-labeling method, device, equipment and storage medium
CN111788582B (en) Electronic apparatus and control method thereof
WO2020215581A1 (en) Chinese coding method and apparatus based on bidirectional long short-term memory network model
CN113240565B (en) Target identification method, device, equipment and storage medium based on quantization model
CN113450764B (en) Text voice recognition method, device, equipment and storage medium
CN113010687B (en) Exercise label prediction method and device, storage medium and computer equipment
CN115062769A (en) Knowledge distillation-based model training method, device, equipment and storage medium
CN115202879A (en) Multi-type intelligent model-based cloud edge collaborative scheduling method and application

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