Disclosure of Invention
In view of this, the present application provides a training method for a face recognition model, which includes:
performing multi-layer neural network training based on the public face data set, and training at least one base layer;
extracting image transformation parameters from the at least one base layer;
carrying out irreversible fuzzification processing on the non-public face data set according to the extracted image transformation parameters;
uploading the fuzzified non-public face data set to a server, and finishing the training of the residual base layer of the multilayer neural network by the server.
Optionally, the multi-layer neural network comprises a multi-layer convolutional neural network.
Optionally, the server includes a cloud computing platform.
Optionally, the extracting the image transformation parameter from the at least one network layer includes:
extracting a feature map in the at least one network layer;
and outputting the extracted feature mapping as an image transformation parameter.
Optionally, the performing irreversible blurring processing on the non-public face data set according to the extracted image transformation parameters includes:
and performing convolution calculation on the image transformation parameters serving as convolution kernels and the non-public face data set so as to perform irreversible blurring processing on the non-public face data set.
The present application further provides a training device for a face recognition model, the device including:
the training module is used for carrying out multilayer neural network training based on the public face data set and training at least one base layer;
an extraction module for extracting image transformation parameters from the at least one base layer;
the processing module is used for carrying out irreversible fuzzification processing on the non-public human face data set according to the extracted image transformation parameters;
and the uploading module is used for uploading the fuzzified non-public face data set to a server, and the server is used for finishing the training of the residual basic layer of the multilayer neural network.
Optionally, the multi-layer neural network comprises a multi-layer convolutional neural network; the server comprises a cloud computing platform.
Optionally, the extraction module is specifically configured to:
extracting a feature map in the at least one network layer;
and outputting the extracted feature mapping as an image transformation parameter.
Optionally, the processing module is specifically configured to:
and performing convolution calculation on the image transformation parameters serving as convolution kernels and the non-public face data set so as to perform irreversible blurring processing on the non-public face data set.
The present application further provides a training device for a face recognition model, including:
a processor; a memory for storing the processor-executable instructions;
wherein the processor is configured to:
performing multi-layer neural network training based on the public face data set, and training at least one base layer;
extracting image transformation parameters from the at least one base layer;
carrying out irreversible fuzzification processing on the non-public face data set according to the extracted image transformation parameters;
uploading the fuzzified non-public face data set to a server, and finishing the training of the residual base layer of the multilayer neural network by the server.
According to the method, multi-layer neural network training is carried out based on the public face data set, at least one basic layer is trained, then image transformation parameters are extracted from the trained basic layer to carry out irreversible fuzzification processing on the non-public face data set, the fuzzified non-public face data set is uploaded to a server, and the server finishes training of the residual basic layer. Because the fuzzification processing on the non-public face data is irreversible and the face data after the fuzzification processing cannot be distinguished by naked eyes, the risk of disclosure is eliminated in the process of uploading the non-public face data.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
In the prior art, for the problem that privacy may be leaked in the transmission process of an image, the current solutions are mainly based on the following two types:
firstly, encrypting a face image to be uploaded by using a secret key, and then transmitting the encrypted face image as public information; and after receiving the uploaded encrypted image, the cloud computing platform decrypts the image to obtain an original face image, and trains a face recognition model.
In the above scheme, once the key used for encrypting the face image is broken or leaked, the problem of privacy leakage still occurs.
Secondly, a privacy area is defined on the face image needing to be uploaded, partial fuzzification is carried out on the privacy area, then the fuzzified privacy area is subtracted from the privacy area to obtain a difference value privacy image, and the difference value privacy area is encrypted by using a secret key.
In the above scheme, once the key used for encrypting the difference privacy area is cracked or leaked, an unauthorized user can obtain the difference privacy image, and privacy leakage still occurs.
In view of this, the present application provides a training method for a face recognition model, which performs multi-layer neural network training on a public face data set, trains at least one base layer, extracts image transformation parameters from the trained at least one base layer to perform irreversible blurring processing on a non-public face data set, uploads the blurred non-public face data set to a cloud computing platform, and the cloud computing platform completes training of the remaining base layers. Because the fuzzification processing on the non-public face data is irreversible and the face data after the fuzzification processing cannot be distinguished by naked eyes, the risk of disclosure is eliminated in the process of uploading the non-public face data.
The present application is described below with reference to specific embodiments and specific application scenarios.
Referring to fig. 1, fig. 1 is a method for training a face recognition model according to an embodiment of the present application, where an execution subject of the method may be a first server; of course, the execution subject of the method can be various computers providing computing resources when the method is implemented; the method comprises the following steps:
101, performing multilayer neural network training based on a public face data set, and training at least one base layer;
step 102, extracting image transformation parameters from the at least one base layer;
103, performing irreversible fuzzification processing on the non-public face data set according to the extracted image transformation parameters;
and 104, uploading the fuzzified non-public face data set to a server, and finishing training of the residual base layer of the multilayer neural network by the server.
In this embodiment, the first server may be a server storing a non-public face data set of a user, and the server may be a cloud computing platform with powerful computing capability, or the server may also be a second server that is superior to the first server in processing capability and is physically independent from the first server for performing face recognition model training.
The technical scheme of the application is described in detail below by taking the server as a cloud computing platform as an example.
In practical applications, in order to utilize the powerful computing power of the cloud computing platform, the training of the face recognition model may be performed by the cloud computing platform. The cloud computing platform can take the face data set uploaded by the first server as a training sample, and then outputs a face recognition model after multi-layer neural network training is carried out on the basis of a large number of training samples. However, a large number of training samples used by a cloud computing platform in multi-layer neural network training usually include a large number of non-public face data sets uploaded by the first server; since the non-public face data set generally relates to user privacy, in order to avoid the risk of privacy disclosure possibly faced in the uploading process as much as possible, the first server may perform irreversible blurring processing on the non-public face data set locally when uploading the non-public face data set to the cloud computing platform.
When the first server performs fuzzification processing on the non-public face data set, multi-layer neural network training can be performed locally based on a large number of pre-collected public face data sets, at least one base layer is trained, and then image transformation parameters are extracted from the base layer to perform fuzzification processing on the non-public face data set needing to be uploaded. The public face data set refers to face image data sets which can be freely obtained from the internet or other public resources, and the face image data sets are usually authorized by the public of the user because the risk of privacy leakage does not exist.
In this embodiment, the multi-layer neural network may be a multi-layer convolutional neural network, and in the basic architecture of the multi-layer convolutional neural network, the multi-layer convolutional neural network generally includes a plurality of 4-5 base layers, each base layer includes a plurality of Feature maps (Feature maps), and each Feature Map extracts a Feature of an input face image through a convolution filter. For example, please refer to fig. 2, fig. 2 is a basic architecture of a multilayer convolutional neural network with 4 base layers, which includes 4 base layers, such as C1, S1, C2, and S2. The C1 and C2 layers are feature extraction layers, and the S1 and S2 layers are feature mapping layers. The feature extraction layer can also be called a convolution layer and is used for performing convolution calculation on input image data; each Feature extraction layer is followed by a Feature mapping layer and used for sampling and calculating the Feature Map generated after convolution calculation in the Feature extraction layer.
When the first server performs the blurring processing on the non-public face data set, the first server may perform multi-layer convolutional neural network training on a large number of pre-collected public face data sets according to the architecture shown in fig. 2, train out at least one base layer, and then extract Feature maps in the base layer as image transformation parameters to perform the blurring processing on the non-public face data set.
The number of base layers trained by the first server for the public face data is smaller than the maximum number of base layers trained by the multilayer convolutional neural network, and the rest base layers are trained by the cloud computing platform.
With continued reference to fig. 2, in one example shown in the present embodiment, the first server may train the first two layers of the multi-layered convolutional neural network based on the public face data set locally, i.e., the C1 layer and the S2 layer. Certainly, in practical application, the first server may also train only the C1 layer of the multilayer convolutional neural network locally, and the cloud computing platform completes the training of the S1, C2 and S2 layers; or the first server may locally train C1, S1, and C2 of the multi-layer convolutional neural network, and the cloud computing platform completes training of the S2 layer, which is not particularly limited in this embodiment.
Specifically, the first server may first perform convolution calculation on the input public face data set and 3 convolution filters, and then generate 3 Feature maps at the C1 layer; the S2 layer also obtains 3S 2 layer Feature maps after sampling calculation of the Feature maps in the C1 layer. The number of the convolution filters can be set according to actual requirements, and is not particularly limited in this embodiment; the detailed training process of the C1 layer and the S2 can be referred to the description of the prior art by those skilled in the art, and the detailed description is omitted here.
After the training of the C1 layer and the S2 layer is completed, Feature maps in the C1 layer and the S2 layer can be extracted and output as image transformation parameters, and then the non-public face data set can be subjected to fuzzification processing according to the image transformation parameters.
After the first server trains the first two layers of the multilayer convolutional neural network and successfully outputs the image transformation parameters, the non-public face data set can be fuzzified according to the output image transformation parameters.
When the first server performs the blurring processing on the non-public face data set, the first server may perform convolution calculation on the non-public face data set by using the output image transformation parameter as a convolution kernel, so as to complete the blurring operation on the non-public face data set. Since the convolution operation is an irreversible process, the face image after blurring processing by convolution calculation is not recoverable and cannot be distinguished by naked eyes.
For the non-public face data after the fuzzification operation, the first server can upload the non-public face data to the cloud computing platform, and because the uploaded non-public face data is fuzzified and processed to be irreversible, the risk of privacy disclosure cannot exist in the uploading process.
After the cloud computing platform receives the non-public face data uploaded by the first server, although the non-public face data is fuzzified by the first server at this time, image transformation parameters adopted by the first server when the first server fuzzifies the non-public face data are extracted from the first two base layers of the multilayer convolutional neural network trained by the first server, so that the cloud computing platform can still continue training by taking the received non-public face data subjected to fuzzification as one base layer, complete training of the remaining C2 and S2 layers, and finally train a face recognition model. The training process of the C2 and S2 layers is the same as the training process of the C1 and S1 layers, and those skilled in the art can refer to the description in the prior art, and the detailed training process will not be described in detail in this embodiment
Of course, when the cloud computing platform performs the multilayer convolutional neural network, the received non-public face data subjected to the fuzzification processing may also be used as input data, and the training of the multilayer convolutional neural network is performed again locally. For example, the cloud computing platform may locally re-train the training C1, S1, C2 and S2 layers of the multi-layer convolutional neural network using the received non-public face data as input data, which is not particularly limited in this embodiment.
In the above description, the technical solution of the present application is described in detail by taking the multilayer neural network as an example, but in a specific implementation, the multilayer neural network may also be another type of multilayer neural network, for example, a BP (Back Propagation) neural network, and in this embodiment, the multilayer neural network is only described as an example, and is not used to limit the present invention.
According to the above description, the multi-layer neural network training is performed on the public face data set, at least one base layer is trained, then the image transformation parameters are extracted from the trained at least one base layer to perform irreversible fuzzification processing on the non-public face data set, the fuzzified non-public face data set is uploaded to the server, and the server completes the training of the residual base layer. Because the fuzzification processing on the non-public face data is irreversible and the face data after the fuzzification processing cannot be distinguished by naked eyes, the risk of disclosure is eliminated in the process of uploading the non-public face data.
In addition, because the image transformation parameters adopted when the non-public face data set is subjected to the fuzzification processing are extracted from at least one base layer of the trained multilayer neural network, the non-public face data set subjected to the fuzzification processing can still be used as a base layer of the multilayer neural network training to be continuously trained by the server.
Corresponding to the method embodiment, the application also provides an embodiment of the device.
Referring to fig. 3, the present application provides a training apparatus 30 for a face recognition model, which is applied to a server. Referring to fig. 4, a hardware architecture related to a server of the training apparatus 30 for bearing the face recognition model generally includes a CPU, a memory, a non-volatile memory, a network interface, an internal bus, and the like; taking a software implementation as an example, the training device 30 of the face recognition model can be generally understood as a computer program loaded in a memory, and a logic device formed by combining software and hardware after being run by a CPU, where the device 30 includes:
a training module 301, configured to perform multi-layer neural network training based on a public face data set, and train out at least one base layer;
an extraction module 302, configured to extract image transformation parameters from the at least one base layer;
the processing module 303 is configured to perform irreversible blurring processing on the non-public face data set according to the extracted image transformation parameters;
and the uploading module 304 is configured to upload the fuzzified non-public face data set to a server, and the server completes training of the remaining base layer of the multilayer neural network.
In this embodiment, the multilayer neural network is a multilayer convolutional neural network; the server side is a cloud computing platform.
In this embodiment, the extracting module 302 is specifically configured to:
extracting a feature map in the at least one network layer;
and outputting the extracted feature mapping as an image transformation parameter.
In this embodiment, the processing module 303 is specifically configured to:
and performing convolution calculation on the image transformation parameters serving as convolution kernels and the non-public face data set so as to perform irreversible blurring processing on the non-public face data set.
The application also provides an embodiment of the training device of the face recognition model.
The device includes:
a processor; a memory for storing the processor-executable instructions;
further, the apparatus may also include input/output interfaces, network interfaces, various hardware, and the like.
Wherein the processor is configured to:
performing multi-layer neural network training based on the public face data set, and training at least one base layer;
extracting image transformation parameters from the at least one base layer;
carrying out irreversible fuzzification processing on the non-public face data set according to the extracted image transformation parameters;
uploading the fuzzified non-public face data set to a server, and finishing the training of the residual base layer of the multilayer neural network by the server.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.