Face privacy protection security identification method and system based on diffusion model
By using the diffusion model to encrypt and decrypt facial feature vectors in face recognition technology, the problem of insufficient storage and computing power of edge devices and privacy leakage is solved, and more efficient privacy protection and secure identification are achieved.
Patent Information
- Application Number
- CN202410680982.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-29
- Publication Date
- 2024-08-30
AI Technical Summary
Traditional face recognition technology has problems with limited storage and computing capabilities on edge devices. At the same time, there is a risk of privacy leakage when face data is transmitted to the server, making it difficult to effectively protect user privacy.
A facial privacy protection secure recognition method based on the diffusion model is adopted. Face image data is collected at the edge device, the facial feature vector is encrypted using the diffusion model, and decrypted on the server side to ensure data security during transmission. Security.
It effectively protects user privacy, improves security and flexibility in the face recognition process, avoids the limitations of traditional encryption methods, and enhances data security and recognition accuracy.
Smart Images

Figure CN118570886A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of face recognition, and in particular to a face privacy protection security recognition method and system based on a diffusion model. Background Art
[0002] Face recognition technology is an important branch of artificial intelligence. Face recognition is a biometric technology that identifies people based on their facial features. Face recognition data is unique, easy to collect, and not easy to be forged. It guarantees the convenience and security of the system to the greatest extent and is widely used in security, finance, medical and other fields. With the development of face recognition technology, face recognition has provided convenience for all aspects of people's lives. Face recognition algorithms can be deployed to edge devices, which can make the recognition method more flexible and adapt to more diverse scenarios. Face recognition technology is deployed to edge devices to reduce the computing pressure of the server. However, edge devices have the defects of limited storage and computing power, and the transmission of data from edge devices to servers will generate the risk of privacy leakage. It faces the challenge of face privacy security issues. Once face data is leaked, it will cause serious losses to individuals. The traditional face recognition mode collects face information and stores face images in the face database of edge devices. Once face data is leaked, it will threaten personal privacy security.
[0003] In order to ensure the privacy and security of facial data, it is necessary to adopt privacy protection methods to store and identify facial data, and use encryption algorithms to encrypt facial feature vectors to improve the security of private data. Traditional encryption methods often use deterministic mathematical algorithms to transform data, and the encryption method is fixed. Machine learning models use a non-deterministic encryption method to encrypt data, and achieve more complex data conversion and encryption by learning the inherent characteristics and laws of the data. Summary of the invention
[0004] In view of the limitations of traditional face recognition technology and encryption methods, the present invention proposes a face privacy protection and security recognition method based on a diffusion model; the present invention applies the face privacy protection and security recognition method based on a diffusion model to the field of face recognition and deploys it on edge devices, making face recognition more flexible and convenient while protecting user privacy.
[0005] The present invention also provides a face privacy protection security recognition system based on a diffusion model.
[0006] Terminology explanation:
[0007] 1. The Wider Face dataset consists of 32,203 images and 393,703 annotated face bounding boxes. Faces vary greatly in appearance, posture, occlusion, background, and scale. It is organized based on 61 event categories, including scale, posture, occlusion, expression, makeup, and lighting. It is widely used in the field of face detection.
[0008] 2. LFW public dataset: It is a commonly used dataset for face recognition. The pictures provided are all from natural scenes in life. Due to factors such as multiple postures, lighting, expressions, age and occlusion, the photos of the same person are very different. The LFW dataset is used as a standard for evaluating the performance of face recognition algorithms.
[0009] 3. MTCNN multi-task convolutional neural network: Through multi-task learning, cascade convolutional neural networks are used to achieve face detection. P-Net, R-Net, and O-Net are the backbone networks that make up the MTCNN model. First, the full convolutional neural network P-Net quickly generates candidate windows, then the candidate windows are refined by R-Net and fine-tuned, and finally, O-Net is used to further refine and output five facial landmarks.
[0010] 4. P-Net network: The input of the P-Net network is a 12×12 feature map. Through convolution, pooling and other operations, the feature map is compressed into a feature map with a side length of 1. The Softmax classification function is used to calculate whether there is a face in the image area. After obtaining a series of candidate box results, the image is restored to its original position based on the original spatial information, and the bounding box regression is performed to adjust the window.
[0011] 5. R-Net network: The input of R-Net is a 24×24 feature map. The generation of R-Net training data requires the use of the P-Net model for prediction. The predicted value of the model is compared with the actual value, and the detection coordinates are continuously adjusted to remove areas that do not belong to the face. Compared with the P-Net network structure, R-Net adds a layer of maximum pooling and a fully connected layer. It is more complex than P-Net, and the extracted face area information is also more detailed.
[0012] 6. O-Net network: O-Net input is a 48×48 feature map. O-Net adds a convolution layer to extract facial features, regresses facial features, locates key points by calculating the minimum Euclidean distance between the predicted coordinates and the true left side, and finally outputs five facial feature points of the left eye, right eye, nose, left corner of the mouth, and right corner of the mouth. Compared with P-Net and R-Net, O-Net has more inputs, a deeper network, and better performance.
[0013] 7. MobileNetV2 lightweight neural network: MobileNetV2 is a lightweight neural network. Different from traditional convolutional neural networks, MobileNetV2 uses a deep separable convolutional network. It first uses Depthwise deep convolution, with each channel processed using a separate convolution kernel, and then uses Pointwise convolution to process cross-channel information, reducing the amount of calculation. To avoid information loss during the calculation process, an inverted residual structure is added to increase the dimension of the low-dimensional compressed input, and then project it to a low dimension for representation through linear convolution. MobileNetV2 has the advantages of taking up less memory, fewer parameters, and good recognition performance.
[0014] 8. Diffusion model: The diffusion process of the diffusion model is a Markov chain. The forward process of the diffusion model is to gradually add noise to the data within a finite number of time steps to destroy the original data. The reverse process of the diffusion model is to reverse the noise process to restore the original data by learning and training the neural network.
[0015] 9. Neural Network θ : It is a network used to approximate the conditional probability distribution in the reverse diffusion process. It uses the U-Net network architecture. The U-Net neural network architecture consists of a symmetrical encoder and decoder. The encoder part is used to extract data feature information, and the decoder part uses the extracted feature information to gradually restore the original data. In the diffusion model, U-Net is used to learn a noisy data to predict the added noise. By inputting a noisy data x t and time step t, through the neural network p θ , to predict the noise of the current time step t, and gradually denoise and restore the original data.
[0016] The technical solution of the present invention is:
[0017] A face privacy protection security recognition method based on a diffusion model, comprising:
[0018] Collect facial image data on the edge device and obtain facial feature vectors;
[0019] Destroy the face image data and encrypt the face feature vector using the forward process of the trained diffusion model;
[0020] The encrypted facial feature vector is sent to the server, where the facial feature vector is decrypted using the reverse process of the trained diffusion model;
[0021] The decrypted facial feature vector is used for face comparison and recognition, and the recognition result is returned to the edge device.
[0022] Preferably, according to the present invention, the forward process of the trained diffusion model is used to encrypt the facial feature vector; comprising:
[0023] The initial data distribution is x0~q(x), and T noises are added to generate a set of noisy feature vectors x1,...,x T ; The formula in the process of adding noise is as follows:
[0024]
[0025] Among them, q(x t |x t-1 ) refers to x t-1 to x t process, is the mean of the Gaussian distribution, β t is the variance of the Gaussian distribution, and the noise addition process is regarded as a Markov chain process. The t-th noise x t , by β t and x t-1 Determine, and then deduce the T-th noise data x T ; Directly fix the sequence during the noise addition process Obtain the T-th noise-added data, that is, the encrypted result of the facial feature vector;
[0026] According to the above formula, define α t =1-β t , Get x t The relationship with x0 is:
[0027] After the facial feature vector is encrypted according to the above formula, the original facial image data is deleted on the edge device, and the encrypted facial feature vector is transmitted to the server for recognition.
[0028] Preferably, according to the present invention, the face feature vector is decrypted using the inverse process of the trained diffusion model; comprising:
[0029] Using neural network p θ To fit the reverse denoising process, the conditional probability is simulated approximately through training to run the reverse diffusion process; as shown in the following formula:
[0030]
[0031] p θ (x t-1 |x t )=N(x t-1 |μ θ (x t, t), ∑ θ (x t , t))
[0032] in, Training is performed by calculating the loss between the noise predicted by the network and the sampled noise, and the gradient is updated until the neural network p θ Training is completed, use the trained neural network to fit Thus, the original face image data is derived.
[0033] Preferably, according to the present invention, collecting face image data on an edge device and obtaining a face feature vector comprises:
[0034] Collecting facial image data;
[0035] Face detection, obtaining facial feature points;
[0036] Face feature extraction to obtain face feature vector.
[0037] Further preferably, face detection refers to: extracting facial key feature points from face image data using a trained face detection model to form a facial key feature map;
[0038] The MTCNN multi-task convolutional neural network is used to extract face candidate frames and predict five key points: two eyes, nose and two corners of the mouth. Specifically, it includes: constructing an image pyramid that adapts to the size of the face, using the P-Net network, R-Net network and O-Net network to predict face candidate frames, and screening the face candidate frames and adjusting the candidate frame boundaries, and then predicting the positions of the five key points: two eyes, nose and two corners of the mouth.
[0039] Further preferably, facial feature extraction refers to: extracting facial features through a trained lightweight facial feature extraction model to obtain a facial feature vector; that is, using a MobileNetV2 lightweight neural network to extract facial features to obtain a facial feature vector.
[0040] Preferably, according to the present invention, the trained face detection model, face feature extraction model and forward process of the diffusion model are deployed on the edge device, face image data is collected by the edge device to obtain a face feature vector, the face feature vector is encrypted through the forward process of the trained diffusion model, and then the encrypted face feature vector is transmitted to the server; the reverse process of the trained diffusion model and the face comparison algorithm are deployed on the server, and the face feature vector is stored. After the server receives the encrypted face feature vector, the reverse operation of the diffusion model is used to restore the face feature vector, and the obtained face feature vector is compared and identified with the feature vector in the face feature vector storage library to obtain a recognition result, and finally the recognition result is returned to the edge device.
[0041] Preferably, according to the present invention, during the training process, the face detection model is trained using the Wider Face dataset to obtain face key points, the lightweight face feature extraction model is trained using the LFW public dataset to obtain face feature vectors, and the inverse process of the diffusion model is trained.
[0042] Preferably, according to the present invention, the face comparison method includes Euclidean distance and cosine distance.
[0043] The cosine distance, also known as the cosine similarity method, is used to compare faces. According to the obtained face feature vector a=(a1, a2, ..., a n ) and the feature vector b in the face database = (b1, b2, ..., b n ) are compared one by one to identify the identity; the cosine similarity calculation formula is:
[0044]
[0045] Among them, a is the facial feature vector obtained by the camera, a i is the value of feature vector a, b is the feature vector in the face feature database, b i is the value of the feature vector b; the face database is extracted by the MobileNetV2 lightweight neural network.
[0046] A computer device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of a method for secure face recognition based on a diffusion model and privacy protection are implemented.
[0047] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of a method for secure face recognition based on a diffusion model and privacy protection.
[0048] A face privacy protection security recognition system based on a diffusion model, comprising:
[0049] The data acquisition and processing module is configured to: collect face image data on the edge device and obtain face feature vectors;
[0050] The data encryption module is configured to: destroy the face image data and encrypt the face feature vector using the forward process of the trained diffusion model;
[0051] The data decryption module is configured to: send the encrypted facial feature vector to the server, and decrypt the facial feature vector using the inverse process of the trained diffusion model on the server;
[0052] The face comparison and recognition module is configured to: perform face comparison and recognition on the decrypted face feature vector, and return the recognition result to the edge device.
[0053] Further preferably, the data acquisition and processing module includes a face acquisition module, a face detection module and a feature extraction module;
[0054] The face acquisition module is configured to: acquire face image data;
[0055] The face detection module is configured to: obtain facial feature points;
[0056] The feature extraction module is configured to: obtain a face feature vector.
[0057] The beneficial effects of the present invention are:
[0058] Compared with the traditional face recognition method, the present invention proposes a face privacy protection security recognition method based on the diffusion model. This method protects the user's privacy from being leaked during the face recognition process by encrypting the face feature vector. Compared with the traditional encryption method, the diffusion model privacy protection technology is proposed, and the implementation process of the diffusion model is used for encryption and decryption, which improves the security of user information. This method is applied to the field of face recognition and deployed to edge devices for user identity recognition and authentication. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 It is a flow chart of the face privacy protection and security recognition method based on the diffusion model of the present invention.
[0060] Figure 2 It is a schematic diagram of the forward diffusion encryption process of the diffusion model of the present invention.
[0061] Figure 3 It is a schematic diagram of the reverse diffusion decryption process of the diffusion model of the present invention. DETAILED DESCRIPTION
[0062] In order to make the technical solution of the present invention clearer, further description will be given in conjunction with the accompanying drawings of the present invention. This example is implemented based on the technical solution of the present invention, and a detailed implementation method and specific operation process are given, but the protection scope of the present invention is not limited to the following embodiments.
[0063] Example 1
[0064] A privacy-preserving and secure face recognition method based on a diffusion model, such as Figure 1 As shown, including:
[0065] Collect facial image data on the edge device and obtain facial feature vectors;
[0066] Destroy the facial image data and encrypt the facial feature vector using the forward process of the trained diffusion model to protect the user's privacy.
[0067] The encrypted facial feature vector is sent to the server, where it is decrypted using the inverse process of the trained diffusion model. As a generative model, the diffusion model can encrypt and decrypt facial feature vectors by adding noise in the forward process and denoising in the reverse process.
[0068] The decrypted facial feature vector is used for face comparison and recognition, and the recognition result is returned to the edge device.
[0069] Through this way of communication between edge devices and servers, face recognition is achieved while protecting user privacy. The face privacy protection and security recognition method based on diffusion model and its application mainly include three aspects: face recognition technology, privacy protection technology based on diffusion model, and application of face security recognition method.
[0070] Example 2
[0071] The difference between the method for face privacy protection and security recognition based on diffusion model described in Example 1 is that:
[0072] The facial feature vector is encrypted using the forward process of the trained diffusion model; including:
[0073] The encryption stage uses the forward process of the diffusion model to encrypt the face information by gradually adding Gaussian noise. The noise adding process is as follows: Figure 2 As shown in Figure 1, the number of noise additions is controllable and satisfies certain mathematical rules. The initial data distribution is x0~q(x), and T noises are added to generate a set of noised feature vectors x1,...,x T ; The formula in the process of adding noise is as follows:
[0074]
[0075] Among them, q(x t |x t-1 ) refers to x t-1 to x t process, is the mean of the Gaussian distribution, β t is the variance of the Gaussian distribution, and the noise addition process is regarded as a Markov chain process. The t-th noise x t , by β t and x t-1 Determine, and then deduce the T-th noise data x T ; Directly fix the sequence during the noise addition process Obtain the T-th noise-added data, that is, the encrypted result of the facial feature vector;
[0076] According to the above formula, define α t =1-β t , Get x t The relationship with x0 is:
[0077] After the facial feature vector is encrypted according to the above formula, the original facial image data is deleted on the edge device to protect the user's privacy, and the encrypted facial feature vector is transmitted to the server for recognition.
[0078] Decrypt the facial feature vector using the inverse process of the trained diffusion model; including:
[0079] After the server receives the encrypted data transmitted by the edge device, it uses the reverse process of the diffusion model to decrypt it, that is, the denoising process is as follows: Figure 3 Since the denoising process needs to find the data distribution from the complete data set, which cannot be predicted manually, a neural network is needed. θ To fit the reverse denoising process, the conditional probability is simulated approximately through training to run the reverse diffusion process; as shown in the following formula:
[0080]
[0081] p θ (x t-1 |x t )=N(x t-1 |μ θ (x t , t), ∑ θ (x t , t))
[0082] in, Training is performed by calculating the loss between the noise predicted by the network and the sampled noise, and the gradient is updated until the neural network p θ Training is completed, use the trained neural network to fit Thus, the original face image data is derived.
[0083] The present invention provides a privacy protection technology based on a diffusion model, and the diffusion model has two processes: a forward process and a reverse process. The forward process is a process of adding noise, which can be regarded as a Markov process. Different types of noise can be added to hide information. The reverse process is a process of subtracting noise. By training and testing the diffusion model, a denoising model is obtained, and the original information is gradually restored through random noise. The diffusion model is applied to face recognition privacy protection technology to realize the encryption, hiding and decryption and restoration operations of face feature vectors. According to the confidentiality level in different occasions, different degrees of noise can be added to the face feature vector to realize the encryption operation, and the number and type of noise addition can be manually controlled. The encrypted face feature vector is restored as much as possible through the denoising model trained by the neural network, thereby realizing the privacy protection of face data and improving the security of face recognition.
[0084] The present invention applies the diffusion model to the data encryption and decryption processing of the feature vector to improve the security and privacy protection of the data. Compared with the original image, the feature vector hides the identity information of the person's image and retains the key information of the original image, and has better performance during the transmission process. The noisy feature vector is difficult to understand and use without decryption. The denoising process of the diffusion model can accurately restore the original information of the feature vector. This method not only ensures the integrity of the feature vector, but also improves the calculation efficiency. The traditional reversible encryption and decryption process network requires a lot of mathematical reasoning and calculation, and requires a lot of manpower. The reversible encryption and decryption of the diffusion model is more flexible and efficient, which ensures the data security of the feature vector during the transmission process.
[0085] Collect facial image data on the edge device and obtain facial feature vectors; including:
[0086] Collecting face image data; using a camera to take photos to collect face image data, and cropping the collected face image data;
[0087] Face detection, obtaining facial feature points to improve the accuracy of the face recognition model;
[0088] Face feature extraction to obtain face feature vector.
[0089] Face detection refers to: extracting key facial feature points from face image data through a trained face detection model to form a facial key feature map;
[0090] The MTCNN multi-task convolutional neural network is used to extract the candidate face frame and predict the five key points of two eyes, nose and two corners of the mouth. Specifically, it includes: extracting the key feature points of the face information to form a feature map of the key points of the face, and using the MTCNN multi-task convolutional neural network to extract the candidate face frame and predict the five key points of two eyes, nose and two corners of the mouth. Construct an image pyramid that adapts to the size of the face, use the P-Net network, R-Net network and O-Net network to predict the candidate face frame, and screen the candidate face frame and adjust the candidate frame boundary, and then predict the positions of the five key points of two eyes, nose and two corners of the mouth.
[0091] Facial feature extraction means: due to the lack of computing power and storage capacity of edge devices, facial features are extracted through a trained lightweight facial feature extraction model to obtain a facial feature vector; that is, the MobileNetV2 lightweight neural network is used to extract facial features to obtain a facial feature vector.
[0092] The current process of facial feature extraction includes: preprocessing the face image through the MTCNN face detection algorithm to obtain an image containing facial key points, inputting the preprocessed image into the MobileNetV2 convolutional neural network, and performing feature extraction and channel number adjustment through a series of inverted residual block sequences including point-by-point convolution, depth-wise convolution, and point-by-point convolution again, and then performing global average pooling to generate a fixed-length feature vector.
[0093] Due to the limited computing and storage of edge devices, the facial feature extraction part based on facial feature points needs to adopt a lightweight network architecture to improve the computing speed. The facial feature extraction part can use the MobileNetV2 lightweight neural network. Unlike traditional networks, MobileNetV2 uses separable convolution. Multiple convolution kernels process information from multiple channels at the same time, which greatly reduces the number of parameters calculated and improves the computing speed of edge devices.
[0094] The facial security recognition method is mainly divided into two parts for deployment, one part is deployed on the edge device, and the other part is deployed on the server. The trained face detection model, face feature extraction model and forward process of the diffusion model are deployed on the edge device, and the face feature vector is obtained by collecting face image data through the edge device. The face feature vector is encrypted through the forward process of the trained diffusion model, and then the encrypted face feature vector is transmitted to the server; the reverse process of the trained diffusion model and the face comparison algorithm are deployed on the server, and the face feature vector is stored. After the server receives the encrypted face feature vector, the reverse operation of the diffusion model is used to restore the face feature vector, and the face feature vector is obtained. The feature vector is compared with the feature vector in the face feature vector storage library to obtain the recognition result, and finally the recognition result is returned to the edge device.
[0095] During the training process, the face detection model is trained using the Wider Face dataset to obtain facial key points, the lightweight face feature extraction model is trained using the LFW public dataset to obtain facial feature vectors, and the inverse process of the diffusion model is trained.
[0096] Methods for face comparison include Euclidean distance and cosine distance.
[0097] The cosine distance, also known as the cosine similarity method, is used to compare faces. According to the obtained face feature vector a=(a1, a2, ..., a n ) and the feature vector b in the face database = (b1, b2, ..., b n ) are compared one by one to identify the identity; the cosine similarity calculation formula is:
[0098]
[0099] Among them, a is the facial feature vector obtained by the camera, a & is the value of feature vector a, b is the feature vector in the face feature database, b & is the value of the feature vector b; the face database is extracted by the MobileNetV2 lightweight neural network.
[0100] The identity information of a face is identified by measuring the cosine value of the angle between two feature vectors. When the angle approaches zero, the closer the two feature vectors are, the smaller the difference is, and the larger the cosine value is. The identity of the face features can be determined by setting the threshold of the cosine similarity.
[0101] Example 3
[0102] A computer device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the face privacy protection and security identification method based on the diffusion model described in Example 1 or 2 are implemented.
[0103] Example 4
[0104] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the diffusion model-based face privacy protection security identification method described in Example 1 or 2.
[0105] Example 5
[0106] A face privacy protection security recognition system based on a diffusion model, comprising:
[0107] The data acquisition and processing module is configured to: collect face image data on the edge device and obtain face feature vectors;
[0108] The data encryption module is configured to: destroy the face image data and encrypt the face feature vector using the forward process of the trained diffusion model;
[0109] The data decryption module is configured to: send the encrypted facial feature vector to the server, and decrypt the facial feature vector using the inverse process of the trained diffusion model on the server;
[0110] The face comparison and recognition module is configured to: perform face comparison and recognition on the decrypted face feature vector, and return the recognition result to the edge device.
[0111] The data acquisition and processing module includes a face acquisition module, a face detection module and a feature extraction module;
[0112] The face acquisition module is configured to: acquire face image data; acquire face image data by taking photos with a camera, and crop the acquired face image data;
[0113] The face detection module is configured to: obtain facial feature points to improve the accuracy of the face recognition model;
[0114] The feature extraction module is configured to: obtain a face feature vector.
[0115] The above description is only an example of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical solution and inventive concept of the present invention within the scope of the present invention disclosed by the present invention, and they should be covered by the protection scope of the present invention.
Claims
1. A face privacy protection security recognition method based on a diffusion model, characterized in that: include: Collect facial image data on the edge device and obtain facial feature vectors; Destroy the face image data and encrypt the face feature vector using the forward process of the trained diffusion model; The encrypted facial feature vector is sent to the server, where the facial feature vector is decrypted using the reverse process of the trained diffusion model; The decrypted facial feature vector is used for face comparison and recognition, and the recognition result is returned to the edge device.
2. According to claim 1, a method for face privacy protection and security recognition based on diffusion model is characterized in that: The facial feature vector is encrypted using the forward process of the trained diffusion model; including: The initial data distribution is x0~q(x), and T noises are added to generate a set of noisy feature vectors x1,…,x T ; The formula in the process of adding noise is as follows: Among them, q(x t |x t-1 ) refers to x t-1 to x t process, is the mean of the Gaussian distribution, β t is the variance of the Gaussian distribution, and the noise addition process is regarded as a Markov chain process. The t-th noise x t , by β t and x t-1 Determine, and then deduce the T-th noise data x T ; Directly fix the sequence during the noise addition process Obtain the T-th noise-added data, that is, the encrypted result of the facial feature vector; According to the above formula, define α t =1-β t , Get x t The relationship with x0 is: After the facial feature vector is encrypted according to the above formula, the original facial image data is deleted on the edge device, and the encrypted facial feature vector is transmitted to the server for recognition.
3. According to claim 1, a method for face privacy protection and security recognition based on diffusion model is characterized in that: Decrypt the facial feature vector using the inverse process of the trained diffusion model; including: Using neural network p θ To fit the reverse denoising process, the conditional probability is simulated approximately through training to run the reverse diffusion process; as shown in the following formula: p θ (x t-1 |x t )=N(x t-1 |μ θ (x t ,t),∑ θ (x t ,t)) in, Training is performed by calculating the loss between the noise predicted by the network and the sampled noise, and the gradient is updated until the neural network p ' Training is completed, use the trained neural network to fit Thus, the original face image data is derived.
4. According to claim 1, a method for face privacy protection and security recognition based on diffusion model is characterized in that: Collect facial image data on the edge device and obtain facial feature vectors; including: Collecting facial image data; Face detection, obtaining facial feature points; Extract facial features and obtain facial feature vectors; Further preferably, face detection refers to: extracting facial key feature points from face image data using a trained face detection model to form a facial key feature map; The MTCNN multi-task convolutional neural network is used to extract face candidate frames and predict five key points: two eyes, nose and two corners of the mouth. Specifically, it includes: building an image pyramid that adapts to the size of the face, using the P-Net network, R-Net network and O-Net network to predict face candidate frames, and screening the face candidate frames and adjusting the candidate frame boundaries, and then predicting the positions of the five key points: two eyes, nose and two corners of the mouth. Further preferably, facial feature extraction refers to: extracting facial features through a trained lightweight facial feature extraction model to obtain a facial feature vector; that is, using a MobileNetV2 lightweight neural network to extract facial features to obtain a facial feature vector.
5. According to claim 1, a method for face privacy protection and security recognition based on diffusion model is characterized in that: The trained face detection model, face feature extraction model and forward process of the diffusion model are deployed on the edge device, and the face image data is collected through the edge device to obtain the face feature vector. The face feature vector is encrypted through the forward process of the trained diffusion model, and then the encrypted face feature vector is transmitted to the server; the reverse process of the trained diffusion model and the face comparison algorithm are deployed on the server, and the face feature vector is stored. After the server receives the encrypted face feature vector, the reverse operation of the diffusion model is used to restore the face feature vector, and the face feature vector is obtained. The feature vector is compared and identified with the feature vector in the face feature vector storage library to obtain the recognition result, and finally the recognition result is returned to the edge device; Further preferably, during the training process, the face detection model is trained using the Wider Face dataset to obtain face key points, the lightweight face feature extraction model is trained using the LFW public dataset to obtain face feature vectors, and the inverse process of the diffusion model is trained.
6. According to claim 1, a method for face privacy protection and security recognition based on diffusion model is characterized in that: Methods for face comparison include Euclidean distance and cosine distance; Further preferably, the cosine distance, that is, the cosine similarity method is used for face comparison, and the obtained face feature vector a=(a1, a3, ..., a4) is compared one by one with the feature vector b=(b1, b3, ..., b4) in the face database to identify the identity; the cosine similarity calculation formula is: Among them, a is the facial feature vector obtained by the camera, a " is the value of feature vector a, b is the feature vector in the face feature database, b " is the value of the feature vector b; the face database is extracted by the MobileNetV2 lightweight neural network.
7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the face privacy protection and security recognition method based on the diffusion model are implemented.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the face privacy protection and security recognition method based on the diffusion model are implemented.
9. A face privacy protection security recognition system based on a diffusion model, characterized in that: include: The data acquisition and processing module is configured to: collect face image data on the edge device and obtain face feature vectors; The data encryption module is configured to: destroy the face image data and encrypt the face feature vector using the forward process of the trained diffusion model; The data decryption module is configured to: send the encrypted facial feature vector to the server, and decrypt the facial feature vector using the inverse process of the trained diffusion model on the server; The face comparison and recognition module is configured to: perform face comparison and recognition on the decrypted face feature vector, and return the recognition result to the edge device.
10. The face privacy protection security recognition system based on diffusion model according to claim 9, characterized in that: The data acquisition and processing module includes a face acquisition module, a face detection module and a feature extraction module; The face acquisition module is configured to: acquire face image data; The face detection module is configured to: obtain facial feature points; The feature extraction module is configured to: obtain a face feature vector.
Citation Information
Cited By
Data processing method and system, electronic equipment and nonvolatile storage medium
CN119337423A
Face security recognition method and system based on swarm intelligence and neural computing
CN119495120A
