CN112733724B - Relativity relationship verification method and device based on discrimination sample meta-digger - Google Patents

Relativity relationship verification method and device based on discrimination sample meta-digger Download PDF

Info

Publication number
CN112733724B
CN112733724B CN202110035353.5A CN202110035353A CN112733724B CN 112733724 B CN112733724 B CN 112733724B CN 202110035353 A CN202110035353 A CN 202110035353A CN 112733724 B CN112733724 B CN 112733724B
Authority
CN
China
Prior art keywords
positive
sample
network
negative
negative sample
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
CN202110035353.5A
Other languages
Chinese (zh)
Other versions
CN112733724A (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.)
Tsinghua University
Original Assignee
Tsinghua University
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 Tsinghua University filed Critical Tsinghua University
Priority to CN202110035353.5A priority Critical patent/CN112733724B/en
Publication of CN112733724A publication Critical patent/CN112733724A/en
Application granted granted Critical
Publication of CN112733724B publication Critical patent/CN112733724B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • 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
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/048Activation functions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation

Abstract

The invention provides a method and a device for verifying relativity based on a discriminant sample meta-miner, wherein the method comprises the following steps: acquiring a first positive and negative sample pair image according to the first positive and negative sample proportion; performing one-time virtual updating on the image relative relation model according to the first positive and negative samples to obtain an updated candidate relative relation model; acquiring a second positive and negative sample pair image by using a second positive and negative sample ratio; updating network parameters of the element mining network according to the second positive and negative sample pair image to obtain a target element mining network; inputting each pair of positive and negative sample pair images in the first positive and negative sample pair images into a target element mining network, and obtaining the sample weight of each pair of positive and negative sample pair images; and training the candidate relationship model according to the sample weight to obtain a target relationship model so as to identify the relationship between the images according to the target relationship model. Therefore, the problem of inherent data imbalance of the relatives verification data set is solved.

Description

Relativity relationship verification method and device based on discrimination sample meta-digger
Technical Field
The invention relates to the technical field of computer vision, in particular to a method and a device for verifying relativity based on a discriminant sample meta-miner.
Background
The relationship verification requires that for two given face pictures, whether a relationship exists between the two face pictures is judged. There are many realistic references for relationship verification, including lost child finding, smart home photo album management, and social media analysis.
The existing database for verifying the relationship usually organizes data into positive sample pairs, that is, only sample pairs with relationship are collected, and sample pairs without relationship can be obtained by randomly combining related sample pairs. Assuming that there are N pairs of related sample pairs in the database, N (N-1) negative sample pairs can be obtained by randomly combining all possible unrelated sample pairs, and it is obvious that the number of negative sample pairs is significantly higher than that of positive sample pairs, and it is a valuable direction how to utilize limited positive sample pairs and simultaneously mine valid information from a large number of negative sample pairs.
Disclosure of Invention
The present invention is directed to solving, at least to some extent, one of the technical problems in the related art.
Therefore, a first objective of the present invention is to provide a relativity verification method based on a discriminant sample meta-miner, which solves the inherent data imbalance problem of relativity verification data sets.
The second purpose of the invention is to provide a relative relationship verification device based on the discriminant sample element miner.
A third object of the invention is to propose a computer device.
A fourth object of the invention is to propose a non-transitory computer-readable storage medium.
A fifth object of the invention is to propose a computer program product.
In order to achieve the above object, an embodiment of a first aspect of the present invention provides a method for verifying a relationship based on a discriminative sample meta-miner, including: acquiring a first positive and negative sample pair image according to the first positive and negative sample proportion;
performing virtual updating on the image relative relationship model once according to the first positive and negative samples to obtain an updated candidate relative relationship model;
obtaining a second positive and negative sample pair image using a second positive and negative sample ratio;
updating the network parameters of the meta-excavation network according to the second positive and negative sample pair image pair to obtain a target meta-excavation network;
inputting each pair of positive and negative sample pair images in the first positive and negative sample pair images into the target element mining network, and obtaining the sample weight of each pair of positive and negative sample pair images;
and training the candidate relative relation model according to the sample weight to obtain a target relative relation model so as to identify the relative relation between the images according to the target relative relation model.
In order to achieve the above object, a second aspect of the present invention provides a relationship verification apparatus based on a discriminant sample meta-miner, including: the first acquisition module is used for acquiring a first positive and negative sample pair image according to a first positive and negative sample proportion;
a first updating module, configured to perform a virtual update on the relationship model according to the first positive and negative samples to obtain an updated candidate relationship model
The second acquisition module is used for acquiring a second positive and negative sample pair image by using a second positive and negative sample proportion;
the second updating module is used for updating the network parameters of the meta-mining network according to the second positive and negative sample pair image pair to obtain a target meta-mining network;
a third obtaining module, configured to input each pair of positive and negative sample pair images in the first positive and negative sample pair image into the target element mining network, and obtain a sample weight of each pair of positive and negative sample pair images;
and the training module is used for training the candidate relationship model according to the sample weight to obtain a target relationship model so as to identify the relationship between the images according to the target relationship model.
In order to achieve the above object, a third aspect of the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the method for verifying membership based on a discriminative sample meta-miner as described in the first aspect of the present invention.
In order to achieve the above object, a fourth embodiment of the present invention provides a non-transitory computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a method for verifying a relationship based on a discriminant sample meta-miner as described in the first embodiment.
In order to achieve the above object, a fifth embodiment of the present invention provides a computer program product, wherein when being executed by an instruction processor of the computer program product, the method for verifying relativity based on a discriminative sample meta-miner as described in the first embodiment of the present invention is implemented.
The embodiment of the invention at least has the following technical effects:
a discriminant sample meta-miner is presented to make full use of all possible samples to better train the relative network.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
The foregoing and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is a schematic flowchart of a relationship verification method based on a discriminative sample meta-miner according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a relationship verification process based on a discriminative sample meta-miner according to an embodiment of the present invention;
fig. 3 is a schematic network structure diagram of a relationship network according to an embodiment of the present invention; and
fig. 4 is a schematic structural diagram of a relationship verification apparatus based on a discriminative sample meta-miner according to an embodiment of the present invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are illustrative and intended to be illustrative of the invention and are not to be construed as limiting the invention.
The following describes a method and an apparatus for verifying a relationship based on a discriminatory sample meta-miner according to an embodiment of the present invention with reference to the accompanying drawings.
For the background art, when the problem of data imbalance is handled, a fixed balanced data set is mostly directly used, that is, N sample pairs are directly randomly sampled from the negative sample pairs, and form a data set with a total size of 2N with the N positive sample pairs, so that the method directly discards the remaining N (N-2) negative samples, and cannot effectively mine effective information in a large number of negative samples. The patent provides a discriminant sample meta-miner to make full use of all possible samples to better train a relative network.
The invention aims to solve the inherent data imbalance problem of a relatives verification data set, aims to fully utilize limited positive sample pairs and simultaneously mine discriminative samples from a large number of negative sample pairs, and finally improves the performance and precision of relatives verification.
Fig. 1 is a schematic flow chart of a method for verifying a relationship based on a discriminative sample meta-miner according to an embodiment of the present invention. As shown in fig. 1, the method includes:
in this example, we first introduce our proposed relationship network. Our relationship network is directed to explicitly modeling the relationship between two pictures to better predict the relationship between them. For two face pictures, firstly, the same convolutional neural network is used for extracting picture features, the pair of pictures are recorded as (x, y), and then the obtained picture features are respectively recorded as (e) x ,e y ) Assume feature e x And e y Both are D-dimensional features, our proposed relationship network aims at modeling the contrast relationship of each dimension of these two features, and our relationship can be formalized as the following equation (1):
Figure BDA0002894061340000041
wherein, the first and the second end of the pipe are connected with each other,
Figure BDA0002894061340000042
and
Figure BDA0002894061340000043
respectively represent e x ,e y The ith element of (1), where | represents the concatenation of features. h and r represent the multi-layer neural network respectively. The final output layer is only provided with one neuron, the neuron is activated by using a sigmoid function, the result is naturally normalized to be between 0 and 1, and the higher the numerical value is, the higher the probability of relativity is. During the test, if f (x, y) > 0.5, the relationship is considered to exist, otherwise, the relationship is not considered to exist. The relationship between the characteristics is well modeled by the relationship network, and the accuracy of the relationship verification is effectively improved. After the training phase is over, the verification tasks for the relatives are deployed independently. Next we describe in detail how the proposed discriminative sample meta-miner is used to train the affinity network.
To take advantage of the limited number of positive samples and the large number of negative samples, we propose a discriminant sample meta-miner to weight the samples during the training process. The whole training process consists of four stages: a virtual training stage, a meta-training stage, a sample mining stage and a fact training stage. Here, let us say the parameter of the membership network f is θ, and let us say the discriminant sample element miner network is
Figure BDA0002894061340000044
Wherein
Figure BDA0002894061340000045
Indicating its network parameters. Next we cyclically perform the following four phases of training:
step 101, obtaining a first positive and negative sample pair image according to a first positive and negative sample ratio.
In this example, a first positive-negative sample pair image is obtained according to a first positive-negative sample ratio, batch data with a positive-negative ratio of 1: C is obtained by sampling from N positive sample pairs and N (N-1) negative samples, the number of positive sample pairs is made to be m, and (1+ C) m pairs of the first positive-negative sample pair image are obtained.
Specifically, we sample a batch with a positive-negative ratio of 1: C from N positive sample pairs and N (N-1) negative samples, let the number of positive sample pairs be m, and then the unbalanced training batch size be (1+ C) m.
And 102, performing one-time virtual updating on the image relative relation model according to the first positive and negative samples to obtain an updated candidate relative relation model.
In this embodiment, assume that we have obtained a model at time t: theta t And
Figure BDA0002894061340000046
at this stage, we perform a virtual update on the relationship model to get
Figure BDA0002894061340000047
In this embodiment, a loss value of the relationship model is calculated according to a loss function and the first positive and negative sample pair image, where the loss function is the following formula (2):
Figure BDA0002894061340000051
wherein S is trn,p And S trn,n Respectively representing positive and negative sample pairs in the first positive and negative sample pair image, C representing the ratio of the number of positive and negative samples in the first positive and negative sample pair image, and g () representing discrimination sample element miningAnd in the device network, a function f () represents a relationship network, phi represents a network parameter of a neural network g, theta represents a network parameter of the neural network f, and t represents the iteration number.
Due to the difference
Figure BDA0002894061340000052
Will result in different values of the loss function, and the loss function is therefore
Figure BDA0002894061340000053
Is measured as a function of (c). We use random gradient descent to get updated
Figure BDA0002894061340000054
Namely, a random gradient descent algorithm and the loss value of the loss function are used for carrying out one-time virtual updating on the relative relation model to obtain an updated candidate relative relation model, wherein,
the random gradient descent algorithm is represented by the following formula (3)
Figure BDA0002894061340000055
Wherein, α represents the learning rate of the step, which is a fixed value set according to the experiment, t represents the iteration number, φ represents the network parameter of the neural network g, and θ represents the network parameter of the neural network f.
Step 103, a second positive-negative sample pair image is obtained using the second positive-negative sample ratio.
In this embodiment, for updating the meta-mining network, we then randomly sample a class-balanced meta-training batch of data (second positive and negative samples vs. images) from the entire dataset, i.e., the positive and negative sample ratio in the batch of data is 1: 1.
And step 104, updating the network parameters of the element mining network according to the second positive and negative sample pair image to obtain a target element mining network.
In this embodiment, we obtain
Figure BDA0002894061340000056
Then, we use the thought of meta-learning to update the parameters of the meta-mining network to obtain
Figure BDA0002894061340000057
Calculating a loss value of the meta-mining network from a loss function and the second positive and negative sample pair image, wherein the loss function is formula (4):
Figure BDA0002894061340000058
wherein S is meta,p And S ,neta,n Respectively representing positive and negative sample pairs in the second positive and negative sample pair image.
Further, we then use a random gradient descent method to obtain updated parameters of the meta-mining network, and use a random gradient descent algorithm to update the network parameters of the meta-mining network to obtain a target meta-mining network, where the random gradient descent algorithm is the following formula (5):
Figure BDA0002894061340000061
wherein, beta represents the learning rate of the step, t represents the iteration times, phi represents the network parameter of the neural network g, and theta represents the network parameter of the neural network f.
And 105, inputting each pair of positive and negative sample pair images in the first positive and negative sample pair image into a target element mining network, and acquiring the sample weight of each pair of positive and negative sample pair images.
And (5) carrying out judgment sample mining on unbalanced training batch data. And obtaining an updated meta-mining network, and using the network to mine the discrimination sample of the unbalanced training batch data used in the first stage. Specifically, we weight samples in the batch. We feed each sample into the meta-mining network, which outputs a value for each sample that represents the importance of the sample as perceived by the meta-mining network. Finally, these values are normalized within the batch, and in particular, the weight for one sample s can be formulated as equation (6):
Figure BDA0002894061340000062
and 106, training the candidate relative relation model according to the sample weight to obtain a target relative relation model so as to identify the relative relation between the images according to the target relative relation model.
After obtaining the weights for each sample, we use these weights to weight the samples to really train our affinity network. The weighted loss function is equation (7):
Figure BDA0002894061340000063
we then use random gradient descent to update the relationship network: updating the candidate relationship model to obtain a target relationship model by using a stochastic gradient descent algorithm, wherein the stochastic gradient descent algorithm is formula (8):
Figure BDA0002894061340000064
where γ is the learning rate of this step.
And repeating the above steps to obtain the final trained relationship network. The above process is illustrated in fig. 2, wherein in fig. 2, h-MLP and r-MLP represent two MLPs (multi-layer neural networks), respectively, and the transformation represented by these two neural networks can be represented by functions h and r, corresponding to h and r in equation 1 above, and finally we present the detailed composition of the meta-mining network in detail. The element mining network is composed of a three-layer fully-connected neural network, the input dimension of the element mining network is 3, and the label of a sample pair, the prediction of a relative relation model on the sample pair and the corresponding binary cross entropy loss function value are respectively input. The three dimensions represent information of a sample pair and are used for inputting the meta-mining network, the output dimension of the meta-mining network is 1, sigmoid is used for activation, and the activated value represents the weight of the sample predicted by the meta-mining network.
Thus, in an embodiment of the invention, two logic modules are included: a relationship network and a discriminant sample meta-miner network. The relationship network is responsible for predicting the existence of the relationship of a given sample, and the judgment sample element miner is responsible for weighting the training samples in the training process, so that the training of the relationship network is better guided. The relationship network needs to predict a pair of pictures, and the network structure is designed as shown in fig. 3. The judgment sample element miner is composed of a three-layer neural network, and a weight is output to each sample to weight the training samples. In the training stage, the judgment sample meta-digger and the relative relationship network are learned under the framework of meta-learning, and in the testing stage, the relative relationship network is independently used for deploying and predicting the relative relationship.
Thus, in the present embodiment, the relationship network is based on the relationship network. In the training, a relationship network based on a relationship network is provided, the network can better mine the relationship between two pictures so as to obtain higher performance, and a relationship training method based on a discriminant sample meta-miner can fully mine information of a large number of negative sample pairs while effectively utilizing limited positive sample pairs so as to obtain a more accurate relationship verification model.
In summary, the membership verification method based on the discrimination sample meta-miner of the embodiment of the invention provides the discrimination sample meta-miner to fully utilize all possible samples so as to better train the membership network.
In order to implement the above embodiment, the present invention further provides a relationship verification apparatus based on the discriminant sample meta-miner.
Fig. 4 is a schematic structural diagram of a relationship verification apparatus based on a discriminative sample element miner according to an embodiment of the present invention.
As shown in fig. 4, the apparatus for verifying the relationship based on the judgment sample meta miner includes: a first obtaining module 410, a first updating module 420, a second obtaining module 430, a second updating module 440, a third obtaining module 450, and a training module 460.
The first obtaining module 410 is configured to obtain a first positive-negative sample pair image according to a first positive-negative sample ratio;
a first updating module 420, configured to perform a virtual update on the image pair affinity model once according to the first positive and negative samples to obtain an updated candidate affinity model
A second obtaining module 430, configured to obtain a second positive-negative sample pair image using a second positive-negative sample ratio;
a second updating module 440, configured to update the network parameters of the meta-mining network according to the second positive-negative sample pair image pair, so as to obtain a target meta-mining network;
a third obtaining module 450, configured to input each pair of positive and negative sample pair images in the first positive and negative sample pair image into the target element mining network, and obtain a sample weight of each pair of positive and negative sample pair images;
a training module 460, configured to train the candidate relationship model according to the sample weight to obtain a target relationship model, so as to identify a relationship between images according to the target relationship model.
It should be noted that the explanation of the embodiment of the method for verifying the relationship based on the judgment sample meta-miner is also applicable to the device for verifying the relationship based on the judgment sample meta-miner in this embodiment, and is not repeated herein.
In order to implement the foregoing embodiment, the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where when the processor executes the computer program, the affinity verification method based on a discriminative sample meta-miner described in the foregoing embodiment is implemented.
In order to achieve the above embodiments, the present invention further provides a non-transitory computer readable storage medium, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the membership verification method based on the discriminative sample meta-miner as described in the above embodiments.
In order to implement the foregoing embodiment, the present invention further provides a computer program product, which when executed by an instruction processor in the computer program product, implements the method for verifying the relationship based on the discriminative sample meta-miner as described in the foregoing embodiment.
In the description of the specification, reference to the description of "one embodiment," "some embodiments," "an example," "a specific example," or "some examples" or the like means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or to implicitly indicate the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "a plurality" means at least two, e.g., two, three, etc., unless explicitly specified otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing steps of a custom logic function or process, and alternate implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Further, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried out in the method of implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and the program, when executed, includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.

Claims (9)

1. A method for verifying relativity based on a discriminant sample meta-miner is characterized by comprising the following steps:
acquiring a first positive and negative sample pair image according to the first positive and negative sample proportion;
performing virtual updating on the image relative relationship model once according to the first positive and negative samples to obtain an updated candidate relative relationship model;
obtaining a second positive and negative sample pair image using a second positive and negative sample ratio;
updating network parameters of the element mining network according to the second positive and negative sample pairs to obtain a target element mining network, wherein the element mining network comprises three layers of fully-connected neural networks, the input of the element mining network is the label of a sample pair, the prediction of a relationship model on the sample pair and the binary cross entropy loss function value of the sample pair, and the output of the element mining network is the weight of the predicted sample pair;
inputting each pair of positive and negative sample pair images in the first positive and negative sample pair images into the target element mining network, and acquiring the sample weight of each pair of positive and negative sample pair images;
and training the candidate relative relation model according to the sample weight to obtain a target relative relation model so as to identify the relative relation between the images according to the target relative relation model.
2. The method of claim 1, wherein said obtaining a first positive-negative sample pair image according to a first positive-negative sample ratio comprises:
sampling from the N positive sample pairs and the N (N-1) negative samples to obtain a positive-negative ratio of 1: and C, in the batch data, the number of the positive sample pairs is m, and a (1+ C) m pair image of the first positive and negative sample pairs is obtained.
3. The method of claim 1, wherein performing a virtual update on the image pair based on the first positive and negative samples to obtain an updated candidate relationship model comprises:
calculating a loss value of the relationship model according to a loss function and the first positive and negative sample pair image, wherein the loss function is as follows:
Figure FDA0003614989650000011
wherein S trn,p And S trn,n Respectively representing the first positive and negative sample pairsC represents the proportion of the number of positive samples to the number of negative samples in the first positive and negative samples to the number of positive samples in the image, a function g () represents a discriminant sample element miner network, a function f () represents a relationship network, phi represents a network parameter of a neural network g, theta represents a network parameter of the neural network f, and t represents the number of iterations;
performing one-time virtual updating on the relationship model by using a random gradient descent algorithm and the loss value of the loss function to obtain an updated candidate relationship model, wherein,
the random gradient descent algorithm is as follows:
Figure FDA0003614989650000021
wherein, alpha represents the learning rate of the step, t represents the iteration times, phi represents the network parameter of the neural network g, and theta represents the network parameter of the neural network f.
4. The method of claim 1, wherein said updating network parameters of said meta-mining network from said second positive-negative sample pair image to obtain a target meta-mining network comprises:
calculating a loss value of the meta-mining network according to a loss function and the second positive-negative sample pair image, wherein the loss function is as follows:
Figure FDA0003614989650000022
wherein S is meta,p And S meta,n Respectively representing positive sample pairs and negative sample pairs in the second positive and negative sample pair image;
updating the network parameters of the meta-excavation network by using a random gradient descent algorithm to obtain a target meta-excavation network, wherein the random gradient descent algorithm comprises the following steps:
Figure FDA0003614989650000023
wherein, beta represents the learning rate of the step, t represents the iteration times, phi represents the network parameter of the neural network g, and theta represents the network parameter of the neural network f.
5. The method of claim 1, wherein the sample weights are formalized as:
Figure FDA0003614989650000024
where the function g () represents a discriminative sample meta-miner network, this formula represents how to compute the weight w of a sample pair s, so
Figure FDA0003614989650000025
The weights of the sample pairs S are represented, q represents the corresponding set of sample pairs S trn,p Or S trn,n Is used to enumerate and index the sample pairs.
6. The method of claim 1, wherein training the candidate affinity model according to the sample weights yields a target affinity model, comprising:
calculating a loss value of the candidate relationship model according to a loss function and the sample weight, wherein the loss function is:
Figure FDA0003614989650000026
further, updating the candidate relationship model by using a stochastic gradient descent algorithm to obtain a target relationship model, wherein the stochastic gradient descent algorithm is as follows:
Figure FDA0003614989650000031
where γ is the learning rate of this step, C represents the ratio of negative samples to positive samples in the first positive-negative sample-to-image,
Figure FDA0003614989650000032
the weights of the sample pairs S are represented, S representing the set S of corresponding sample pairs trn,p Or S trn,n The method comprises the following steps that a sample pair is used for enumerating and indexing the sample pair, a function g () represents a discriminant sample element miner network, a function f () represents a relationship network, phi represents a network parameter of a neural network g, theta represents a network parameter of the neural network f, and t represents iteration times.
7. A relativity verifying device based on a discriminant sample meta-miner is characterized by comprising the following components:
the first acquisition module is used for acquiring a first positive and negative sample pair image according to a first positive and negative sample proportion;
the first updating module is used for carrying out one-time virtual updating on the image relative relation model according to the first positive and negative samples to obtain an updated candidate relative relation model;
a second obtaining module for obtaining a second positive and negative sample pair image using a second positive and negative sample ratio;
a second updating module, configured to update network parameters of an element mining network according to the second positive and negative sample pairs to obtain a target element mining network, where the element mining network includes three layers of fully-connected neural networks, inputs of the element mining network are labels of sample pairs, predictions of the sample pairs by a relationship model, and binary cross entropy loss function values of the sample pairs, and an output of the element mining network is weights of the predicted sample pairs;
a third obtaining module, configured to input each pair of positive and negative sample pair images in the first positive and negative sample pair image into the target element mining network, and obtain a sample weight of each pair of positive and negative sample pair images;
and the training module is used for training the candidate relative relation model according to the sample weight to obtain a target relative relation model so as to identify the relative relation between the images according to the target relative relation model.
8. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method of any one of claims 1-6 when executing the computer program.
9. A non-transitory computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the method of any one of claims 1-6.
CN202110035353.5A 2021-01-12 2021-01-12 Relativity relationship verification method and device based on discrimination sample meta-digger Active CN112733724B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110035353.5A CN112733724B (en) 2021-01-12 2021-01-12 Relativity relationship verification method and device based on discrimination sample meta-digger

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110035353.5A CN112733724B (en) 2021-01-12 2021-01-12 Relativity relationship verification method and device based on discrimination sample meta-digger

Publications (2)

Publication Number Publication Date
CN112733724A CN112733724A (en) 2021-04-30
CN112733724B true CN112733724B (en) 2022-07-26

Family

ID=75590372

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110035353.5A Active CN112733724B (en) 2021-01-12 2021-01-12 Relativity relationship verification method and device based on discrimination sample meta-digger

Country Status (1)

Country Link
CN (1) CN112733724B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116029357B (en) * 2023-03-29 2023-08-15 荣耀终端有限公司 Training sample generation, model training, click rate evaluation method and electronic equipment
CN116310656B (en) * 2023-05-11 2023-08-15 福瑞泰克智能系统有限公司 Training sample determining method and device and computer equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108647577A (en) * 2018-04-10 2018-10-12 华中科技大学 A kind of pedestrian's weight identification model that adaptive difficult example is excavated, method and system
CN109784144A (en) * 2018-11-29 2019-05-21 北京邮电大学 A kind of kinship recognition methods and system
CN109993026A (en) * 2017-12-29 2019-07-09 华为技术有限公司 The training method and device of relatives' identification network model
CN112070153A (en) * 2020-09-07 2020-12-11 深延科技(北京)有限公司 Relativity relationship verification method and system based on deep learning

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109902665A (en) * 2019-03-28 2019-06-18 北京达佳互联信息技术有限公司 Similar face retrieval method, apparatus and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109993026A (en) * 2017-12-29 2019-07-09 华为技术有限公司 The training method and device of relatives' identification network model
CN108647577A (en) * 2018-04-10 2018-10-12 华中科技大学 A kind of pedestrian's weight identification model that adaptive difficult example is excavated, method and system
CN109784144A (en) * 2018-11-29 2019-05-21 北京邮电大学 A kind of kinship recognition methods and system
CN112070153A (en) * 2020-09-07 2020-12-11 深延科技(北京)有限公司 Relativity relationship verification method and system based on deep learning

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
Discriminative Deep Metric Learning for Face and Kinship Verification;Jiwen Lu等;《IEEE Transactions on Image Processing》;20170620;第26卷(第9期);第4269-4282页 *
Graph-Based Kinship Reasoning Network;Wanhua Li等;《2020 IEEE International Conference on Multimedia and Expo (ICME)》;20200609;第1-6页 *
Learning Meta Face Recognition in Unseen Domains;Jianzhu Guo等;《2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)》;20200805;第6162-6171页 *
基于局部特征融合的邻域排斥度量学习亲属关系认证算法;胡正平等;《模式识别与人工智能》;20170615;第31卷(第06期);第554-561页 *
基于深度卷积神经网络End-to-End模型的亲属关系认证算法;胡正平等;《模式识别与人工智能》;20180615;第30卷(第06期);第530-537页 *

Also Published As

Publication number Publication date
CN112733724A (en) 2021-04-30

Similar Documents

Publication Publication Date Title
CN109376615B (en) Method, device and storage medium for improving prediction performance of deep learning network
CN109816032B (en) Unbiased mapping zero sample classification method and device based on generative countermeasure network
CN110659721B (en) Method and system for constructing target detection network
CN112733724B (en) Relativity relationship verification method and device based on discrimination sample meta-digger
CN110738235B (en) Pulmonary tuberculosis judging method, device, computer equipment and storage medium
CN111507370A (en) Method and device for obtaining sample image of inspection label in automatic labeling image
CN107977748B (en) Multivariable distorted time sequence prediction method
CN109190808A (en) User's behavior prediction method, apparatus, equipment and medium
CN116089883B (en) Training method for improving classification degree of new and old categories in existing category increment learning
CN113792768A (en) Hypergraph neural network classification method and device
CN110502659A (en) The training method of image characteristics extraction and network, device and equipment
CN115457395A (en) Lightweight remote sensing target detection method based on channel attention and multi-scale feature fusion
CN114445356A (en) Multi-resolution-based full-field pathological section image tumor rapid positioning method
CN113592071B (en) Equipment fault recognition model training and recognition method, system, device and medium
CN114528913A (en) Model migration method, device, equipment and medium based on trust and consistency
CN114997036A (en) Network topology reconstruction method, device and equipment based on deep learning
CN116151319A (en) Method and device for searching neural network integration model and electronic equipment
CN112348188B (en) Model generation method and device, electronic device and storage medium
CN111696636B (en) Data processing method and device based on deep neural network
CN114565092A (en) Neural network structure determining method and device
CN109326324B (en) Antigen epitope detection method, system and terminal equipment
CN113569960B (en) Small sample image classification method and system based on domain adaptation
CN114612527A (en) Image registration method and device, electronic equipment and storage medium
CN114496068A (en) Protein secondary structure prediction method, device, equipment and storage medium
CN113010687B (en) Exercise label prediction method and device, storage medium and computer equipment

Legal Events

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