Facial privacy protection method and system

Through mask key point labeling and triangular affine transformation technology, combined with FaceMesh and DWPose algorithms, the problem of facial privacy leakage in remote video supervision and medication management is solved, and effective privacy protection and efficient medication video review is achieved.

CN118968592AActive Publication Date: 2024-11-15SHENZHEN NANSHAN DISTRICT CHRONIC DISEASE CONTROL CENT (SHENZHEN NANSHAN DISTRICT MENTAL HEALTH CENT) +1
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411004243.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-24
Publication Date
2024-11-15
Estimated Expiration
2044-07-24

AI Technical Summary

Technical Problem

Under the remote video supervision and medication management mode, the patient's facial images and environmental information are easily leaked, resulting in a threat to privacy and security, and it is difficult for the existing technology to effectively protect the patient's facial privacy.

Method used

Using mask key point annotation and triangular affine transformation technology, facial key point detection and detail enhancement of medication video frames is performed. Through the combination of FaceMesh and DWPose algorithm, the mask is covered with the Ensure privacy protection on human faces.

Benefits of technology

Effectively protect patients' facial privacy, avoid information leakage, and at the same time, it does not affect the review and management efficiency of medication videos, adapt to different video quality and patient posture changes, and ensure the reliability of privacy protection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118968592A_ABST
    Figure CN118968592A_ABST
Patent Text Reader

Abstract

The invention discloses a face privacy protection method and system, and relates to the technical field of face detection, and the method comprises the steps: obtaining a medicine taking video of a patient, and extracting a video frame; selecting a mask and marking mask key points; performing face key point detection and selection on each video frame, and performing detail enhancement on key point detection and selection through a human body posture detection algorithm to obtain face key points; and performing triangular affine transformation based on the face key points and the mask key points to add a mask to the face of the video frame. Effective privacy protection can be provided for the patient, and meanwhile, the auditing and management efficiency of the medicine taking video is not affected. By combining the FaceMesh and DWPose algorithms and the Delou triangulation and triangulation affine transformation technology, it is ensured that the mask can accurately cover the human face, a good privacy protection effect can be kept even in a complex video scene, and the privacy protection reliability is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of face detection, and more particularly to a facial privacy protection method and system. Background Art

[0002] Tuberculosis is one of the top ten causes of death in the world. It has the characteristics of both chronic diseases and infectious diseases. The continuous spread of tuberculosis epidemic is a major global public health problem. The current public health service model for tuberculosis patients is a collection of public health services centered on DOTS (Directly Observed Treatment, Short-course). The work form is mainly for tuberculosis patients to receive services at community health centers or tuberculosis professional institutions, supplemented by medical staff visiting homes and providing telephone follow-up services. This working method has achieved certain results in the early stage of tuberculosis prevention and control, but it has increased the time, energy and psychological burden of patients, and the workload of grassroots medical staff is heavy. A series of drawbacks that restrict the prevention and control effect have gradually emerged: the actual implementation rate of DOTS is extremely low, patients take medicine by themselves, and irregular medication has become a common phenomenon. They often forget to take medicine and miss medicine frequently, and adverse drug reactions are not discovered in time, resulting in low cure rate, relapse and even drug resistance. In recent years, in order to reduce the drawbacks of DOTS and improve management efficiency, remote video-supervised medication (Video-Observed Therapy, VOT) has gradually become the mainstream of innovative management methods for tuberculosis patients.

[0003] Although the VOT management model has reduced the workload of medical staff in primary medical institutions to a certain extent, the shortage of human resources directly affects the quality of health management of tuberculosis patients, and it is difficult to ensure the timeliness, effectiveness and even authenticity of the implementation of health management of tuberculosis patients. The implementation of the current VOT management model is still difficult to achieve high-quality health management of patients. At the same time, researchers have implemented the VOT management method for patients with pulmonary tuberculosis for 6 years, with millions of medication videos. It was found that there is a widespread phenomenon that medical staff do not review medication videos in a timely manner and the quality control is unstable. The rapid development of artificial intelligence (AI) technology and its wide application in the fields of medical services and health management have provided strong support for AI technology in medical services and intelligent review of medication videos. The application of AI technology can realize the upgrade of the VOT management model, and adopt a human-machine collaborative medication review model with intelligent review as the main and manual review as the auxiliary, which is expected to further reduce the workload of primary medical staff, improve the quality control of medication management for tuberculosis patients, and improve the timeliness of medication management.

[0004] The VOT management model for tuberculosis patients has achieved remarkable results, but there is a problem that cannot be ignored: it is inevitable to directly collect sensitive personal information of patients, including facial images of patients and shooting environment. Once leaked, this information can be easily used for illegal activities such as identification of specific identities, cracking of financial accounts, and monitoring of whereabouts, thereby causing infringement of the patient's personal dignity or endangerment of personal and property safety. As a result, patients' awareness of personal privacy protection has gradually increased. In the early days of VOT's launch in 2017, the full upload rate of patients' medication videos was 63.4%, while in 2021 the full upload rate dropped to 46.4%.

[0005] Therefore, how to propose a facial privacy protection method and system to avoid the leakage of user's face and other feature information in the VOT management mode and ensure the user's privacy security is an urgent problem that technicians in this field need to solve. Summary of the invention

[0006] In view of this, the present invention provides a facial privacy protection method and system to avoid leakage of user's facial features and other information in VOT management mode and ensure the privacy of the user. In order to achieve the above purpose, the present invention adopts the following technical solutions:

[0007] A facial privacy protection method, comprising:

[0008] Obtain the patient's medication video and extract the video frames;

[0009] Select the mask and mark the key points of the mask;

[0010] Detect and select facial key points for each video frame, and enhance the details of key point detection and selection through human posture detection algorithm to obtain facial key points;

[0011] A mask is added to the face in the video frame by performing triangular affine transformation based on the face key points and mask key points.

[0012] Optionally, the detecting and selecting facial key points for each video frame includes:

[0013] The key points of the face include eyes, nose, mouth, eyebrows, jawline and facial contour features.

[0014] Perform facial key point detection on each video frame using the FaceMesh algorithm in mediapipe.

[0015] Optionally, the selecting a mask and marking key points of the mask includes:

[0016] A wearing mask adapted to the human face is selected, the mask key points of the wearing mask are fixed, and after the wearing mask is selected, the key points are manually annotated, and the key point annotations are matched with the selected human face key points.

[0017] Optionally, the step of performing detail enhancement on key point detection and selection using a human posture detection algorithm to obtain facial key points includes:

[0018] Use FaceMesh algorithm to detect key points of face;

[0019] When the FaceMesh algorithm does not detect a face, the DWPose posture detection algorithm is started;

[0020] Through the DWPose posture detection algorithm, the posture of the video frame without detected face is estimated to obtain key points;

[0021] Through key point conversion, the key points obtained by the DWPose posture detection algorithm are converted into key points selected by the FaceMesh algorithm.

[0022] Optionally, the step of converting the key points obtained by the DWPose posture detection algorithm into the key points selected by the FaceMesh algorithm through key point conversion includes:

[0023] Based on the key points of the video frames that can be obtained by the DWPose posture detection algorithm and the FaceMesh algorithm, a mapping relationship is established by comparing the position relationship of the key points between the two;

[0024] Use the mapping relationship to map the key points obtained by the DWpose posture detection algorithm to the corresponding FaceMesh key points;

[0025] The mapping relationship includes coordinate translation or interpolation using multiple DWPose key points;

[0026] The key points obtained by the DWPose posture detection algorithm are converted into key points selected by the FaceMesh algorithm.

[0027] Optionally, it also includes: converting the key points obtained by the DWPose posture detection algorithm into key points selected by the FaceMesh algorithm, performing smoothing correction on the key points, and performing smoothing correction on the outermost contour points of the key points.

[0028] Optionally, the smoothing correction of the contour points at the outermost edge of the key points includes:

[0029] Each facial contour point will be compared with its adjacent contour points in clockwise and counterclockwise directions: the target point is called A. i , the midpoint of the two corresponding adjacent contour points is B i, the distance between the corresponding adjacent contour points is d i , calculate all contour points A i With B i The distance between the points and d i The ratio of |A i B i | / d i ;

[0030] If there are contour points whose ratio exceeds the ratio threshold, the point A with the largest ratio will be x Move to the corresponding B x points, and then reiterate the algorithm until the corresponding ratios of all points do not exceed the threshold, or the upper limit of the number of iterations is reached.

[0031] Optionally, performing triangular affine transformation based on face key points and mask key points to add a mask to the face of the video frame includes:

[0032] Get the face key points and the corresponding mask key points;

[0033] Compute Delaunay triangulation for mask key points;

[0034] According to the connection method of the key points of the mask, the Delaunay triangulation is calculated in the same way on the key points of the face in the video frame;

[0035] Using triangular affine transformation, the triangle of mask key points is mapped to the triangle of face key points in the video frame, and the mask is covered on the face.

[0036] Optionally, the triangular affine transformation includes: encoding translation, scaling, rotation and shearing, constructing a 2x3 transformation matrix, the first two columns of the matrix encode rotation, scaling and shearing, and the last column encodes translation.

[0037] Optionally, a facial privacy protection system comprises:

[0038] Acquisition module: used to obtain the patient's medication video and extract video frames;

[0039] Annotation module: used to select masks and annotate key points of masks;

[0040] Detection and selection module: used to detect and select facial key points for each video frame, and enhance the details of key point detection and selection through human posture detection algorithm to obtain facial key points;

[0041] Transformation module: used to add a mask to the face of the video frame based on the triangular affine transformation of the face key points and the mask key points.

[0042] It can be seen from the above technical solutions that, compared with the prior art, the present invention discloses a facial privacy protection method and system, which has the following beneficial effects:

[0043] The present invention proposes a facial privacy protection method, including: obtaining a patient's medication video and extracting a video frame; selecting a mask and marking the key points of the mask; detecting and selecting facial key points for each video frame, and performing detail enhancement on the key point detection and selection through a human posture detection algorithm to obtain facial key points; and performing triangular affine transformation based on the facial key points and the mask key points to add a mask to the face of the video frame. The present invention can provide effective privacy protection for patients without affecting the review and management efficiency of medication videos, and has important practical application value. By combining the FaceMesh and DWPose algorithms, as well as the Delaunay triangulation and triangular affine transformation techniques, it is ensured that the mask can be accurately covered on the face, and a good privacy protection effect can be maintained even in complex video scenes; it can adapt to different video qualities and changes in the patient's posture when taking medicine, and ensure the reliability of privacy protection. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0045] Figure 1 A schematic flow chart of a facial privacy protection method provided by the present invention.

[0046] Figure 2 A schematic diagram of the structure of a facial privacy protection system provided by the present invention.

[0047] Figure 3 This is a structural schematic diagram of a facial privacy protection device provided by the present invention.

[0048] Figure 4 A schematic diagram of the structure of a facial key point detection module provided by the present invention.

[0049] Figure 5 A schematic diagram of the structure provided by the present invention. DETAILED DESCRIPTION

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

[0051] The embodiment of the present invention discloses a facial privacy protection method, such as Figure 1 As shown, including:

[0052] Obtain the patient's medication video and extract the video frames;

[0053] Select the mask and mark the key points of the mask;

[0054] Detect and select facial key points for each video frame, and enhance the details of key point detection and selection through human posture detection algorithm to obtain facial key points;

[0055] A mask is added to the face in the video frame by performing triangular affine transformation based on the face key points and mask key points.

[0056] Furthermore, the detecting and selecting of facial key points for each video frame includes:

[0057] The key points of the face include eyes, nose, mouth, eyebrows, jawline and facial contour features.

[0058] Perform facial key point detection on each video frame using the FaceMesh algorithm in mediapipe.

[0059] In a specific embodiment, according to the patient's recorded medication video, video frames are extracted, and facial key points are detected for each video frame. The FaceMesh algorithm in mediapipe is used to detect facial key points. The FaceMesh algorithm detects 468 facial key points, which contain rich facial features. The matching of masks and faces does not require such fine features. The selection of key points includes facial key features: eyes, nose, mouth, eyebrows, jaw line, face contour, etc. 75 of the 468 key points are selected as the final facial key points to be obtained. The 75 key points are as follows: Figure 5 As shown. 0-16 is the jawline. 17-21 is the left eyebrow, 22-26 is the right eyebrow, 27-35 is the nose bridge and nose, 36-41 is the left eye, 42-47 is the right eye, 48-59 is the outer contour of the mouth, 60-67 is the inner contour of the lips, and 68-74 is the forehead contour.

[0060] Furthermore, the selecting of the mask and marking of the key points of the mask includes:

[0061] A mask adapted to the human face is selected, the mask key points of the mask are fixed, and after the mask is selected, the key points are manually annotated, and the key point annotations are matched with the selected human face key points. Specifically, they are matched with the 75 key points determined above.

[0062] Furthermore, the key points are detected and selected by a human posture detection algorithm to enhance details and obtain key points of the face, including:

[0063] Use FaceMesh algorithm to detect key points of face;

[0064] When the FaceMesh algorithm does not detect a face, the DWPose posture detection algorithm is started;

[0065] Through the DWPose posture detection algorithm, the posture of the video frame without detected face is estimated to obtain key points;

[0066] Through key point conversion, the key points obtained by the DWPose posture detection algorithm are converted into key points selected by the FaceMesh algorithm.

[0067] In a specific embodiment, due to the particularity of the medication video, the action of swallowing medication involves the movement of the head and hands and the occlusion of the face. When taking medication, the patient needs to swallow the medication with water. When drinking water and taking medication, the face will inevitably be occluded. At this time, when using the basic model FaceMesh algorithm to detect facial key points, recognition errors and omissions will occur. At this time, the human posture detection algorithm can be used to reduce the occurrence of omissions with the help of the relative position of the body. The specific operation is as follows:

[0068] S1: Human pose estimation.

[0069] With the help of the DWPose posture detection algorithm, the posture of the input video frame is predicted, and the key point position and the corresponding confidence are returned; then the key point confidence is detected. If the average confidence is lower than the threshold, it is considered that the person and posture are not detected, and the subsequent calculation and mask addition are skipped. Otherwise, the subsequent operation continues.

[0070] DWpose is an open source human posture detection algorithm. For video frames where FaceMesh fails to detect faces due to reasons such as occlusion by a water cup, the FaceMesh algorithm is started when no face is detected and DWPose is used to supplement it. DWPose is used to obtain the detection key points and their corresponding confidence levels. A threshold is pre-defined. If the mean of all key points does not exceed the threshold, the detection result of DWPose is considered unreliable, and the person and posture are deemed not to have been detected. No additional mask operation is performed on this video frame. If the mean of all key points is greater than the threshold, subsequent key point conversion operations are performed.

[0071] S2: Key point conversion.

[0072] The facial key point positions of DWPose are similar to the key point positions selected by the FaceMesh algorithm. Therefore, the positions of FaceMesh key points can be approximated by using the positional relationship between points and using the positions of 1-3 similar DWPose key points.

[0073] The position and number of facial key points obtained by DWPose are not completely consistent with the key points selected by the FaceMesh algorithm, but there is a high similarity between the two. First, based on the video frame key points that can be obtained by both, a mapping relationship is established by comparing the position relationship of the key points between the two, and then the mapping relationship is used to map the key points of DWpose to the corresponding FaceMesh key points. This mapping relationship has a simple coordinate translation, or uses multiple DWPose key points for interpolation. Through this key point conversion, the key points obtained by DWPose are converted into the key points selected by the FaceMesh algorithm, so that they can be accurately matched with the mask later.

[0074] S3: Key point smoothing correction. In addition, since it was observed during the experiment that DWPose occasionally recognized the wrong mask and caused it to deform, after the key point conversion, the contour points at the outermost edge of the key point need to be smoothed. In the smoothing correction, each facial contour point will be compared with its adjacent contour points in the clockwise and counterclockwise directions: the target point is denoted as A. i , the midpoint of the two corresponding adjacent contour points is B i , the distance between the corresponding adjacent contour points is d i , calculate all contour points A i With B i The distance between the points and d i The ratio of |A i B i | / d i If a point exceeds the ratio threshold, the point with the largest ratio will be x Move to the corresponding B xpoints, and then reiterate the algorithm until the corresponding ratios of all points do not exceed the threshold, or the upper limit of the number of iterations is reached.

[0075] Furthermore, performing triangular affine transformation based on face key points and mask key points to add a mask to the face of the video frame includes:

[0076] Get the face key points and the corresponding mask key points;

[0077] Compute Delaunay triangulation for mask key points;

[0078] According to the connection method of the key points of the mask, the Delaunay triangulation is calculated in the same way on the key points of the face in the video frame;

[0079] Using triangular affine transformation, the triangle of mask key points is mapped to the triangle of face key points in the video frame, and the mask is covered on the face.

[0080] The triangular affine transformation includes: encoding translation, scaling, rotation and shearing, constructing a 2x3 transformation matrix, the first two columns of the matrix encode rotation, scaling and shearing, and the last column encodes translation.

[0081] In a specific implementation, the specific steps of adding a mask to the face of a video frame are:

[0082] After obtaining the key points of the face and the key points corresponding to the mask;

[0083] S11: Calculate Delaunay triangulation for mask key points. For a set of scattered points on a plane, find a way to connect these points to form a series of triangles. This is triangulation. Among all possible triangulations, Delaunay triangulation has a special property: for each triangle in the triangulation, its circumscribed circle does not contain other points.

[0084] S22: According to the connection method of the key points of the mask, the Delaunay triangulation is calculated in the same way at the key points of the face in the video frame.

[0085] S33: Use triangular affine transformation to map the triangle of mask key points to the triangle of face key points in the video frame, so as to attach the mask to the face. Affine transformation encodes translation, scaling, rotation and shearing. It is a 2x3 matrix, the first two columns of which encode rotation, scaling and shearing, and the last column encodes translation.

[0086]

[0087] a and d usually control scaling and rotation. In the case of pure scaling, a and d represent the scaling factors in the x and y directions, respectively. In a rotation transformation, a = cos(θ) and d = cos(θ), where θ is the angle of rotation. b and c control shearing and rotation. In a pure shear transformation, b and c represent the shearing effect of x on y and y on x, respectively. In a rotation transformation, b = -sin(θ) and c = sin(θ). t x and t y are translation parameters, representing the translation amounts in the x and y directions respectively.

[0088] Specifically, given a point (x, y), we can move it to the point (x t ,y t ),

[0089]

[0090] Specifically, the actual use needs to expose the eyes and mouth. The purpose of exposing the eyes is to reserve the warning of drug-induced liver injury through scleral yellowing, and the purpose of exposing the mouth is to identify medication, so the eyes and mouth parts of the mask image, that is, 36-41 left eyes, 42-47 right eyes, 48-59 mouth outer contour, the surrounding areas of the three parts are set to be fully transparent.

[0091] In a specific embodiment, a facial privacy protection system, such as Figure 2 As shown, including:

[0092] Acquisition module: used to obtain the patient's medication video and extract video frames;

[0093] Annotation module: used to select masks and annotate key points of masks;

[0094] Detection and selection module: used to detect and select facial key points for each video frame, and enhance the details of key point detection and selection through human posture detection algorithm to obtain facial key points;

[0095] Transformation module: used to add a mask to the face of the video frame based on the triangular affine transformation of the face key points and the mask key points.

[0096] In a specific implementation, a facial privacy protection method is provided. For a video of a patient taking medicine, a mask is put on the face in the video. A series of key points are obtained for both the face and the mask. Due to the particularity of the video of taking medicine, there are rotations and occlusions, which will cause omissions and errors in the simple detection of facial key points. At this time, a human posture detection algorithm is used to reduce the occurrence of omissions with the help of the relative position of the body. The facial key points obtained by the human posture detection can be converted into predetermined facial key points after linear changes. Then, the same connection method is used to calculate the Delaunay triangulation of the mask and video frame key points. Finally, the triangular affine transformation is used to superimpose the mask mapping on the face to complete the mask wearing operation.

[0097] In a specific embodiment, Figure 3 As shown, a facial privacy protection device includes: an input, a facial key point detection module and a facial key point step connected in sequence, and the facial key points are combined with a mask with key points to perform triangular affine transformation to realize the face wearing a mask. For the acquired patient medication video, a mask is put on the face in the video, and the facial key points in the video are detected and the mask is marked with the same series of key points. Then, the Delaunay triangulation is calculated for the mask and the facial key points using the same connection method, and finally the mask mapping is superimposed on the face using triangular affine transformation, and the mask wearing operation is completed.

[0098] In a specific embodiment, Figure 4 As shown in the figure, a facial key point detection module is used. Due to the particularity of medication videos, there are rotations and occlusions, which cause omissions and errors in simple facial key point detection FaceMesh. At this time, the human posture detection DWPose algorithm can reduce omissions by using the relative position of the body. The facial key points obtained by human posture detection can be converted into predetermined facial key points after linear changes and smoothing. If DWPose fails to detect the human posture, it is considered that there is no face in the video frame, and the original video frame is fed back and output without the subsequent mask wearing process.

[0099] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0100] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A facial privacy protection method, It is characterized in that include: Obtain the patient's medication video and extract the video frames; Select the mask and mark the key points of the mask; Detect and select facial key points for each video frame, and enhance the details of key point detection and selection through human posture detection algorithm to obtain facial key points; A mask is added to the face in the video frame by performing triangular affine transformation based on the face key points and mask key points.

2. A facial privacy protection method according to claim 1, It is characterized in that The detecting and selecting of facial key points for each video frame includes: The key points of the face include eyes, nose, mouth, eyebrows, jawline and facial contour features. Perform facial key point detection on each video frame using the FaceMesh algorithm in mediapipe.

3. A facial privacy protection method according to claim 1, It is characterized in that The selecting of the mask and marking of the key points of the mask include: A wearing mask adapted to the human face is selected, the mask key points of the wearing mask are fixed, and after the wearing mask is selected, the key points are manually annotated, and the key point annotations are matched with the selected human face key points.

4. A facial privacy protection method according to claim 1, It is characterized in that The key points of the face are obtained by detecting and selecting key points through a human posture detection algorithm and performing detail enhancement, including: Use FaceMesh algorithm to detect key points of face; When the FaceMesh algorithm does not detect a face, the DWPose posture detection algorithm is started; Through the DWPose posture detection algorithm, the posture of the video frame without face detection is estimated to obtain key points; Through key point conversion, the key points obtained by the DWPose posture detection algorithm are converted into key points selected by the FaceMesh algorithm.

5. A facial privacy protection method according to claim 4, It is characterized in that The key points obtained by the DWPose posture detection algorithm are converted into the key points selected by the FaceMesh algorithm through key point conversion, including: Based on the key points of the video frames that can be obtained by the DWPose posture detection algorithm and the FaceMesh algorithm, a mapping relationship is established by comparing the position relationship of the key points between the two; Use the mapping relationship to map the key points obtained by the DWpose posture detection algorithm to the corresponding FaceMesh key points; The mapping relationship includes coordinate translation or interpolation using multiple DWPose key points; The key points obtained by the DWPose posture detection algorithm are converted into key points selected by the FaceMesh algorithm.

6. A facial privacy protection method according to claim 4, It is characterized in that Also includes: The key points obtained by the DWPose posture detection algorithm are converted into key points selected by the FaceMesh algorithm, and then the key points are smoothed and corrected, and the contour points at the outermost edge of the key points are smoothed and corrected.

7. A facial privacy protection method according to claim 6, It is characterized in that The smoothing correction of the contour points at the outermost edge of the key points includes: Each facial contour point will be compared with its adjacent contour points in clockwise and counterclockwise directions: the target point is called A. i , the midpoint of the two corresponding adjacent contour points is B i , the distance between the corresponding adjacent contour points is d i , calculate all contour points A i With B i The distance between the points and d i The ratio A i B i d i ; If there are contour points whose ratio exceeds the ratio threshold, the point A with the largest ratio will be x Move to the corresponding B x points, and then reiterate the algorithm until the corresponding ratios of all points do not exceed the threshold, or the upper limit of the number of iterations is reached.

8. A facial privacy protection method according to claim 1, It is characterized in that The method of performing triangular affine transformation based on the face key points and the mask key points to add a mask to the face of the video frame comprises: Get the face key points and the corresponding mask key points; Compute Delaunay triangulation for mask key points; According to the connection method of the key points of the mask, the Delaunay triangulation is calculated in the same way on the key points of the face in the video frame; Using triangular affine transformation, the triangle of mask key points is mapped to the triangle of face key points in the video frame, and the mask is covered on the face.

9. A facial privacy protection method according to claim 8, It is characterized in that The triangular affine transformation includes: encoding translation, scaling, rotation and shearing, constructing a 2x3 transformation matrix, the first two columns of the matrix encode rotation, scaling and shearing, and the last column encodes translation.

10. A facial privacy protection system, It is characterized in that include: Acquisition module: used to obtain the patient's medication video and extract video frames; Annotation module: used to select masks and annotate key points of masks; Detection and selection module: used to detect and select facial key points for each video frame, and enhance the details of key point detection and selection through human posture detection algorithm to obtain facial key points; Transformation module: used to add a mask to the face of the video frame based on the triangular affine transformation of the face key points and the mask key points.

Citation Information

Patent Citations

  • Image processing technology-based human face privacy protection method

    CN108427918A

  • Method and device for generating shielded face image

    CN111767876A

  • Face information detection method and device, terminal equipment and storage medium

    CN111814573A

  • Face detection and protection method and device, electronic equipment and storage medium

    CN113591681A

  • Video face changing method and device, storage medium and equipment

    CN116993576A