CN112784903B - Method, device and equipment for training target recognition model - Google Patents

Method, device and equipment for training target recognition model Download PDF

Info

Publication number
CN112784903B
CN112784903B CN202110102511.4A CN202110102511A CN112784903B CN 112784903 B CN112784903 B CN 112784903B CN 202110102511 A CN202110102511 A CN 202110102511A CN 112784903 B CN112784903 B CN 112784903B
Authority
CN
China
Prior art keywords
alternative
recognition model
sample
label
training
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
CN202110102511.4A
Other languages
Chinese (zh)
Other versions
CN112784903A (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.)
Shanghai Minglue Artificial Intelligence Group Co Ltd
Original Assignee
Shanghai Minglue Artificial Intelligence Group 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 Shanghai Minglue Artificial Intelligence Group Co Ltd filed Critical Shanghai Minglue Artificial Intelligence Group Co Ltd
Priority to CN202110102511.4A priority Critical patent/CN112784903B/en
Publication of CN112784903A publication Critical patent/CN112784903A/en
Application granted granted Critical
Publication of CN112784903B publication Critical patent/CN112784903B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/07Target detection
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Abstract

The application relates to the technical field of artificial intelligence and discloses a method for training a target recognition model. The method comprises the following steps: obtaining a training sample; the training samples comprise a first label sample, a second label sample and a label-free sample; the label samples comprise a first label sample and a second label sample; obtaining a first alternative identification model according to the first label sample; obtaining a second alternative identification model according to the second label sample and the first alternative identification model; obtaining a third alternative identification model according to the label-free sample and the second alternative identification model; and obtaining a target recognition model according to the third alternative recognition model. The training samples are obtained to train the preset recognition model, so that the recognition accuracy of the third alternative recognition model to the similar targets of the unlabeled samples can be improved, and the recognition accuracy of the target recognition model to the similar targets of the long tail samples is improved. The application also discloses a device and equipment for training the target recognition model.

Description

Method, device and equipment for training target recognition model
Technical Field
The present application relates to the field of artificial intelligence, and for example, to a method, apparatus, and device for training a target recognition model.
Background
The object type is recognized as an indispensable link in many artificial intelligence processing processes, and along with the development of a machine learning algorithm, the object type can be automatically recognized by utilizing a neural network model. The long tail samples are samples with low sample number, and compared with the number of other training samples, the training samples of the long tail object are fewer, so that the trained neural network model is difficult to effectively identify targets of the same type of the long tail samples.
In the process of implementing the embodiments of the present disclosure, it is found that at least the following problems exist in the related art: in the prior art, the accuracy of the identification result of the similar targets of the long tail sample is low.
Disclosure of Invention
The following presents a simplified summary in order to provide a basic understanding of some aspects of the disclosed embodiments. This summary is not an extensive overview, and is intended to neither identify key/critical elements nor delineate the scope of such embodiments, but is intended as a prelude to the more detailed description that follows.
The embodiment of the disclosure provides a method, a device and equipment for training a target recognition model, so that the recognition accuracy of the target recognition model on similar targets of long tail samples can be improved.
In some embodiments, the method for training a target recognition model comprises:
obtaining a training sample; the training samples comprise a first label sample, a second label sample and a label-free sample; the first label sample is a label sample with the quantity ratio reaching a preset value in the training sample; the second label samples are label samples with the quantity ratio lower than the preset value in the training samples;
obtaining a first alternative identification model according to the first label sample;
obtaining the second alternative identification model according to the second label sample and the first alternative identification model;
obtaining a third alternative identification model according to the label-free sample and the second alternative identification model;
and obtaining a target recognition model according to the third alternative recognition model.
In some embodiments, the apparatus comprises: a processor and a memory storing program instructions, the processor being configured to perform the above-described method for training a target recognition model when executing the program instructions.
The method, the device and the equipment for training the target recognition model provided by the embodiment of the disclosure can realize the following technical effects: according to the scheme, the first label sample is obtained, the preset recognition model is trained to obtain the first alternative recognition model, and the recognition accuracy of the first alternative recognition model to the similar targets of the first label sample can be improved; training the first alternative recognition model through the second label sample to obtain a second alternative recognition model, so that the recognition accuracy of the second alternative recognition model to the similar targets of the second label sample can be improved; the second alternative recognition model is trained through the unlabeled sample to obtain a third alternative recognition model, and the recognition accuracy of the third alternative recognition model to the unlabeled sample similar target can be improved, so that the recognition accuracy of the target recognition model to the long tail sample similar target is improved.
The foregoing general description and the following description are exemplary and explanatory only and are not restrictive of the application.
Drawings
One or more embodiments are illustrated by way of example and not limitation in the figures of the accompanying drawings, in which like references indicate similar elements, and in which like reference numerals refer to similar elements, and in which:
FIG. 1 is a schematic diagram of a method for training a target recognition model provided by an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of an apparatus for training a target recognition model provided in an embodiment of the present disclosure.
Detailed Description
So that the manner in which the features and techniques of the disclosed embodiments can be understood in more detail, a more particular description of the embodiments of the disclosure, briefly summarized below, may be had by reference to the appended drawings, which are not intended to be limiting of the embodiments of the disclosure. In the following description of the technology, for purposes of explanation, numerous details are set forth in order to provide a thorough understanding of the disclosed embodiments. However, one or more embodiments may still be practiced without these details. In other instances, well-known structures and devices may be shown simplified in order to simplify the drawing.
The terms first, second and the like in the description and in the claims of the embodiments of the disclosure and in the above-described figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate in order to describe embodiments of the present disclosure. Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion.
The term "plurality" means two or more, unless otherwise indicated.
In the embodiment of the present disclosure, the character "/" indicates that the front and rear objects are an or relationship. For example, A/B represents: a or B.
The term "and/or" is an associative relationship that describes an object, meaning that there may be three relationships. For example, a and/or B, represent: a or B, or, A and B.
Referring to fig. 1, an embodiment of the present disclosure provides a method for training a target recognition model, including:
step S101, obtaining a training sample; the training samples comprise a first label sample, a second label sample and a label-free sample;
step S102, a first alternative identification model is obtained according to a first label sample;
step S103, a second alternative identification model is obtained according to the second label sample and the first alternative identification model;
step S104, a third alternative recognition model is obtained according to the label-free sample and the second alternative recognition model;
step S105, obtaining a target recognition model according to the third candidate recognition model.
By adopting the method for training the target recognition model, which is provided by the embodiment of the application, the first alternative recognition model is obtained by training the preset recognition model by acquiring the first label sample, so that the recognition accuracy of the first alternative recognition model to the similar targets of the first label sample can be improved; training the first alternative recognition model through the second label sample to obtain a second alternative recognition model, so that the recognition accuracy of the second alternative recognition model to the similar targets of the second label sample can be improved; the second alternative recognition model is trained through the unlabeled sample to obtain a third alternative recognition model, and the recognition accuracy of the third alternative recognition model to the unlabeled sample similar target can be improved, so that the recognition accuracy of the target recognition model to the long tail sample similar target is improved.
Obtaining a training sample; the training samples comprise a first label sample, a second label sample and a label-free sample; the first label sample is a label sample with the quantity ratio reaching a preset value in the training sample; the second label samples are label samples with the quantity ratio lower than the preset value in the training samples;
optionally, the first label sample is a label sample with a number ratio reaching a preset value in the training sample, and the second label sample is a label sample with a number ratio lower than the preset value in the training sample. Optionally, the preset value is 0.1%.
In some embodiments, the first label swatch is a non-long tail object swatch and the second label swatch is a long tail object swatch.
Optionally, obtaining a first alternative identification model from the first label sample includes: training a preset recognition model according to the first label sample to obtain a first recognition result; acquiring a first loss value of a first identification result according to a preset first loss function; and determining a first alternative identification model according to the first loss value.
Alternatively, the preset recognition model is Resnet (residual network model), VGG (Visual Geometry Group ), or GoogLeNet.
Optionally, the first loss function isOptionally by calculationObtaining a first loss value of the first recognition result, wherein θ is a parameter of a preset recognition model, log L (θ) is the first loss value of the first recognition result under the parameter θ, and P θ (x 1 Y) is the first recognition result under the parameter θ, x 1 For the first label sample, y is the target identification type. Alternatively, by calculating P θ (x 1 ,y)=P θ (x 1 |y) P (y) obtaining a first recognition result under the parameter θ, wherein P θ (x 1 |y) is the first label sample x 1 Probability of being identified as class y, P (y) being the target identification typeProbability of class y.
Optionally, the target recognition type is a type of target object to be recognized. In some embodiments, the target object to be identified is a quick-release product such as a beverage, food, or the like. In some embodiments, the target identification type is a type of beverage, such as: cola, snow green, etc.
Optionally, determining the first alternative identification model according to the first loss value includes: and determining a first alternative identification model according to the first loss value and the first determination link. Optionally, the first determining step includes: acquiring a first gradient value of a first loss value; adjusting parameters of a preset recognition model according to the first gradient value to determine a first adjustment recognition model; training the first adjustment recognition model according to the first label sample to obtain a first adjustment recognition result; acquiring a first adjustment loss value of a first adjustment identification result; and determining a first alternative identification model according to the first adjustment loss value.
Optionally, deriving the first loss value yields a first gradient value.
Optionally, adjusting parameters of the preset recognition model according to the first gradient value includes: by calculating theta 1 Obtaining the parameter θ of the first adjustment identification model by=θ+g 1 Wherein θ 1 And for the first adjustment of parameters of the identification model, θ is a parameter in a preset identification model, and g is a first gradient value.
In some embodiments, the preset recognition model is Resnet, and the parameter θ in Resnet includes LR (Learning Rate), BS (Batch Size), N (Number of iterations), and the like. For example, the first gradient value is-3, and the parameters of the first adjustment identification model are LR-3, BS-3, N-3, etc.
Optionally, determining the first alternative identification model according to the first adjustment loss value includes: determining a first adjustment recognition model corresponding to the first adjustment loss value as a first alternative recognition model under the condition that the first adjustment loss value is smaller than or equal to a first set threshold value; and repeatedly executing the first determining link under the condition that the first adjustment loss value is larger than the first set threshold value until the obtained first adjustment loss value is smaller than or equal to the first set threshold value.
In this way, the first alternative recognition model is obtained by training the preset recognition model through the first label sample, and the recognition accuracy of the first alternative recognition model on the similar targets of the first label sample can be improved.
Optionally, obtaining a second alternative recognition model from the second label sample and the first alternative recognition model includes: training the first alternative identification model according to the second label sample to obtain a second identification result; acquiring a second loss value of a second identification result according to a preset second loss function; and determining a second alternative identification model according to the second loss value.
Optionally, the second loss function isOptionally by calculationObtaining a second loss value of a second recognition result, wherein θ 1 For parameters of the first alternative recognition model, log L (θ 1 ) To be at the parameter theta 1 Second loss value of the second recognition result, < ->To be at the parameter theta 1 The second recognition result, x 2 For the second label sample, y is the target identification type. Optionally by calculationObtaining the parameter theta 1 A second recognition result below, wherein +.>For the second label sample x 2 The probability of being identified as class y, P (y) being the probability of the target identification type being class y.
Optionally, determining a second alternative identification model according to the second loss value includes: and determining a second alternative identification model according to the second loss value and the second determination link. Optionally, the second determining step includes: acquiring a second gradient value of the second loss value; adjusting parameters of the first alternative identification model according to the second gradient value to determine a second adjustment identification model; training the second adjustment recognition model according to the second label sample to obtain a second adjustment recognition result; acquiring a second adjustment loss value of a second adjustment identification result; and determining a second alternative identification model according to the second adjustment loss value.
Optionally, deriving the second loss value yields a second gradient value.
Optionally, adjusting the parameters of the first alternative recognition model according to the second gradient value includes: by calculating theta 2 =θ 1 +g 1 Obtaining the parameter theta of the second adjustment identification model 2 Wherein θ 2 For first adjusting parameters of the recognition model, θ 1 G for parameters in the first alternative recognition model 1 Is the second gradient value.
Optionally, determining a second alternative identification model according to the second adjustment loss value includes: determining a second adjustment recognition model corresponding to the second adjustment loss value as a second alternative recognition model under the condition that the second adjustment loss value is smaller than or equal to a second set threshold value; and repeating the second determining step until the obtained second adjustment loss value is smaller than or equal to the second set threshold value under the condition that the second adjustment loss value is larger than the second set threshold value.
In this way, the second alternative recognition model is obtained by training the first alternative recognition model through the second label sample, and the recognition accuracy of the second alternative recognition model to the similar targets of the second label sample can be improved.
Optionally, obtaining the target recognition model according to the third candidate recognition model includes: and taking the third alternative identification model as the target identification model under the condition that the third alternative identification model meets the preset condition.
Optionally, in a case that the third alternative recognition model meets the preset condition, taking the third alternative recognition model as the target recognition model includes: obtaining a test sample; testing the third alternative model according to the test sample to obtain a test result; and taking the third alternative recognition model as the target recognition model under the condition that the test result meets the preset condition.
Optionally, the test result meets a preset condition, including a recognition accuracy of 90% for the test result.
Optionally, obtaining a third alternative recognition model from the unlabeled exemplar and the second alternative recognition model includes: training the second alternative recognition model according to the label-free sample to obtain a third recognition result; acquiring a third loss value of a third identification result according to a preset third loss function; and determining a third alternative identification model according to the third loss value.
Optionally, the third loss function isAlternatively, by calculating +.>Obtaining a third loss value of a third recognition result, wherein θ 2 For parameters of the second alternative recognition model, log L (θ 2 ) To be at the parameter theta 2 A third loss value for the third recognition result,to be at the parameter theta 2 Third recognition result below->The total probability that a sample is identified as a target identification type for no tags. Alternatively, by calculating +.>Obtaining a total probability that the unlabeled exemplar is identified as the target identification type, wherein +.>As unlabeled exemplar x 3 Identified as C 1 The probability of a class is determined by,P(C 1 ) Identifying type C for the target 1 Probability of class->As unlabeled exemplar x 3 Identified as C 2 Probability of class, P (C 2 ) Identifying type C for the target 2 Probability of class, x 3 Is a no-label sample.
Optionally, determining a third alternative identification model according to the third loss value includes: and determining a third alternative identification model according to a third determination link according to the third loss value. Optionally, the third determining step includes: acquiring a third gradient value of the third loss value; adjusting parameters of the second alternative recognition model according to the third gradient value to determine a third adjustment recognition model; training the third adjustment recognition model according to the label-free sample to obtain a third adjustment recognition result; acquiring a third adjustment loss value of a third adjustment identification result; and determining a third alternative identification model according to the third adjustment loss value.
Optionally, deriving the third loss value yields a third gradient value.
Optionally, adjusting the parameters of the second alternative identification model according to the third gradient value includes: by calculating theta 3 =θ 2 +g 2 Obtaining the parameter theta of the third adjustment identification model 3 Wherein θ 3 For third adjustment of parameters of the recognition model, θ 2 G for parameters in the second alternative recognition model 2 And is the third gradient value.
Optionally, determining a third alternative identification model according to the third adjustment loss value includes: when the third adjustment loss value is smaller than or equal to a third set threshold value, determining a third adjustment identification model corresponding to the third adjustment loss value as a third alternative identification model; and repeating the third determining step until the obtained third adjustment loss value is smaller than or equal to the third set threshold value under the condition that the third adjustment loss value is larger than the third set threshold value.
In this way, the second alternative recognition model is trained through the unlabeled sample to obtain the third alternative recognition model, and the recognition accuracy of the third alternative recognition model to the similar targets of the unlabeled sample can be improved.
Training is carried out to predetermining the recognition model through weighing apparatus training sample among the prior art, because first label sample quantity is greater than the quantity of second label sample, and the mode of balanced training sample has two kinds, includes: equalizing the training samples in a manner that reduces the number of first label samples; or, the training samples are equalized by increasing the number of second label samples. If the training samples are balanced in a mode of reducing the number of the first label samples, then training the preset recognition model easily causes that the trained recognition model cannot meet the user requirements; it is easy to incur high costs if training samples are balanced by increasing the number of second label samples. If the preset recognition model is trained in an unbalanced training sample mode, the number of iterations is too small when the model is trained due to unbalanced samples, so that the recognition accuracy of the trained recognition model is low, and the requirements of users cannot be met.
According to the scheme, the first alternative identification model is obtained by acquiring the first label sample and training the preset identification model, so that the identification accuracy of the first alternative identification model to the first label sample can be improved; training the first alternative identification model through the second label sample to obtain a second alternative identification model, so that the identification accuracy of the second alternative identification model to the second label sample can be improved; training the second alternative identification model through the label-free sample to obtain a third alternative identification model, so that the identification accuracy of the third alternative identification model to the label-free sample can be improved; the target recognition model can be obtained according to the third alternative recognition model, so that the recognition accuracy of the target recognition model on similar targets of long tail samples can be improved.
As shown in connection with FIG. 2, embodiments of the present disclosure provide an apparatus for training a target recognition model, including a processor (processor) 100 and a memory (memory) 101 storing program instructions. Optionally, the apparatus may further comprise a communication interface (Communication Interface) 102 and a bus 103. The processor 100, the communication interface 102, and the memory 101 may communicate with each other via the bus 103. The communication interface 102 may be used for information transfer. Processor 100 may invoke program instructions in memory 101 to perform the method for object recognition model training of the above-described embodiments.
Further, the program instructions in the memory 101 described above may be implemented in the form of software functional units and sold or used as a separate product, and may be stored in a computer-readable storage medium.
The memory 101 is a computer readable storage medium that can be used to store a software program, a computer executable program, such as program instructions/modules corresponding to the methods in the embodiments of the present disclosure. The processor 100 executes functional applications and data processing by running program instructions/modules stored in the memory 101, i.e. implements the method for training the object recognition model in the above-described embodiments.
The memory 101 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, at least one application program required for a function; the storage data area may store data created according to the use of the terminal device, etc. Further, the memory 101 may include a high-speed random access memory, and may also include a nonvolatile memory.
By adopting the device for training the target recognition model, which is provided by the embodiment of the application, the first alternative recognition model is obtained by training the preset recognition model by acquiring the first label sample, so that the recognition accuracy of the first alternative recognition model to the similar targets of the first label sample can be improved; training the first alternative recognition model through the second label sample to obtain a second alternative recognition model, so that the recognition accuracy of the second alternative recognition model to the similar targets of the second label sample can be improved; the second alternative recognition model is trained through the unlabeled sample to obtain a third alternative recognition model, and the recognition accuracy of the third alternative recognition model to the unlabeled sample similar target can be improved, so that the recognition accuracy of the target recognition model to the long tail sample similar target is improved.
The embodiment of the disclosure provides equipment comprising the device for training the target recognition model. The device trains the preset recognition model by acquiring the first label sample to obtain a first alternative recognition model, so that the recognition accuracy of the first alternative recognition model to the similar targets of the first label sample can be improved; training the first alternative recognition model through the second label sample to obtain a second alternative recognition model, so that the recognition accuracy of the second alternative recognition model to the similar targets of the second label sample can be improved; the second alternative recognition model is trained through the unlabeled sample to obtain a third alternative recognition model, and the recognition accuracy of the third alternative recognition model to the unlabeled sample similar target can be improved, so that the recognition accuracy of the target recognition model to the long tail sample similar target is improved.
Alternatively, the device is a computer or the like.
Embodiments of the present disclosure provide a computer readable storage medium storing computer executable instructions configured to perform the above-described method for training a target recognition model.
The disclosed embodiments provide a computer program product comprising a computer program stored on a computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, cause the computer to perform the above-described method for training a target recognition model.
The computer readable storage medium may be a transitory computer readable storage medium or a non-transitory computer readable storage medium.
Embodiments of the present disclosure may be embodied in a software product stored on a storage medium, including one or more instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of a method according to embodiments of the present disclosure. And the aforementioned storage medium may be a non-transitory storage medium including: a plurality of media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or a transitory storage medium.
The above description and the drawings illustrate embodiments of the disclosure sufficiently to enable those skilled in the art to practice them. Other embodiments may involve structural, logical, electrical, process, and other changes. The embodiments represent only possible variations. Individual components and functions are optional unless explicitly required, and the sequence of operations may vary. Portions and features of some embodiments may be included in, or substituted for, those of others. Moreover, the terminology used in the present application is for the purpose of describing embodiments only and is not intended to limit the claims. As used in the description of the embodiments and the claims, the singular forms "a," "an," and "the" (the) are intended to include the plural forms as well, unless the context clearly indicates otherwise. Similarly, the term "and/or" as used in this disclosure is meant to encompass any and all possible combinations of one or more of the associated listed. Furthermore, when used in the present disclosure, the terms "comprises," "comprising," and/or variations thereof, mean that the recited features, integers, steps, operations, elements, and/or components are present, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. Without further limitation, an element defined by the phrase "comprising one …" does not exclude the presence of other like elements in a process, method or apparatus comprising such elements. In this context, each embodiment may be described with emphasis on the differences from the other embodiments, and the same similar parts between the various embodiments may be referred to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method sections disclosed in the embodiments, the description of the method sections may be referred to for relevance.
Those of skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. The skilled artisan may use different methods for each particular application to achieve the described functionality, but such implementation should not be considered to be beyond the scope of the embodiments of the present disclosure. It will be clearly understood by those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
In the embodiments disclosed herein, the disclosed methods, articles of manufacture (including but not limited to devices, apparatuses, etc.) may be practiced in other ways. For example, the apparatus embodiments described above are merely illustrative, and for example, the division of the units may be merely a logical function division, and there may be additional divisions when actually implemented, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. In addition, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interface, device or unit indirect coupling or communication connection, which may be in electrical, mechanical or other form. The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to implement the present embodiment. In addition, each functional unit in the embodiments of the present disclosure may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. In the description corresponding to the flowcharts and block diagrams in the figures, operations or steps corresponding to different blocks may also occur in different orders than that disclosed in the description, and sometimes no specific order exists between different operations or steps. For example, two consecutive operations or steps may actually be performed substantially in parallel, they may sometimes be performed in reverse order, which may be dependent on the functions involved. Each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.

Claims (10)

1. A method for training a target recognition model, comprising:
obtaining a training sample; the training samples comprise a first label sample, a second label sample and a label-free sample; the first label sample is a label sample with the quantity ratio reaching a preset value in the training sample; the second label samples are label samples with the quantity ratio lower than the preset value in the training samples;
obtaining a first alternative identification model according to the first label sample;
obtaining a second alternative identification model according to the second label sample and the first alternative identification model;
obtaining a third alternative identification model according to the label-free sample and the second alternative identification model;
obtaining a target recognition model according to the third alternative recognition model; the target recognition model is used for recognizing the type of the target object.
2. The method of claim 1, wherein obtaining a first alternative identification model from the first label sample comprises:
training a preset recognition model according to the first label sample to obtain a first recognition result;
acquiring a first loss value of the first identification result according to a preset first loss function;
and determining a first alternative identification model according to the first loss value.
3. The method of claim 2, wherein determining a first alternative recognition model from the first loss value comprises:
acquiring a first gradient value of the first loss value;
adjusting parameters of the preset recognition model according to the first gradient value to determine a first adjustment recognition model;
training the first adjustment recognition model according to the first label sample to obtain a first adjustment recognition result;
acquiring a first adjustment loss value of the first adjustment identification result;
and determining a first alternative identification model according to the first adjustment loss value.
4. The method of claim 1, wherein obtaining the second alternative identification model from the second label sample and the first alternative identification model comprises:
training the first alternative identification model according to the second label sample to obtain a second identification result;
acquiring a second loss value of the second identification result according to a preset second loss function;
and determining a second alternative identification model according to the second loss value.
5. The method of claim 4, wherein determining a second alternative recognition model from the second loss value comprises:
acquiring a second gradient value of the second loss value;
adjusting the parameters of the first alternative identification model according to the second gradient value to determine a second adjustment identification model;
training the second adjustment recognition model according to the second label sample to obtain a second adjustment recognition result;
acquiring a second adjustment loss value of the second adjustment identification result;
and determining a second alternative identification model according to the second adjustment loss value.
6. The method of claim 1, wherein obtaining a target recognition model from the third candidate recognition model comprises:
and taking the third alternative identification model as a target identification model under the condition that the third alternative identification model meets the preset condition.
7. The method according to any one of claims 1 to 6, wherein obtaining a third alternative identification model from the unlabeled exemplar and the second alternative identification model comprises:
training the second alternative recognition model according to the label-free sample to obtain a third recognition result;
obtaining a third loss value of the third identification result according to a preset third loss function;
and determining a third alternative identification model according to the third loss value.
8. The method of claim 7, wherein determining a third alternative recognition model from the third loss value comprises:
acquiring a third gradient value of the third loss value;
adjusting the parameters of the second alternative recognition model according to the third gradient value to determine a third adjustment recognition model;
training the third adjustment recognition model according to the label-free sample to obtain a third adjustment recognition result;
acquiring a third adjustment loss value of the third adjustment identification result;
and determining a third alternative identification model according to the third adjustment loss value.
9. An apparatus for object recognition model training, comprising a processor and a memory storing program instructions, wherein the processor is configured to, when executing the program instructions, perform the method for object recognition model training of any of claims 1 to 8.
10. An apparatus comprising the device for training the object recognition model of claim 9.
CN202110102511.4A 2021-01-26 2021-01-26 Method, device and equipment for training target recognition model Active CN112784903B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110102511.4A CN112784903B (en) 2021-01-26 2021-01-26 Method, device and equipment for training target recognition model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110102511.4A CN112784903B (en) 2021-01-26 2021-01-26 Method, device and equipment for training target recognition model

Publications (2)

Publication Number Publication Date
CN112784903A CN112784903A (en) 2021-05-11
CN112784903B true CN112784903B (en) 2023-12-12

Family

ID=75757776

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110102511.4A Active CN112784903B (en) 2021-01-26 2021-01-26 Method, device and equipment for training target recognition model

Country Status (1)

Country Link
CN (1) CN112784903B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111428757A (en) * 2020-03-05 2020-07-17 支付宝(杭州)信息技术有限公司 Model training method, abnormal data detection method and device and electronic equipment
CN111461164A (en) * 2020-02-25 2020-07-28 清华大学 Sample data set capacity expansion method and model training method
CN111582185A (en) * 2020-05-11 2020-08-25 北京百度网讯科技有限公司 Method and apparatus for recognizing image
CN111667066A (en) * 2020-04-23 2020-09-15 北京旷视科技有限公司 Network model training and character recognition method and device and electronic equipment
CN111931931A (en) * 2020-09-29 2020-11-13 杭州迪英加科技有限公司 Deep neural network training method and device for pathology full-field image

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111461164A (en) * 2020-02-25 2020-07-28 清华大学 Sample data set capacity expansion method and model training method
CN111428757A (en) * 2020-03-05 2020-07-17 支付宝(杭州)信息技术有限公司 Model training method, abnormal data detection method and device and electronic equipment
CN111667066A (en) * 2020-04-23 2020-09-15 北京旷视科技有限公司 Network model training and character recognition method and device and electronic equipment
CN111582185A (en) * 2020-05-11 2020-08-25 北京百度网讯科技有限公司 Method and apparatus for recognizing image
CN111931931A (en) * 2020-09-29 2020-11-13 杭州迪英加科技有限公司 Deep neural network training method and device for pathology full-field image

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Overcoming Classifier Imbalance for Long-tail Object Detection with Balanced Group Softmax;Yu Li et al;《reaarXiv: 2006.10408v1》;第1-12页 *
使用少量有标签样本学习的方法;熊智翔等;《计算机应用》;第11-15页 *

Also Published As

Publication number Publication date
CN112784903A (en) 2021-05-11

Similar Documents

Publication Publication Date Title
CN108737406B (en) Method and system for detecting abnormal flow data
CN113688042B (en) Determination method and device of test scene, electronic equipment and readable storage medium
CN109858476B (en) Tag expansion method and electronic equipment
CN110298035B (en) Word vector definition method, device, equipment and storage medium based on artificial intelligence
CN116629275B (en) Intelligent decision support system and method based on big data
CN111428493A (en) Entity relationship acquisition method, device, equipment and storage medium
CN111858843B (en) Text classification method and device
CN111461164B (en) Sample data set capacity expansion method and model training method
CN107491536B (en) Test question checking method, test question checking device and electronic equipment
CN110134777B (en) Question duplication eliminating method and device, electronic equipment and computer readable storage medium
CN111666761A (en) Fine-grained emotion analysis model training method and device
CN113590764B (en) Training sample construction method and device, electronic equipment and storage medium
CN108460098A (en) Information recommendation method, device and computer equipment
CN111931809A (en) Data processing method and device, storage medium and electronic equipment
CN112307860A (en) Image recognition model training method and device and image recognition method and device
CN111639185B (en) Relation information extraction method, device, electronic equipment and readable storage medium
CN112308148A (en) Defect category identification and twin neural network training method, device and storage medium
CN104966109A (en) Medical laboratory report image classification method and apparatus
CN111104897A (en) Training method and device for child face recognition model and storage medium
CN112784903B (en) Method, device and equipment for training target recognition model
CN113723431B (en) Image recognition method, apparatus and computer readable storage medium
CN116089616A (en) Theme text acquisition method, device, equipment and storage medium
CN111860554A (en) Risk monitoring method and device, storage medium and electronic equipment
CN111488452A (en) Webpage tampering detection method, detection system and related equipment
CN109359274A (en) The method, device and equipment that the character string of a kind of pair of Mass production is identified

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