WO2023000792A1 - Methods and apparatuses for constructing living body identification model and for living body identification, device and medium - Google Patents

Methods and apparatuses for constructing living body identification model and for living body identification, device and medium Download PDF

Info

Publication number
WO2023000792A1
WO2023000792A1 PCT/CN2022/093514 CN2022093514W WO2023000792A1 WO 2023000792 A1 WO2023000792 A1 WO 2023000792A1 CN 2022093514 W CN2022093514 W CN 2022093514W WO 2023000792 A1 WO2023000792 A1 WO 2023000792A1
Authority
WO
WIPO (PCT)
Prior art keywords
living body
living
image data
category
loss function
Prior art date
Application number
PCT/CN2022/093514
Other languages
French (fr)
Chinese (zh)
Inventor
俞颖超
周秋生
Original Assignee
京东科技控股股份有限公司
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 京东科技控股股份有限公司 filed Critical 京东科技控股股份有限公司
Publication of WO2023000792A1 publication Critical patent/WO2023000792A1/en

Links

Images

Classifications

    • 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
    • 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/0464Convolutional networks [CNN, ConvNet]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • 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
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/40Spoof detection, e.g. liveness detection

Definitions

  • the present disclosure relates to the field of computer technology, and in particular to a method, device, device and medium for constructing a living body recognition model and living body recognition.
  • embodiments of the present disclosure provide a method, device, device and medium for constructing a living body recognition model and living body recognition.
  • the embodiments of the present disclosure provide a method for constructing a living body recognition model.
  • the above-mentioned method for constructing a living body recognition model includes: acquiring image data obtained by shooting a target object, the above-mentioned target object including: a living body object and non-living body objects carried by multiple types of physical media; The first label; based on the type difference of the physical medium, the image data of the above-mentioned non-living object corresponds to multiple second labels representing the non-living category; the above-mentioned image data is input into the machine learning model for training; and based on the above The first label and multiple types of the above-mentioned second labels are used to perform multi-classification training on the above-mentioned machine learning model to obtain a living body recognition model.
  • the above-mentioned multi-classification training is performed on the above-mentioned machine learning model based on the above-mentioned first label and multiple types of the above-mentioned second labels to obtain a living body recognition model, including: in each round of training of the above-mentioned machine learning model, For the input current image data, output the respective probability values that the above current image data belong to the living body category and belong to the non-living body category corresponding to each type of physical medium in the above-mentioned multiple types of physical media; A target loss function, the above-mentioned target loss function is used to characterize the degree of deviation between the predicted category of the above-mentioned current image data and the category corresponding to the label of the above-mentioned current image data; and when the degree of convergence of the above-mentioned target loss function meets the set value Stop the training and get the trained living body recognition model.
  • the above target loss function is a weighted sum of a cross-entropy loss function and a ternary center loss function.
  • the above-mentioned cross-entropy loss function is used as the main loss function
  • the above-mentioned ternary center loss function is used as the auxiliary loss function
  • the above-mentioned target loss function is the sum of the product of the above-mentioned auxiliary loss function and the weight coefficient and the above-mentioned main loss function , the value of the above weight coefficient is between 0 and 1 and can ensure the convergence of the above target loss function.
  • the above-mentioned based on the type difference of the physical medium, corresponding the image data of the above-mentioned non-living object to multiple types of second labels representing the category of the non-living body includes: based on the difference of the attribute type of the physical medium, the above-mentioned physical medium Divided into a plurality of main categories; based on the difference of at least one of the shape and material of the physical medium, the physical medium under each main category is subdivided to obtain a subdivision category; wherein, the above main category and the above subdivision category belong to non-living object category; for each image data of the non-living object, determine the target main category or target sub-category corresponding to the physical medium of the current non-living object; or the second tab of the target segment above.
  • the above-mentioned main categories include: paper media, screen media, and material media for three-dimensional models; Or more: plain paper, curved paper, cut paper, button hole paper, normal photo, curved photo, cropped photo, button hole photo; according to the type difference of the above screen media, the above screen media are divided into the following Two or more types of subdivided categories: desktop screen, tablet computer screen, mobile phone screen, laptop computer screen; according to the material difference of the material medium for the above three-dimensional model, the above three-dimensional model material medium is divided into the following subcategories Two or more of: plaster models, wooden models, metal models, plastic models.
  • inventions of the present disclosure provide a method for living body identification.
  • the above method for living body recognition includes: acquiring image data to be detected, wherein the image data to be detected contains objects to be identified; inputting the image data to be detected into a living body recognition model to output classification results of the objects to be identified is the type of physical medium corresponding to the living body category or the non-living body category; wherein, the above-mentioned living body recognition model is constructed by the above-mentioned method for constructing a living body recognition model.
  • inventions of the present disclosure provide an apparatus for constructing a living body recognition model.
  • the above-mentioned device for building a living body recognition model includes: a first data acquisition module, a tag association module, an input module and a training module.
  • the above-mentioned first data acquisition module is configured to acquire the image data of the target object obtained by shooting, and the above-mentioned target object includes: living objects and non-living objects carried by various types of physical media.
  • the label association module is configured to correspond the image data of the above-mentioned living objects to the first label representing the category of living objects; Second tab.
  • the above-mentioned input module is configured to input the above-mentioned image data into the machine learning model for training.
  • the above-mentioned training module is configured to perform multi-classification training on the above-mentioned machine learning model based on the above-mentioned first label and multiple types of the above-mentioned second labels, so as to obtain a living body recognition model.
  • inventions of the present disclosure provide a device for living body identification.
  • the above-mentioned device for living body identification includes: a second data acquisition module and an identification module.
  • the second data acquisition module is configured to acquire image data to be detected, and the image data to be detected includes an object to be identified.
  • the recognition module is configured to input the image data to be detected into the living body recognition model, so as to output the classification result of the object to be recognized as the living body category or the physical medium type corresponding to the non-living body category.
  • the above-mentioned living body recognition model is constructed by the above-mentioned method for constructing a living body recognition model or constructed by the above-mentioned device for constructing a living body recognition model.
  • inventions of the present disclosure provide an electronic device.
  • the above-mentioned electronic equipment includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete mutual communication through the communication bus; the memory is used to store computer programs; the processor is used to execute all programs on the memory.
  • the stored program realizes the above-mentioned method of constructing a living body recognition model or a method of living body recognition.
  • embodiments of the present disclosure provide a computer-readable storage medium.
  • a computer program is stored on the above-mentioned computer-readable storage medium, and when the above-mentioned computer program is executed by a processor, the above-mentioned method for constructing a living body recognition model or a method for living body recognition is realized.
  • the image data of the non-living object corresponds to the multiple second labels representing the category of non-living objects.
  • the second label is used for multi-category learning.
  • the learning of each attack category only needs to focus on a smaller number of features, the task is simpler, the machine learning is easier and more efficient, and the living body recognition model obtained after training is suitable for living objects and non-living objects. Objects are well differentiated.
  • FIG. 1 schematically shows the system architecture of the method and device for constructing a living body recognition model applicable to an embodiment of the present disclosure
  • FIG. 2 schematically shows a flowchart of a method for constructing a living body recognition model according to an embodiment of the present disclosure
  • FIG. 3 schematically shows a detailed implementation flowchart of operation S203 according to an embodiment of the present disclosure
  • FIG. 4 schematically shows a detailed implementation flowchart of operation S205 according to an embodiment of the present disclosure
  • Fig. 5 schematically shows a schematic diagram of the implementation process of constructing a living body recognition model according to an embodiment of the present disclosure
  • Figure 6 schematically shows the visual features of the trained model on the test set using the Cross Entropy Loss function (Cross Entropy Loss) as the target loss function;
  • Figure 7 schematically shows the visual features of the trained living body recognition model on the test set using the weighted sum of the cross-entropy loss function (Cross Entropy Loss) and the triplet-center loss function (Triplet-Center Loss) as the target loss function ;
  • FIG. 8 schematically shows a flow chart of a method for living body recognition according to an embodiment of the present disclosure
  • Fig. 9 schematically shows a structural block diagram of a device for constructing a living body recognition model according to an embodiment of the present disclosure
  • Fig. 10 schematically shows a structural block diagram of a device for living body recognition according to an embodiment of the present disclosure.
  • Fig. 11 schematically shows a structural block diagram of an electronic device provided by an embodiment of the present disclosure.
  • Embodiments of the present disclosure provide a method, device, device and medium for constructing a living body recognition model and living body recognition.
  • the above-mentioned method for constructing a living body recognition model includes: acquiring image data obtained by shooting a target object, the above-mentioned target object including: a living body object and non-living body objects carried by multiple types of physical media; The first label; based on the type difference of the physical medium, the image data of the above-mentioned non-living object corresponds to multiple second labels representing the non-living category; the above-mentioned image data is input into the machine learning model for training; and based on the above The first label and multiple types of the above-mentioned second labels are used to perform multi-classification training on the above-mentioned machine learning model (corresponding to at least 3 categories, one category of living objects, and at least 2 categories of non-living objects carried by physical media), to obtain a living body recognition model. .
  • a result of the above-mentioned living body recognition model classifying the above-mentioned image data is: a living body category, or a non-living body category corresponding to one type of physical medium among the above-mentioned multiple types of physical media.
  • Fig. 1 schematically shows the system architecture of the method and device for constructing a living body recognition model applicable to the embodiments of the present disclosure.
  • a system architecture 100 applicable to the method and device for constructing a living body recognition model includes: terminal devices 101 , 102 , 103 , a network 104 and a server 105 .
  • the network 104 is used as a medium for providing communication links between the terminal devices 101 , 102 , 103 and the server 105 .
  • Network 104 may include various connection types, such as wires, wireless communication links, or fiber optic cables, among others.
  • terminal devices 101 , 102 , 103 Users can use terminal devices 101 , 102 , 103 to interact with server 105 via network 104 to receive or send messages and the like.
  • the terminal devices 101, 102, 103 may be installed with an image capture device, a picture/video playing application, and the like.
  • Other communication client applications may also be installed, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (just examples).
  • the terminal devices 101, 102, 103 can be display screens and various electronic devices that support picture/video playback.
  • the electronic devices can further include image capture devices.
  • electronic devices include but are not limited to smart phones, tablet computers, notebook computers, Desktop computers, self-driving cars, surveillance equipment, and more.
  • the server 105 may be a server that provides various services, such as a background management server that provides service support for data processing of images or videos captured by users using the terminal devices 101 , 102 , and 103 (just an example).
  • the background management server can analyze and process the received data such as image/video processing requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.
  • the data processing can be to perform face recognition processing on the video frames in the images or videos captured by the terminal devices 101, 102, 103, so as to obtain whether the faces in the above images or video frames are real faces or other types of faces. Fake face.
  • the method for constructing a living body recognition model provided by the embodiments of the present disclosure may generally be executed by the server 105 or a terminal device with certain computing capabilities.
  • the apparatus for constructing a living body recognition model provided by the embodiments of the present disclosure may generally be set in the server 105 or the above-mentioned terminal devices with certain computing capabilities.
  • the method for constructing a living body recognition model provided by the embodiments of the present disclosure may also be executed by a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101 , 102 , 103 and/or the server 105 .
  • the apparatus for constructing a living body recognition model may also be set in a server or a server cluster that is different from the server 105 and can communicate with the terminal devices 101 , 102 , 103 and/or the server 105 .
  • the first exemplary embodiment of the present disclosure provides a method of constructing a living body recognition model.
  • Fig. 2 schematically shows a flowchart of a method for constructing a living body recognition model according to an embodiment of the present disclosure.
  • the method for constructing a living body recognition model includes the following operations: S201 , S202 , S203 , S204 and S205 .
  • the above operations S201-S205 may be performed by a terminal device equipped with an image capture device, or by a server.
  • image data of a target object captured by shooting is acquired, and the target object includes: living objects and non-living objects carried by various types of physical media.
  • the image data of the above-mentioned living body object is corresponded to the first label representing the living body category.
  • the image data of the above-mentioned non-living object is corresponded to multiple types of second labels representing the category of non-living objects.
  • multi-classification training is performed on the machine learning model based on the first label and multiple types of the second label, so as to obtain a living body recognition model.
  • a result of the above-mentioned living body recognition model classifying the above-mentioned image data is: a living body category, or a non-living body category corresponding to one type of physical medium among the above-mentioned multiple types of physical media.
  • the above-mentioned living object is a real object, such as a real human part, such as a human face.
  • the non-living objects carried by the above-mentioned physical medium may be: human faces on photos, human faces on A4 paper, human faces on screens (such as human faces on mobile phone screens), human faces corresponding to statues, etc.
  • the living object can be other real animals, such as cats, dogs, birds, etc.
  • the non-living objects carried by physical media are: cats/dogs/ Birds, cats/dogs/birds on A4 paper, cats/dogs/birds on screen, cats/dogs/birds corresponding to statues, etc.
  • the way to obtain the image data obtained by shooting the target object can be directly shooting the target object by the terminal device to obtain the image data obtained by shooting the target object; Or the image data corresponding to the photo and video frame is obtained from the image and video database captured by the monitoring device).
  • the first label is denoted as 0, and the image data of the living object is corresponding (also referred to as associated) with the label 0, and the label 0 indicates that the real classification of the living object is the living category.
  • the number 0 of the above label is used as an example, and may also be defined as other numbers, as long as the number corresponds to the meaning of the representation.
  • the image data of the non-living object may be corresponding to multiple different category tags.
  • non-living objects are classified according to differences in physical media: ordinary paper, curved paper, cut paper, buttonhole paper, desktop screen, tablet computer screen, mobile phone screen, laptop computer screen, plaster model , wooden model, metal model, plastic model these 12 non-living categories, then the corresponding multi-category second labels can be expressed as: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12.
  • label 1 indicates that the real classification of non-living objects is non-living objects corresponding to ordinary paper.
  • the real classification of living objects is non-living objects corresponding to bent paper, non-living objects corresponding to cut paper, ..., non-living objects corresponding to metal models, and non-living objects corresponding to plastic models.
  • the machine learning model may be a convolutional neural network, or other types of deep learning networks or other machine learning models.
  • multi-classification training may be performed on the machine learning model based on the labels 0, 1, 2, . . . , 11, 12, so as to obtain a living body recognition model.
  • the multi-classification training here, it corresponds to at least 3 categories, the living object corresponds to one category, and according to the difference in the type of physical medium, the non-living objects carried by the physical medium correspond to at least 2 categories.
  • the model mainly relies on the moiré features generated when the screen is presented, while for paper-based attacks, the model mainly relies on the unique fiber texture of paper.
  • Features such as color gamut changes are used for identification.
  • the image data of non-living objects corresponds to multiple second labels representing non-living categories based on the type difference of the physical medium, and when training the machine learning model, according to the The first label and the multi-category second label of non-living objects are used for multi-classification learning.
  • the task is simpler, and machine learning is easier and more efficient.
  • Fig. 3 schematically shows a detailed implementation flowchart of operation S203 according to an embodiment of the present disclosure.
  • the operation S203 of associating the image data of the above-mentioned non-living object with multiple types of second labels representing the category of non-living objects based on the type difference of the physical medium includes the following sub-operations: S2031, S2032, S2033, and S2034.
  • the above-mentioned physical media is divided into a plurality of main categories based on the difference of attribute types of the physical media.
  • the physical medium under each main category is subdivided to obtain subdivided categories.
  • the above-mentioned main category and the above-mentioned sub-category belong to the non-living category.
  • the image data of the current non-living object is corresponded to the second label representing the above-mentioned target main category or the above-mentioned target sub-category.
  • the above-mentioned main categories include: paper media, screen media, and material media for three-dimensional models.
  • the above-mentioned paper-based media are divided into two or more of the following sub-categories: plain paper, curved paper, cut-out paper, button-hole paper, plain photo, Bend photos, crop photos, buttonhole photos.
  • the above-mentioned screen media can be divided into two or more of the following subcategories: desktop screens, tablet computer screens, mobile phone screens, and laptop computer screens.
  • the above-mentioned material medium for the three-dimensional model is divided into two or more of the following subcategories: plaster model, wooden model, metal model, plastic model.
  • Fig. 4 schematically shows a detailed implementation flowchart of operation S205 according to an embodiment of the present disclosure.
  • the above-mentioned operation S205 of performing multi-classification training on the above-mentioned machine learning model based on the above-mentioned first label and multiple types of above-mentioned second labels to obtain a living body recognition model includes the following sub-operations: S2051, S2052, and S2053.
  • sub-operation S2051 in each round of training of the above-mentioned machine learning model, for the input current image data, output and obtain that the above-mentioned current image data respectively belong to the living body category and belong to the non-living body category corresponding to each type of physical medium in the above-mentioned multiple types of physical media each probability value of .
  • a target loss function for the current image data is determined according to the respective probability values, and the target loss function is used to characterize the degree of deviation between the predicted category of the current image data and the category corresponding to the label of the current image data.
  • sub-operation S2053 the training is stopped when the convergence degree of the target loss function meets the set value, and a trained living body recognition model is obtained.
  • the above target loss function is a weighted sum of a cross-entropy loss function and a ternary center loss function.
  • Triplet-Center Loss combines the advantages of Triplet Loss (Triplet Loss) and Center Loss (Center Loss).
  • Triplet Loss makes the sample features of the same class as close as possible during the learning process. , the sample features of different categories are as far away as possible to achieve the effect of increasing the separability between categories.
  • the center loss first provides a class center for each category. During the model learning process, the distance between the sample and the corresponding category center is minimized to reduce the intra-class variance and make the intra-class features more compact.
  • the ternary center loss function can be Increasing the distance between classes can reduce the variance within classes.
  • Fig. 5 schematically shows a schematic diagram of an implementation process of constructing a living body recognition model according to an embodiment of the present disclosure.
  • the target object includes: a real human face, a human face carried by ordinary paper, a human face carried by curved paper, a human face carried by a tablet computer screen, a human face carried by a mobile phone screen, and a human face carried by a plaster model and the human face carried by the metal model, the captured image data of these target objects are obtained, and the image data 0-6 are respectively used to correspond to the image data of the above-mentioned target objects.
  • a large number of image data samples acquired are divided into training set and test set, and the image data samples in the training set are input into the machine learning model for multi-classification training.
  • the features of each image data can be extracted through the weight-sharing convolutional neural network, correspondingly expressed as features 0 to 6, and the target loss function is determined based on the labels of each input image data sample, where the target loss function is cross
  • the living body recognition model can process an image data containing an object to be recognized randomly input in the test set, and the classification result is obtained: the living body category or the corresponding medium type of the non-living body category is: ordinary paper, curved paper, Tablet screens, mobile phone screens, plaster or metal models.
  • the accuracy of the living body recognition model can be tested based on the test set, and the parameters of the living body recognition model can be adjusted according to the test set, so that the application scenarios of the living body recognition model can be generalized.
  • the cross-entropy loss function is used as the main loss function, and the ternary
  • the central loss function is used as an auxiliary loss function (corresponding to multiply by the previous weight coefficient ⁇ in the subsequent formula (3)).
  • the main loss function Based on the setting of the main loss function, it is ensured that the predicted category corresponding to the output of the image data sample input to the machine learning model is as close as possible to the category corresponding to the real label; based on the setting of the auxiliary loss function, in multi-category training scenarios with more than three categories It can effectively promote the reduction of intra-class distance and the simultaneous increase of inter-class distance.
  • the model obtained by using the weighted sum of the cross-entropy loss function and the ternary center loss function as the target loss function for training is also compared with the model obtained by only using the cross-entropy loss function for training.
  • Figure 6 schematically shows the visual features of the trained model on the test set using the cross entropy loss function (Cross Entropy Loss) as the target loss function
  • Figure 7 schematically shows the cross entropy loss function (Cross Entropy Loss) ) and the triplet-center loss function (Triplet-Center Loss) as the target loss function, the visual features of the trained living body recognition model on the test set.
  • the circled part is represented as a real person feature (corresponding to a living body category), and other points in the area outside the circled part represent non-real human face features, Corresponds to the attack features in the face anti-counterfeiting technology (corresponding to the non-living category).
  • the three-category (including living body type and at least two other non-living body types) model training process proposed by the embodiments of the present disclosure requires only It is necessary to focus on fewer and essential features, which not only achieves the focus of features; but also combines with the target loss function composed of the weighted sum of the cross-entropy loss function and the ternary center loss function, making the overall training process more efficient. Fast and has a good convergence effect.
  • N represents the total number of samples
  • xi is the input image data sample
  • y i is the actual/real label corresponding to xi
  • the above label y i ⁇ ⁇ 0,1,2,3,... ,9,10,11,12 ⁇ as an example
  • other values 1 to 12 represent different attack types, including: ordinary paper, bent paper, cut paper, buttonhole paper, Desktop screens, tablet screens, mobile phone screens, laptop screens, plaster models, wooden models, metal models, and plastic models correspond to non-living types.
  • CNN convolutional neural network
  • f i is the feature extracted by the CNN network; c j and j ⁇ y i represent other The center point of the category; m is the preset hyperparameter of the ternary loss; for f i and The Euclidean distance of is used to characterize the feature distance between the input image data sample x i and the center point of the current category; The minimum value of the feature distance between the image data sample x i used to characterize the input and the center points of other categories.
  • the purpose of setting the preset hyperparameter m is to increase the distance between classes, and the specific value can be optimized in advance.
  • the target loss function composed of the ternary center loss function L tc and the weighted cross-entropy loss function converges to a preset level.
  • the parameters of the training model make The corresponding intra-class distance decreases, The corresponding inter-class distance increases.
  • the target loss function is the weighted sum of the cross-entropy loss function L ce and the ternary center loss function L tc , and the target loss function is expressed as L, then L satisfies the following expression:
  • is the probability (or score) of the image data sample x i identified as y i obtained after passing through the CNN network
  • is the weight coefficient of the ternary center loss function
  • the value of ⁇ is: 0 ⁇ 1 and can guarantee the convergence of the target loss function. According to the actual experimental results, on the premise of ensuring the convergence of the target loss function, the value of ⁇ can be as large as possible to improve the training speed.
  • the target loss function provided by the embodiments of the present disclosure which is composed of the weighted sum of the cross-entropy loss function and the ternary center loss function, can well match the multi-classification training process of more than three classifications.
  • the cross-entropy loss function as the main loss function and the ternary center loss function as the auxiliary loss function, refer to formula (3).
  • the main loss function L ce Based on the setting of the main loss function L ce , it is ensured that the corresponding output of the image data sample input to the machine learning model is as close as possible to the corresponding category of the real label; based on the setting of the auxiliary loss function L tc , in more than three categories
  • the feature distance between the input image data sample and the current category center point during the training process tends to decrease, and at the same time, the minimum value of the feature distance between the input image data sample and other category center points It shows an increasing trend, which effectively promotes the reduction of the intra-class distance and the simultaneous increase of the inter-class distance, speeds up the convergence speed of training, and improves the effect of aggregation between similar classes and distinction between different classes.
  • the target loss function disclosed in this disclosure does not have a good adaptability to the scenario of binary classification, because the intra-class distance of binary classification is larger than that of multi-classification, and various types of attacks act as a large class, resulting in a large intra-class distance, not easy to aggregate, and the convergence speed is very slow.
  • the data corresponding to the non-living body type is not easy to aggregate in the class during the training process, so that the input image data samples are consistent with
  • the minimum value of the feature distance between other category center points (there is only one category center point in the binary classification scenario, and it is unstable) cannot be increased in a regular manner, resulting in that the distance between classes is not easy to separate, and the convergence speed is very slow.
  • the idea of combining the multi-classification training with more than three classifications and the target loss function in the weighted form of the cross-entropy loss function and the ternary center loss function proposed by the embodiments of the present disclosure is original and has excellent effects.
  • a second exemplary embodiment of the present disclosure provides a method of living body recognition.
  • Fig. 8 schematically shows a flow chart of a method for living body recognition according to an embodiment of the present disclosure.
  • the living body recognition method provided by the embodiment of the present disclosure includes the following operations: S801 and S802.
  • image data to be detected is acquired, and the image data to be detected includes an object to be recognized.
  • the image data to be detected can be image data containing objects to be identified in various types of application scenarios, for example, in the scenario of facial recognition punching of a facial recognition attendance machine, or in the scenario of personal smart device security verification.
  • the image data to be detected may be: image data taken by a real user in the surrounding background, or image data taken by an illegal user in the surrounding background by taking a face photo or A4 paper with a human face printed on it.
  • the above-mentioned image data to be detected is input into the living body recognition model, so as to output the classification result of the above-mentioned object to be recognized as a living body type or a physical medium type corresponding to a non-living body type.
  • the living body recognition model feature extraction and recognition can be performed on the image to be recognized in the input image data to be detected, and it can be identified whether the classification result of the object to be recognized is the living body category or the physical medium type determined in the non-living body category.
  • the above-mentioned living body recognition model is constructed by the method for constructing a living body recognition model described in the first embodiment.
  • the living body recognition model has a good degree of discrimination between living objects and non-living objects
  • multi-category learning is performed according to the first label of living objects and the multi-category second labels of non-living objects.
  • the task is simpler, machine learning is easier and more efficient, and it can quickly extract and classify the feature information of the object to be recognized in the image data to be detected, and has a high efficiency and high recognition accuracy.
  • a third exemplary embodiment of the present disclosure provides an apparatus for constructing a living body recognition model.
  • Fig. 9 schematically shows a structural block diagram of an apparatus for constructing a living body recognition model according to an embodiment of the present disclosure.
  • an apparatus 900 for building a living body recognition model includes: a first data acquisition module 901 , a tag association module 902 , an input module 903 and a training module 904 .
  • the above-mentioned first data acquisition module 901 is configured to acquire the image data of the target object obtained by shooting, and the above-mentioned target object includes: living objects and non-living objects carried by various types of physical media.
  • the tag association module 902 is configured to associate the image data of the living object with the first tag representing the living category; class second label.
  • the tag association module 902 includes functional modules or sub-modules for implementing the above-mentioned sub-operations S2031-S2034.
  • the above-mentioned input module 903 is configured to input the above-mentioned image data into the machine learning model for training.
  • the above-mentioned training module 904 is configured to perform multi-classification training on the above-mentioned machine learning model based on the above-mentioned first label and multiple types of the above-mentioned second labels, so as to obtain a living body recognition model.
  • the result of the above-mentioned living body recognition model classifying the above-mentioned image data is: a living body category, or a non-living body category corresponding to one type of physical medium among the above-mentioned multiple types of physical media.
  • the above-mentioned training module 904 includes functional modules or sub-modules for implementing the above-mentioned sub-operations S2051-S2053.
  • a fourth exemplary embodiment of the present disclosure provides an apparatus for living body identification.
  • Fig. 10 schematically shows a structural block diagram of a device for living body recognition according to an embodiment of the present disclosure.
  • an apparatus 1000 for living body identification provided by an embodiment of the present disclosure includes: a second data acquisition module 1001 and an identification module 1002 .
  • the second data acquisition module 1001 is configured to acquire image data to be detected, and the image data to be detected includes an object to be identified.
  • the recognition module 1002 is configured to input the image data to be detected into the living body recognition model, so as to output the classification result of the object to be recognized as the living body category or the physical medium type corresponding to the non-living body category.
  • the above-mentioned living body recognition model is constructed by the above-mentioned method for constructing a living body recognition model or constructed by the above-mentioned device for constructing a living body recognition model.
  • the above-mentioned device 1000 for living body recognition may store a pre-built living body recognition model, or may perform data communication with a device for building a living body recognition model, so as to call the constructed living body recognition model to process the image data to be detected, In order to obtain the classification result of the object to be recognized.
  • any number of the first data acquisition module 901, the label association module 902, the input module 903 and the training module 904 can be combined in one module, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules may be combined with at least part of the functions of other modules and implemented in one module.
  • At least one of the first data acquisition module 901, the label association module 902, the input module 903 and the training module 904 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA) , system-on-chip, system-on-substrate, system-on-package, application-specific integrated circuit (ASIC), or any other reasonable means of integrating or packaging circuits, such as hardware or firmware, or in software, hardware, and firmware Any one of the three implementations or an appropriate combination of any of them.
  • FPGA field programmable gate array
  • PLA programmable logic array
  • ASIC application-specific integrated circuit
  • at least one of the first data acquisition module 901, the label association module 902, the input module 903 and the training module 904 may be at least partially implemented as a computer program module, and when the computer program module is executed, corresponding functions may be performed .
  • any multiple of the second data acquisition module 1001 and the identification module 1002 can be implemented in one module, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules may be combined with at least part of the functions of other modules and implemented in one module.
  • At least one of the second data acquisition module 1001 and the identification module 1002 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, A system on a package, an application-specific integrated circuit (ASIC), or any other reasonable way of integrating or packaging circuits, such as hardware or firmware, or any of the three implementation methods of software, hardware, and firmware, or It can be realized by any suitable combination of any of them.
  • FPGA field programmable gate array
  • PLA programmable logic array
  • ASIC application-specific integrated circuit
  • at least one of the second data acquisition module 1001 and the identification module 1002 may be at least partially implemented as a computer program module, and when the computer program module is executed, corresponding functions may be performed.
  • a fifth exemplary embodiment of the present disclosure provides an electronic device.
  • Fig. 11 schematically shows a structural block diagram of an electronic device provided by an embodiment of the present disclosure.
  • an electronic device 1100 provided by an embodiment of the present disclosure includes a processor 1101, a communication interface 1102, a memory 1103, and a communication bus 1104, wherein the processor 1101, the communication interface 1102, and the memory 1103 complete mutual communication via the communication bus 1104.
  • the memory 1103 is used to store computer programs; the processor 1101 is used to execute the programs stored in the memory to implement the above-mentioned method of constructing a living body recognition model or a living body recognition method.
  • the sixth exemplary embodiment of the present disclosure also provides a computer-readable storage medium.
  • a computer program is stored on the above-mentioned computer-readable storage medium, and when the above-mentioned computer program is executed by a processor, the method for constructing a living body recognition model or the method for living body recognition as described above is realized.
  • the computer-readable storage medium may be included in the device/device described in the above embodiments; or it may exist independently without being assembled into the device/device.
  • the above-mentioned computer-readable storage medium carries one or more programs, and when the above-mentioned one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.
  • the computer-readable storage medium may be a non-volatile computer-readable storage medium, such as may include but not limited to: portable computer disk, hard disk, random access memory (RAM), read-only memory (ROM) , erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

Landscapes

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

Abstract

The present disclosure relates to methods and apparatuses for constructing a living body identification model and for living body identification, a device and a medium. The method for constructing the living body identification model comprises: acquiring image data obtained by photographing a target subject, the target subject comprising: a living subject and non-living objects carried by multiple types of physical media; making image data of the living subject correspond to a first tag which represents a living body category; on the basis of type differences of the physical media, making image data of the non-living objects correspond to multiple types of second tags which represent non-living-body categories; inputting the image data into a machine learning model for training; and performing multi-class training on the machine learning model on the basis of the first tag and the multiple types of second tags so as to obtain a living body identification model.

Description

构建活体识别模型和活体识别的方法、装置、设备及介质Method, device, equipment and medium for constructing living body recognition model and living body recognition
相关申请的交叉引用Cross References to Related Applications
本公开要求于2021年7月22日向中华人民共和国国家知识产权局提交的申请号为202110833025.X、名称为“构建活体识别模型和活体识别的方法、装置、设备及介质”的发明专利申请的优先权,并通过引用的方式将其全部内容并入本文。This disclosure requires the application for an invention patent with the application number 202110833025.X and the name "method, device, equipment and medium for constructing a living body recognition model and living body recognition" submitted to the State Intellectual Property Office of the People's Republic of China on July 22, 2021. priority, and is hereby incorporated by reference in its entirety.
技术领域technical field
本公开涉及计算机技术领域,尤其涉及一种构建活体识别模型和活体识别的方法、装置、设备及介质。The present disclosure relates to the field of computer technology, and in particular to a method, device, device and medium for constructing a living body recognition model and living body recognition.
背景技术Background technique
随着人工智能技术的发展,人的面部特征作为一种屏幕锁定和解锁的途径。通过设置人脸识别系统,可以在智能设备进行人脸的录入和识别,以实现用户基于人脸特征来对智能设备进行解锁。然而,在人脸支付、人脸安检和视频监控等领域,为了提高人脸识别的安全性,需要人脸识别系统能够区分真实的人脸和一些携带有人脸信息的伪造脸,以避免人脸识别系统遭受恶意攻击而导致一系列的损失。With the development of artificial intelligence technology, human facial features are used as a way to lock and unlock the screen. By setting up the face recognition system, the face can be entered and recognized on the smart device, so that the user can unlock the smart device based on the facial features. However, in the fields of face payment, face security inspection, and video surveillance, in order to improve the security of face recognition, it is necessary for the face recognition system to be able to distinguish between real faces and some forged faces carrying face information, so as to avoid The recognition system suffers malicious attacks and causes a series of losses.
在实现本公开构思的过程中,发现相关技术中至少存在如下技术问题:在已有的人脸防伪方案中,防伪任务常常被建模为一个二分类问题,将真人作为一类,任何类型的攻击作为一类,这种二分类的建模方式将各种不同的攻击视作一类,混合的这一攻击类中需要学习到的特征模态就很多,导致混合攻击类的机器学习过程很复杂,机器学习的结果较差。In the process of realizing the concept of the present disclosure, it is found that there are at least the following technical problems in related technologies: In the existing face anti-counterfeiting solutions, the anti-counterfeiting task is often modeled as a binary classification problem. Attacks are regarded as one type. This binary classification modeling method regards various attacks as one type. There are many feature modes that need to be learned in this mixed attack type, which makes the machine learning process of mixed attack types very difficult. Complicated, machine learning results are poor.
公开内容public content
为了解决上述技术问题或者至少部分地解决上述技术问题,本公开的实施例提供了一种构建活体识别模型和活体识别的方法、装置、设备及介质。In order to solve the above technical problems or at least partly solve the above technical problems, embodiments of the present disclosure provide a method, device, device and medium for constructing a living body recognition model and living body recognition.
第一方面,本公开的实施例提供了一种构建活体识别模型的方法。上述构建活体识别模型的方法包括:获取目标对象经拍摄得到的图像数据,上述目标对象包含:活体对象和多类物理介质承载的非活体对象;将上述活体对象的图像数据对应于表征活体类别的第一标签;基于物理介质的类型差异,将上述非活体对象的图像数据对应于表征非活体类别的多类第二标签;将上述图像数据输入至机器学习模型中,以进行训 练;以及基于上述第一标签和多类上述第二标签来对上述机器学习模型进行多分类训练,以得到活体识别模型。In the first aspect, the embodiments of the present disclosure provide a method for constructing a living body recognition model. The above-mentioned method for constructing a living body recognition model includes: acquiring image data obtained by shooting a target object, the above-mentioned target object including: a living body object and non-living body objects carried by multiple types of physical media; The first label; based on the type difference of the physical medium, the image data of the above-mentioned non-living object corresponds to multiple second labels representing the non-living category; the above-mentioned image data is input into the machine learning model for training; and based on the above The first label and multiple types of the above-mentioned second labels are used to perform multi-classification training on the above-mentioned machine learning model to obtain a living body recognition model.
根据本公开的实施例,上述基于上述第一标签和多类上述第二标签来对上述机器学习模型进行多分类训练,以得到活体识别模型,包括:在上述机器学习模型的每轮训练中,针对输入的当前图像数据,输出得到上述当前图像数据分别属于活体类别和属于上述多类物理介质中各类物理介质对应的非活体类别的各个概率值;根据上述各个概率值确定针对当前图像数据的目标损失函数,上述目标损失函数用于表征上述当前图像数据的预测类别与上述当前图像数据的标签对应的类别之间的偏离程度;以及在上述目标损失函数的收敛程度符合设定值的情况下停止训练,并得到训练完成的活体识别模型。According to an embodiment of the present disclosure, the above-mentioned multi-classification training is performed on the above-mentioned machine learning model based on the above-mentioned first label and multiple types of the above-mentioned second labels to obtain a living body recognition model, including: in each round of training of the above-mentioned machine learning model, For the input current image data, output the respective probability values that the above current image data belong to the living body category and belong to the non-living body category corresponding to each type of physical medium in the above-mentioned multiple types of physical media; A target loss function, the above-mentioned target loss function is used to characterize the degree of deviation between the predicted category of the above-mentioned current image data and the category corresponding to the label of the above-mentioned current image data; and when the degree of convergence of the above-mentioned target loss function meets the set value Stop the training and get the trained living body recognition model.
根据本公开的实施例,上述目标损失函数为交叉熵损失函数和三元中心损失函数的加权和。According to an embodiment of the present disclosure, the above target loss function is a weighted sum of a cross-entropy loss function and a ternary center loss function.
根据本公开的实施例,上述交叉熵损失函数作为主损失函数,上述三元中心损失函数作为辅助损失函数,上述目标损失函数为上述辅助损失函数和权重系数的乘积与上述主损失函数的加和,上述权重系数的取值介于0~1之间且能够保证上述目标损失函数收敛。According to an embodiment of the present disclosure, the above-mentioned cross-entropy loss function is used as the main loss function, the above-mentioned ternary center loss function is used as the auxiliary loss function, and the above-mentioned target loss function is the sum of the product of the above-mentioned auxiliary loss function and the weight coefficient and the above-mentioned main loss function , the value of the above weight coefficient is between 0 and 1 and can ensure the convergence of the above target loss function.
根据本公开的实施例,上述基于物理介质的类型差异,将上述非活体对象的图像数据对应于表征非活体类别的多类第二标签,包括:基于物理介质的属性类型差异,将上述物理介质划分为多个主类别;基于物理介质的形状、材料至少之一的差异,对每个主类别下的物理介质进行细分,得到细分类别;其中,上述主类别和上述细分类别均属于非活体类别;针对每个非活体对象的图像数据,确定当前非活体对象的物理介质所对应的目标主类别或目标细分类别;以及将当前非活体对象的图像数据对应于表征上述目标主类别或上述目标细分类别的第二标签。According to an embodiment of the present disclosure, the above-mentioned based on the type difference of the physical medium, corresponding the image data of the above-mentioned non-living object to multiple types of second labels representing the category of the non-living body, includes: based on the difference of the attribute type of the physical medium, the above-mentioned physical medium Divided into a plurality of main categories; based on the difference of at least one of the shape and material of the physical medium, the physical medium under each main category is subdivided to obtain a subdivision category; wherein, the above main category and the above subdivision category belong to non-living object category; for each image data of the non-living object, determine the target main category or target sub-category corresponding to the physical medium of the current non-living object; or the second tab of the target segment above.
根据本公开的实施例,上述主类别包括:纸质介质、屏幕介质、立体模型用材料介质;根据上述纸质介质的材料、形状差异,将上述纸质介质划分为以下细分类别的两种或更多种:普通纸质、弯曲纸质、裁剪纸质、扣洞纸质、普通照片、弯曲照片、裁剪照片、扣洞照片;根据上述屏幕介质的类型差异,将上述屏幕介质划分为以下细分类别的两种或更多种:台式机屏幕、平板电脑屏幕、手机屏幕、笔记本电脑屏幕;根据上述立体模型用材料介质的材料差异,将上述立体模型用材料介质划分为以下细分类别的两种或更多种:石膏模型、木质模型、金属模型、塑料模型。According to an embodiment of the present disclosure, the above-mentioned main categories include: paper media, screen media, and material media for three-dimensional models; Or more: plain paper, curved paper, cut paper, button hole paper, normal photo, curved photo, cropped photo, button hole photo; according to the type difference of the above screen media, the above screen media are divided into the following Two or more types of subdivided categories: desktop screen, tablet computer screen, mobile phone screen, laptop computer screen; according to the material difference of the material medium for the above three-dimensional model, the above three-dimensional model material medium is divided into the following subcategories Two or more of: plaster models, wooden models, metal models, plastic models.
第二方面,本公开的实施例提供了一种活体识别的方法。上述活体识别的方法包括:获取待检测的图像数据,上述待检测的图像数据中包含待识别对象;将上述待检 测的图像数据输入至活体识别模型中,以输出得到上述待识别对象的分类结果为活体类别、或非活体类别所对应的物理介质类型;其中,上述活体识别模型由上述构建活体识别模型的方法构建得到。In a second aspect, embodiments of the present disclosure provide a method for living body identification. The above method for living body recognition includes: acquiring image data to be detected, wherein the image data to be detected contains objects to be identified; inputting the image data to be detected into a living body recognition model to output classification results of the objects to be identified is the type of physical medium corresponding to the living body category or the non-living body category; wherein, the above-mentioned living body recognition model is constructed by the above-mentioned method for constructing a living body recognition model.
第三方面,本公开的实施例提供了一种用于构建活体识别模型的装置。上述用于构建活体识别模型的装置包括:第一数据获取模块、标签关联模块、输入模块和训练模块。上述第一数据获取模块配置为获取目标对象经拍摄得到的图像数据,上述目标对象包含:活体对象和多类物理介质承载的非活体对象。上述标签关联模块配置为将上述活体对象的图像数据对应于表征活体类别的第一标签;以及用于基于物理介质的类型差异,将上述非活体对象的图像数据对应于表征非活体类别的多类第二标签。上述输入模块配置为将上述图像数据输入至机器学习模型中,以进行训练。上述训练模块配置为基于上述第一标签和多类上述第二标签来对上述机器学习模型进行多分类训练,以得到活体识别模型。In a third aspect, embodiments of the present disclosure provide an apparatus for constructing a living body recognition model. The above-mentioned device for building a living body recognition model includes: a first data acquisition module, a tag association module, an input module and a training module. The above-mentioned first data acquisition module is configured to acquire the image data of the target object obtained by shooting, and the above-mentioned target object includes: living objects and non-living objects carried by various types of physical media. The label association module is configured to correspond the image data of the above-mentioned living objects to the first label representing the category of living objects; Second tab. The above-mentioned input module is configured to input the above-mentioned image data into the machine learning model for training. The above-mentioned training module is configured to perform multi-classification training on the above-mentioned machine learning model based on the above-mentioned first label and multiple types of the above-mentioned second labels, so as to obtain a living body recognition model.
第四方面,本公开的实施例提供了一种用于活体识别的装置。上述用于活体识别的装置包括:第二数据获取模块和识别模块。上述第二数据获取模块配置为获取待检测的图像数据,上述待检测的图像数据中包含待识别对象。上述识别模块配置为将上述待检测的图像数据输入至活体识别模型中,以输出得到上述待识别对象的分类结果为活体类别、或非活体类别所对应的物理介质类型。其中,上述活体识别模型由上述构建活体识别模型的方法构建得到或者由上述用于构建活体识别模型的装置构建得到。In a fourth aspect, embodiments of the present disclosure provide a device for living body identification. The above-mentioned device for living body identification includes: a second data acquisition module and an identification module. The second data acquisition module is configured to acquire image data to be detected, and the image data to be detected includes an object to be identified. The recognition module is configured to input the image data to be detected into the living body recognition model, so as to output the classification result of the object to be recognized as the living body category or the physical medium type corresponding to the non-living body category. Wherein, the above-mentioned living body recognition model is constructed by the above-mentioned method for constructing a living body recognition model or constructed by the above-mentioned device for constructing a living body recognition model.
第五方面,本公开的实施例提供了一种电子设备。上述电子设备包括处理器、通信接口、存储器和通信总线,其中,处理器、通信接口和存储器通过通信总线完成相互间的通信;存储器,用于存放计算机程序;处理器,用于执行存储器上所存放的程序时,实现如上所述的构建活体识别模型的方法或活体识别的方法。In a fifth aspect, embodiments of the present disclosure provide an electronic device. The above-mentioned electronic equipment includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete mutual communication through the communication bus; the memory is used to store computer programs; the processor is used to execute all programs on the memory. The stored program realizes the above-mentioned method of constructing a living body recognition model or a method of living body recognition.
第六方面,本公开的实施例提供了一种计算机可读存储介质。上述计算机可读存储介质上存储有计算机程序,上述计算机程序被处理器执行时实现如上所述的构建活体识别模型的方法或活体识别的方法。In a sixth aspect, embodiments of the present disclosure provide a computer-readable storage medium. A computer program is stored on the above-mentioned computer-readable storage medium, and when the above-mentioned computer program is executed by a processor, the above-mentioned method for constructing a living body recognition model or a method for living body recognition is realized.
本公开实施例提供的一些技术方案具有如下优点的部分或全部:Some technical solutions provided by embodiments of the present disclosure have some or all of the following advantages:
通过基于物理介质的类型差异,将非活体对象的图像数据对应于表征非活体类别的多类第二标签,在进行机器学习模型的训练时,根据活体对象的第一标签和非活体对象的多类第二标签进行多分类学习,对于每一攻击类别的学习只需要聚焦更少量的特征,任务更加简单,机器学习更加容易且高效率,并且训练后得到的活体识别模型对于活体对象和非活体对象具有较好的区分度。Based on the type difference of the physical medium, the image data of the non-living object corresponds to the multiple second labels representing the category of non-living objects. The second label is used for multi-category learning. The learning of each attack category only needs to focus on a smaller number of features, the task is simpler, the machine learning is easier and more efficient, and the living body recognition model obtained after training is suitable for living objects and non-living objects. Objects are well differentiated.
本公开实施例提供的一些技术方案具有如下优点的部分或全部:Some technical solutions provided by embodiments of the present disclosure have some or all of the following advantages:
将三分类以上的多分类训练过程,与由交叉熵损失函数和三元中心损失函数的加权和构成的目标损失函数进行结合,使得整体训练过程更为高效、快速且具有良好的收敛效果。其中,基于主损失函数L ce的设置,保证输入至机器学习模型的图像数据样本对应输出得到的预测类别尽可能靠近真实的标签所对应的类别;基于辅助损失函数L tc的设置,在三类别以上的多类别训练场景下,使得训练过程中输入的图像数据样本与当前类别中心点之间的特征距离呈减小趋势,同时使得输入的图像数据样本与其他类别中心点之间的特征距离的最小值呈增大趋势,从而有效促进类内间距的减小以及类间间距的同时增大,加快了训练的收敛速度,且提升了同类之间聚合、不同类之间区分的效果。 Combining the multi-category training process with more than three categories and the target loss function composed of the weighted sum of the cross-entropy loss function and the ternary center loss function makes the overall training process more efficient, fast and has a good convergence effect. Among them, based on the setting of the main loss function L ce , it is ensured that the corresponding output of the image data sample input to the machine learning model is as close as possible to the corresponding category of the real label; based on the setting of the auxiliary loss function L tc , in the three categories In the above multi-category training scenario, the characteristic distance between the input image data sample and the center point of the current category in the training process tends to decrease, and at the same time, the characteristic distance between the input image data sample and other category center points decreases. The minimum value tends to increase, which effectively promotes the reduction of the intra-class distance and the simultaneous increase of the inter-class distance, speeds up the convergence speed of training, and improves the effect of aggregation between similar classes and distinction between different classes.
附图说明Description of drawings
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description serve to explain the principles of the disclosure.
为了更清楚地说明本公开实施例或现有技术中的技术方案,下面将对实施例或相关技术描述中所需要使用的附图作简单地介绍,显而易见地,对于本领域普通技术人员而言,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the following will briefly introduce the accompanying drawings that need to be used in the description of the embodiments or related technologies. Obviously, for those of ordinary skill in the art , on the premise of not paying creative labor, other drawings can also be obtained based on these drawings.
图1示意性示出了适用于本公开实施例的构建活体识别模型的方法和装置的系统架构;FIG. 1 schematically shows the system architecture of the method and device for constructing a living body recognition model applicable to an embodiment of the present disclosure;
图2示意性示出了根据本公开实施例的构建活体识别模型的方法的流程图;FIG. 2 schematically shows a flowchart of a method for constructing a living body recognition model according to an embodiment of the present disclosure;
图3示意性示出了根据本公开实施例的操作S203的详细实施流程图;FIG. 3 schematically shows a detailed implementation flowchart of operation S203 according to an embodiment of the present disclosure;
图4示意性示出了根据本公开实施例的操作S205的详细实施流程图;FIG. 4 schematically shows a detailed implementation flowchart of operation S205 according to an embodiment of the present disclosure;
图5示意性示出了根据本公开实施例的构建活体识别模型的实施过程示意图;Fig. 5 schematically shows a schematic diagram of the implementation process of constructing a living body recognition model according to an embodiment of the present disclosure;
图6示意性示出了采用交叉熵损失函数(Cross Entropy Loss)作为目标损失函数,训练得到的模型在测试集上的可视化特征;Figure 6 schematically shows the visual features of the trained model on the test set using the Cross Entropy Loss function (Cross Entropy Loss) as the target loss function;
图7示意性示出了采用交叉熵损失函数(Cross Entropy Loss)和三元中心损失函数(Triplet-Center Loss)的加权和作为目标损失函数,训练得到的活体识别模型在测试集上的可视化特征;Figure 7 schematically shows the visual features of the trained living body recognition model on the test set using the weighted sum of the cross-entropy loss function (Cross Entropy Loss) and the triplet-center loss function (Triplet-Center Loss) as the target loss function ;
图8示意性示出了根据本公开实施例的活体识别的方法的流程图;FIG. 8 schematically shows a flow chart of a method for living body recognition according to an embodiment of the present disclosure;
图9示意性示出了根据本公开实施例的用于构建活体识别模型的装置的结构框图;Fig. 9 schematically shows a structural block diagram of a device for constructing a living body recognition model according to an embodiment of the present disclosure;
图10示意性示出了根据本公开实施例的用于活体识别的装置的结构框图;以及Fig. 10 schematically shows a structural block diagram of a device for living body recognition according to an embodiment of the present disclosure; and
图11示意性示出了本公开实施例提供的电子设备的结构框图。Fig. 11 schematically shows a structural block diagram of an electronic device provided by an embodiment of the present disclosure.
具体实施方式detailed description
本公开的实施例提供了一种构建活体识别模型和活体识别的方法、装置、设备及介质。上述构建活体识别模型的方法包括:获取目标对象经拍摄得到的图像数据,上述目标对象包含:活体对象和多类物理介质承载的非活体对象;将上述活体对象的图像数据对应于表征活体类别的第一标签;基于物理介质的类型差异,将上述非活体对象的图像数据对应于表征非活体类别的多类第二标签;将上述图像数据输入至机器学习模型中,以进行训练;以及基于上述第一标签和多类上述第二标签来对上述机器学习模型进行多分类训练(其中对应于至少3类,活体对象一类,物理介质承载的非活体对象至少2类),以得到活体识别模型。Embodiments of the present disclosure provide a method, device, device and medium for constructing a living body recognition model and living body recognition. The above-mentioned method for constructing a living body recognition model includes: acquiring image data obtained by shooting a target object, the above-mentioned target object including: a living body object and non-living body objects carried by multiple types of physical media; The first label; based on the type difference of the physical medium, the image data of the above-mentioned non-living object corresponds to multiple second labels representing the non-living category; the above-mentioned image data is input into the machine learning model for training; and based on the above The first label and multiple types of the above-mentioned second labels are used to perform multi-classification training on the above-mentioned machine learning model (corresponding to at least 3 categories, one category of living objects, and at least 2 categories of non-living objects carried by physical media), to obtain a living body recognition model. .
上述活体识别模型对上述图像数据进行分类的结果为:活体类别、或上述多类物理介质中的一类物理介质对应的非活体类别。A result of the above-mentioned living body recognition model classifying the above-mentioned image data is: a living body category, or a non-living body category corresponding to one type of physical medium among the above-mentioned multiple types of physical media.
为使本公开实施例的目的、技术方案和优点更加清楚,下面将结合本公开实施例中的附图,对本公开实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本公开的一部分实施例,而不是全部的实施例。基于本公开中的实施例,本领域普通技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本公开保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments It is a part of embodiments of the present disclosure, but not all embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present disclosure.
图1示意性示出了适用于本公开实施例的构建活体识别模型的方法和装置的系统架构。Fig. 1 schematically shows the system architecture of the method and device for constructing a living body recognition model applicable to the embodiments of the present disclosure.
参照图1所示,适用于本公开实施例的构建活体识别模型的方法及装置的系统架构100包括:终端设备101、102、103,网络104和服务器105。网络104用以在终端设备101、102、103和服务器105之间提供通信链路的介质。网络104可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。Referring to FIG. 1 , a system architecture 100 applicable to the method and device for constructing a living body recognition model according to an embodiment of the present disclosure includes: terminal devices 101 , 102 , 103 , a network 104 and a server 105 . The network 104 is used as a medium for providing communication links between the terminal devices 101 , 102 , 103 and the server 105 . Network 104 may include various connection types, such as wires, wireless communication links, or fiber optic cables, among others.
用户可以使用终端设备101、102、103通过网络104与服务器105交互,以接收或发送消息等。终端设备101、102、103上可以安装有图像捕获装置、图片/视频播放类应用等。还可以安装有其他通讯客户端应用,例如购物类应用、网页浏览器应用、搜索类应用、即时通信工具、邮箱客户端、社交平台软件等(仅为示例)。Users can use terminal devices 101 , 102 , 103 to interact with server 105 via network 104 to receive or send messages and the like. The terminal devices 101, 102, 103 may be installed with an image capture device, a picture/video playing application, and the like. Other communication client applications may also be installed, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (just examples).
终端设备101、102、103可以是显示屏并且支持图片/视频播放的各种电子设备,该电子设备还可以进一步包括图像捕获装置,例如电子设备包括但不限于智能手机、平板电脑、笔记本电脑、台式计算机、无人驾驶汽车、监控设备等等。The terminal devices 101, 102, 103 can be display screens and various electronic devices that support picture/video playback. The electronic devices can further include image capture devices. For example, electronic devices include but are not limited to smart phones, tablet computers, notebook computers, Desktop computers, self-driving cars, surveillance equipment, and more.
服务器105可以是提供各种服务的服务器,例如对用户利用终端设备101、102、103所拍摄的图像或视频进行数据处理提供服务支持的后台管理服务器(仅为示例)。后台管理服务器可以对接收到的图像/视频处理请求等数据进行分析等处理,并将处理结 果(例如根据用户请求获取或生成的网页、信息、或数据等)反馈给终端设备。例如,数据处理可以是对终端设备101、102、103所拍摄的图像或视频中的视频帧进行人脸识别处理,以得到上述图像或视频帧中的人脸是真实的人脸还是其他类型的伪人脸。The server 105 may be a server that provides various services, such as a background management server that provides service support for data processing of images or videos captured by users using the terminal devices 101 , 102 , and 103 (just an example). The background management server can analyze and process the received data such as image/video processing requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device. For example, the data processing can be to perform face recognition processing on the video frames in the images or videos captured by the terminal devices 101, 102, 103, so as to obtain whether the faces in the above images or video frames are real faces or other types of faces. Fake face.
需要说明的是,本公开实施例所提供的构建活体识别模型的方法一般可以由服务器105或具有一定运算能力的终端设备执行。相应地,本公开实施例所提供的构建活体识别模型的装置一般可以设置于服务器105中或上述具有一定运算能力的终端设备中。本公开实施例所提供的构建活体识别模型的方法也可以由不同于服务器105且能够与终端设备101、102、103和/或服务器105通信的服务器或服务器集群执行。相应地,本公开实施例所提供的构建活体识别模型的装置也可以设置于不同于服务器105且能够与终端设备101、102、103和/或服务器105通信的服务器或服务器集群中。It should be noted that the method for constructing a living body recognition model provided by the embodiments of the present disclosure may generally be executed by the server 105 or a terminal device with certain computing capabilities. Correspondingly, the apparatus for constructing a living body recognition model provided by the embodiments of the present disclosure may generally be set in the server 105 or the above-mentioned terminal devices with certain computing capabilities. The method for constructing a living body recognition model provided by the embodiments of the present disclosure may also be executed by a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101 , 102 , 103 and/or the server 105 . Correspondingly, the apparatus for constructing a living body recognition model provided by the embodiments of the present disclosure may also be set in a server or a server cluster that is different from the server 105 and can communicate with the terminal devices 101 , 102 , 103 and/or the server 105 .
应该理解,图1中的终端设备、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。It should be understood that the numbers of terminal devices, networks and servers in Fig. 1 are only illustrative. According to the implementation needs, there can be any number of terminal devices, networks and servers.
本公开的第一个示例性实施例提供了一种构建活体识别模型的方法。The first exemplary embodiment of the present disclosure provides a method of constructing a living body recognition model.
图2示意性示出了根据本公开实施例的构建活体识别模型的方法的流程图。Fig. 2 schematically shows a flowchart of a method for constructing a living body recognition model according to an embodiment of the present disclosure.
参照图2所示,本公开实施例提供的构建活体识别模型的方法包括以下操作:S201、S202、S203、S204和S205。上述操作S201~S205可以由带有图像捕获装置的终端设备执行,或者由服务器执行。Referring to FIG. 2 , the method for constructing a living body recognition model provided by an embodiment of the present disclosure includes the following operations: S201 , S202 , S203 , S204 and S205 . The above operations S201-S205 may be performed by a terminal device equipped with an image capture device, or by a server.
在操作S201,获取目标对象经拍摄得到的图像数据,上述目标对象包含:活体对象和多类物理介质承载的非活体对象。In operation S201, image data of a target object captured by shooting is acquired, and the target object includes: living objects and non-living objects carried by various types of physical media.
在操作S202,将上述活体对象的图像数据对应于表征活体类别的第一标签。In operation S202, the image data of the above-mentioned living body object is corresponded to the first label representing the living body category.
在操作S203,基于物理介质的类型差异,将上述非活体对象的图像数据对应于表征非活体类别的多类第二标签。In operation S203, based on the type difference of the physical medium, the image data of the above-mentioned non-living object is corresponded to multiple types of second labels representing the category of non-living objects.
在操作S204,将上述图像数据输入至机器学习模型中,以进行训练。In operation S204, the above image data is input into the machine learning model for training.
在操作S205,基于上述第一标签和多类上述第二标签来对上述机器学习模型进行多分类训练,以得到活体识别模型。In operation S205, multi-classification training is performed on the machine learning model based on the first label and multiple types of the second label, so as to obtain a living body recognition model.
上述活体识别模型对上述图像数据进行分类的结果为:活体类别、或上述多类物理介质中的一类物理介质对应的非活体类别。A result of the above-mentioned living body recognition model classifying the above-mentioned image data is: a living body category, or a non-living body category corresponding to one type of physical medium among the above-mentioned multiple types of physical media.
上述操作S201中,上述活体对象为真实的对象,例如为真实的人的部位,例如为人脸。上述物理介质承载的非活体对象可以是:照片上的人脸、A4纸上的人脸、屏幕上的人脸(例如手机屏幕上的人脸)、雕像对应的人脸等。这里以人脸作为活体对象的示例,在其他应用场景中,活体对象可以是其他真实的动物,例如为猫、狗、鸟等,物理介质承载的非活体对象为:照片上的猫/狗/鸟、A4纸上的猫/狗/鸟、屏幕上的猫/ 狗/鸟、雕像对应的猫/狗/鸟等。In the above operation S201, the above-mentioned living object is a real object, such as a real human part, such as a human face. The non-living objects carried by the above-mentioned physical medium may be: human faces on photos, human faces on A4 paper, human faces on screens (such as human faces on mobile phone screens), human faces corresponding to statues, etc. Here we take the human face as an example of a living object. In other application scenarios, the living object can be other real animals, such as cats, dogs, birds, etc. The non-living objects carried by physical media are: cats/dogs/ Birds, cats/dogs/birds on A4 paper, cats/dogs/birds on screen, cats/dogs/birds corresponding to statues, etc.
获取目标对象经拍摄得到的图像数据的途径,可以是由终端设备直接对目标对象进行拍摄,以得到目标对象经拍摄得到的图像数据;也可以是由服务器从终端设备(例如照相机、手机摄像头、或者监控装置)所拍摄的图像、视频的数据库中获取照片、视频帧所对应的图像数据。The way to obtain the image data obtained by shooting the target object can be directly shooting the target object by the terminal device to obtain the image data obtained by shooting the target object; Or the image data corresponding to the photo and video frame is obtained from the image and video database captured by the monitoring device).
上述操作S202中,例如将第一标签表示为0,对活体对象的图像数据对应(也可以称为关联)于标签0,标签0表示该活体对象的真实分类为活体类别。应该理解的是,上述标签的数字0作为示例,也可以定义为其他数字,只要数字和表征的含义对应即可。In the above operation S202, for example, the first label is denoted as 0, and the image data of the living object is corresponding (also referred to as associated) with the label 0, and the label 0 indicates that the real classification of the living object is the living category. It should be understood that the number 0 of the above label is used as an example, and may also be defined as other numbers, as long as the number corresponds to the meaning of the representation.
上述操作S203中,根据非活体对象所承载的物理介质的差异,可以将非活体对象的图像数据对应于多个不同的类别标签。示例性的,将非活体对象按照物理介质的差异划分为:普通纸质、弯曲纸质、裁剪纸质、扣洞纸质、台式机屏幕、平板电脑屏幕、手机屏幕、笔记本电脑屏幕、石膏模型、木质模型、金属模型、塑料模型这12种非活体类别,则对应的多类第二标签可以表示为:1、2、3、4、5、6、7、8、9、10、11、12,依次与上述各个类型进行对应,标签1表示非活体对象的真实分类为普通纸质对应的非活体对象,类似的,标签2、标签3、……、标签11、标签12分别对应表示非活体对象的真实分类为弯曲纸质对应的非活体对象、裁剪纸质对应的非活体对象、……、金属模型对应的非活体对象、塑料模型对应的非活体对象。In the above operation S203, according to the difference of the physical medium carried by the non-living object, the image data of the non-living object may be corresponding to multiple different category tags. Exemplarily, non-living objects are classified according to differences in physical media: ordinary paper, curved paper, cut paper, buttonhole paper, desktop screen, tablet computer screen, mobile phone screen, laptop computer screen, plaster model , wooden model, metal model, plastic model these 12 non-living categories, then the corresponding multi-category second labels can be expressed as: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12. Corresponding to each of the above types in turn, label 1 indicates that the real classification of non-living objects is non-living objects corresponding to ordinary paper. The real classification of living objects is non-living objects corresponding to bent paper, non-living objects corresponding to cut paper, ..., non-living objects corresponding to metal models, and non-living objects corresponding to plastic models.
上述操作S204中,机器学习模型可以是卷积神经网络,也可以是其他类型的深度学习网络或者其他机器学习模型。In the above operation S204, the machine learning model may be a convolutional neural network, or other types of deep learning networks or other machine learning models.
上述操作S205中,按照上述的标签示例,可以基于标签0、1、2、……、11、12来对机器学习模型进行多分类训练,从而得到活体识别模型。这里的多分类训练中,对应于至少3类,活体对象对应于一类,根据物理介质的种类差异,将物理介质承载的非活体对象对应于至少2类。In the above operation S205, according to the above label examples, multi-classification training may be performed on the machine learning model based on the labels 0, 1, 2, . . . , 11, 12, so as to obtain a living body recognition model. In the multi-classification training here, it corresponds to at least 3 categories, the living object corresponds to one category, and according to the difference in the type of physical medium, the non-living objects carried by the physical medium correspond to at least 2 categories.
本公开的实施例中,考虑到攻击者可以基于纸片、屏幕、石膏等物理介质向人脸识别系统呈现合法用户的人脸,当模型对基于物理介质的攻击进行识别时,对于不同的物理介质模型识别依赖的特征并不一样,例如对基于屏幕的攻击,模型主要依赖屏幕呈现时产生的摩尔纹特征来进行识别,而对于基于纸质的攻击,模型主要依赖纸质特有的纤维纹理,颜色域变化等特征来进行识别。因此,基于上述操作S201~S205,通过基于物理介质的类型差异,将非活体对象的图像数据对应于表征非活体类别的多类第二标签,在进行机器学习模型的训练时,根据活体对象的第一标签和非活体对象的多类第二标签进行多分类学习,对于每一攻击类别的学习只需要聚焦更少量且本质性的特征,任务更加简单,机器学习更加容易且高效率。In the embodiments of the present disclosure, considering that the attacker can present the legal user's face to the face recognition system based on physical media such as paper, screen, plaster, etc., when the model recognizes attacks based on physical media, for different physical media Media model identification relies on different features. For example, for screen-based attacks, the model mainly relies on the moiré features generated when the screen is presented, while for paper-based attacks, the model mainly relies on the unique fiber texture of paper. Features such as color gamut changes are used for identification. Therefore, based on the above-mentioned operations S201-S205, the image data of non-living objects corresponds to multiple second labels representing non-living categories based on the type difference of the physical medium, and when training the machine learning model, according to the The first label and the multi-category second label of non-living objects are used for multi-classification learning. For the learning of each attack category, only a small number of essential features need to be focused. The task is simpler, and machine learning is easier and more efficient.
图3示意性示出了根据本公开实施例的操作S203的详细实施流程图。Fig. 3 schematically shows a detailed implementation flowchart of operation S203 according to an embodiment of the present disclosure.
根据本公开的实施例,参照图3所示,上述基于物理介质的类型差异,将上述非活体对象的图像数据对应于表征非活体类别的多类第二标签的操作S203,包括以下子操作:S2031、S2032、S2033和S2034。According to an embodiment of the present disclosure, referring to FIG. 3 , the operation S203 of associating the image data of the above-mentioned non-living object with multiple types of second labels representing the category of non-living objects based on the type difference of the physical medium includes the following sub-operations: S2031, S2032, S2033, and S2034.
在操作S2031,基于物理介质的属性类型差异,将上述物理介质划分为多个主类别。In operation S2031, the above-mentioned physical media is divided into a plurality of main categories based on the difference of attribute types of the physical media.
在操作S2032,基于物理介质的形状、材料至少之一的差异,对每个主类别下的物理介质进行细分,得到细分类别。其中,上述主类别和上述细分类别均属于非活体类别。In operation S2032, based on the difference of at least one of the shape and material of the physical medium, the physical medium under each main category is subdivided to obtain subdivided categories. Among them, the above-mentioned main category and the above-mentioned sub-category belong to the non-living category.
在操作S2033,针对每个非活体对象的图像数据,确定当前非活体对象的物理介质所对应的目标主类别或目标细分类别。In operation S2033, for each image data of the non-living object, determine a target main category or a target sub-category corresponding to the physical medium of the current non-living object.
在操作S2034,将当前非活体对象的图像数据对应于表征上述目标主类别或上述目标细分类别的第二标签。In operation S2034, the image data of the current non-living object is corresponded to the second label representing the above-mentioned target main category or the above-mentioned target sub-category.
根据本公开的实施例,上述主类别包括:纸质介质、屏幕介质、立体模型用材料介质。According to an embodiment of the present disclosure, the above-mentioned main categories include: paper media, screen media, and material media for three-dimensional models.
根据上述纸质介质的材料、形状差异,将上述纸质介质划分为以下细分类别的两种或更多种:普通纸质、弯曲纸质、裁剪纸质、扣洞纸质、普通照片、弯曲照片、裁剪照片、扣洞照片。According to the difference in material and shape of the above-mentioned paper-based media, the above-mentioned paper-based media are divided into two or more of the following sub-categories: plain paper, curved paper, cut-out paper, button-hole paper, plain photo, Bend photos, crop photos, buttonhole photos.
根据上述屏幕介质的类型差异,将上述屏幕介质划分为以下细分类别的两种或更多种:台式机屏幕、平板电脑屏幕、手机屏幕、笔记本电脑屏幕。According to the differences in types of the above-mentioned screen media, the above-mentioned screen media can be divided into two or more of the following subcategories: desktop screens, tablet computer screens, mobile phone screens, and laptop computer screens.
根据上述立体模型用材料介质的材料差异,将上述立体模型用材料介质划分为以下细分类别的两种或更多种:石膏模型、木质模型、金属模型、塑料模型。According to the material difference of the material medium for the three-dimensional model, the above-mentioned material medium for the three-dimensional model is divided into two or more of the following subcategories: plaster model, wooden model, metal model, plastic model.
图4示意性示出了根据本公开实施例的操作S205的详细实施流程图。Fig. 4 schematically shows a detailed implementation flowchart of operation S205 according to an embodiment of the present disclosure.
根据本公开的实施例,参照图4所示,上述基于上述第一标签和多类上述第二标签来对上述机器学习模型进行多分类训练,以得到活体识别模型的操作S205包括以下子操作:S2051、S2052和S2053。According to an embodiment of the present disclosure, as shown in FIG. 4 , the above-mentioned operation S205 of performing multi-classification training on the above-mentioned machine learning model based on the above-mentioned first label and multiple types of above-mentioned second labels to obtain a living body recognition model includes the following sub-operations: S2051, S2052, and S2053.
在子操作S2051,在上述机器学习模型的每轮训练中,针对输入的当前图像数据,输出得到上述当前图像数据分别属于活体类别和属于上述多类物理介质中各类物理介质对应的非活体类别的各个概率值。In sub-operation S2051, in each round of training of the above-mentioned machine learning model, for the input current image data, output and obtain that the above-mentioned current image data respectively belong to the living body category and belong to the non-living body category corresponding to each type of physical medium in the above-mentioned multiple types of physical media each probability value of .
在子操作S2052,根据上述各个概率值确定针对当前图像数据的目标损失函数,上述目标损失函数用于表征上述当前图像数据的预测类别与上述当前图像数据的标签对应的类别之间的偏离程度。In sub-operation S2052, a target loss function for the current image data is determined according to the respective probability values, and the target loss function is used to characterize the degree of deviation between the predicted category of the current image data and the category corresponding to the label of the current image data.
在子操作S2053,在上述目标损失函数的收敛程度符合设定值的情况下停止训练, 并得到训练完成的活体识别模型。In sub-operation S2053, the training is stopped when the convergence degree of the target loss function meets the set value, and a trained living body recognition model is obtained.
根据本公开的实施例,上述目标损失函数为交叉熵损失函数和三元中心损失函数的加权和。According to an embodiment of the present disclosure, the above target loss function is a weighted sum of a cross-entropy loss function and a ternary center loss function.
其中,三元中心损失函数(Triplet-Center Loss)是结合了三元损失(Triplet Loss)和中心损失(Center Loss)的优势,三元损失在学习过程中通过让同一类的样本特征尽可能靠近,不同类别的样本特征尽可能远离,来达到增大类间可分离度的作用。中心损失首先为每一个类别提供一个类中心,在模型学习过程中通过最小化样本与对应类别中心的距离来达到缩小类内方差的目的并使得类内特征更加紧凑,三元中心损失函数既可以加大类间距又可以减小类内方差。Among them, the Triplet-Center Loss function (Triplet-Center Loss) combines the advantages of Triplet Loss (Triplet Loss) and Center Loss (Center Loss). Triplet Loss makes the sample features of the same class as close as possible during the learning process. , the sample features of different categories are as far away as possible to achieve the effect of increasing the separability between categories. The center loss first provides a class center for each category. During the model learning process, the distance between the sample and the corresponding category center is minimized to reduce the intra-class variance and make the intra-class features more compact. The ternary center loss function can be Increasing the distance between classes can reduce the variance within classes.
图5示意性示出了根据本公开实施例的构建活体识别模型的实施过程示意图。Fig. 5 schematically shows a schematic diagram of an implementation process of constructing a living body recognition model according to an embodiment of the present disclosure.
参照图5所示,示例了构建活体识别模型的过程。本实施例中,目标对象包括:真实人脸、普通纸质承载的人脸、弯曲纸质承载的人脸、平板电脑屏幕承载的人脸、手机屏幕承载的人脸、石膏模型承载的人脸和金属模型承载的人脸,获取这些目标对象经拍摄的图像数据,分别采用图像数据0~6来对应上述各个目标对象的图像数据。将获取的大量的图像数据样本划分为训练集和测试集,将训练集中的图像数据样本输入至机器学习模型中,进行多分类训练。训练时可以通过权重共享的卷积神经网络来提取出各个图像数据的特征,对应表示为特征0~6,并基于各个输入的图像数据样本的标签来确定目标损失函数,其中目标损失函数为交叉熵损失函数(Cross Entropy Loss,CE Loss)和三元中心损失函数的加权和。经过多次训练后,目标损失函数的收敛程度符合设定值,那么对应训练得到的即为活体识别模型。该活体识别模型能够对测试集中随机输入的一个包含有待识别对象的图像数据进行处理,并得到分类结果为:活体类别、或非活体类别所对应的介质类型为:普通纸质、弯曲纸质、平板电脑屏幕、手机屏幕、石膏模型或金属模型。Referring to FIG. 5 , the process of building a living body recognition model is illustrated. In this embodiment, the target object includes: a real human face, a human face carried by ordinary paper, a human face carried by curved paper, a human face carried by a tablet computer screen, a human face carried by a mobile phone screen, and a human face carried by a plaster model and the human face carried by the metal model, the captured image data of these target objects are obtained, and the image data 0-6 are respectively used to correspond to the image data of the above-mentioned target objects. A large number of image data samples acquired are divided into training set and test set, and the image data samples in the training set are input into the machine learning model for multi-classification training. During training, the features of each image data can be extracted through the weight-sharing convolutional neural network, correspondingly expressed as features 0 to 6, and the target loss function is determined based on the labels of each input image data sample, where the target loss function is cross The weighted sum of the entropy loss function (Cross Entropy Loss, CE Loss) and the ternary center loss function. After many times of training, if the convergence degree of the target loss function meets the set value, then the corresponding training is the living body recognition model. The living body recognition model can process an image data containing an object to be recognized randomly input in the test set, and the classification result is obtained: the living body category or the corresponding medium type of the non-living body category is: ordinary paper, curved paper, Tablet screens, mobile phone screens, plaster or metal models.
根据本公开的实施例,可以基于测试集对活体识别模型的准确度进行测试,并根据测试集对活体识别模型的参数进行调整,使得活体识别模型的应用场景泛化。According to the embodiments of the present disclosure, the accuracy of the living body recognition model can be tested based on the test set, and the parameters of the living body recognition model can be adjusted according to the test set, so that the application scenarios of the living body recognition model can be generalized.
本公开的实施例中,在机器学习模型的训练过程中,通过采用由交叉熵损失函数与三元中心损失函数的加权和构成的目标损失函数,以交叉熵损失函数作为主损失函数,三元中心损失函数作为辅助损失函数(对应要乘以后续的公式(3)中前面的权重系数α)。基于主损失函数的设置,保证输入至机器学习模型的图像数据样本对应输出得到的预测类别尽可能靠近真实的标签所对应的类别;基于辅助损失函数的设置,在三类别以上的多类别训练场景下,能够有效促进类内间距的减小以及类间间距的同时增大。In the embodiment of the present disclosure, in the training process of the machine learning model, by using the target loss function composed of the weighted sum of the cross-entropy loss function and the ternary center loss function, the cross-entropy loss function is used as the main loss function, and the ternary The central loss function is used as an auxiliary loss function (corresponding to multiply by the previous weight coefficient α in the subsequent formula (3)). Based on the setting of the main loss function, it is ensured that the predicted category corresponding to the output of the image data sample input to the machine learning model is as close as possible to the category corresponding to the real label; based on the setting of the auxiliary loss function, in multi-category training scenarios with more than three categories It can effectively promote the reduction of intra-class distance and the simultaneous increase of inter-class distance.
为了验证本公开实施例的目标损失函数的效果,还对比了采用交叉熵损失函数与三元中心损失函数的加权和作为目标损失函数进行训练得到的模型,与只采用交叉熵损失函数进行训练得到的模型,这两种损失函数所对应的测试结果。In order to verify the effect of the target loss function of the embodiment of the present disclosure, the model obtained by using the weighted sum of the cross-entropy loss function and the ternary center loss function as the target loss function for training is also compared with the model obtained by only using the cross-entropy loss function for training. The model, the test results corresponding to these two loss functions.
图6示意性示出了采用交叉熵损失函数(Cross Entropy Loss)作为目标损失函数,训练得到的模型在测试集上的可视化特征;图7示意性示出了采用交叉熵损失函数(Cross Entropy Loss)和三元中心损失函数(Triplet-Center Loss)的加权和作为目标损失函数,训练得到的活体识别模型在测试集上的可视化特征。Figure 6 schematically shows the visual features of the trained model on the test set using the cross entropy loss function (Cross Entropy Loss) as the target loss function; Figure 7 schematically shows the cross entropy loss function (Cross Entropy Loss) ) and the triplet-center loss function (Triplet-Center Loss) as the target loss function, the visual features of the trained living body recognition model on the test set.
参照图6和图7中采用虚线框圈出的部分所示,圈出的部分内表示为真人特征(对应为活体类别),圈出部分之外的区域的其他点表示非真实人脸特征,对应于人脸防伪技术里面的攻击特征(对应为非活体类别)。通过对比图6和图7可以看到,图7对应的活体识别模型的真人特征与攻击特征可分离度更强,而图6对应模型的真人特征被攻击特征包围可分离度更弱,这说明在交叉熵损失函数Cross Entropy Loss的基础上加入三元中心损失函数Triplet-Center Loss可提升模型对攻击和真人的区分力度,证明了采用本公开实施例提供的目标损失函数训练得到的活体识别模型对于活体对象和非活体对象具有较好的区分度。With reference to Fig. 6 and Fig. 7, shown in the part circled by the dotted line frame, the circled part is represented as a real person feature (corresponding to a living body category), and other points in the area outside the circled part represent non-real human face features, Corresponds to the attack features in the face anti-counterfeiting technology (corresponding to the non-living category). By comparing Figure 6 and Figure 7, it can be seen that the liveness recognition model corresponding to Figure 7 has a stronger separability between real-person features and attack features, while the model corresponding to Figure 6 has a weaker separability between real-person features surrounded by attack features, which shows that Adding the triplet-center loss function Triplet-Center Loss on the basis of the cross-entropy loss function Cross Entropy Loss can improve the model's ability to distinguish between attacks and real people, which proves that the living body recognition model obtained by training with the target loss function provided by the embodiment of the present disclosure It has a good degree of discrimination for living objects and non-living objects.
此外,相较于现有技术中的二分类训练场景,本公开实施例所提出的三分类(包含活体类型和至少两种其他非活体类型)的模型训练过程,对于每一攻击类别的学习只需要聚焦更少量且本质性的特征,不仅实现了特征的聚焦;还通过与由交叉熵损失函数和三元中心损失函数的加权和构成的目标损失函数进行结合,使得整体训练过程更为高效、快速且具有良好的收敛效果。In addition, compared with the two-category training scenario in the prior art, the three-category (including living body type and at least two other non-living body types) model training process proposed by the embodiments of the present disclosure requires only It is necessary to focus on fewer and essential features, which not only achieves the focus of features; but also combines with the target loss function composed of the weighted sum of the cross-entropy loss function and the ternary center loss function, making the overall training process more efficient. Fast and has a good convergence effect.
下面结合具体实例来描述目标损失函数的表达式。The following describes the expression of the target loss function in combination with specific examples.
假设训练数据为
Figure PCTCN2022093514-appb-000001
其中N代表总体样本数量,x i是输入的图像数据样本,y i是x i对应的实际/真实标签,在一实施例中,以上述标签y i∈{0,1,2,3,…,9,10,11,12}作为示例;y i=0代表活体类型,其他数值1~12代表不同的攻击类型,包括:普通纸质、弯曲纸质、裁剪纸质、扣洞纸质、台式机屏幕、平板电脑屏幕、手机屏幕、笔记本电脑屏幕、石膏模型、木质模型、金属模型、塑料模型各自对应的非活体类型。
Suppose the training data is
Figure PCTCN2022093514-appb-000001
Wherein N represents the total number of samples, xi is the input image data sample, y i is the actual/real label corresponding to xi , in one embodiment, the above label y i ∈ {0,1,2,3,... ,9,10,11,12} as an example; y i =0 represents the living body type, and other values 1 to 12 represent different attack types, including: ordinary paper, bent paper, cut paper, buttonhole paper, Desktop screens, tablet screens, mobile phone screens, laptop screens, plaster models, wooden models, metal models, and plastic models correspond to non-living types.
本实施例中,以机器学习模型包括权重共享的卷积神经网络(CNN)进行示例。对于每个图像数据样本x i,在经过权重共享的CNN网络f进行图像特征提取后,输出固定维度的特征f(x i),将f(x i)简记为f iIn this embodiment, a convolutional neural network (CNN) whose machine learning model includes weight sharing is used as an example. For each image data sample x i , after image feature extraction by weight-sharing CNN network f, a fixed-dimensional feature f( xi ) is output, and f( xi ) is abbreviated as f i .
假设训练中每次参与迭代的样本数为M,M<N,那么每次参与迭代的M个样本对应的三元中心损失函数为:Assuming that the number of samples participating in each iteration in training is M, and M<N, then the ternary center loss function corresponding to M samples participating in each iteration is:
Figure PCTCN2022093514-appb-000002
Figure PCTCN2022093514-appb-000002
Figure PCTCN2022093514-appb-000003
Figure PCTCN2022093514-appb-000003
其中,
Figure PCTCN2022093514-appb-000004
表示输入的图像数据样本x i对应的真实标签y i所在的当前类别的中心点;f i为由CNN网络进行特征提取得到的特征;c j且j≠y i表示除y i之外的其他类别的中心点;m为三元损失预设的超参数;
Figure PCTCN2022093514-appb-000005
为f i
Figure PCTCN2022093514-appb-000006
的欧式距离,用于表征输入的图像数据样本x i与当前类别中心点之间的特征距离;
Figure PCTCN2022093514-appb-000007
用于表征输入的图像数据样本x i与其他类别中心点之间的特征距离的最小值。
in,
Figure PCTCN2022093514-appb-000004
Indicates the center point of the current category of the real label y i corresponding to the input image data sample x i ; f i is the feature extracted by the CNN network; c j and j≠y i represent other The center point of the category; m is the preset hyperparameter of the ternary loss;
Figure PCTCN2022093514-appb-000005
for f i and
Figure PCTCN2022093514-appb-000006
The Euclidean distance of is used to characterize the feature distance between the input image data sample x i and the center point of the current category;
Figure PCTCN2022093514-appb-000007
The minimum value of the feature distance between the image data sample x i used to characterize the input and the center points of other categories.
上述公式(1)中,预设的超参数m的设置目的是增大类间间距,具体数值可以预先进行优化。通过多次训练,使得三元中心损失函数L tc和交叉熵损失函数加权构成的目标损失函数收敛至预设程度,其中要实现三元中心损失函数的收敛,通过训练模型的参数,使得
Figure PCTCN2022093514-appb-000008
对应的类内距离减小,
Figure PCTCN2022093514-appb-000009
对应的类间间距增大。
In the above formula (1), the purpose of setting the preset hyperparameter m is to increase the distance between classes, and the specific value can be optimized in advance. Through multiple trainings, the target loss function composed of the ternary center loss function L tc and the weighted cross-entropy loss function converges to a preset level. In order to achieve the convergence of the ternary center loss function, the parameters of the training model make
Figure PCTCN2022093514-appb-000008
The corresponding intra-class distance decreases,
Figure PCTCN2022093514-appb-000009
The corresponding inter-class distance increases.
目标损失函数为交叉熵损失函数L ce和三元中心损失函数L tc的加权和,将目标损失函数表示为L,则L满足以下表达式: The target loss function is the weighted sum of the cross-entropy loss function L ce and the ternary center loss function L tc , and the target loss function is expressed as L, then L satisfies the following expression:
L=L ce+αL tc  (3), L=L ce +αL tc (3),
Figure PCTCN2022093514-appb-000010
Figure PCTCN2022093514-appb-000010
其中,
Figure PCTCN2022093514-appb-000011
是图像数据样本x i经过CNN网络之后得到的识别为y i这一类的概率(或称为分值);α为三元中心损失函数的权重系数,α的取值为:0<α<1且能够保证目标损失函数收敛。根据实际实验效果可知,在保证目标损失函数收敛的前提下可以对α取尽可能大一些的值,以提提升训练速度。
in,
Figure PCTCN2022093514-appb-000011
is the probability (or score) of the image data sample x i identified as y i obtained after passing through the CNN network; α is the weight coefficient of the ternary center loss function, and the value of α is: 0<α< 1 and can guarantee the convergence of the target loss function. According to the actual experimental results, on the premise of ensuring the convergence of the target loss function, the value of α can be as large as possible to improve the training speed.
其中,
Figure PCTCN2022093514-appb-000012
满足以下表达式:
in,
Figure PCTCN2022093514-appb-000012
satisfy the following expression:
Figure PCTCN2022093514-appb-000013
Figure PCTCN2022093514-appb-000013
其中,
Figure PCTCN2022093514-appb-000014
表示f i的权重,
Figure PCTCN2022093514-appb-000015
表示偏置,这里的j的取值为分类结果的各个类别所对应的取值,在这里以标签0~12对应的类别进行示例。
in,
Figure PCTCN2022093514-appb-000014
Indicates the weight of f i ,
Figure PCTCN2022093514-appb-000015
Indicates the bias. The value of j here is the value corresponding to each category of the classification result. Here, the category corresponding to labels 0-12 is used as an example.
本公开实施例提供的由交叉熵损失函数和三元中心损失函数的加权和构成的目标损失函数与三分类以上的多分类训练过程能够很好的匹配。通过以交叉熵损失函数作为主损失函数,三元中心损失函数作为辅助损失函数,参照公式(3)所示。基于主损 失函数L ce的设置,保证输入至机器学习模型的图像数据样本对应输出得到的预测类别尽可能靠近真实的标签所对应的类别;基于辅助损失函数L tc的设置,在三类别以上的多类别训练场景下,使得训练过程中输入的图像数据样本与当前类别中心点之间的特征距离呈减小趋势,同时使得输入的图像数据样本与其他类别中心点之间的特征距离的最小值呈增大趋势,从而有效促进类内间距的减小以及类间间距的同时增大,加快了训练的收敛速度,且提升了同类之间聚合、不同类之间区分的效果。 The target loss function provided by the embodiments of the present disclosure, which is composed of the weighted sum of the cross-entropy loss function and the ternary center loss function, can well match the multi-classification training process of more than three classifications. By using the cross-entropy loss function as the main loss function and the ternary center loss function as the auxiliary loss function, refer to formula (3). Based on the setting of the main loss function L ce , it is ensured that the corresponding output of the image data sample input to the machine learning model is as close as possible to the corresponding category of the real label; based on the setting of the auxiliary loss function L tc , in more than three categories In the multi-category training scenario, the feature distance between the input image data sample and the current category center point during the training process tends to decrease, and at the same time, the minimum value of the feature distance between the input image data sample and other category center points It shows an increasing trend, which effectively promotes the reduction of the intra-class distance and the simultaneous increase of the inter-class distance, speeds up the convergence speed of training, and improves the effect of aggregation between similar classes and distinction between different classes.
相较而言,本公开目标损失函数与二分类这一场景的适配度不佳,这是由于二分类的类内距离要比多分类的类内间距大,各种类型的攻击作为一个大类,导致类内距离大,不容易聚合,收敛速度非常慢。In comparison, the target loss function disclosed in this disclosure does not have a good adaptability to the scenario of binary classification, because the intra-class distance of binary classification is larger than that of multi-classification, and various types of attacks act as a large class, resulting in a large intra-class distance, not easy to aggregate, and the convergence speed is very slow.
具体而言,参照公式(1)中的
Figure PCTCN2022093514-appb-000016
这一项而言,由于二分类中非活体类型所对应的中心点具有很大的波动,导致非活体这一类型对应的数据在训练过程中类内不容易聚合,使得输入的图像数据样本与其他类别中心点(二分类场景下只有一个类别中心点,且不稳定)之间的特征距离的最小值无法按照规律的形式进行增大,导致类间距离不容易分离,收敛的速度非常慢。本公开实施例提出的将三分类以上的多分类训练与交叉熵损失函数和三元中心损失函数加权形式的目标损失函数进行结合的思路为独创且效果优良。
Specifically, referring to the formula (1) in
Figure PCTCN2022093514-appb-000016
In terms of this item, due to the large fluctuations in the center point corresponding to the non-living body type in the binary classification, the data corresponding to the non-living body type is not easy to aggregate in the class during the training process, so that the input image data samples are consistent with The minimum value of the feature distance between other category center points (there is only one category center point in the binary classification scenario, and it is unstable) cannot be increased in a regular manner, resulting in that the distance between classes is not easy to separate, and the convergence speed is very slow. The idea of combining the multi-classification training with more than three classifications and the target loss function in the weighted form of the cross-entropy loss function and the ternary center loss function proposed by the embodiments of the present disclosure is original and has excellent effects.
本公开的第二个示例性实施例提供了一种活体识别的方法。A second exemplary embodiment of the present disclosure provides a method of living body recognition.
图8示意性示出了根据本公开实施例的活体识别的方法的流程图。Fig. 8 schematically shows a flow chart of a method for living body recognition according to an embodiment of the present disclosure.
参照图8所示,本公开实施例提供的活体识别的方法包括以下操作:S801和S802。Referring to FIG. 8 , the living body recognition method provided by the embodiment of the present disclosure includes the following operations: S801 and S802.
在操作S801,获取待检测的图像数据,上述待检测的图像数据中包含待识别对象。In operation S801, image data to be detected is acquired, and the image data to be detected includes an object to be recognized.
待检测的图像数据可以是各种类型的应用场景下的包含待识别对象的图像数据,例如在面部识别考勤机器的面部识别打卡的场景下,或者在个人智能设备安全验证的场景下,获取的待检测的图像数据可以是:由真实的用户在周围的背景中拍摄得到的图像数据,或者为不法用户采用人脸照片或者打印有人脸的A4纸在周围的背景中拍摄得到的图像数据。The image data to be detected can be image data containing objects to be identified in various types of application scenarios, for example, in the scenario of facial recognition punching of a facial recognition attendance machine, or in the scenario of personal smart device security verification. The image data to be detected may be: image data taken by a real user in the surrounding background, or image data taken by an illegal user in the surrounding background by taking a face photo or A4 paper with a human face printed on it.
在操作S802,将上述待检测的图像数据输入至活体识别模型中,以输出得到上述待识别对象的分类结果为活体类别、或非活体类别所对应的物理介质类型。In operation S802, the above-mentioned image data to be detected is input into the living body recognition model, so as to output the classification result of the above-mentioned object to be recognized as a living body type or a physical medium type corresponding to a non-living body type.
通过活体识别模型,可以将输入的待检测的图像数据中的待识别图像进行特征提取和识别,并识别出待识别对象的分类结果是活体类别,还是非活体类别中确定的物理介质类型。Through the living body recognition model, feature extraction and recognition can be performed on the image to be recognized in the input image data to be detected, and it can be identified whether the classification result of the object to be recognized is the living body category or the physical medium type determined in the non-living body category.
其中,上述活体识别模型由第一实施例描述的构建活体识别模型的方法构建得到。Wherein, the above-mentioned living body recognition model is constructed by the method for constructing a living body recognition model described in the first embodiment.
由于活体识别模型对于活体对象和非活体对象具有较好的区分度,根据活体对象的第一标签和非活体对象的多类第二标签进行多分类学习,对于每一攻击类别的学习只需要聚焦更少量且本质性的特征,任务更加简单,机器学习更加容易且高效率,并且能够快速提取出待检测的图像数据中的待识别对象的特征信息并对其进行分类,进行活体识别时具有高效率且较高的识别准确度。Since the living body recognition model has a good degree of discrimination between living objects and non-living objects, multi-category learning is performed according to the first label of living objects and the multi-category second labels of non-living objects. For the learning of each attack category, it only needs to focus on With fewer and essential features, the task is simpler, machine learning is easier and more efficient, and it can quickly extract and classify the feature information of the object to be recognized in the image data to be detected, and has a high efficiency and high recognition accuracy.
本公开的第三个示例性实施例提供了一种用于构建活体识别模型的装置。A third exemplary embodiment of the present disclosure provides an apparatus for constructing a living body recognition model.
图9示意性示出了根据本公开实施例的用于构建活体识别模型的装置的结构框图。Fig. 9 schematically shows a structural block diagram of an apparatus for constructing a living body recognition model according to an embodiment of the present disclosure.
参照图9所示,本公开实施例提供的用于构建活体识别模型的装置900包括:第一数据获取模块901、标签关联模块902、输入模块903和训练模块904。Referring to FIG. 9 , an apparatus 900 for building a living body recognition model provided by an embodiment of the present disclosure includes: a first data acquisition module 901 , a tag association module 902 , an input module 903 and a training module 904 .
上述第一数据获取模块901配置为获取目标对象经拍摄得到的图像数据,上述目标对象包含:活体对象和多类物理介质承载的非活体对象。The above-mentioned first data acquisition module 901 is configured to acquire the image data of the target object obtained by shooting, and the above-mentioned target object includes: living objects and non-living objects carried by various types of physical media.
上述标签关联模块902配置为将上述活体对象的图像数据对应于表征活体类别的第一标签;以及用于基于物理介质的类型差异,将上述非活体对象的图像数据对应于表征非活体类别的多类第二标签。上述标签关联模块902包括用于实施上述子操作S2031~S2034的功能模块或子模块。The tag association module 902 is configured to associate the image data of the living object with the first tag representing the living category; class second label. The tag association module 902 includes functional modules or sub-modules for implementing the above-mentioned sub-operations S2031-S2034.
上述输入模块903配置为将上述图像数据输入至机器学习模型中,以进行训练。The above-mentioned input module 903 is configured to input the above-mentioned image data into the machine learning model for training.
上述训练模块904配置为基于上述第一标签和多类上述第二标签来对上述机器学习模型进行多分类训练,以得到活体识别模型。The above-mentioned training module 904 is configured to perform multi-classification training on the above-mentioned machine learning model based on the above-mentioned first label and multiple types of the above-mentioned second labels, so as to obtain a living body recognition model.
上述活体识别模型对上述图像数据进行分类的结果为:活体类别,或上述多类物理介质中的一类物理介质对应的非活体类别。The result of the above-mentioned living body recognition model classifying the above-mentioned image data is: a living body category, or a non-living body category corresponding to one type of physical medium among the above-mentioned multiple types of physical media.
上述训练模块904包括用于实施上述子操作S2051~S2053的功能模块或子模块。The above-mentioned training module 904 includes functional modules or sub-modules for implementing the above-mentioned sub-operations S2051-S2053.
本公开的第四个示例性实施例提供了一种用于活体识别的装置。A fourth exemplary embodiment of the present disclosure provides an apparatus for living body identification.
图10示意性示出了根据本公开实施例的用于活体识别的装置的结构框图。Fig. 10 schematically shows a structural block diagram of a device for living body recognition according to an embodiment of the present disclosure.
参照图10所示,本公开实施例提供的用于活体识别的装置1000包括:第二数据获取模块1001和识别模块1002。Referring to FIG. 10 , an apparatus 1000 for living body identification provided by an embodiment of the present disclosure includes: a second data acquisition module 1001 and an identification module 1002 .
上述第二数据获取模块1001配置为获取待检测的图像数据,上述待检测的图像数据中包含待识别对象。The second data acquisition module 1001 is configured to acquire image data to be detected, and the image data to be detected includes an object to be identified.
上述识别模块1002配置为将上述待检测的图像数据输入至活体识别模型中,以输出得到上述待识别对象的分类结果为活体类别、或非活体类别所对应的物理介质类型。The recognition module 1002 is configured to input the image data to be detected into the living body recognition model, so as to output the classification result of the object to be recognized as the living body category or the physical medium type corresponding to the non-living body category.
其中,上述活体识别模型由上述构建活体识别模型的方法构建得到或者由上述用于构建活体识别模型的装置构建得到。Wherein, the above-mentioned living body recognition model is constructed by the above-mentioned method for constructing a living body recognition model or constructed by the above-mentioned device for constructing a living body recognition model.
上述用于活体识别的装置1000中可以存储有预先构建的活体识别模型,或者可以 与用于构建活体识别模型的装置进行数据通信,来调用构建好的活体识别模型对待检测的图像数据进行处理,以得到待识别对象的分类结果。The above-mentioned device 1000 for living body recognition may store a pre-built living body recognition model, or may perform data communication with a device for building a living body recognition model, so as to call the constructed living body recognition model to process the image data to be detected, In order to obtain the classification result of the object to be recognized.
上述第三个实施例中,第一数据获取模块901、标签关联模块902、输入模块903和训练模块904中的任意多个可以合并在一个模块中实现,或者其中的任意一个模块可以被拆分成多个模块。或者,这些模块中的一个或多个模块的至少部分功能可以与其他模块的至少部分功能相结合,并在一个模块中实现。第一数据获取模块901、标签关联模块902、输入模块903和训练模块904中的至少一个可以至少被部分地实现为硬件电路,例如现场可编程门阵列(FPGA)、可编程逻辑阵列(PLA)、片上系统、基板上的系统、封装上的系统、专用集成电路(ASIC),或可以通过对电路进行集成或封装的任何其他的合理方式等硬件或固件来实现,或以软件、硬件以及固件三种实现方式中任意一种或以其中任意几种的适当组合来实现。或者,第一数据获取模块901、标签关联模块902、输入模块903和训练模块904中的至少一个可以至少被部分地实现为计算机程序模块,当该计算机程序模块被运行时,可以执行相应的功能。In the third embodiment above, any number of the first data acquisition module 901, the label association module 902, the input module 903 and the training module 904 can be combined in one module, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules may be combined with at least part of the functions of other modules and implemented in one module. At least one of the first data acquisition module 901, the label association module 902, the input module 903 and the training module 904 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA) , system-on-chip, system-on-substrate, system-on-package, application-specific integrated circuit (ASIC), or any other reasonable means of integrating or packaging circuits, such as hardware or firmware, or in software, hardware, and firmware Any one of the three implementations or an appropriate combination of any of them. Alternatively, at least one of the first data acquisition module 901, the label association module 902, the input module 903 and the training module 904 may be at least partially implemented as a computer program module, and when the computer program module is executed, corresponding functions may be performed .
上述第四个实施例中,第二数据获取模块1001和识别模块1002中的任意多个可以合并在一个模块中实现,或者其中的任意一个模块可以被拆分成多个模块。或者,这些模块中的一个或多个模块的至少部分功能可以与其他模块的至少部分功能相结合,并在一个模块中实现。第二数据获取模块1001和识别模块1002中的至少一个可以至少被部分地实现为硬件电路,例如现场可编程门阵列(FPGA)、可编程逻辑阵列(PLA)、片上系统、基板上的系统、封装上的系统、专用集成电路(ASIC),或可以通过对电路进行集成或封装的任何其他的合理方式等硬件或固件来实现,或以软件、硬件以及固件三种实现方式中任意一种或以其中任意几种的适当组合来实现。或者,第二数据获取模块1001和识别模块1002中的至少一个可以至少被部分地实现为计算机程序模块,当该计算机程序模块被运行时,可以执行相应的功能。In the fourth embodiment above, any multiple of the second data acquisition module 1001 and the identification module 1002 can be implemented in one module, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules may be combined with at least part of the functions of other modules and implemented in one module. At least one of the second data acquisition module 1001 and the identification module 1002 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, A system on a package, an application-specific integrated circuit (ASIC), or any other reasonable way of integrating or packaging circuits, such as hardware or firmware, or any of the three implementation methods of software, hardware, and firmware, or It can be realized by any suitable combination of any of them. Alternatively, at least one of the second data acquisition module 1001 and the identification module 1002 may be at least partially implemented as a computer program module, and when the computer program module is executed, corresponding functions may be performed.
本公开的第五个示例性实施例提供了一种电子设备。A fifth exemplary embodiment of the present disclosure provides an electronic device.
图11示意性示出了本公开实施例提供的电子设备的结构框图。Fig. 11 schematically shows a structural block diagram of an electronic device provided by an embodiment of the present disclosure.
参照图11所示,本公开实施例提供的电子设备1100包括处理器1101、通信接口1102、存储器1103和通信总线1104,其中,处理器1101、通信接口1102和存储器1103通过通信总线1104完成相互间的通信;存储器1103,用于存放计算机程序;处理器1101,用于执行存储器上所存放的程序时,实现如上所述的构建活体识别模型的方或活体识别的方法。Referring to FIG. 11 , an electronic device 1100 provided by an embodiment of the present disclosure includes a processor 1101, a communication interface 1102, a memory 1103, and a communication bus 1104, wherein the processor 1101, the communication interface 1102, and the memory 1103 complete mutual communication via the communication bus 1104. The memory 1103 is used to store computer programs; the processor 1101 is used to execute the programs stored in the memory to implement the above-mentioned method of constructing a living body recognition model or a living body recognition method.
本公开的第六个示例性实施例还提供了一种计算机可读存储介质。上述计算机可读存储介质上存储有计算机程序,上述计算机程序被处理器执行时实现如上所述的构 建活体识别模型的方或活体识别的方法。The sixth exemplary embodiment of the present disclosure also provides a computer-readable storage medium. A computer program is stored on the above-mentioned computer-readable storage medium, and when the above-mentioned computer program is executed by a processor, the method for constructing a living body recognition model or the method for living body recognition as described above is realized.
该计算机可读存储介质可以是上述实施例中描述的设备/装置中所包含的;也可以是单独存在,而未装配入该设备/装置中。上述计算机可读存储介质承载有一个或者多个程序,当上述一个或者多个程序被执行时,实现根据本公开实施例的方法。The computer-readable storage medium may be included in the device/device described in the above embodiments; or it may exist independently without being assembled into the device/device. The above-mentioned computer-readable storage medium carries one or more programs, and when the above-mentioned one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.
根据本公开的实施例,计算机可读存储介质可以是非易失性的计算机可读存储介质,例如可以包括但不限于:便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, such as may include but not limited to: portable computer disk, hard disk, random access memory (RAM), read-only memory (ROM) , erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
需要说明的是,在本文中,诸如“第一”和“第二”等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that in this article, relative terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply these No such actual relationship or order exists between entities or operations. Furthermore, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus comprising a set of elements includes not only those elements, but also includes elements not expressly listed. other elements of or also include elements inherent in such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising said element.
以上所述仅是本公开的具体实施方式,使本领域技术人员能够理解或实现本公开。对这些实施例的多种修改对本领域的技术人员来说将是显而易见的,本文所定义的一般原理可以在不脱离本公开的精神或范围的情况下,在其它实施例中实现。因此,本公开将不会被限制于本文所示的这些实施例,而是要符合与本文所申请的原理和新颖特点相一致的最宽的范围。The above descriptions are only specific implementation manners of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.

Claims (11)

  1. 一种构建活体识别模型的方法,包括:A method for building a living body recognition model, comprising:
    获取目标对象经拍摄得到的图像数据,所述目标对象包含:活体对象和多类物理介质承载的非活体对象;Obtaining the image data of the target object after shooting, the target object includes: living objects and non-living objects carried by various types of physical media;
    将所述活体对象的图像数据对应于表征活体类别的第一标签;Corresponding the image data of the living subject to the first label representing the living category;
    基于物理介质的类型差异,将所述非活体对象的图像数据对应于表征非活体类别的多类第二标签;Corresponding the image data of the non-living object to multiple types of second labels representing the category of non-living objects based on the type difference of the physical medium;
    将所述图像数据输入至机器学习模型中,以进行训练;以及inputting the image data into a machine learning model for training; and
    基于所述第一标签和多类所述第二标签来对所述机器学习模型进行多分类训练,以得到活体识别模型。Perform multi-classification training on the machine learning model based on the first label and multiple types of the second labels, so as to obtain a living body recognition model.
  2. 根据权利要求1所述的方法,所述基于所述第一标签和多类所述第二标签来对所述机器学习模型进行多分类训练,以得到活体识别模型,包括:The method according to claim 1, said performing multi-classification training on said machine learning model based on said first label and multiple types of said second labels, so as to obtain a living body recognition model, comprising:
    在所述机器学习模型的每轮训练中,针对输入的当前图像数据,输出得到所述当前图像数据分别属于活体类别和属于所述多类物理介质中各类物理介质对应的非活体类别的各个概率值;In each round of training of the machine learning model, for the input current image data, output the current image data belonging to the living body category and the non-living body category corresponding to each type of physical medium in the multiple types of physical media. probability value;
    根据所述各个概率值确定针对当前图像数据的目标损失函数,所述目标损失函数用于表征所述当前图像数据的预测类别与所述当前图像数据的标签对应的类别之间的偏离程度;以及Determine a target loss function for the current image data according to the respective probability values, the target loss function is used to characterize the degree of deviation between the predicted category of the current image data and the category corresponding to the label of the current image data; and
    在所述目标损失函数的收敛程度符合设定值的情况下停止训练,并得到训练完成的活体识别模型。When the convergence degree of the target loss function meets the set value, the training is stopped, and a trained living body recognition model is obtained.
  3. 根据权利要求2所述的方法,所述目标损失函数为交叉熵损失函数和三元中心损失函数的加权和。The method according to claim 2, the target loss function is a weighted sum of a cross-entropy loss function and a ternary center loss function.
  4. 根据权利要求3所述的方法,所述交叉熵损失函数作为主损失函数,所述三元中心损失函数作为辅助损失函数,所述目标损失函数为所述辅助损失函数和权重系数的乘积与所述主损失函数的加和,所述权重系数的取值介于0~1之间且能够保证所述目标损失函数收敛。According to the method according to claim 3, the cross-entropy loss function is used as the main loss function, the ternary center loss function is used as the auxiliary loss function, and the target loss function is the product of the auxiliary loss function and the weight coefficient and the The sum of the main loss functions, the value of the weight coefficient is between 0 and 1 and can ensure the convergence of the target loss function.
  5. 根据权利要求1-4中任一项所述的方法,所述基于物理介质的类型差异,将所述非活体对象的图像数据对应于表征非活体类别的多类第二标签,包括:According to the method according to any one of claims 1-4, said based on the type difference of the physical medium, corresponding the image data of the non-living object to multiple types of second labels that characterize the non-living category, comprising:
    基于物理介质的属性类型差异,将所述物理介质划分为多个主类别;dividing the physical medium into a plurality of main categories based on differences in attribute types of the physical medium;
    基于物理介质的形状、材料至少之一的差异,对每个主类别下的物理介质进行细分,得到细分类别;其中,所述主类别和所述细分类别均属于非活体类别;Based on the difference of at least one of the shape and material of the physical medium, the physical medium under each main category is subdivided to obtain a subdivided category; wherein, both the main category and the subdivided category belong to the non-living category;
    针对每个非活体对象的图像数据,确定当前非活体对象的物理介质所对应的目标主类别或目标细分类别;以及For each image data of the non-living object, determine a target main category or a target sub-category corresponding to the physical medium of the current non-living object; and
    将当前非活体对象的图像数据对应于表征所述目标主类别或所述目标细分类别的第二标签。Corresponding the image data of the current non-living object to the second label representing the target main category or the target subcategory.
  6. 根据权利要求5所述的方法,其中,The method according to claim 5, wherein,
    所述主类别包括:纸质介质、屏幕介质、立体模型用材料介质;The main categories include: paper media, screen media, material media for three-dimensional models;
    根据所述纸质介质的材料、形状差异,将所述纸质介质划分为以下细分类别的两种或更多种:普通纸质、弯曲纸质、裁剪纸质、扣洞纸质、普通照片、弯曲照片、裁剪照片、扣洞照片;According to the difference in material and shape of the paper medium, the paper medium is divided into two or more of the following sub-categories: plain paper, curved paper, cut paper, buttonhole paper, plain photos, bent photos, cropped photos, buttonhole photos;
    根据所述屏幕介质的类型差异,将所述屏幕介质划分为以下细分类别的两种或更多种:台式机屏幕、平板电脑屏幕、手机屏幕、笔记本电脑屏幕;According to the type difference of the screen medium, the screen medium is divided into two or more of the following subdivided categories: desktop screen, tablet computer screen, mobile phone screen, notebook computer screen;
    根据所述立体模型用材料介质的材料差异,将所述立体模型用材料介质划分为以下细分类别的两种或更多种:石膏模型、木质模型、金属模型、塑料模型。According to the material difference of the material medium for the three-dimensional model, the material medium for the three-dimensional model is divided into two or more of the following subcategories: plaster model, wooden model, metal model, plastic model.
  7. 一种活体识别的方法,包括:A method for living body identification, comprising:
    获取待检测的图像数据,所述待检测的图像数据中包含待识别对象;Obtaining image data to be detected, the image data to be detected includes an object to be identified;
    将所述待检测的图像数据输入至活体识别模型中,以输出得到所述待识别对象的分类结果为活体类别、或非活体类别所对应的物理介质类型;其中,所述活体识别模型由权利要求1-6中任一项所述的方法构建得到。Input the image data to be detected into the living body recognition model to output the classification result of the object to be recognized as the living body category or the physical medium type corresponding to the non-living body category; wherein, the living body recognition model is controlled by the right Obtained by the method described in any one of requirements 1-6.
  8. 一种用于构建活体识别模型的装置,包括:A device for building a living body recognition model, comprising:
    第一数据获取模块,配置为获取目标对象经拍摄得到的图像数据,所述目标对象包含:活体对象和多类物理介质承载的非活体对象;The first data acquisition module is configured to acquire the image data of the target object obtained by shooting, and the target object includes: living objects and non-living objects carried by multiple types of physical media;
    标签关联模块,配置为将所述活体对象的图像数据对应于表征活体类别的第一标签;以及用于基于物理介质的类型差异,将所述非活体对象的图像数据对应于表征非活体类别的多类第二标签;A label association module configured to associate the image data of the living object with the first label representing the living category; and for corresponding the image data of the non-living object to the first label representing the non-living category based on the type difference of the physical medium multi-category second label;
    输入模块,配置为将所述图像数据输入至机器学习模型中,以进行训练;以及an input module configured to input the image data into a machine learning model for training; and
    训练模块,配置为基于所述第一标签和多类所述第二标签来对所述机器学习模型进行多分类训练,以得到活体识别模型。The training module is configured to perform multi-classification training on the machine learning model based on the first label and multiple types of the second labels, so as to obtain a living body recognition model.
  9. 一种用于活体识别的装置,包括:A device for living body identification, comprising:
    第二数据获取模块,配置为获取待检测的图像数据,所述待检测的图像数据中包含待识别对象;The second data acquisition module is configured to acquire image data to be detected, where the image data to be detected includes an object to be identified;
    识别模块,配置为将所述待检测的图像数据输入至活体识别模型中,以输出得到所述待识别对象的分类结果为活体类别、或非活体类别所对应的物理介质类型;其中, 所述活体识别模型由权利要求1-6中任一项所述的方法构建得到或者由权利要求8所述的装置构建得到。The recognition module is configured to input the image data to be detected into the living body recognition model, so as to output the classification result of the object to be recognized as the living body category or the physical medium type corresponding to the non-living body category; wherein, the The living body recognition model is constructed by the method described in any one of claims 1-6 or constructed by the device described in claim 8.
  10. 一种电子设备,包括处理器、通信接口、存储器和通信总线,其中,处理器、通信接口和存储器通过通信总线完成相互间的通信;An electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete mutual communication through the communication bus;
    存储器,用于存放计算机程序;memory for storing computer programs;
    处理器,用于执行存储器上所存放的程序时,实现权利要求1-7中任一项所述的方法。When the processor is used to execute the program stored in the memory, it realizes the method described in any one of claims 1-7.
  11. 一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1-7中任一项所述的方法。A computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method according to any one of claims 1-7 is implemented.
PCT/CN2022/093514 2021-07-22 2022-05-18 Methods and apparatuses for constructing living body identification model and for living body identification, device and medium WO2023000792A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110833025.X 2021-07-22
CN202110833025.XA CN115690918A (en) 2021-07-22 2021-07-22 Method, device, equipment and medium for constructing living body identification model and living body identification

Publications (1)

Publication Number Publication Date
WO2023000792A1 true WO2023000792A1 (en) 2023-01-26

Family

ID=84978915

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/093514 WO2023000792A1 (en) 2021-07-22 2022-05-18 Methods and apparatuses for constructing living body identification model and for living body identification, device and medium

Country Status (2)

Country Link
CN (1) CN115690918A (en)
WO (1) WO2023000792A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117196560A (en) * 2023-11-07 2023-12-08 深圳市慧云智跑网络科技有限公司 Data acquisition method and system of card punching equipment based on Internet of things

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110765923A (en) * 2019-10-18 2020-02-07 腾讯科技(深圳)有限公司 Face living body detection method, device, equipment and storage medium
CN111191519A (en) * 2019-12-09 2020-05-22 同济大学 Living body detection method for user access of mobile power supply device
CN112036331A (en) * 2020-09-03 2020-12-04 腾讯科技(深圳)有限公司 Training method, device and equipment of living body detection model and storage medium
CN112270288A (en) * 2020-11-10 2021-01-26 深圳市商汤科技有限公司 Living body identification method, access control device control method, living body identification device, access control device and electronic device
CN112597885A (en) * 2020-12-22 2021-04-02 北京华捷艾米科技有限公司 Face living body detection method and device, electronic equipment and computer storage medium
CN112883831A (en) * 2021-01-29 2021-06-01 北京市商汤科技开发有限公司 Living body detection method and device, electronic equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110765923A (en) * 2019-10-18 2020-02-07 腾讯科技(深圳)有限公司 Face living body detection method, device, equipment and storage medium
CN111191519A (en) * 2019-12-09 2020-05-22 同济大学 Living body detection method for user access of mobile power supply device
CN112036331A (en) * 2020-09-03 2020-12-04 腾讯科技(深圳)有限公司 Training method, device and equipment of living body detection model and storage medium
CN112270288A (en) * 2020-11-10 2021-01-26 深圳市商汤科技有限公司 Living body identification method, access control device control method, living body identification device, access control device and electronic device
CN112597885A (en) * 2020-12-22 2021-04-02 北京华捷艾米科技有限公司 Face living body detection method and device, electronic equipment and computer storage medium
CN112883831A (en) * 2021-01-29 2021-06-01 北京市商汤科技开发有限公司 Living body detection method and device, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117196560A (en) * 2023-11-07 2023-12-08 深圳市慧云智跑网络科技有限公司 Data acquisition method and system of card punching equipment based on Internet of things
CN117196560B (en) * 2023-11-07 2024-02-13 深圳市慧云智跑网络科技有限公司 Data acquisition method and system of card punching equipment based on Internet of things

Also Published As

Publication number Publication date
CN115690918A (en) 2023-02-03

Similar Documents

Publication Publication Date Title
US10755084B2 (en) Face authentication to mitigate spoofing
US10025950B1 (en) Systems and methods for image recognition
Oh et al. Faceless person recognition: Privacy implications in social media
CN111886842B (en) Remote user authentication using threshold-based matching
WO2022126970A1 (en) Method and device for financial fraud risk identification, computer device, and storage medium
Squicciarini et al. Toward automated online photo privacy
WO2018176954A1 (en) Method, device and system for providing friend-making objects
US11126827B2 (en) Method and system for image identification
WO2022134584A1 (en) Real estate picture verification method and apparatus, computer device and storage medium
US10733279B2 (en) Multiple-tiered facial recognition
KR101647691B1 (en) Method for hybrid-based video clustering and server implementing the same
CA3040971A1 (en) Face authentication to mitigate spoofing
TW201944294A (en) Method and apparatus for identity verification, electronic device, computer program, and storage medium
Shoshitaishvili et al. Portrait of a privacy invasion
WO2021128846A1 (en) Electronic file control method and apparatus, and computer device and storage medium
CN112330331A (en) Identity verification method, device and equipment based on face recognition and storage medium
WO2023000792A1 (en) Methods and apparatuses for constructing living body identification model and for living body identification, device and medium
WO2021175010A1 (en) User gender identification method and apparatus, electronic device, and storage medium
CN113221721A (en) Image recognition method, device, equipment and medium
WO2021081741A1 (en) Image classification method and system employing multi-relationship social network
US20220004652A1 (en) Providing images with privacy label
CN110162535A (en) For executing personalized searching method, device, equipment and storage medium
Gao et al. Cloud-based actor identification with batch-orthogonal local-sensitive hashing and sparse representation
KR102060110B1 (en) Method, apparatus and computer program for classifying object in contents
WO2019129293A1 (en) Feature data generation method and apparatus and feature matching method and apparatus

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE