Encrypted model training, image encryption and encrypted face image recognition method and device
By training encryption models and face recognition models, and optimizing the encryption process in combination with prediction losses, the contradiction between privacy protection and recognition accuracy in the use of face images is solved, achieving the effect of protecting privacy while maintaining recognition accuracy.
Patent Information
- Application Number
- CN202110822280.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-20
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2041-07-20
AI Technical Summary
It is difficult with existing technology to protect user privacy while maintaining the execution accuracy of downstream tasks during the use of face images. Especially when training face recognition models, the loss of image features of encrypted face images leads to a decrease in recognition accuracy. .
By training the encryption model and the face recognition model, using the total prediction loss as the target, and combining the positive correlation between the first prediction loss and the second prediction loss to ensure that the encryption model retains important features during the encryption process of the original face image, and then after encryption The accuracy of the recognition results of image training is comparable to that of the original images.
It is possible to protect user privacy while maintaining the recognition accuracy of the face recognition model, ensuring the feature confidentiality and recognition distinction of the encrypted image, and avoiding excessive loss of image features during the encryption process.
Smart Images

Figure CN113486839B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to an encryption model training method and device for privacy protection, an image encryption method and device, and an encrypted face image recognition method and device. Background Art
[0002] In recent years, data security and personal privacy protection have received increasing attention and attention from the public. Due to the unpredictability of the security of the operating environment of third-party devices, the security of data in the process of using facial images, such as face recognition applications, is under great threat. How to protect user privacy throughout the entire process of using facial images is an issue worthy of research and discussion.
[0003] At present, the process of protecting the privacy of users in the entire process of using facial images is generally: using the encryption algorithm in the traditional digital image processing method to encrypt the facial image, and then using the encrypted facial image to perform downstream tasks, for example, using the encrypted facial image and its corresponding label information to train the facial recognition model. Among them, the encryption algorithm in the traditional digital image processing method generally includes: randomly disturbing the rows or columns of the image, randomly disturbing the pixels of the image, scaling the pixels of the image, or encrypting the image using a chaotic sequence.
[0004] However, in the above process, the encrypted facial images can protect the user's personal privacy to a certain extent, but it is impossible to control the impact of the image feature loss of the encrypted facial images on downstream tasks. For example, the accuracy of the encrypted facial images may drop significantly when used to train facial recognition models.
[0005] Therefore, we hope to have an improved solution that can protect personal privacy while ensuring the accuracy of downstream tasks. Summary of the invention
[0006] One or more embodiments of the present specification provide an encryption model training method and device for privacy protection, an image encryption method and device, and an encrypted face image recognition method and device, so as to train an encryption model to achieve personal privacy protection while ensuring the execution accuracy of downstream tasks.
[0007] According to a first aspect, a method for training an encrypted model for privacy protection is provided, comprising:
[0008] Encrypting the original face image using the encryption model to be trained to obtain the corresponding encrypted face image;
[0009] Inputting the encrypted face image into a first face recognition model to be trained to obtain a first face prediction result;
[0010] Determine a first prediction loss using the first face prediction result and the face annotation result corresponding to the original face image;
[0011] Inputting the original face image and the encrypted face image into a trained second face recognition model respectively to obtain a first output result corresponding to the original face image and a second output result corresponding to the encrypted face image, wherein the second face recognition model is trained based on the original face image and the corresponding face annotation result;
[0012] Determining a second predicted loss based on the first output result and the second output result;
[0013] determining a total predicted loss, the total predicted loss being positively correlated with the first predicted loss and the second predicted loss;
[0014] The encryption model and the first face recognition model are trained with the goal of minimizing the total prediction loss.
[0015] In one possible implementation, the first output result includes: a first image feature of the original facial image, and the second output result includes: a second image feature of the encrypted facial image;
[0016] The determining of the second prediction loss comprises:
[0017] calculating a similarity between the first image feature and the second image feature;
[0018] The second prediction loss is determined, which is positively correlated with the similarity.
[0019] In one possible implementation, the second output result further includes: a second face prediction result of the encrypted face image;
[0020] Also includes:
[0021] Determining a third prediction loss based on the second face prediction result and the face labeling result;
[0022] The second predicted loss is also positively correlated with the third predicted loss.
[0023] In one possible implementation manner, the first image feature is a feature vector corresponding to a feature map outputted for the original face image at an intermediate layer predetermined in the second face recognition model;
[0024] The second image feature is the predetermined intermediate layer, and is a feature vector corresponding to the feature map output for the encrypted facial image.
[0025] In one possible implementation, the first face recognition model and the second face recognition model have the same neural network structure.
[0026] In one possible implementation, it further includes:
[0027] Using a feature extraction algorithm corresponding to a specified image similarity evaluation index, respectively extract a first feature map corresponding to the original face image and a second feature map corresponding to the encrypted face image;
[0028] Determining a difference between the first feature map and the second feature map;
[0029] The total prediction loss is also negatively correlated with the difference.
[0030] In one possible implementation, the feature extraction algorithm includes at least one of the following: a feature extraction algorithm based on discrete cosine transform DCT, a feature extraction algorithm based on principal component analysis PCA;
[0031] The degree of difference is determined based on pixel differences between the images.
[0032] According to a second aspect, there is provided an image encryption method for privacy protection, comprising:
[0033] Obtaining an encryption model trained by the method described in the first aspect;
[0034] Obtaining a face image to be encrypted;
[0035] The face image to be encrypted is input into the encryption model to obtain the corresponding encrypted face image.
[0036] According to a third aspect, a privacy-protected encrypted face image recognition method is provided, comprising:
[0037] Obtaining an encryption model and a first face recognition model trained by the method described in the first aspect;
[0038] Inputting the face image to be processed into the encryption model to obtain the corresponding face image to be recognized;
[0039] The face image to be recognized is input into the first face recognition model to obtain a corresponding face recognition result.
[0040] According to a fourth aspect, there is provided an encryption model training device for privacy protection, comprising:
[0041] A first encryption module is configured to encrypt the original face image using the encryption model to be trained to obtain a corresponding encrypted face image;
[0042] A first image input module, configured to input the encrypted face image into a first face recognition model to be trained to obtain a first face prediction result;
[0043] A first loss determination module, configured to determine a first prediction loss using the first face prediction result and a face annotation result corresponding to the original face image;
[0044] A second image input module is configured to input the original face image and the encrypted face image into a trained second face recognition model respectively, to obtain a first output result corresponding to the original face image and a second output result corresponding to the encrypted face image, wherein the second face recognition model is trained based on the original face image and the corresponding face annotation result;
[0045] A second loss determination module, configured to determine a second predicted loss based on the first output result and the second output result;
[0046] a total loss determination module configured to determine a total predicted loss, the total predicted loss being positively correlated with the first predicted loss and the second predicted loss;
[0047] The model training module is configured to train the encryption model and the first face recognition model with the goal of minimizing the total prediction loss.
[0048] According to a fifth aspect, there is provided an image encryption device for privacy protection, comprising:
[0049] A first model acquisition module, configured to obtain an encrypted model trained by the device as described in the fourth aspect;
[0050] An image acquisition module, configured to obtain a face image to be encrypted;
[0051] The third image input module is configured to input the face image to be encrypted into the encryption model to obtain a corresponding encrypted face image.
[0052] According to a sixth aspect, there is provided an encrypted face image recognition device based on privacy protection, comprising:
[0053] A second model acquisition module, configured to obtain the encrypted model trained by the device as described in the fourth aspect and the first face recognition model;
[0054] A fourth image input module, configured to input the face image to be processed into the encryption model to obtain a corresponding face image to be recognized;
[0055] The fifth image input module is configured to input the face image to be recognized into the first face recognition model to obtain a corresponding face recognition result.
[0056] According to a seventh aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed in a computer, the computer is caused to execute the method described in the first aspect.
[0057] According to an eighth aspect, a computing device is provided, comprising a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method described in the first aspect is implemented.
[0058] According to a ninth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed in a computer, the computer is caused to execute the method described in the second aspect.
[0059] According to the tenth aspect, a computing device is provided, comprising a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method described in the second aspect is implemented.
[0060] According to the eleventh aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed in a computer, the computer is caused to execute the method described in the third aspect.
[0061] According to the twelfth aspect, a computing device is provided, comprising a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method described in the third aspect is implemented.
[0062] According to the method and device provided in the embodiments of this specification, the total prediction loss is determined based on the positive correlation with the first prediction loss and the second prediction loss, and the encryption model and the first face recognition model are trained with the goal of minimizing the total prediction loss to ensure that the trained encryption model can encrypt the original face image and protect the face and associated personal privacy information in the original face image, while ensuring the accuracy of the recognition results of the first face recognition model trained using the encrypted face image. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0064] Figure 1 A schematic diagram of an implementation framework of an embodiment disclosed in this specification;
[0065] Figure 2A flowchart of an encryption model training method for privacy protection provided in an embodiment;
[0066] Figure 3 A schematic diagram of an implementation framework of an embodiment disclosed in this specification;
[0067] Figure 4A A schematic diagram of a flow chart of an image encryption method for privacy protection provided in an embodiment;
[0068] Figure 4B A schematic diagram of an encrypted face image obtained after the face image to be encrypted is encrypted;
[0069] Figure 5 A schematic diagram of a flow chart of a privacy-protection-based encrypted face image recognition method provided in an embodiment;
[0070] Figure 6 A schematic block diagram of an encryption model training device for privacy protection provided in an embodiment;
[0071] Figure 7 A schematic block diagram of an image encryption device for privacy protection provided in an embodiment;
[0072] Figure 8 A schematic block diagram of an encrypted face image recognition device based on privacy protection provided in an embodiment. DETAILED DESCRIPTION
[0073] The technical solutions of the embodiments of this specification will be described in detail below with reference to the accompanying drawings.
[0074] The embodiments of this specification disclose an encryption model training method for privacy protection, an image encryption method for privacy protection, and an encrypted face image recognition method based on privacy protection. The application scenario and inventive concept of the encryption model training method for privacy protection are first introduced below, as follows:
[0075] In the process of using faces, such as face recognition and face payment, if the face image is used directly, the face and its corresponding privacy are easily leaked during use. In order to protect personal privacy, the encryption algorithm in the traditional digital image processing method can be used to encrypt the face image, and then the encrypted face image can be used for subsequent tasks. In the above process, it plays a role in protecting personal privacy to a certain extent, but it is impossible to control the impact of the image feature loss of the encrypted face image on downstream tasks. For example, when the encrypted face image is used to train the face recognition model, the accuracy of the face recognition model may drop significantly. The encryption algorithm in the traditional digital image processing method generally includes: randomly disturbing the rows or columns of the image, randomly disturbing the pixels of the image, scaling the pixels of the image, or using a chaotic sequence to encrypt the image and other encryption algorithms.
[0076] In view of this, the inventor proposes an encryption model training method for privacy protection, such as Figure 1 As shown, it is a schematic diagram of the implementation framework of an embodiment disclosed in this specification. Among them, the original face image is encrypted using the encryption model to be trained to obtain the corresponding encrypted face image; the encrypted face image is recognized using the first face recognition model to be trained to obtain the first face prediction result; the first face prediction result and the face annotation result corresponding to the original face image are used to determine the first prediction loss. Among them, the first prediction loss can characterize the difference between the prediction result of the encrypted face image and the real face annotation result. The smaller the first prediction loss is, the more accurate the first face prediction result is. That is to say, the more facial features used for face recognition in the encrypted face image, and the fewer background features irrelevant to face recognition, correspondingly, the higher the recognition result accuracy of the first face recognition model.
[0077] The original face image and the encrypted face image are respectively input into the trained second face recognition model to obtain a first output result corresponding to the original face image and a second output result corresponding to the encrypted face image, wherein the second face recognition model is trained based on the original face image and the corresponding face annotation result. Based on the first output result and the second output result, a second prediction loss is determined. The second prediction loss can represent the similarity between the image features of the original face image and the encrypted face image obtained by the second face recognition model, and / or the difference between the prediction result corresponding to the encrypted face image and the corresponding annotation result. Among them, the smaller the similarity, the less similar the image features of the original face image and the encrypted face image obtained by the second face recognition model are, and accordingly, the image features corresponding to the original face image cannot be inferred from the image features corresponding to the encrypted face image. In this way, the smaller the similarity, the better the encryption effect of the face in the encrypted face image, and the better the privacy protection. The smaller the difference between the prediction result corresponding to the encrypted face image and the corresponding annotation result, the closer they are, that is, the result recognized by the second face recognition model based on the encrypted face image is closer to the original annotation result. This means that the image features retained by the encrypted face image can still be effectively used for face recognition. Therefore, this difference can, to a certain extent, reflect the degree of differentiation of the image features retained by the encrypted face image for face recognition. Accordingly, the smaller the second prediction loss, the better.
[0078] Furthermore, according to the positive correlation with the first prediction loss and the second prediction loss, the total prediction loss is determined, and the encryption model and the first face recognition model are trained with the goal of minimizing the total prediction loss. During the training process, the privacy protection of the encrypted image and the accuracy of the face recognition image obtained by the encrypted image training are taken into account, that is, the accuracy of the first face recognition model trained with the encrypted face image is guaranteed to be equivalent to the accuracy of the face recognition model trained with the original face image.
[0079] In one or more embodiments of the present specification, in consideration of more comprehensive protection of the original face in the original face image, that is, more comprehensive protection of personal privacy, during the training of the encryption model, the total prediction loss can also be jointly set from the perspective of expanding the difference between the image features of the original face image and the image features of the encrypted face image. This makes it possible that the image features of the encrypted face image obtained by the trained encryption model are significantly different from those of the original face image, ensuring that the original face cannot be restored using the image features of the encrypted face image.
[0080] In one possible implementation, the feature extraction algorithms corresponding to the image features of the original face image and the image features of the encrypted face image mentioned above may include, but are not limited to: feature extraction algorithms corresponding to specified image similarity evaluation indicators. The specified image similarity evaluation indicators may include, but are not limited to: feature extraction based on discrete cosine transform DCT and feature extraction based on principal component analysis PCA.
[0081] For the image encryption method for privacy protection, it uses the encryption model trained by the above-mentioned encryption model training method for privacy protection to encrypt the face image to be encrypted, and obtains the corresponding encrypted face image, so as to achieve the confidentiality of the face in the encrypted face image while not affecting the accuracy of the face recognition model subsequently trained using the encrypted face image.
[0082] For the encrypted face image recognition method based on privacy protection, it first uses the encryption model trained by the above-mentioned encryption model training method for privacy protection to encrypt the face image to be processed, and obtains the corresponding face image to be recognized. Then, the first face recognition model trained by the above-mentioned encryption model training method for privacy protection is used to perform face recognition on the face image to be recognized, and a face recognition result with higher accuracy is obtained, thereby realizing accurate recognition of the encrypted face image.
[0083] In combination with specific embodiments, the encryption model training method for privacy protection, the image encryption method for privacy protection, and the encrypted face image recognition method based on privacy protection provided in this specification are described in detail below. First, the encryption model training method for privacy protection is described.
[0084] Figure 2 A flowchart of an encryption model training method for privacy protection in one embodiment of this specification is shown. The method can be implemented by any device, equipment, platform, device cluster, etc. with computing and processing capabilities. The method includes the following steps S210-S270:
[0085] S210: Encrypt the original face image using the encryption model to be trained to obtain a corresponding encrypted face image.
[0086] In one possible implementation, before training the encryption model, a training set for training the encryption model can be first constructed, and the training set can include: multiple original face images and face annotation results corresponding to each original face image. Among them, the original face image can be: an image containing a face acquired by an image acquisition device. The face annotation result can include: information characterizing the identity of the face in the corresponding original face image, for example, the identity of the face in each original face image can be identified by a face ID. Subsequently, the encryption model training process for privacy protection provided in the embodiment of this specification can be executed for each original face image in the training set to train the encryption model and the first face recognition model.
[0087] It can be understood that in the embodiments of this specification, one of the original face images is taken as an example to illustrate the processing process of each original face image in the training set. That is, similar processing can be performed on each original face image in the training set.
[0088] The encryption model to be trained can be a model based on a neural network. In one case, the encryption model to be trained can be a model with a U-Net structure. The model with a U-Net structure can better extract useful features in the image. The useful features may include but are not limited to: features in the image that are helpful for face recognition and features that are helpful for encryption.
[0089] The original face image is input into the encryption model to be trained, and the encryption model to be trained encrypts the original face image to obtain an encrypted face image corresponding to the original face image.
[0090] S220: Input the encrypted face image into a first face recognition model to be trained to obtain a first face prediction result.
[0091] In one implementation, the first face recognition model to be trained may be a model based on a neural network, which may include a feature extraction layer and a classification layer. The encrypted face image is input into the feature extraction layer to obtain image features of the encrypted face image, and the extracted image features are input into the classification layer to obtain a first face prediction result. The first face prediction result includes the identity information of the face in the predicted encrypted face image.
[0092] S230: Determine a first prediction loss using the first face prediction result and the face annotation result corresponding to the original face image.
[0093] Specifically, based on the first loss function, the first prediction loss is determined using the first face prediction result and the face annotation result corresponding to the original face image. The first prediction loss can represent the difference between the face prediction result and the face annotation result. The smaller the first prediction loss is, the more accurate the first face prediction result is, and accordingly, the higher the accuracy of the recognition result of the first face recognition model is.
[0094] The first loss function may be an ArcFace loss function, or may be an L1 loss function, an L2 loss function, a cross entropy loss function, or a Smooth L1 loss function, etc. It is understandable that the embodiments of this specification do not limit the specific type of the first loss function.
[0095] S240: Input the original face image and the encrypted face image into the trained second face recognition model respectively, and obtain a first output result corresponding to the original face image and a second output result corresponding to the encrypted face image. The second face recognition model is trained based on the original face image and the corresponding face annotation result, and the accuracy of its recognition result meets expectations. The second face recognition model can be a model based on a neural network. In one implementation, the second face recognition model can include a feature extraction layer and a classification layer, the feature extraction layer can extract image features of the input image, and the classification layer can determine the face recognition result of the corresponding image based on the image features output by the feature extraction layer. Accordingly, the output result of the second face recognition model may include: image features extracted by a certain layer of the feature extraction layer, and may also include the face recognition result determined by the classification layer.
[0096] In one embodiment, in order to facilitate the encryption model training process, the first face recognition model and the second face recognition model may have the same neural network structure. In another embodiment, the first face recognition model and the second face recognition model may have different neural network structures.
[0097] S250: Determine a second prediction loss based on the first output result and the second output result.
[0098] In one case, the first output result may include: a first image feature of the original face image and / or a third face prediction result of the original face image. The second output result may include: a second image feature of the encrypted face image and / or a second face prediction result. The first image feature and the second image feature are: features obtained from the same layer of the second face recognition model.
[0099] In one embodiment, the first image feature may be a feature vector corresponding to a feature map output by a predetermined intermediate layer in the second face recognition model for the original face image, and the second image feature may be a feature vector corresponding to a feature map output by the predetermined intermediate layer for the encrypted face image.
[0100] In one implementation, the first output result includes the first image feature, and the second output result includes the second image feature. Accordingly, the aforementioned S250, the process of determining the second prediction loss, may include the following steps 12 and 14:
[0101] Step 12: Calculate the similarity between the first image feature and the second image feature. The similarity between the first image feature and the second image feature may be calculated according to a preset similarity algorithm. The similarity may represent the degree of similarity between the first image feature and the second image feature. The smaller the similarity value, the lower the degree of similarity between the first image feature and the second image feature.
[0102] In one embodiment, the preset similarity algorithm may be a cosine cosine similarity algorithm or other similarity algorithms. Taking the preset similarity algorithm as the cosine cosine similarity algorithm as an example, the cosine cosine similarity algorithm is used to calculate the cosine value between the angles of the two feature vectors, that is, the cosine value between the angles of the first image feature and the second image feature. The cosine value is used to measure the similarity between the first image feature and the second image feature. The closer the cosine value is to 1, the closer the angle between the first image feature and the second image feature is to 0, indicating that the first image feature and the second image feature are more similar. The closer the cosine value is to 0, the closer the angle between the first image feature and the second image feature is to 90 degrees, indicating that the first image feature and the second image feature are less similar.
[0103] Accordingly, in order to ensure that the second image features extracted by the second face recognition model from the encrypted face image cannot restore the original face, the similarity between the second image features and the first image features needs to be low. Then, in step 14: determine the second prediction loss, which is positively correlated with the similarity. In other words, the second prediction loss is determined based on the positive correlation with the similarity.
[0104] In another implementation manner, the second output result may further include a second face prediction result, and before step 14, step 13 may further be included:
[0105] Step 13: Determine a third prediction loss based on the second face prediction result and the face annotation result.
[0106] Accordingly, the aforementioned step 14 is further designed to make the second prediction loss positively correlated with the third prediction loss.
[0107] In this embodiment, the second loss function can be used to determine the loss between the second face prediction result and the face annotation result, that is, the third prediction loss, based on the second face prediction result and the face annotation result. The smaller the third prediction loss, the closer the second face prediction result is to the face annotation result, that is, the result obtained by the second face recognition model based on the encrypted face image is closer to the original annotation result. This means that the image features retained by the encrypted face image can still be effectively used for face recognition. Therefore, the third prediction loss can reflect the distinguishing degree of the image features retained by the encrypted face image for face recognition to a certain extent.
[0108] The second loss function may be an ArcFace loss function, or an L1 loss function, an L2 loss function, a cross entropy loss function, or a Smooth L1 loss function, etc. It is understandable that the embodiments of this specification do not limit the specific type of the second loss function.
[0109] In one implementation, the second prediction loss can be expressed by the following formula (1):
[0110] l 11 =al 111 +bl 112 ; (1)
[0111] Among them, l 11 represents the second prediction loss, l 111 Indicates similarity, l 112 Represents the third prediction loss, a and b are preset weight coefficients, and a and b are positive numbers.
[0112] S260: Determine a total prediction loss. The total prediction loss is positively correlated with the first prediction loss and the second prediction loss.
[0113] In view of the first prediction loss, the accuracy of the recognition result of the face recognition model trained with the encrypted face image can be monitored. The smaller the first prediction loss, the higher the accuracy of the recognition result of the face recognition model trained with the encrypted face image, that is, the smaller the first prediction loss, the better.
[0114] Furthermore, given that the second prediction loss can represent: the similarity between image features of the original face image and the encrypted face image obtained by the second face recognition model, and / or the difference between the prediction result corresponding to the encrypted face image and the corresponding annotation result.
[0115] The smaller the similarity, the less similar the image features of the original face image and the encrypted face image obtained by the second face recognition model are. Correspondingly, it is more difficult to infer the image features of the original face image from the image features of the encrypted face image. In this way, the smaller the similarity, the better the encryption effect of the face in the encrypted face image, and the better the privacy protection effect.
[0116] The smaller the difference between the prediction result corresponding to the encrypted face image and the corresponding annotation result, the closer they are, that is, the result recognized by the second face recognition model based on the encrypted face image is closer to the original annotation result. This means that the image features retained by the encrypted face image can still be effectively used for face recognition. Therefore, the difference can reflect to a certain extent the degree of discrimination of the image features retained by the encrypted face image for face recognition. Accordingly, the smaller the second prediction loss, the better. Accordingly, when determining the total prediction loss, it is positively correlated with the first prediction loss and the second prediction loss.
[0117] In one implementation, the total prediction loss can be expressed by the following formula (2):
[0118] l 1 =al 111 +bl 112 +cl 12 ; (2)
[0119] l 1 represents the total prediction loss, l 12 Represents the first prediction loss, c is the preset weight coefficient, and c is a positive number.
[0120] S270: Train the encryption model and the first face recognition model with the goal of minimizing the total prediction loss.
[0121] Based on the total prediction loss, the back propagation algorithm is used to determine the model parameter gradients of the encryption model and the first face recognition model. The updated model parameters of the encryption model and the first face recognition model are determined using the determined model parameter gradients and the model parameters of the encryption model and the first face recognition model. Then, based on the updated model parameters, the model parameters of the encryption model and the first face recognition model are adjusted. Among them, the determination of the model parameter gradients of the encryption model and the first face recognition model is obtained with the goal of minimizing the total prediction loss. Minimizing the total prediction loss can achieve supervision of the recognition results of the face recognition model trained using the encrypted image and maintain its accuracy. Intuitively, for example, the original face cannot be observed from the encrypted face image using the human eye, and the features extracted from the encrypted face image cannot restore the original face, which improves the encryption effect of the image encrypted using the encryption model and the confidentiality of the face in the encrypted image.
[0122] The above steps S210 to S270 are a model iteration training process. In order to train a better encryption model and a first face recognition model, the above process can be iterated multiple times. That is, after step S270, based on the encryption model and the updated model parameters of the first face recognition model, return to step S210.
[0123] The stopping conditions of the above-mentioned model iterative training process may include: the number of iterative training times reaches a preset number threshold, or the iterative training duration reaches a preset duration, or the total prediction loss is less than a set loss threshold, etc.
[0124] In this embodiment, the total prediction loss is determined based on the positive correlation with the first prediction loss and the second prediction loss, and the encryption model and the first face recognition model are trained with the goal of minimizing the total prediction loss to ensure that the trained encryption model can encrypt the original face image and protect the face and associated personal privacy information in the original face image, while ensuring the accuracy of the first face recognition model trained using the encrypted face image.
[0125] Moreover, by training the encryption model with the first prediction loss, the encryption model can highlight the important parts of the image, such as the features of the main face, and better remove the features in the image that are irrelevant to face recognition, such as background features. For example, if there are two faces in the image, the features of the non-main face can be removed by training the encryption model with the first prediction loss, making the encrypted image easier to train, the model can converge quickly, and the recognition accuracy is high. Among them, the main face can refer to the face with identity information marked in the face annotation result corresponding to the image, and the non-main face can refer to the face without identity information marked in the face annotation result corresponding to the image.
[0126] Let's review the execution process of steps S210 to S270. The above embodiment is explained by taking an original face image as a sample. In another embodiment, the above steps S210 to S250 can also be performed for a batch of samples, i.e., multiple original face images, to obtain the first prediction loss and the second prediction loss of each original face image respectively. Based on the positive correlation between the first prediction loss and the second prediction loss of the multiple original face images, the total prediction loss is determined, and the encryption model and the first face recognition model are trained with the goal of minimizing the total prediction loss. In this embodiment, the total prediction loss is determined for a batch of samples, and then the model parameters of the encryption model and the first face recognition model are adjusted. This can reduce the number of parameter adjustments for the encryption model and the first face recognition model, making it easier to implement the training process.
[0127] In one implementation, in the process of determining the total prediction loss based on the positive correlation between the first prediction loss and the second prediction loss of the plurality of original face images, the first prediction loss l of the plurality of original face images may be: 12 Sum and calculate the second prediction loss l for multiple original face images 11 Sum, and then based on the l of multiple original face images 11 Sum value and l 12 Sum the values and determine the total prediction loss.
[0128] In another embodiment of the present specification, the similarity between images can be determined by features extracted by a face recognition model in addition to being determined by visual perception, i.e., human eye discrimination, and image similarity evaluation indicators. In one case, there may be two frames of images that are very different in visual perception, but the features extracted by feature extraction algorithms corresponding to certain image similarity evaluation indicators are relatively similar. In view of this, in order to avoid the situation where the features extracted by feature extraction algorithms corresponding to certain image similarity evaluation indicators of the encrypted face image are still similar to the features extracted by feature extraction algorithms corresponding to the image similarity evaluation indicators of the original face image, and then the face in the encrypted face image is deduced through the extracted features, exposing personal privacy, the method may also include the following steps 21-22:
[0129] Step 21: Utilize the feature extraction algorithm corresponding to the specified image similarity evaluation index to respectively extract the first feature map corresponding to the original face image and the second feature map corresponding to the encrypted face image. In one implementation, the feature extraction algorithm may include at least one of the following: feature extraction based on discrete cosine transform DCT, feature extraction based on principal component analysis PCA. It can be understood that the above feature extraction algorithm is used as an example of an embodiment of this specification. The above specified image similarity evaluation index may also be other indicators for evaluating image similarity, and accordingly, the feature extraction algorithm may be a feature extraction algorithm corresponding to other indicators for evaluating image similarity.
[0130] Step 22: Determine the difference between the first feature map and the second feature map. The difference may be determined based on the pixel difference between the images. In one embodiment, the difference may be: calculating the mean square error (MSE) value between the first feature map and the second feature map, and determining the calculated MSE value as the difference between the first feature map and the second feature map.
[0131] Accordingly, the aforementioned step S270 is designed so that the total prediction loss is also negatively correlated with the difference. It can be understood that the difference is determined based on the pixel difference between the images. The greater the pixel difference between the images, the greater the difference between the images. The greater the difference between the first feature map and the second feature map, the greater the pixel difference between the encrypted face image and the original face image, and the face in the original face image cannot be inferred from the second feature map, and the encryption effect of the encrypted face image is better. Accordingly, the total prediction loss is also negatively correlated with the difference.
[0132] In one embodiment, in step S260, the total prediction loss can be determined based on the positive correlation with the first prediction loss and the second prediction loss and the negative correlation with the difference. Then, the encryption model and the first face recognition model are trained with the goal of minimizing the total prediction loss. In this way, the confidentiality of the encrypted face image encrypted by the encryption model can be guaranteed from the perspective of appearance observation and feature extraction, and the accuracy of the face recognition model trained using the encrypted image can be guaranteed.
[0133] In one case, the total prediction loss can be expressed by the following formula (3):
[0134] l 2 =al 111 +bl 112 +cl 12 +dl 13 ; (3)
[0135] l 3 represents the total prediction loss, l 13 represents the difference, d represents the preset weight coefficient, and d is a negative number. The preset weight coefficient can be set according to actual needs. In one embodiment, the preset weight coefficient can be set to a=1, b=1, c=1, and d=-0.00001 respectively.
[0136] Figure 3 FIG. 1 is a schematic diagram of an implementation framework of an embodiment disclosed in this specification. Figure 3 As shown, the original face image x is input into the encryption model to be trained to obtain the encrypted face image E(x). The encrypted face image E(x) is input into the first face recognition model f1 to be trained, f1 extracts features from the encrypted face image, and obtains a corresponding feature vector based on the extracted image features, and then determines the first face prediction result based on the corresponding feature vector. The first prediction loss is determined using the first face prediction result and the face annotation result corresponding to the original face image.
[0137] The original face image x and the encrypted face image E(x) are input into the trained second face recognition model f2 to obtain the first output result of the original face image x and the second output result of the encrypted face image E(x). The first output result includes the first image feature, i.e., the intermediate layer predetermined by the second face recognition model f2, and the feature vector corresponding to the feature map outputted by the original face image x. The second output result includes the second image feature, i.e., the intermediate layer predetermined by the second face recognition model f2, the feature vector corresponding to the feature map outputted by the encrypted face image E(x), and the second face prediction result.
[0138] Based on the cosine similarity algorithm, the cosine loss similarity between the first image feature and the second image feature is calculated. According to the ArcFace loss function, based on the second face prediction result and the face annotation result, the third prediction loss ArcFace loss is determined. Further, the second prediction loss can be determined based on the positive correlation between the above similarity and the third prediction loss.
[0139] Use the feature extraction algorithm corresponding to the specified image similarity evaluation index, such as Figure 3 The DCT feature extraction algorithm shown in the figure is used to extract the first feature map corresponding to the original face image and the second feature map corresponding to the encrypted face image; based on the mean square error (MSE) algorithm, the difference (MSE) value between the first feature map and the second feature map is calculated.
[0140] Subsequently, the total prediction loss is determined based on the positive correlation with the first prediction loss and the second prediction loss (similarity and third prediction loss) and the negative correlation with the difference.
[0141] Corresponding to the above method embodiment, the image encryption method for privacy protection is explained below.
[0142] like Figure 4A As shown, a flowchart of a privacy-preserving image encryption method provided in an embodiment of this specification is provided. The method can be implemented by any device, equipment, platform, device cluster, etc. with computing and processing capabilities. The privacy-preserving image encryption method can include the following steps S410-S430:
[0143] S410: Obtain an encryption model. The training method of the encryption model may refer to the training method provided in the embodiment of the encryption model training method for privacy protection, which will not be described in detail here. In one implementation, the encryption model may be pre-stored locally on the device, and accordingly, the encryption model may be obtained directly from the local device. In another implementation, the encryption model may also be downloaded from a server storing the encryption model. When there is a need to encrypt a face image, an encryption model is obtained. The need to encrypt a face image may be: detecting that a set image acquisition device is started; or obtaining an image containing a face.
[0144] S420: Obtaining a face image to be encrypted. The face image to be encrypted is an image containing a face. It is understandable that S420 may be executed after S410, before S410, or in parallel with S410.
[0145] S430: Input the face image to be encrypted into the encryption model to obtain the corresponding encrypted face image. The face image to be encrypted is an image containing a face. The encryption model can be a model based on a neural network. The face image to be encrypted is input into the encryption model. The encryption model encrypts the face image to be encrypted to obtain the corresponding encrypted face image. There is a large difference in pixels between the encrypted face image and the original image, i.e., the face image to be encrypted, and the face therein cannot be distinguished by the human eye; the features extracted from it are significantly different from the features extracted from the original image; and it has distinctiveness and uniqueness in face recognition. Figure 4B , which is a schematic diagram of an encrypted face image obtained after the face image to be encrypted is encrypted. The figure shows four groups of face images to be encrypted and their corresponding encrypted face images.
[0146] In one implementation, the encryption model may be a model of a U-Net structure.
[0147] In one embodiment, the method can be applied to a terminal device, which can be any device with computing and processing capabilities, such as a mobile phone, a camera, and a computer. Accordingly, the terminal device can obtain a facial image to be encrypted, and then directly encrypt the obtained image locally using an encryption model, so as to reduce the risk of facial image theft to a certain extent, thereby reducing the risk of personal privacy leakage involved in the image.
[0148] In this embodiment, the trained encryption model can be used to encrypt the face image, and the encrypted face image can be used to perform other tasks, such as face payment tasks and face recognition tasks.
[0149] Corresponding to the above method embodiment, an encrypted face image recognition method based on privacy protection is described below.
[0150] like Figure 5 As shown, a flowchart of a privacy-protected encrypted face image recognition method provided in an embodiment of this specification is provided. The method can be implemented by any device, equipment, platform, device cluster, etc. with computing and processing capabilities. The privacy-protected encrypted face image recognition may include the following steps S510-S530:
[0151] S510: Obtain an encryption model and a first face recognition model; wherein, the training method of the encryption model and the first face recognition model can refer to the training method provided in the above-mentioned encryption model training method embodiment for privacy protection, which will not be repeated here.
[0152] The encryption model may be a model based on a neural network. In one implementation, the encryption model may be a model of a U-Net structure. The first face recognition model may be a model based on a neural network, for example, a model based on a deep neural network.
[0153] S520: Input the face image to be processed into the encryption model to obtain the corresponding face image to be identified. The face image to be processed is an image containing a face. Input the face image to be processed into the encryption model, and the encryption model encrypts the face image to be processed to obtain the corresponding face image to be identified. The face image to be identified has a large difference in pixels from the original image, i.e., the face image to be processed, and the face therein cannot be distinguished by the human eye; the features extracted from it are greatly different from the features extracted from the original image; and it has distinguishability and uniqueness in face recognition.
[0154] S530: Input the face image to be recognized into the first face recognition model to obtain the corresponding face recognition result. The first face recognition model may include a feature extraction layer and a classification layer. The face image to be recognized is input into the feature extraction layer, and the feature extraction layer extracts features from the face image to be recognized to obtain corresponding image features; the image features are input into the classification layer, and the classification layer determines the corresponding face recognition result based on the input image features.
[0155] In one implementation, the obtained face recognition results can continue to be used for the execution of downstream tasks, such as: implementing face payment tasks, implementing attendance tasks, implementing identity authentication tasks, etc.
[0156] In this embodiment, by encrypting the facial image and then using the encrypted facial image to perform facial recognition, the protection of the face in the facial image and the personal privacy involved can be improved to a certain extent.
[0157] The foregoing describes certain embodiments of the present specification, and other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims may be performed in an order different from that in the embodiments, and the desired results may still be achieved. In addition, the processes depicted in the accompanying drawings do not necessarily have to be performed in the specific order or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0158] Corresponding to the above method embodiment, the present specification embodiment provides an encryption model training device 600 for privacy protection, and its schematic block diagram is as follows: Figure 6 As shown, including:
[0159] A first encryption module 610 is configured to encrypt the original face image using the encryption model to be trained to obtain a corresponding encrypted face image;
[0160] A first image input module 620, configured to input the encrypted face image into a first face recognition model to be trained to obtain a first face prediction result;
[0161] A first loss determination module 630 is configured to determine a first prediction loss using the first face prediction result and the face annotation result corresponding to the original face image;
[0162] A second image input module 640 is configured to input the original face image and the encrypted face image into a trained second face recognition model respectively, to obtain a first output result corresponding to the original face image and a second output result corresponding to the encrypted face image, wherein the second face recognition model is trained based on the original face image and the corresponding face annotation result;
[0163] A second loss determination module 650, configured to determine a second predicted loss based on the first output result and the second output result;
[0164] a total loss determination module 660 configured to determine a total predicted loss, the total predicted loss being positively correlated with the first predicted loss and the second predicted loss;
[0165] The model training module 670 is configured to train the encryption model and the first face recognition model with the goal of minimizing the total prediction loss.
[0166] In one possible implementation, the first output result includes: a first image feature of the original facial image, and the second output result includes: a second image feature of the encrypted facial image;
[0167] The second loss determination module 650 includes:
[0168] a similarity calculation unit (not shown in the figure), configured to calculate the similarity between the first image feature and the second image feature;
[0169] The first determining unit (not shown in the figure) is configured to determine the second prediction loss, which is positively correlated with the similarity.
[0170] In one possible implementation, the second output result further includes: a second face prediction result of the encrypted face image;
[0171] The second loss determination module 650 further includes:
[0172] A second determining unit (not shown in the figure) is configured to determine a third prediction loss based on the second face prediction result and the face labeling result;
[0173] The first determining unit is further configured to make the second predicted loss positively correlated with the third predicted loss.
[0174] In one possible implementation, the first image feature is a feature vector corresponding to a feature map outputted by a predetermined intermediate layer in the second face recognition model for the original face image;
[0175] The second image feature is the predetermined intermediate layer, and is a feature vector corresponding to the feature map output for the encrypted facial image.
[0176] In one possible implementation, the first face recognition model and the second face recognition model have the same neural network structure.
[0177] In one possible implementation, it also includes:
[0178] A feature extraction module (not shown in the figure), configured to use a feature extraction algorithm corresponding to a specified image similarity evaluation index to respectively extract a first feature map corresponding to the original face image and a second feature map corresponding to the encrypted face image;
[0179] a difference determination module (not shown in the figure), configured to determine a difference between the first feature map and the second feature map;
[0180] The total loss determination module 660 is further configured to make the total prediction loss negatively correlated with the difference.
[0181] In one possible implementation, the feature extraction algorithm includes at least one of the following: a feature extraction algorithm based on discrete cosine transform DCT, a feature extraction algorithm based on principal component analysis PCA;
[0182] The degree of difference is determined based on pixel differences between the images.
[0183] Corresponding to the above method embodiment, the present specification embodiment provides an image encryption device 700 for privacy protection, and its schematic block diagram is as follows: Figure 7 As shown, including:
[0184] A first model acquisition module 710 is configured to obtain an encryption model trained by the encryption model training device for privacy protection as described above;
[0185] An image acquisition module 720 is configured to obtain a face image to be encrypted;
[0186] The third image input module 730 is configured to input the face image to be encrypted into the encryption model to obtain a corresponding encrypted face image.
[0187] Corresponding to the above method embodiment, the present specification embodiment provides an encrypted face image recognition device 800 based on privacy protection, and its schematic block diagram is as follows: Figure 8 As shown, including:
[0188] A second model acquisition module 810 is configured to obtain the encryption model trained by the encryption model training device for privacy protection and the first face recognition model;
[0189] The fourth image input module 820 is configured to input the face image to be processed into the encryption model to obtain a corresponding face image to be recognized.
[0190] The fifth image input module 830 is configured to input the face image to be recognized into the first face recognition model to obtain a corresponding face recognition result.
[0191] The above device embodiments correspond to the method embodiments. For specific descriptions, please refer to the description of the method embodiments, which will not be repeated here. The device embodiments are obtained based on the corresponding method embodiments and have the same technical effects as the corresponding method embodiments. For specific descriptions, please refer to the corresponding method embodiments.
[0192] An embodiment of the present specification also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed in a computer, the computer is caused to execute the encryption model training method for privacy protection provided in the present specification.
[0193] An embodiment of the present specification also provides a computing device, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the encryption model training method for privacy protection provided in the present specification is implemented.
[0194] The embodiments of the present specification also provide a computer-readable storage medium on which a computer program is stored. When the computer program is executed in a computer, the computer is caused to execute the image encryption method for privacy protection provided in the present specification.
[0195] An embodiment of the present specification also provides a computing device, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the image encryption method for privacy protection provided in the present specification is implemented.
[0196] The embodiments of the present specification also provide a computer-readable storage medium on which a computer program is stored. When the computer program is executed in a computer, the computer is caused to execute the privacy protection-based encrypted facial image recognition method provided in the present specification.
[0197] An embodiment of the present specification also provides a computing device, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the encrypted facial image recognition method based on privacy protection provided in the present specification is implemented.
[0198] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the storage medium and computing device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0199] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the embodiments of the present invention may be implemented using hardware, software, firmware, or any combination thereof. When implemented using software, these functions may be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium.
[0200] The specific implementation methods described above further describe the purpose, technical solutions and beneficial effects of the embodiments of the present invention in detail. It should be understood that the above description is only a specific implementation method of the embodiments of the present invention and is not intended to limit the scope of protection of the present invention. Any modification, equivalent replacement, improvement, etc. made on the basis of the technical solution of the present invention shall be included in the scope of protection of the present invention.
Claims
1. A privacy-preserving encrypted model training method, include: Encrypting the original face image using the encryption model to be trained to obtain the corresponding encrypted face image; Inputting the encrypted face image into a first face recognition model to be trained to obtain a first face prediction result; Determine a first prediction loss using the first face prediction result and the face annotation result corresponding to the original face image; Inputting the original face image and the encrypted face image into a trained second face recognition model respectively to obtain a first output result corresponding to the original face image and a second output result corresponding to the encrypted face image, wherein the second face recognition model is trained based on the original face image and the corresponding face annotation result; Determining a second predicted loss based on the first output result and the second output result; determining a total predicted loss, the total predicted loss being positively correlated with the first predicted loss and the second predicted loss; The encryption model and the first face recognition model are trained with the goal of minimizing the total prediction loss.
2. The method according to claim 1, in, The first output result includes: a first image feature of the original face image, and the second output result includes: a second image feature of the encrypted face image; The determining of the second prediction loss comprises: calculating a similarity between the first image feature and the second image feature; The second prediction loss is determined, which is positively correlated with the similarity.
3. The method according to claim 2, wherein the second output result is include: A second face prediction result of the encrypted face image; Also includes: Determining a third prediction loss based on the second face prediction result and the face labeling result; The second predicted loss is also positively correlated with the third predicted loss.
4. The method according to claim 2, in, The first image feature is a feature vector corresponding to a feature map outputted by a predetermined intermediate layer in the second face recognition model for the original face image; The second image feature is the predetermined intermediate layer, and is a feature vector corresponding to the feature map output for the encrypted facial image.
5. The method according to claim 1, in, The first face recognition model and the second face recognition model have the same neural network structure.
6. The method according to any one of claims 1 to 5, further comprising: include: Using a feature extraction algorithm corresponding to a specified image similarity evaluation index, respectively extract a first feature map corresponding to the original face image and a second feature map corresponding to the encrypted face image; Determining a degree of difference between the first feature map and the second feature map; The total prediction loss is also negatively correlated with the difference.
7. The method according to claim 6, in, The feature extraction algorithm includes at least one of the following: a feature extraction algorithm based on discrete cosine transform DCT, a feature extraction algorithm based on principal component analysis PCA; The degree of difference is determined based on pixel differences between the images.
8. An image encryption method for privacy protection, include: Obtaining an encryption model trained by the method according to any one of claims 1 to 7; Obtaining a face image to be encrypted; The face image to be encrypted is input into the encryption model to obtain the corresponding encrypted face image.
9. A privacy-preserving encrypted face image recognition method. include: Obtaining an encryption model and a first face recognition model trained by the method according to any one of claims 1 to 7; Inputting the face image to be processed into the encryption model to obtain the corresponding face image to be recognized; The face image to be recognized is input into the first face recognition model to obtain a corresponding face recognition result.
10. An encrypted model training device for privacy protection, include: A first encryption module is configured to encrypt the original face image using the encryption model to be trained to obtain a corresponding encrypted face image; A first image input module, configured to input the encrypted face image into a first face recognition model to be trained to obtain a first face prediction result; A first loss determination module, configured to determine a first prediction loss using the first face prediction result and a face annotation result corresponding to the original face image; A second image input module is configured to input the original face image and the encrypted face image into a trained second face recognition model respectively, to obtain a first output result corresponding to the original face image and a second output result corresponding to the encrypted face image, wherein the second face recognition model is trained based on the original face image and the corresponding face annotation result; A second loss determination module, configured to determine a second predicted loss based on the first output result and the second output result; a total loss determination module configured to determine a total predicted loss, the total predicted loss being positively correlated with the first predicted loss and the second predicted loss; The model training module is configured to train the encryption model and the first face recognition model with the goal of minimizing the total prediction loss.
11. The device according to claim 10, in, The first output result includes: a first image feature of the original face image, and the second output result includes: a second image feature of the encrypted face image; The second loss determination module comprises: a similarity calculation unit, configured to calculate a similarity between the first image feature and the second image feature; The first determining unit is configured to determine the second prediction loss, which is positively correlated with the similarity.
12. The device according to claim 11, wherein the second output result is include: A second face prediction result of the encrypted face image; The second loss determination module further includes: A second determining unit is configured to determine a third prediction loss based on the second face prediction result and the face labeling result; The first determining unit is further configured to make the second predicted loss positively correlated with the third predicted loss.
13. The device according to claim 11, in, The first image feature is a feature vector corresponding to a feature map outputted by a predetermined intermediate layer in the second face recognition model for the original face image; The second image feature is the predetermined intermediate layer, and is a feature vector corresponding to the feature map output for the encrypted facial image.
14. The device according to claim 10, in, The first face recognition model and the second face recognition model have the same neural network structure.
15. The device according to any one of claims 10 to 14, further comprising: include: A feature extraction module is configured to use a feature extraction algorithm corresponding to a specified image similarity evaluation index to respectively extract a first feature map corresponding to the original face image and a second feature map corresponding to the encrypted face image; a difference determination module, configured to determine a difference between the first feature map and the second feature map; The total loss determination module is further configured such that the total predicted loss is negatively correlated with the degree of difference.
16. The device according to claim 15, in, The feature extraction algorithm includes at least one of the following: a feature extraction algorithm based on discrete cosine transform DCT, a feature extraction algorithm based on principal component analysis PCA; The degree of difference is determined based on pixel differences between the images.
17. An image encryption device for privacy protection, include: A first model acquisition module, configured to obtain an encrypted model trained by the device according to any one of claims 10 to 16; An image acquisition module, configured to obtain a face image to be encrypted; The third image input module is configured to input the face image to be encrypted into the encryption model to obtain a corresponding encrypted face image.
18. An encrypted face image recognition device based on privacy protection, include: A second model acquisition module, configured to obtain an encrypted model and a first face recognition model trained by the apparatus according to any one of claims 10 to 16; A fourth image input module, configured to input the face image to be processed into the encryption model to obtain a corresponding face image to be recognized; The fifth image input module is configured to input the face image to be recognized into the first face recognition model to obtain a corresponding face recognition result.
19. A computing device comprising a memory and a processor, in, The memory stores executable codes, and when the processor executes the executable codes, the method according to any one of claims 1 to 7 is implemented.
20. A computing device comprising a memory and a processor, in, The memory stores executable codes, and when the processor executes the executable codes, the method described in claim 8 is implemented.
21. A computing device comprising a memory and a processor, in, The memory stores executable codes, and when the processor executes the executable codes, the method described in claim 9 is implemented.
