CN112733724A - 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
CN112733724A
CN112733724A CN202110035353.5A CN202110035353A CN112733724A CN 112733724 A CN112733724 A CN 112733724A CN 202110035353 A CN202110035353 A CN 202110035353A CN 112733724 A CN112733724 A CN 112733724A
Authority
CN
China
Prior art keywords
positive
sample
network
negative sample
negative
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110035353.5A
Other languages
Chinese (zh)
Other versions
CN112733724B (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

Landscapes

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

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; 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 samples 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 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. 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 the data into positive sample pairs, that is, only the sample pairs with relationship are collected, and the sample pairs without relationship can be obtained by randomly combining the sample pairs with relationship. 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 how to exploit valid information from a large number of negative sample pairs while using limited positive sample pairs is a valuable direction.
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, the first purpose 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 set.
The second purpose of the invention is to provide a relativity verifying device based on a discriminant sample meta-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 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;
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 for performing one-time virtual updating on the image relative relationship model according to the first positive and negative samples to obtain an updated candidate relative relationship model
A second obtaining module for obtaining a second positive and negative sample pair image using a second positive and negative sample ratio;
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 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 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 method for verifying a relationship 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 method and apparatus for verifying the relationship based on the discriminative sample meta-miner according to the embodiments of the present invention will be described 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 used directly, that is, N sample pairs are sampled randomly from negative sample pairs directly, and form a data set with a total size of 2N with N positive sample pairs, so that the method directly discards the remaining N (N-2) negative samples, and effective information in a large number of negative samples cannot be effectively mined. 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 affinity networks strive to explicitly model the relationship between two pictures to better predict their affinity. 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,ey) Assume feature exAnd eyAll are D-dimensional features, the relatives we proposeIn an effort to model the contrastive relationship of each dimension of these two features, our relativity can be formalized as the following equation (1):
Figure BDA0002894061340000041
wherein,
Figure BDA0002894061340000042
and
Figure BDA0002894061340000043
respectively represent ex,eyThe 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 the relationship is. In the testing process, if f (x, y) > 0.5, the relationship is considered to exist, otherwise, the relationship is considered to not 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 separately deployed. 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. Then I amThese 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: thetatAnd
Figure BDA0002894061340000046
at this stage, we perform a virtual update on the relationship model to get
Figure BDA0002894061340000047
In this embodiment, the 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 istrn,pAnd Strn,nRespectively representing positive and negative sample pairs in the first positive and negative sample pair image, C representing the ratio of the number of positive samples to negative samples in the first positive and negative sample pair image, a function g () representing a discriminative sample element miner network, a function f () representing a relationship network,phi denotes the network parameters of the neural network g, theta denotes the network parameters of the neural network f, and t denotes the number of iterations.
Due to the difference
Figure BDA0002894061340000052
Will result in different loss function values, and the loss function is therefore
Figure BDA0002894061340000053
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, acquiring a second positive-negative sample pair image by 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 104, updating the network parameters of the element mining network according to the second positive and negative sample pair image to obtain the target element mining network.
In this embodiment, we obtain
Figure BDA0002894061340000056
After that time, the user can use the device,we use the idea of meta-learning to update the parameters of the meta-mining network
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 ismeta,pAnd S,neta,nRespectively 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 obtaining 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, for the weight of 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 formula (7):
Figure BDA0002894061340000063
we then use random gradient descent to update the relationship network: 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 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 whether the relationship exists or not for a given sample, and the sample meta-digger is responsible for weighting the training samples in the training process, so that the training of the relationship network is better guided. The relativity 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 sample meta-digger and the relative relationship network are judged to be studied 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 meta-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 foregoing explanation of the embodiment of the method for verifying membership based on a discriminative sample meta-miner is also applicable to the device for verifying membership based on a discriminative 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 the processor executes the computer program to implement the method for verifying membership based on a discriminant sample meta-miner as described in the foregoing embodiment.
In order to achieve the above embodiments, the present invention further proposes a non-transitory computer-readable storage medium having stored thereon a computer program which, 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 embodiments, 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 embodiments.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean 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 implicitly indicating 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 specifically limited 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). Additionally, 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, the various steps or methods may be implemented in software or firmware stored in 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 by the method for 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 when the program is executed, the program 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 (10)

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 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;
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.
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, making the number of the positive sample pairs m to obtain (1+ C) m pairs of the first positive and negative sample pair images.
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 FDA0002894061330000011
wherein Strn,pAnd Strn,nRespectively representing positive sample pairs and negative sample pairs in the first positive and negative sample pair images, C representing the proportion of the positive samples to the negative samples in the first positive and negative sample pair images, g () representing a discriminative sample element miner network, f () representing a relationship network, phi representing a network parameter of a neural network g, theta representing a network parameter of the neural network f, and t representing 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 FDA0002894061330000021
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 and 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 and negative sample pair image, wherein the loss function is as follows:
Figure FDA0002894061330000022
wherein S ismeta,pAnd Smeta,nRespectively representing positive sample pairs and negative sample pairs in the second positive and negative sample pair image;
updating the network parameters of the meta-mining network by using a random gradient descent algorithm to obtain a target meta-mining network, wherein the random gradient descent algorithm comprises the following steps:
Figure FDA0002894061330000023
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 FDA0002894061330000024
wherein the function g () represents a discriminant sample meta-miner network, which formula represents how to compute the weight w of a sample pair s, so
Figure FDA0002894061330000025
The weights of the sample pairs S are represented, q represents the corresponding set of sample pairs Strn,pOr Strn,nIs 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 FDA0002894061330000026
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 FDA0002894061330000031
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 FDA0002894061330000032
the weights of the sample pairs S are represented, S representing the set S of corresponding sample pairstrn,pOr Strn,nThe function g () represents a discriminant sample element miner network, the function f () represents a relationship network, phi represents a network parameter of the neural network g, theta represents a network parameter of the neural network f, and t represents the number of iterations.
7. A relativity verifying device based on a discriminant sample meta-miner is characterized by comprising:
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 for performing one-time virtual updating on the image relative relationship model according to the first positive and negative samples to obtain an updated candidate relative relationship model
A second obtaining module for obtaining a second positive and negative sample pair image using a second positive and negative sample ratio;
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 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 having stored thereon a computer program, wherein the computer program, when executed by a processor, implements the method of any one of claims 1-6.
10. A computer program product, characterized in that instructions in the computer program product, when executed by a processor, implement the method according to any 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 true CN112733724A (en) 2021-04-30
CN112733724B 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)

Cited By (2)

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

Citations (5)

* 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
US20200250226A1 (en) * 2019-03-28 2020-08-06 Beijing Dajia Internet Information Technology Co., Ltd. Similar face retrieval method, device and storage medium
CN112070153A (en) * 2020-09-07 2020-12-11 深延科技(北京)有限公司 Relativity relationship verification method and system based on deep learning

Patent Citations (5)

* 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
US20200250226A1 (en) * 2019-03-28 2020-08-06 Beijing Dajia Internet Information Technology Co., Ltd. Similar face retrieval method, device and storage medium
CN112070153A (en) * 2020-09-07 2020-12-11 深延科技(北京)有限公司 Relativity relationship verification method and system based on deep learning

Non-Patent Citations (10)

* Cited by examiner, † Cited by third party
Title
JIANZHU GUO等: "Learning Meta Face Recognition in Unseen Domains", 《2020 IEEE/CVF CONFERENCE ON COMPUTER VISION AND PATTERN RECOGNITION (CVPR)》 *
JIANZHU GUO等: "Learning Meta Face Recognition in Unseen Domains", 《2020 IEEE/CVF CONFERENCE ON COMPUTER VISION AND PATTERN RECOGNITION (CVPR)》, 5 August 2020 (2020-08-05), pages 6162 - 6171 *
JIWEN LU等: "Discriminative Deep Metric Learning for Face and Kinship Verification", 《IEEE TRANSACTIONS ON IMAGE PROCESSING》 *
JIWEN LU等: "Discriminative Deep Metric Learning for Face and Kinship Verification", 《IEEE TRANSACTIONS ON IMAGE PROCESSING》, vol. 26, no. 9, 20 June 2017 (2017-06-20), pages 4269 - 4282, XP011655764, DOI: 10.1109/TIP.2017.2717505 *
WANHUA LI等: "Graph-Based Kinship Reasoning Network", 《2020 IEEE INTERNATIONAL CONFERENCE ON MULTIMEDIA AND EXPO (ICME)》 *
WANHUA LI等: "Graph-Based Kinship Reasoning Network", 《2020 IEEE INTERNATIONAL CONFERENCE ON MULTIMEDIA AND EXPO (ICME)》, 9 June 2020 (2020-06-09), pages 1 - 6 *
胡正平等: "基于局部特征融合的邻域排斥度量学习亲属关系认证算法", 《模式识别与人工智能》 *
胡正平等: "基于局部特征融合的邻域排斥度量学习亲属关系认证算法", 《模式识别与人工智能》, vol. 31, no. 06, 15 June 2017 (2017-06-15), pages 554 - 561 *
胡正平等: "基于深度卷积神经网络End-to-End模型的亲属关系认证算法", 《模式识别与人工智能》 *
胡正平等: "基于深度卷积神经网络End-to-End模型的亲属关系认证算法", 《模式识别与人工智能》, vol. 30, no. 06, 15 June 2018 (2018-06-15), pages 530 - 537 *

Cited By (4)

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

Also Published As

Publication number Publication date
CN112733724B (en) 2022-07-26

Similar Documents

Publication Publication Date Title
CN109816032B (en) Unbiased mapping zero sample classification method and device based on generative countermeasure network
CN111352656B (en) Neural network apparatus and method using bitwise operations
CN108229667A (en) Trimming based on artificial neural network classification
EP3767551A1 (en) Inspection system, image recognition system, recognition system, discriminator generation system, and learning data generation device
CN107784322B (en) Abnormal data detection method, abnormal data detection device, abnormal data detection storage medium, and program product
CN110738235B (en) Pulmonary tuberculosis judging method, device, computer equipment and storage medium
CN112733724B (en) Relativity relationship verification method and device based on discrimination sample meta-digger
CN109190808A (en) User's behavior prediction method, apparatus, equipment and medium
CN107977748B (en) Multivariable distorted time sequence prediction method
EP3637327A1 (en) Computing device and method
CN115496955A (en) Image classification model training method, image classification method, apparatus and medium
CN112906865B (en) Neural network architecture searching method and device, electronic equipment and storage medium
CN116089883B (en) Training method for improving classification degree of new and old categories in existing category increment learning
CN116151319A (en) Method and device for searching neural network integration model and electronic equipment
CN112101418A (en) Method, system, medium and equipment for identifying breast tumor type
CN110069997B (en) Scene classification method and device and electronic equipment
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
CN112348188B (en) Model generation method and device, electronic device and storage medium
CN116861262B (en) Perception model training method and device, electronic equipment and storage medium
CN113569960B (en) Small sample image classification method and system based on domain adaptation
CN113010687B (en) Exercise label prediction method and device, storage medium and computer equipment
CN114612527A (en) Image registration method and device, electronic equipment and storage medium
CN115146822A (en) Photovoltaic power generation prediction method and device and terminal 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