A method and device for generating an occluded face image

By triangular segmentation and projection of key points of the face and the occlusion, the problem of poor fitting of the occlusion under different postures and angles of the face image is solved, and the natural fit between the occlusion and the face image is achieved.

CN111767876BActive Publication Date: 2025-01-03BEIJING AIBI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010633993.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-02
Publication Date
2025-01-03
Estimated Expiration
2040-07-02

AI Technical Summary

Technical Problem

There are various postures and angles in real face images. Only by performing rigid geometric transformations such as translation, rotation and scaling of the occlusion, the fitting angle between the occlusion and the face image does not match, making it difficult for the occlusion to fit naturally.

Method used

By determining the key points of the face and the occlusion, performing triangle segmentation and projecting the key points of the occlusion into the key points triangle of the face to generate an occlusion face image to avoid fitting problems caused by rigid geometric transformation.

Benefits of technology

The natural fit between the occluded objects and the face image is achieved, and the problem of difficult occluded objects is solved. The generated occluded face image is more natural and appropriate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111767876B_ABST
    Figure CN111767876B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for generating an occluded face image, comprising: determining a first preset number of target face key points in the face image to be occluded; determining a first preset number of occluder key points in the occluder image based on the first preset number of target face key points, triangulating the face image to be occluded and the occluder image for the first number of target face key points and the first preset number of occluder key points, respectively, to obtain a second preset number of face key point triangles and a second preset number of occluder key point triangles, projecting each occluder key point triangle into a corresponding face key point triangle, to obtain a face image with occluders. In the above method, by projecting the triangle of the occluder key point into the corresponding face key point figure, a face image with occluders is obtained, thereby avoiding the problem that the rigid geometric transformation of the occluder is difficult to fit naturally on the face image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to a method and device for generating an occluded face image. Background Art

[0002] For the generation of occluded face data, the current common practice is to translate, rotate and scale the occluders (such as mask images, glasses images, etc.) in appropriate proportions according to the positions of key points on the face, and cover the occluders on the unobstructed face image to simulate the occluded face image.

[0003] However, real face images have various postures and angles. Simply performing rigid geometric transformations such as translation, rotation, and scaling on the occluder may result in a mismatch in the fitting angle between the occluder and the face image, making it difficult to fit the occluder with the face image. Summary of the invention

[0004] In view of this, the present invention provides a method and device for generating an occluded face image to solve the problem that real face images have various postures and angles. Only by performing rigid geometric transformations such as translation, rotation, and scaling on the occluder, the occluder and the face image may not fit at the right angle, which makes it difficult for the occluder to fit naturally on the face image. The specific solution is as follows:

[0005] A method for generating an occluded face image, comprising:

[0006] Determine a first preset number of target facial key points in the face image to be occluded;

[0007] Determining a first preset number of occluder key points in the occluder image according to the first preset number of target face key points, wherein the target face key points correspond to the occluder key points;

[0008] triangulate the to-be-occluded face image and the occluder image respectively for the first number of target face key points and the first preset number of occluder key points to obtain a second preset number of face key point triangles and a second preset number of occluder key point triangles;

[0009] Project each occluded key point triangle onto the corresponding face key point triangle to obtain a face image with occluders.

[0010] The above method may optionally include determining a first preset number of target facial key points in the face image to be occluded, including:

[0011] Acquire a third preset number of facial key points in the face image to be blocked, wherein the third preset number is greater than or equal to the first preset number;

[0012] Obtaining an obstruction type in the obstruction image and a first preset number corresponding to the obstruction type;

[0013] Selecting candidate facial key points from the third preset number of key points according to the type of the occluder;

[0014] The first preset number of target facial key points are selected from the candidate facial key points.

[0015] The above method may optionally include performing triangulation on the face image to be occluded and the occluder image for the first number of target face key points and the first preset number of occluder key points, respectively, to obtain a second preset number of face key point triangles and a second preset number of occluder key point triangles, including:

[0016] triangulate the face image to be occluded according to the first number of target face key points to obtain a second preset number of face key point triangles;

[0017] Obtaining the connection relationship between the edges of the second preset number of facial key point triangles;

[0018] The occluder image is triangulated according to the connection relationship and the first preset number of occluder key points to obtain the second preset number of occluder key point triangles.

[0019] The above method may optionally project each occluding key point triangle into a corresponding face key point triangle to obtain a face image with occluding objects, including:

[0020] For each occluder key point triangle, calculate the projection point of each point in the corresponding target face key point triangle;

[0021] The pixel value of each point is obtained, and the pixel value is added to the corresponding projection point to obtain a face image with an occluder.

[0022] The above method may optionally further include:

[0023] The face images are screened in advance to obtain the face images to be blocked.

[0024] A device for generating an occluded face image, comprising:

[0025] A first determination module, used to determine a first preset number of target facial key points in the face image to be blocked;

[0026] A second determination module is used to determine a first preset number of occluder key points in the occluder image according to the first preset number of target face key points, wherein there is a corresponding relationship between the target face key points and the occluder key points;

[0027] a triangulation module, configured to triangulate the to-be-occluded face image and the occluder image respectively for the first number of target face key points and the first preset number of occluder key points, to obtain a second preset number of face key point triangles and a second preset number of occluder key point triangles;

[0028] The projection module is used to project each occluding key point triangle into the corresponding face key point triangle to obtain a face image with occluding objects.

[0029] In the above device, optionally, the first determining module includes:

[0030] A key point acquisition unit, which acquires a third preset number of facial key points in the face image to be blocked, wherein the third preset number is greater than or equal to the first preset number;

[0031] A type and quantity acquisition unit, configured to acquire the type of the occluder in the occluder image and a first preset quantity corresponding to the type of the occluder;

[0032] A first selection unit, configured to select candidate facial key points from the third preset number of key points according to the type of the occluder;

[0033] The second selection unit is used to select the first preset number of target facial key points from the candidate facial key points.

[0034] In the above device, optionally, the segmentation module comprises:

[0035] A first subdivision unit is used to triangulate the face image to be occluded according to the first number of target face key points to obtain a second preset number of face key point triangles;

[0036] A connection relationship acquisition unit, used to acquire the connection relationship between the edges of the second preset number of facial key point triangles;

[0037] The second subdivision unit is used to triangulate the obstruction image according to the connection relationship and the first preset number of obstruction key points to obtain the second preset number of obstruction key point triangles.

[0038] In the above device, optionally, the projection module includes:

[0039] A calculation unit, for calculating, for each occluder key point triangle, a projection point of each point therein in a corresponding target face key point triangle;

[0040] The projection unit is used to obtain the pixel value of each point, add the pixel value to the corresponding projection point, and obtain the face image with the occluder.

[0041] The above device may optionally further include:

[0042] The screening module is used to pre-screen each face image to obtain the face image to be blocked.

[0043] Compared with the prior art, the present invention has the following advantages:

[0044] The present invention discloses a method for generating an occluded face image, comprising: determining a first preset number of target face key points in the face image to be occluded; determining a first preset number of occluder key points in the occluder image based on the first preset number of target face key points, triangulating the face image to be occluded and the occluder image for the first number of target face key points and the first preset number of occluder key points, respectively, to obtain a second preset number of face key point triangles and a second preset number of occluder key point triangles, projecting each occluder key point triangle into a corresponding face key point triangle, to obtain a face image with occluders. In the above method, by projecting the triangle of the occluder key point into the corresponding face key point figure, a face image with occluders is obtained, thereby avoiding the problem that the rigid geometric transformation of the occluder is difficult to fit naturally on the face image.

[0045] Of course, any product implementing the present invention does not necessarily need to achieve all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] 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 some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0047] Figure 1 A flow chart of a method for generating an occluded face image disclosed in an embodiment of the present application;

[0048] Figure 2 A schematic diagram of key points of a human face disclosed in an embodiment of the present application;

[0049] Figure 3A schematic diagram of the key point selection of the mask in the embodiment of the present application;

[0050] Figure 4 A schematic diagram of triangulation of key points of a face disclosed in an embodiment of the present application;

[0051] Figure 5 A schematic diagram of the correspondence between the key point triangles of the face and the key point triangles of the mask disclosed in the embodiment of the present application;

[0052] Figure 6 This is a schematic diagram of a face image of a person wearing a mask disclosed in an embodiment of the present application;

[0053] Figure 7 This is a structural block diagram of a device for generating an occluded face image disclosed in an embodiment of the present application. DETAILED DESCRIPTION

[0054] 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.

[0055] 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.

[0056] The present invention discloses a method and device for generating an occluded face image, which is applied in the process of generating an occluded face image. Since the current occluded face images are all generated by translating, rotating and scaling the occluders (such as mask images, glasses images, etc.) in appropriate proportions, and covering the occluders on the unobstructed face images to simulate the occluded face images, the occluded face images are not aligned with the face images. Therefore, the present invention provides a method for generating an occluded face image, and the execution flow of the generation method is as follows: Figure 1 As shown, the steps include:

[0057] S101, determining a first preset number of target facial key points in the face image to be occluded;

[0058] In the embodiment of the present invention, facial images exist in various postures and angles. Preferably, the facial images can be screened in advance, and the facial images with rotation angles greater than a preset rotation angle threshold can be eliminated to obtain the facial images to be occluded, which can further ensure that the occluded object fits the facial image better, wherein the preset rotation angle threshold can be set based on experience or specific circumstances. In the embodiment of the present invention, the specific value of the preset rotation angle threshold is not limited.

[0059] The first number of target facial key points is selected from a third preset number of facial key points, wherein the third preset number is greater than or equal to the first preset number, and the selection process is as follows: after obtaining the face image to be occluded, a facial key point detector is used to detect facial key points, and the facial key points detected by each key point detector can be 68 points, 72 points, 108 points, 118 points, or other points. In the embodiment of the present invention, the third preset number of 118 is used as an example to illustrate that 118 facial key points can be obtained based on the key point detector.

[0060] P=[p0,p1,p2,…,p 117 ], here p i =[x i ,y i ],i=0,1,2,…,117.

[0061] Schematic diagram of facial key points Figure 2 shown.

[0062] In the period, the selection of the first preset number can be related to the actual situation or the type of obstruction. The relationship between the type of obstruction and the first preset number is pre-set. The specific setting principle can be set according to experience or specific circumstances. The specific setting principle is not limited in the embodiment of the present invention. For example, the obstruction can be a mask or glasses. The obstruction is taken as an example for explanation. It is assumed that the first preset number corresponding to the mask is 27. According to the wearing habit of the mask, the alternative key area is the area under the eyes in the face image. The face key points in the third preset number of face keys that are in the alternative key area are selected as alternative face key points. A first preset number of target face key points are selected from the alternative face key points. The specific selection principle can be determined according to experience or specific circumstances to ensure that the first preset number of target face key points conforms to the wearing habit of the mask. The specific selection principle is not limited.

[0063] S102, determining a first preset number of occluder key points in the occluder image according to the first preset number of target face key points, wherein the target face key points correspond to the occluder key points;

[0064] In an embodiment of the present invention, the face image to be occluded and the occluding object image are placed in the same coordinate system, and for each target face key point in the face image to be occluded, the distance between the target face key point and each point on the edge of the occluding object image is calculated, and the point corresponding to the shortest distance among each distance is taken as the occluding object key point corresponding to the current target face key point, and a corresponding relationship between the target face key point and the occluding object key point is established.

[0065] Taking the mask as an example, 27 mask key points are determined in the mask according to the first preset number of target face key points. The schematic diagram of the mask key points after determination is as follows: Figure 3 shown.

[0066] S103, triangulating the to-be-occluded face image and the occluder image for the first number of target face key points and the first preset number of occluder key points, respectively, to obtain a second preset number of face key point triangles and a second preset number of occluder key point triangles;

[0067] In an embodiment of the present invention, the to-be-occluded face image and the to-be-occluded face image are triangulated for the first number of target face key points and the first preset number of obstruction key points, respectively. The to-be-occluded face image can be triangulated for the first preset number of target face key points first, and based on the triangulation result, the to-be-occluded face image is triangulated for the first preset number of obstruction key points. Alternatively, the to-be-occluded face image can be triangulated for the first preset number of obstruction key points first, and based on the triangulation result, the to-be-occluded face image is triangulated for the first preset number of target face key points. The principle of triangulation is mainly to ensure that there are no intersecting edges. During the triangulation process, the image can be directly triangulated into triangles, or it can be triangulated into other polygons and then further triangulated into triangles.

[0068] Among them, taking the first preset number of target face key points as an example to preferentially triangulate the face image to be occluded, triangulate the face image to be occluded according to the first preset number of target face key points to obtain a second preset number of face key point triangles, taking the first preset number as 27 as an example, Figure 4 As shown, the first preset number of facial key points are divided into 28 facial key point triangles, and the connection relationship between the edges of the 28 facial key point triangles is obtained. Therefore, the occlusion image is triangulated according to the connection relationship and the first preset number of occlusion key points to obtain 28 mask key point triangles.

[0069] S104: Project each occluded key point triangle onto the corresponding face key point triangle to obtain a face image with occluders.

[0070] In the embodiment of the present invention, based on the 28 mask key point triangles obtained in S103, the 28 mask triangle areas are sequentially mapped to the face image to be blocked. Taking one of the triangles as an example, Figure 5 As shown, the three vertices of the face key point triangle are in counterclockwise order. As shown in 5(1), the three vertices of the corresponding mask key point triangle area on the mask graph are in counterclockwise order: As shown in 5(2), a point in the mask key point triangle area Corresponding projection points on the face It can be calculated according to formula (1):

[0071]

[0072] in,

[0073]

[0074]

[0075]

[0076] And k1+k2+k3=1

[0077] in, Area: The calculation process is as follows: The coordinates of the three vertices of the triangle are known to be A=[x a ,y a ],B=[x b ,y b ],C=[x c ,y c ]

[0078] The area of ​​a triangle can be calculated using the following determinant:

[0079]

[0080] Calculated Mapping points on the mask map Afterwards, obtain The RGB of the pixel corresponding to the point can be The RGB value of the corresponding pixel is assigned to By traversing each point in the triangle of each mask key point, the mask image can be attached to the face to form a face image covered by a mask, such as Figure 6 shown.

[0081] The present invention discloses a method for generating an occluded face image, comprising: determining a first preset number of target face key points in the face image to be occluded; determining a first preset number of occluder key points in the occluder image based on the first preset number of target face key points, triangulating the face image to be occluded and the occluder image for the first number of target face key points and the first preset number of occluder key points, respectively, to obtain a second preset number of face key point triangles and a second preset number of occluder key point triangles, projecting each occluder key point triangle into a corresponding face key point triangle, to obtain a face image with occluders. In the above method, by projecting the triangle of the occluder key point into the corresponding face key point figure, a face image with occluders is obtained, thereby avoiding the problem that the rigid geometric transformation of the occluder is difficult to fit naturally on the face image.

[0082] Based on the above-mentioned method for generating an occluded face image, an embodiment of the present invention further provides a device for generating an occluded face image. The structural block diagram of the device is as follows: Figure 7 As shown, it includes: a first determination module 201, a second determination module 202, a segmentation module 203 and a projection module 204.

[0083] in,

[0084] The first determination module 201 is used to determine a first preset number of target facial key points in the face image to be blocked;

[0085] The second determination module 202 is used to determine a first preset number of occluder key points in the occluder image according to the first preset number of target face key points, wherein there is a corresponding relationship between the target face key points and the occluder key points;

[0086] The triangulation module 203 is used to triangulate the face image to be occluded and the occluder image respectively according to the first number of target face key points and the first preset number of occluder key points to obtain a second preset number of face key point triangles and a second preset number of occluder key point triangles;

[0087] The projection module 204 is used to project each occluding key point triangle into the corresponding face key point triangle to obtain a face image with occluding objects.

[0088] The present invention discloses a device for generating an image of a face with an occlusion, comprising: determining a first preset number of target face key points in the image of the face to be occluded; determining a first preset number of occluder key points in the occluder image based on the first preset number of target face key points, triangulating the image of the face to be occluded and the occluder image for the first number of target face key points and the first preset number of occluder key points, respectively, to obtain a second preset number of face key point triangles and a second preset number of occluder key point triangles, projecting each occluder key point triangle into a corresponding face key point triangle, to obtain a face image with an occluder. In the above device, by projecting the triangle of the occluder key point into the corresponding face key point figure, a face image with an occluder is obtained, thereby avoiding the problem that the rigid geometric transformation of the occluder is difficult to fit naturally on the face image.

[0089] In the embodiment of the present invention, the first determining module 201 includes:

[0090] Key point acquisition unit 205, type and quantity acquisition unit 206, first selection unit 207 and second selection unit 208.

[0091] in,

[0092] The key point acquisition unit 205 acquires a third preset number of facial key points in the face image to be blocked, wherein the third preset number is greater than or equal to the first preset number;

[0093] The type and quantity acquisition unit 206 is used to acquire the type of the occluder in the occluder image and a first preset quantity corresponding to the type of the occluder;

[0094] The first selection unit 207 is used to select candidate facial key points from the third preset number of key points according to the type of the occluder;

[0095] The second selection unit 208 is used to select the first preset number of target facial key points from the candidate facial key points.

[0096] In the embodiment of the present invention, the segmentation module 203 includes:

[0097] A first segmentation unit 209 , a connection relationship acquisition unit 210 and a second segmentation unit 211 .

[0098] in,

[0099] The first subdivision unit 209 is used to perform triangulation on the face image to be occluded according to the first number of target face key points to obtain a second preset number of face key point triangles;

[0100] The connection relationship acquisition unit 210 is used to acquire the connection relationship between the edges of the second preset number of facial key point triangles;

[0101] The second subdivision unit 211 is used to perform triangulation on the occluder image according to the connection relationship and the first preset number of occluder key points to obtain the second preset number of occluder key point triangles.

[0102] In the embodiment of the present invention, the projection module 204 includes:

[0103] A calculation unit 212 and a projection unit 213 .

[0104] in,

[0105] The calculation unit 212 is used to calculate the projection point of each point in each occluder key point triangle in the corresponding target face key point triangle;

[0106] The projection unit 213 is used to obtain the pixel value of each point, and add the pixel value to the corresponding projection point to obtain the face image with the occluder.

[0107] In the embodiment of the present invention, the generating device further includes: a screening module 214 .

[0108] in,

[0109] The screening module 214 is used to pre-screen each face image to obtain the face image to be blocked.

[0110] It should be noted that each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0111] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0112] For the convenience of description, the above device is described as being divided into various units according to their functions. Of course, when implementing the present invention, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0113] It can be known from the description of the above implementation methods that those skilled in the art can clearly understand that the present invention can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present invention or certain parts of the embodiments.

[0114] The above is a detailed introduction to a method and device for generating an occluded facial image provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A method for generating an occluded face image, characterized in that: include: Determine a first preset number of target facial key points in the face image to be occluded; Determining a first preset number of occluder key points in the occluder image according to the first preset number of target face key points, wherein the target face key points correspond to the occluder key points; triangulate the to-be-occluded face image and the occlusion object image respectively for the first preset number of target face key points and the first preset number of occlusion object key points to obtain a second preset number of face key point triangles and a second preset number of occlusion object key point triangles; Project each occluded key point triangle onto the corresponding face key point triangle to obtain the face image with occluders; Wherein, determining a first preset number of target face key points in the face image to be blocked includes: Acquire a third preset number of facial key points in the face image to be blocked, wherein the third preset number is greater than or equal to the first preset number; Obtaining an obstruction type in the obstruction image and a first preset number corresponding to the obstruction type; Selecting candidate facial key points from the third preset number of key points according to the type of the occluder; Selecting the first preset number of target facial key points from the candidate facial key points; The method of triangulating the face image to be occluded and the occluder image for the first preset number of target face key points and the first preset number of occluder key points, respectively, to obtain a second preset number of face key point triangles and a second preset number of occluder key point triangles, includes: Triangulating the face image to be occluded according to the first preset number of target face key points to obtain a second preset number of face key point triangles; Obtaining the connection relationship between the edges of the second preset number of facial key point triangles; Triangulating the occluder image according to the connection relationship and the first preset number of occluder key points to obtain the second preset number of occluder key point triangles; Among them, each occluded key point triangle is projected into the corresponding face key point triangle to obtain a face image with occluders, including: For each occluder key point triangle, calculate the projection point of each point in the corresponding target face key point triangle; where the three vertices of the face key point triangle are in counterclockwise order: The three vertices of the occluder key point triangle are in counterclockwise order: Occluder key point A point in the triangle area Corresponding projection points on the face Calculate according to formula (1): in, And k1+k2+k3=1 in, Area: The calculation process is as follows: The coordinates of the three vertices of the triangle are known to be A=[x a ,y a ],B=[x b ,y b ],C=[x c ,y c ] The area of ​​a triangle is calculated using the following determinant: The pixel value of each point is obtained, and the pixel value is added to the corresponding projection point to obtain a face image with an occluder.

2. The method according to claim 1, characterized in that: Also includes: The face images are screened in advance to obtain the face images to be blocked.

3. A device for generating an occluded face image, characterized in that: include: A first determination module, used to determine a first preset number of target facial key points in the face image to be blocked; A second determination module is used to determine a first preset number of occluder key points in the occluder image according to the first preset number of target face key points, wherein there is a corresponding relationship between the target face key points and the occluder key points; a triangulation module, configured to triangulate the to-be-occluded face image and the occlusion object image respectively for the first preset number of target face key points and the first preset number of occlusion object key points, to obtain a second preset number of face key point triangles and a second preset number of occlusion object key point triangles; A projection module is used to project each occluded key point triangle into the corresponding face key point triangle to obtain a face image with occluders; Wherein, the first determining module includes: A key point acquisition unit, which acquires a third preset number of facial key points in the face image to be blocked, wherein the third preset number is greater than or equal to the first preset number; A type and quantity acquisition unit, configured to acquire the type of the occluder in the occluder image and a first preset quantity corresponding to the type of the occluder; A first selection unit, configured to select candidate facial key points from the third preset number of key points according to the type of the occluder; A second selection unit, configured to select the first preset number of target facial key points from the candidate facial key points; Wherein, the segmentation module comprises: A first subdivision unit is used to triangulate the face image to be occluded according to the first preset number of target face key points to obtain a second preset number of face key point triangles; A connection relationship acquisition unit, used to acquire the connection relationship between the edges of the second preset number of facial key point triangles; A second triangulation unit is configured to triangulate the occluder image according to the connection relationship and the first preset number of occluder key points to obtain triangles of the second preset number of occluder key points; Wherein, the projection module comprises: A calculation unit is used to calculate the projection point of each point in each occluder key point triangle in the corresponding target face key point triangle; wherein, the three vertices of the face key point triangle are respectively in counterclockwise order: The three vertices of the occluder key point triangle are in counterclockwise order: Occluder key point A point in the triangle area Corresponding projection points on the face Calculate according to formula (1): in, And k1+k2+k3=1 in, Area: The calculation process is as follows: The coordinates of the three vertices of the triangle are known to be A=[x a ,y a ],B=[x b ,y b ],C=[x c ,y c ] The area of ​​a triangle is calculated using the following determinant: The projection unit is used to obtain the pixel value of each point, add the pixel value to the corresponding projection point, and obtain the face image with the occluder.

4. The device according to claim 3, characterized in that Also includes: The screening module is used to pre-screen each face image to obtain the face image to be blocked.