Methods, apparatus, and equipment for training and optimizing face liveness detection based on federated learning

Through the federated learning face liveness detection training optimization method, face image features are extracted and formed into a matrix, which solves the problems of low detection efficiency and poor device versatility in the existing technology, and achieves efficient face liveness detection and hardware-independent detection. ability.

CN112613407BActive Publication Date: 2024-08-13HANGZHOU QULIAN TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011544633.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-23
Publication Date
2024-08-13
Estimated Expiration
2040-12-23

AI Technical Summary

Technical Problem

The existing face liveness detection model results in low detection efficiency and poor device versatility, and cannot be used universally on devices with different hardware configurations.

Method used

The face liveness detection training optimization method based on federated learning is adopted to extract the features of the face image, form a mapping matrix, calculate the associated parameter matrix and symmetric positive definite matrix, and finally upload it to the server for global model training to achieve face liveness detection without any problems. Action interaction or additional information is required.

Benefits of technology

It improves the detection efficiency of face liveness detection, ensures the versatility of the device, and avoids the problem of high hardware requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112613407B_ABST
    Figure CN112613407B_ABST
Patent Text Reader

Abstract

The present invention discloses a face liveness detection training optimization method based on federated learning, which is applied to the field of face liveness detection and is used to solve the problem that the existing face liveness detection model will lead to low detection efficiency and poor equipment versatility in the face liveness detection method. The method provided by the present invention includes: extracting features of multiple face images in a face image set obtained during face liveness detection training; wherein the face image includes annotation information; mapping the features of the multiple face images with the annotation information and forming a mapping matrix; calculating and processing the features of the multiple face images to obtain an associated parameter matrix; calculating and processing the associated parameter matrix to obtain a symmetric positive definite matrix; calculating and processing the mapping matrix and the symmetric positive definite matrix to obtain a minimum error matrix; uploading the minimum error matrix and the associated parameter matrix to a server for training a global model for face liveness detection, so that the server trains the global model for face liveness detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of human face liveness detection, and in particular to a human face liveness detection training optimization method, device, computer equipment and storage medium based on federated learning. Background Art

[0002] At present, face recognition technology is widely used in edge computing devices (such as 5G edge computing devices, AI edge computing devices, etc.) for identity verification. However, existing face recognition systems are easily misled by videos or photos, resulting in failure to recognize live faces. Therefore, face liveness detection technology came into being to overcome the shortcomings of face recognition systems that are easily misled by videos or photos.

[0003] In the prior art, the method of face liveness detection is mainly to perform face liveness detection through interaction (the system requires the identified object to make actions such as blinking, shaking head, opening mouth, etc. to determine whether it is alive). In the process of training the face liveness detection model based on the interactive method, it is necessary to collect images related to actions such as blinking, shaking head, opening mouth, etc. in advance, and then analyze the characteristics of the actions before identity authentication can be performed. This results in the trained face liveness detection model being used for face liveness detection. The detection efficiency is relatively low, and because it is necessary to collect various actions made by the detected face, it has relatively high requirements on the hardware of the face recognition device and cannot be used on devices with different hardware configurations.

[0004] Therefore, from the above content, it can be seen that the existing face liveness detection model will cause the face liveness detection method to have problems of low detection efficiency and poor device versatility. Summary of the invention

[0005] The embodiments of the present invention provide a method, device, computer equipment and storage medium for optimizing face liveness detection training based on federated learning, so as to solve the technical problems that the existing face liveness detection model leads to low detection efficiency and poor equipment versatility in the face liveness detection method.

[0006] A method for optimizing face liveness detection training based on federated learning, comprising:

[0007] Based on a face image set obtained during face liveness detection training, extract features of multiple face images in the face image set; wherein the face image includes annotation information;

[0008] Mapping the features of multiple face images with the annotation information and forming a mapping matrix;

[0009] Calculating and processing the features of multiple face images to obtain a correlation parameter matrix;

[0010] The correlation parameter matrix is ​​computationally processed to obtain a symmetric positive definite matrix;

[0011] The mapping matrix and the symmetric positive definite matrix are processed to obtain the minimum error matrix;

[0012] The minimum error matrix and the associated parameter matrix are uploaded to a server for training a global model for face liveness detection, so that the server trains the global model for face liveness detection.

[0013] A face liveness detection training optimization device based on federated learning, comprising:

[0014] A feature extraction module, used to extract features of multiple face images in a face image set based on a face image set obtained during face liveness detection training; wherein the face image includes annotation information;

[0015] A mapping module, used to map the features of multiple face images with the annotation information and form a mapping matrix;

[0016] A correlation parameter matrix acquisition module is used to calculate and process the features of multiple face images to obtain a correlation parameter matrix;

[0017] A symmetric positive definite matrix acquisition module is used to calculate and process the associated parameter matrix to obtain a symmetric positive definite matrix;

[0018] A minimum error matrix acquisition module is used to calculate and process the mapping matrix and the symmetric positive definite matrix to obtain the minimum error matrix;

[0019] The training module is used to upload the minimum error matrix and the associated parameter matrix to a server for training a global model for face liveness detection, so that the server trains the global model for face liveness detection.

[0020] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned method for optimizing face liveness detection training based on federated learning when executing the computer program.

[0021] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the above-mentioned method for optimizing face liveness detection training based on federated learning.

[0022] The face liveness detection training optimization method, device, computer equipment and storage medium based on federated learning proposed in the embodiment of the present invention extracts features of multiple face images in the face image set based on the face image set obtained during the face liveness detection training process; wherein the face image includes annotation information. The features of the multiple face images are mapped with the annotation information to form a mapping matrix; the features of the multiple face images are calculated to obtain an associated parameter matrix; the associated parameter matrix is ​​calculated to obtain a symmetric positive definite matrix; the mapping matrix and the symmetric positive definite matrix are calculated to obtain a minimum error matrix; the minimum error matrix and the associated parameter matrix are uploaded to a server for training a global model for face liveness detection, so that the server trains the global model for face liveness detection. By using the obtained global model for face liveness detection, face liveness detection can be performed without using the face for action interaction or additional information, thereby improving the detection efficiency of face liveness detection based on the global model for face liveness detection, and there are no special requirements for the device to which the global model for face liveness detection is applied, thereby ensuring the versatility of the device. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0024] Figure 1 2 is a schematic diagram of an application environment of a method for optimizing face liveness detection training based on federated learning in one embodiment of the present invention;

[0025] Figure 2 is a flow chart of a method for optimizing face liveness detection training based on federated learning in one embodiment of the present invention;

[0026] Figure 3 is an interactive flow chart of a method for optimizing face liveness detection training based on federated learning in one embodiment of the present invention;

[0027] Figure 4 is another interactive flow chart of a method for optimizing face liveness detection training based on federated learning in one embodiment of the present invention;

[0028] Figure 5 2 is a schematic diagram of the structure of a face liveness detection training optimization device based on federated learning in one embodiment of the present invention;

[0029] Figure 6 is a schematic diagram of a server in one embodiment of the present invention;

[0030] Figure 7 It is a schematic diagram of a terminal device in one embodiment of the present invention. DETAILED DESCRIPTION

[0031] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0032] The face liveness detection training optimization method based on federated learning provided in this application can be applied in Figure 1 In an application environment, a computer device / terminal device communicates with a server via a network. The computer device / terminal device may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and portable wearable devices. The server may be implemented as an independent server or a server cluster consisting of multiple servers.

[0033] In one embodiment, if Figure 2 As shown in the figure, a method for optimizing face liveness detection training based on federated learning is provided. Figure 1 The server in the example is used as an example to illustrate, including the following steps S101 to S106:

[0034] S101. Based on a face image set obtained during face liveness detection training, extract features of multiple face images in the face image set; wherein the face image includes annotation information.

[0035] In step S101, the specific steps are:

[0036] The above-mentioned acquired face image set can be obtained through an edge computing device, and face detection is performed on the face image set through the edge computing device. The face detection method includes but is not limited to a multi-task convolutional neural network and an adaptive enhancement algorithm.

[0037] The features extracted in the above step S101 are local binary pattern features of multiple face images.

[0038] It should be noted here that the local binary pattern feature is an operator used to describe the local texture features of an image, and has significant advantages such as rotation invariance and grayscale invariance.

[0039] The above-mentioned annotation information marks whether the facial image is a live facial image. For example, when the facial image is a live facial image, the annotation information is marked as 1, and when the facial image is a photo or a video, the annotation information is marked as 0.

[0040] S102: Map the features of multiple face images with the annotation information to form a mapping matrix.

[0041] In step S102, specifically:

[0042] By establishing a binary group, a mapping relationship is established between the features of the plurality of face images and the annotation information of the face images corresponding to the features;

[0043] The two-tuple is used as a mapping parameter, and all mapping parameters form a mapping matrix.

[0044] In the above mapping matrix, each mapping parameter in a row corresponds to different features of the same face image.

[0045] S103: Calculate and process the features of multiple face images to obtain a correlation parameter matrix.

[0046] Specifically, Figure 3 As shown, step S103 includes the following steps S301 to S303:

[0047] S301, performing Euclidean distance calculation on features of multiple face images to obtain a corresponding Euclidean distance matrix.

[0048] S302, performing correlation calculation on the Euclidean distance matrix to obtain a correlation matrix.

[0049] S303: Calculate the correlation matrix to obtain a correlation parameter matrix

[0050] Regarding the step of calculating the Euclidean distance of the features of the multiple face images in the above step S301,

[0051] Specifically, the Euclidean distance of the features of multiple face images is calculated according to the following formula:

[0052]

[0053] Among them, X i is the feature of the i-th face image, X j is the feature of the j-th face image, dis is the Euclidean distance between the feature of the i-th face image and the feature of the j-th face image, represents the feature of the dth dimension in the i-th face image, Represents the features of the d-th dimension in the j-th image, where d is 1, 2, 3, ..., D, and D is a positive integer.

[0054] The Euclidean distance is calculated for the features of multiple face images to obtain all Euclidean distance parameters, and a Euclidean distance matrix is ​​obtained according to all the Euclidean distance parameters.

[0055] The above step S302 specifically includes the following steps a to c:

[0056] a. Sort the Euclidean distance matrix and obtain a preset number of nearest neighbor parameters from each row in the Euclidean distance matrix;

[0057] b. Calculate the distance standard deviation based on the nearest neighbor parameter;

[0058] c. Based on the distance standard deviation, the correlation matrix is ​​obtained.

[0059] For the above step a, it should be noted here that the nearest neighbor parameter refers to the parameter with the smallest value in each row of the Euclidean distance matrix when the preset number is 1, and when the preset number is greater than 1, according to the arrangement order of the Euclidean distance matrix, the values ​​of multiple parameters of a preset number are selected in ascending order starting from the smallest parameter.

[0060] For example, assuming that the preset number is 4, the arrangement order of the Euclidean distance matrix is ​​from small to large, and a certain row in the Euclidean distance matrix after sorting is (1, 3, 4, 5, 7, 9, 11), then 4 nearest neighbor parameters are obtained, and these 4 nearest neighbor parameters are (1, 3, 4, 5).

[0061] For the above step b, specifically: calculate the distance standard deviation according to the following formula:

[0062]

[0063] Where σ is the distance standard deviation, d i is the distance between the i-th nearest neighbor parameter and the current point, d avg is the average distance between the nearest neighbor parameter and the current value, K is the number of nearest neighbor parameters, i is 1, 2, 3...K, and K is a positive integer.

[0064] For the above step c, the specific steps are: obtain the correlation matrix according to the following formula:

[0065]

[0066] Among them, A is the correlation matrix, A i,j is the correlation parameter of the i-th row and j-th column in the correlation matrix, σ is the distance standard deviation, X i is the i-th feature, X j is the jth feature.

[0067] When the ith feature is the nearest neighbor parameter of the jth feature, the Euclidean distance between the ith feature and the jth feature is calculated by exp (exponential) according to the distance standard deviation to obtain the correlation parameter of the ith row and jth column in the correlation matrix.

[0068] When the i-th feature is not the nearest neighbor parameter of the j-th feature, the correlation parameter in the i-th row and j-th column of the correlation matrix is ​​0.

[0069] The above step S303 specifically includes the following steps A to D:

[0070] A. Calculate the square root of each number in the correlation matrix and establish the first square root matrix accordingly.

[0071] B. Add each number on the main diagonal of the first square root matrix to get the square root matrix sum.

[0072] For the above step B, specifically: calculate the square root matrix sum according to the following formula:

[0073]

[0074] C. Divide the first square root matrix by the sum of the square root matrices to obtain a second square root matrix.

[0075] For the above step C, specifically: calculate the second square root matrix according to the following formula:

[0076]

[0077] D. Inverse the second square root matrix to obtain the correlation parameter matrix.

[0078] For the above step D, it is specifically: calculate the correlation parameter matrix according to the following formula:

[0079] Ω=(H) -1

[0080] S104, performing calculation processing on the associated parameter matrix to obtain a symmetric positive definite matrix.

[0081] For the above step S104, it is specifically: obtain a symmetric positive definite matrix according to the following formula:

[0082]

[0083] Where M is a symmetric positive definite matrix, Ω is the correlation parameter matrix, λ1 is a constant parameter, is matrix multiplication, and I is the identity matrix.

[0084] S105, calculating and processing the mapping matrix and the symmetric positive definite matrix to obtain a minimum error matrix.

[0085] In step S105, specifically: the mapping matrix and the symmetric positive definite matrix obtained from multiple training tasks are calculated to obtain a minimum error matrix.

[0086] Specifically, Figure 4 As shown, step S105 includes the following steps S501 to S504:

[0087] S501. By calculating the loss value, gradient value, change amount and average of the mapping matrix, the corresponding loss value matrix, gradient value matrix, change amount matrix and first average matrix are obtained respectively.

[0088] For the above step S501, specifically: obtain the loss value matrix, the gradient value matrix, the change matrix and the first average matrix according to the following formula:

[0089]

[0090] ω=ω t (α) (2)

[0091] X=X t Δα t (3)

[0092] C=c(α) (4)

[0093] Where t represents the number of training tasks, α is the mapping parameter between face image X and features, is a pair of features and corresponding labels of the training data Here, it should be noted that y refers to the annotation information, which marks whether the face image is a living image. Δα is the change in the mapping parameter task after updating.

[0094] is the loss function. Here, it should be noted that the loss function is the difference between the predicted result and the correct result obtained from the X mapping under the mapping parameter α. The loss function includes but is not limited to the hinge loss function and the cross entropy loss function. L is the loss value matrix, ω is the gradient value matrix, X is the change matrix, and C is the first average matrix

[0095] S502: Calculate the mean of the gradient value matrix and the variation matrix to obtain a second mean matrix.

[0096] For the above step S501, specifically: obtain the second average matrix according to the following formula:

[0097] B=<ω,X>

[0098] Among them, B is the second mean matrix, ω is the gradient value matrix, and X is the change matrix

[0099] S503: Obtain a symmetric positive definite variation matrix according to the symmetric positive definite matrix and the variation matrix.

[0100] For the above step S503, it is specifically: obtain the symmetric positive definite variation matrix according to the following formula:

[0101] E=X T M t X, where E is a symmetric positive definite matrix of variation, M t represents the symmetric positive definite matrix in the tth training task, and X is the variable matrix.

[0102] S504, obtaining a minimum error matrix according to the loss value matrix, the first average matrix, the second average matrix and the symmetric positive definite variation matrix.

[0103] For the above step S504, specifically: the minimum error matrix is ​​obtained according to the following calculation:

[0104]

[0105] Among them, L represents the loss value matrix, C represents the first mean matrix, B represents the second mean matrix, E represents the symmetric positive definite variation matrix, J represents the minimum error matrix, i is 1, 2, 3...N, and N is a positive integer.

[0106] S106. Upload the minimum error matrix and the associated parameter matrix to a server for training a global model for face liveness detection, so that the server trains the global model for face liveness detection.

[0107] In step S106, the global model of face liveness detection is expressed as the following function:

[0108]

[0109] in, is the global model for face liveness detection, λ2 is a constant parameter, is the F-norm of the minimum error matrix, Ω is the associated parameter matrix, and tr represents the trace of the matrix.

[0110] The face liveness detection training optimization method based on federated learning proposed in this embodiment extracts features of multiple face images in the face image set based on the face image set obtained during the face liveness detection training process; wherein the face image includes annotation information. The features of the multiple face images are mapped with the annotation information to form a mapping matrix; the features of the multiple face images are calculated to obtain an associated parameter matrix; the associated parameter matrix is ​​calculated to obtain a symmetric positive definite matrix; the mapping matrix and the symmetric positive definite matrix are calculated to obtain a minimum error matrix; the minimum error matrix and the associated parameter matrix are uploaded to a server for training a global model for face liveness detection, so that the server trains a global model for face liveness detection. By using the obtained global model for face liveness detection, face liveness detection can be performed without using the face for action interaction or additional information, which can solve the technical problems of low detection efficiency and poor equipment versatility in the face liveness detection method caused by the existing face liveness detection model.

[0111] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0112] In one embodiment, a face liveness detection training optimization device based on federated learning is provided, and the face liveness detection training optimization device based on federated learning corresponds to the face liveness detection training optimization method based on federated learning in the above embodiment. Figure 5 As shown, the face liveness detection training optimization device based on federated learning includes a feature extraction module 11, a mapping module 12, an associated parameter matrix acquisition module 13, a symmetric positive definite matrix acquisition module 14, a minimum error matrix acquisition module 15 and a training module 16. The functional modules are described in detail as follows:

[0113] The feature extraction module 11 is used to extract features of multiple face images in the face image set based on the face image set obtained during the face liveness detection training process; wherein the face image includes annotation information;

[0114] The mapping module 12 is used to map the features of multiple face images with the annotation information and form a mapping matrix.

[0115] The correlation parameter matrix acquisition module 13 is used to calculate and process the features of multiple face images to obtain a correlation parameter matrix.

[0116] The symmetric positive definite matrix acquisition module 14 is used to calculate and process the associated parameter matrix to obtain a symmetric positive definite matrix.

[0117] The minimum error matrix acquisition module 15 is used to calculate and process the mapping matrix and the symmetric positive definite matrix to obtain the minimum error matrix.

[0118] The training module 16 is used to upload the minimum error matrix and the associated parameter matrix to a server for training a global model for face liveness detection, so that the server trains the global model for face liveness detection.

[0119] In this embodiment, the correlation parameter matrix acquisition module 13 further includes:

[0120] The Euclidean distance calculation unit is used to perform Euclidean distance calculation on the features of multiple face images to obtain a corresponding Euclidean distance matrix.

[0121] The correlation matrix calculation unit is used to perform correlation calculation on the Euclidean distance matrix to obtain a correlation matrix.

[0122] The correlation parameter matrix calculation unit is used to calculate the correlation matrix to obtain the correlation parameter matrix.

[0123] In this embodiment, the correlation parameter matrix calculation unit further includes:

[0124] The first square root matrix calculation unit is used to calculate the square root of each number in the correlation matrix and establish the first square root matrix accordingly.

[0125] The square root matrix sum calculation unit is used to add each number on the main diagonal of the first square root matrix to obtain the square root matrix sum.

[0126] The second square root matrix calculation unit is used to divide the first square root matrix by the square root matrix sum to obtain the second square root matrix.

[0127] The inverse calculation unit is used to perform inverse calculation on the second square root matrix to obtain the correlation parameter matrix.

[0128] In one embodiment, the minimum error matrix acquisition module 15 further includes:

[0129] The matrix calculation unit is used to obtain the corresponding loss value matrix, gradient value matrix, change amount matrix and first average number matrix respectively by calculating the loss value, gradient value, change amount and average of the mapping matrix.

[0130] The second average matrix calculation unit is used to perform average calculation on the gradient value matrix and the variation matrix to obtain a second average matrix.

[0131] The symmetric positive definite variation matrix calculation unit is used to obtain the symmetric positive definite variation matrix according to the symmetric positive definite matrix and the variation matrix.

[0132] The minimum error matrix calculation unit is used to obtain the minimum error matrix according to the loss value matrix, the first average matrix, the second average matrix and the symmetric positive definite variation matrix.

[0133] The meaning of "first" and "second" in the above modules / units is only to distinguish different modules / units, and is not used to define which module / unit has a higher priority or other limiting meanings. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or modules is not necessarily limited to those steps or modules clearly listed, but may include other steps or modules that are not clearly listed or inherent to these processes, methods, products or devices. The division of modules in this application is only a logical division, and there may be other division methods when implemented in actual applications.

[0134] For the specific definition of the face liveness detection training optimization device based on federated learning, please refer to the definition of the face liveness detection training optimization method based on federated learning above, which will not be repeated here. Each module in the above-mentioned face liveness detection training optimization device based on federated learning can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0135] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 6 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data involved in a face liveness detection training optimization method based on federated learning. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a face liveness detection training optimization method based on federated learning is implemented.

[0136] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 7As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external server through a network connection. When the computer program is executed by the processor, a method for optimizing face liveness detection training based on federated learning is implemented.

[0137] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the method for optimizing face liveness detection training based on federated learning in the above embodiment are implemented, such as Figure 2 Steps S101 to S106 and other extensions of the method and extensions of related steps are shown. Alternatively, when the processor executes the computer program, the functions of each module / unit of the face liveness detection training optimization device based on federated learning in the above embodiment are implemented, for example Figure 5 The functions of modules 11 to 16 are shown in Figure 1. To avoid repetition, they will not be described here.

[0138] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the computer device, and various interfaces and lines are used to connect various parts of the entire computer device.

[0139] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the computer device by running or executing the computer program and / or module stored in the memory and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, video data, etc.), etc.

[0140] The memory may be integrated into the processor or may be arranged separately from the processor.

[0141] In one embodiment, a computer-readable storage medium is provided on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for optimizing face liveness detection training based on federated learning in the above embodiment are implemented, such as Figure 2 Steps S101 to S106 shown in the figure and other extensions of the method and extensions of related steps. Alternatively, when the computer program is executed by the processor, the functions of each module / unit of the face liveness detection training optimization device based on federated learning in the above embodiment are realized, for example Figure 5 The functions of modules 11 to 16 are shown in Figure 1. To avoid repetition, they will not be described here.

[0142] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0143] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0144] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.

Claims

1. A method for optimizing face liveness detection training based on federated learning, characterized in that: include: Based on a face image set obtained during face liveness detection training, extract features of multiple face images in the face image set; wherein the face image includes annotation information; Mapping the features of the plurality of face images with the annotation information to form a mapping matrix; Calculating and processing the features of the plurality of face images to obtain a correlation parameter matrix; Performing computational processing on the association parameter matrix to obtain a symmetric positive definite matrix; Performing calculation processing on the mapping matrix and the symmetric positive definite matrix to obtain a minimum error matrix; The minimum error matrix and the associated parameter matrix are uploaded to a server for training a global model for face liveness detection, so that the server trains the global model for face liveness detection.

2. The method for optimizing face liveness detection training according to claim 1, characterized in that: The step of extracting features of a plurality of face images in the face set comprises: Extract local binary pattern features of the multiple face images.

3. The method for optimizing face liveness detection training according to claim 1, characterized in that: The step of calculating and processing the features of the plurality of face images to obtain a correlation parameter matrix comprises: Performing Euclidean distance calculation on the features of the multiple face images to obtain a corresponding Euclidean distance matrix; Performing correlation calculation on the Euclidean distance matrix to obtain a correlation matrix; The correlation matrix is ​​subjected to calculation processing to obtain the association parameter matrix.

4. The method for optimizing face liveness detection training according to claim 3, characterized in that: The step of calculating and processing the correlation matrix to obtain the association parameter matrix comprises: Calculate the square root of each number in the correlation matrix and establish a first square root matrix accordingly; Add each number on the main diagonal of the first square root matrix to obtain a square root matrix sum; Dividing the first square root matrix by the square root matrix sum to obtain a second square root matrix; An inverse calculation is performed on the second square root matrix to obtain the association parameter matrix.

5. The method for optimizing face liveness detection training according to claim 1, characterized in that: The step of calculating and processing the mapping matrix and the symmetric positive definite matrix to obtain a minimum error matrix comprises: By calculating the loss value, gradient value, change amount and average of the mapping matrix, corresponding loss value matrix, gradient value matrix, change amount matrix and first average matrix are obtained respectively; Performing mean calculation on the gradient value matrix and the variation matrix to obtain a second mean matrix; Obtaining a symmetric positive definite variation matrix according to the symmetric positive definite matrix and the variation matrix; The minimum error matrix is ​​obtained according to the loss value matrix, the first average matrix, the second average matrix and the symmetric positive definite variation matrix.

6. A face liveness detection training optimization device based on federated learning, characterized in that: include: A feature extraction module, configured to extract features of a plurality of face images in a face image set based on a face image set obtained during face liveness detection training; wherein the face image includes annotation information; A mapping module, used to map the features of the plurality of face images with the annotation information and form a mapping matrix; A correlation parameter matrix acquisition module, used for calculating and processing the features of the plurality of face images to obtain a correlation parameter matrix; A symmetric positive definite matrix acquisition module is used to calculate and process the associated parameter matrix to obtain a symmetric positive definite matrix; A minimum error matrix acquisition module, used for calculating and processing the mapping matrix and the symmetric positive definite matrix to obtain a minimum error matrix; A training module is used to upload the minimum error matrix and the associated parameter matrix to a server used to train a global model for face liveness detection, so that the server trains the global model for face liveness detection.

7. The face liveness detection training optimization device according to claim 6, characterized in that: The associated parameter matrix acquisition module includes: A Euclidean distance calculation unit, configured to perform Euclidean distance calculation on the features of the plurality of face images to obtain a corresponding Euclidean distance matrix; A correlation matrix calculation unit, used for performing correlation calculation on the Euclidean distance matrix to obtain a correlation matrix; The correlation parameter matrix calculation unit is used to calculate the correlation matrix to obtain the correlation parameter matrix.

8. The face liveness detection training optimization device according to claim 6, characterized in that: The minimum error matrix acquisition module comprises: A matrix calculation unit, configured to obtain a corresponding loss value matrix, a gradient value matrix, a change amount matrix and a first average number matrix by calculating the loss value, the gradient value, the change amount and the average of the mapping matrix; A second mean matrix calculation unit, used for performing mean calculation on the gradient value matrix and the variation matrix to obtain a second mean matrix; A symmetric positive definite variation matrix calculation unit, used for obtaining a symmetric positive definite variation matrix according to the symmetric positive definite matrix and the variation matrix; A minimum error matrix calculation unit is used to obtain the minimum error matrix according to the loss value matrix, the first average matrix, the second average matrix and the symmetric positive definite variation matrix.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the face liveness detection training optimization method based on federated learning as described in any one of claims 1 to 5 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the face liveness detection training optimization method based on federated learning as described in any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Living body detection method, computer device and computer readable storage medium

    CN107992842A

  • Face recognition method based on group sparse representation and low-rank matrix recovery

    CN109522841A