WO2022134337A1 - Face occlusion detection method and system, device, and storage medium - Google Patents

Face occlusion detection method and system, device, and storage medium Download PDF

Info

Publication number
WO2022134337A1
WO2022134337A1 PCT/CN2021/082571 CN2021082571W WO2022134337A1 WO 2022134337 A1 WO2022134337 A1 WO 2022134337A1 CN 2021082571 W CN2021082571 W CN 2021082571W WO 2022134337 A1 WO2022134337 A1 WO 2022134337A1
Authority
WO
WIPO (PCT)
Prior art keywords
face
image
key point
organ
occlusion detection
Prior art date
Application number
PCT/CN2021/082571
Other languages
French (fr)
Chinese (zh)
Inventor
陈丹
陆进
陈斌
刘玉宇
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2022134337A1 publication Critical patent/WO2022134337A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation
    • G06V40/171Local features and components; Facial parts ; Occluding parts, e.g. glasses; Geometrical relationships
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation

Definitions

  • the present application relates to the technical field of artificial intelligence, and in particular, to a method, system, device and storage medium for face occlusion monitoring.
  • face recognition and living body detection play a vital role in building traffic, financial authentication and other fields, and the occlusion of face images will have a direct impact on the results of face recognition and living body detection. . Therefore, face occlusion detection is an indispensable link in the face system.
  • the existing face occlusion detection technical solutions are mainly divided into two directions: one is to use traditional methods to distinguish skin color and texture information from hue and texture, and then judge whether the face image is occluded; the other is to train deep neural networks.
  • the single-task classification method is mainly used to determine whether the entire face is occluded, or the multi-task method is used to integrate with the detection model, and the types and positions of various facial organs and occluders are detected at the same time to determine the occlusion of the face. .
  • the inventor found that the traditional method is affected by the complexity of face features and the diversity of occluders, and is not universal and has weak generalization ability.
  • the single-task classification method cannot be accurate to specific organs, landing scenes There are limitations, and the task of detecting organs at the same time when the multi-task method directly locates the occluder is difficult, and the accuracy is difficult to guarantee.
  • the main purpose of this application is to provide a face occlusion detection method, system, computer equipment and computer-readable storage medium, which are used to solve the problem that traditional methods in the prior art are not universal and have weak generalization ability, and single-task classification
  • the method cannot be accurate to specific organs, and the landing scene is limited, while the multi-task method is difficult to detect organs, and the accuracy is difficult to guarantee.
  • a first aspect of the present application provides a face occlusion detection method, and the face occlusion detection method includes:
  • the face image is subjected to face organ block segmentation to obtain a corresponding face organ block image
  • the occlusion ratio of each face organ is calculated according to the pixel value of the target mask image.
  • a second aspect of the present application provides a face occlusion detection device, the face occlusion detection device includes: a memory, a processor, and a face occlusion detection program stored in the memory and executable on the processor , the processor implements the following steps when executing the face occlusion detection program:
  • the face image is subjected to face organ block segmentation to obtain a corresponding face organ block image
  • the occlusion ratio of each face organ is calculated according to the pixel value of the target mask image.
  • a third aspect of the present application provides a storage medium, a computer-readable storage medium, where computer instructions are stored in the computer-readable storage medium, and when the computer instructions are executed on a computer, the computer is caused to perform the following steps:
  • the face image is subjected to face organ block segmentation to obtain a corresponding face organ block image
  • the occlusion ratio of each face organ is calculated according to the pixel value of the target mask image.
  • a fourth aspect of the present application provides a face occlusion detection system, where the face occlusion detection system includes:
  • the acquisition module is used to acquire the face image to be detected
  • a first detection module configured to perform key point detection on the face image to obtain key point information of the face organs in the face image
  • a segmentation module configured to perform facial organ block segmentation on the face image according to the key point information to obtain a corresponding face organ block image
  • the second detection module is used to preprocess the face organ block image, and input the preprocessed face organ block image into a pre-trained face occlusion detection model to perform face occlusion detection, and Output the corresponding mask image;
  • a processing module configured to perform binarization processing on the mask image to obtain the binarized target mask image
  • the calculation module is configured to calculate the occlusion ratio of each face organ according to the pixel value of the target mask image.
  • a face occlusion detection method, system, computer equipment and computer-readable storage medium provided by the present application, by acquiring a face image to be detected; key point information of face organs; according to the key point information, the face image is subjected to face organ block segmentation to obtain a corresponding face organ block image; the face organ block image is preprocessed, and Input the preprocessed face organ block image into the pre-trained face occlusion detection model to perform face occlusion detection, and output the corresponding mask image; calculate each pixel value according to the target mask image. Occlusion ratio of individual face organs.
  • the specific occlusion position of each part of the organ and the occlusion percentage of each face organ can be accurately calculated, which not only reduces the complexity of face occlusion detection, but also reduces the complexity of face occlusion detection.
  • the division is accurate to each face organ, which greatly improves the accuracy of face occlusion detection.
  • FIG. 1 is a schematic flowchart of steps of a method for detecting face occlusion provided by the present application
  • FIG. 2 is a schematic flow chart of step refinement of step S200 in FIG. 1 provided by the present application;
  • FIG. 3 is a schematic grayscale image of facial organ block segmentation provided by the application.
  • FIG. 4 is a schematic flowchart of step refinement of step S300 in FIG. 1 provided by the present application;
  • Fig. 5 is a kind of schematic facial organ block segmentation rendering effect diagram provided by this application.
  • FIG. 6 is a schematic flowchart of step refinement of step S400 in FIG. 1 provided by the present application;
  • FIG. 7 is a schematic flowchart of step refinement of step S500 in FIG. 1 provided by the present application.
  • FIG. 8 is a schematic flow chart of step refinement of the training method for a face occlusion detection model in the face occlusion detection method provided by the present application;
  • FIG. 9 is a schematic flowchart of step refinement of step S600 in FIG. 1 provided by the present application.
  • FIG. 10 is a schematic diagram of an optional program module of the face occlusion detection system provided by the application.
  • FIG. 11 is a schematic diagram of an optional hardware architecture of the computer device provided by the present application.
  • the embodiments of the present application provide a face occlusion detection method, system, device, and storage medium.
  • face organs as blocks to perform pixel-level semantic segmentation, the specific occlusion position of each part and organ and each face can be accurately calculated.
  • the occlusion percentage of organs not only reduces the complexity of face occlusion detection, but also the face division is accurate to each face organ, which greatly improves the accuracy of face occlusion detection.
  • FIG. 1 a schematic flowchart of steps of a face occlusion detection method provided by an embodiment of the present application is shown. It can be understood that the flowcharts in the embodiments of the present application are not used to limit the order of executing steps.
  • the following is an exemplary description with a computer device as the execution subject, and the computer device may include mobile terminals such as smart phones, tablet personal computers, laptop computers, etc., as well as fixed terminals such as desktop computers. . details as follows:
  • Step S100 acquiring a face image to be detected.
  • the face image to be detected by the model can be obtained by taking a photo of the face by a camera device, capturing a face by a video monitoring device, and capturing by a web crawler.
  • Step S200 performing key point detection on the face image to obtain key point information of the face organs in the face image.
  • key point detection is performed by inputting the face image to be detected into a preset key point model, and corresponding key point information is obtained, thereby determining the key point information of the face organs.
  • the step 200 may include:
  • Step S201 inputting the face image into a preset key point model to perform the key point detection, to obtain a preset number of key point information on the two-dimensional plane of the face image, wherein the key point
  • the information includes the coordinates of the key points and the serial numbers corresponding to the key points;
  • Step S202 according to the preset number of key point information and the position of each face organ in the face image, determine the key point information of each face organ, wherein the face organ includes forehead, left Eyebrows, right eyebrows, left eye, right eye, nose and mouth.
  • the face image to be detected is input into a preset key point model for key point detection and calibration, 68 key points are marked on the face image to be detected, and the The corresponding serial number is also marked, and the corresponding key point information is obtained to determine the corresponding face organ coordinate point information.
  • FIG. 3 is a schematic grayscale image of facial organ block (Patch) segmentation.
  • the serial numbers corresponding to the coordinates of the key points are 36, 37, 38, 39, 40, and 41, respectively, and the area enclosed by the coordinates of the key points represents the left eye.
  • the serial numbers corresponding to the key point coordinates of the left eyebrow are 17, 18, 19, 20, and 21, respectively, and the serial numbers corresponding to the key point coordinates of the right eyebrow are 22, 23, 24, 25, and 26.
  • the serial number The horizontal line where the two points 19 and 24 are located is used as the lower boundary of the forehead.
  • the height of the face frame extending one-fifth of the orientation is used as the upper boundary of the forehead, and the left and right boundaries of the forehead are respectively the serial number 17.
  • the vertical line corresponding to the serial number 26 forms a rectangular area as the forehead.
  • the height of the face frame is the distance between the largest point in the key point coordinates of the eyebrows and the smallest point in the key point coordinates of the face contour.
  • the human cheek can also be divided by the 68 key point information.
  • the sequence numbers corresponding to the key point coordinates are 1, 2, 3, 4, 5, 6, 7, 31 respectively. , 40, 41, 48, the area enclosed by these 11 key points is the left cheek.
  • the face contour can also be divided by the 68 key point information.
  • the serial numbers corresponding to the key point coordinates are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13. , 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, the area surrounded by these 27 key points is the face contour.
  • the embodiment of the present application obtains the key point information of the face image by performing key point detection on the face image, thereby accurately obtaining the corresponding face organs.
  • Step S300 according to the key point information, perform face organ Patch segmentation on the face image to obtain a corresponding face organ Patch image.
  • the face image is patched, and the minimum circumscribed rectangular area containing each face organ is taken to obtain the corresponding face organ Patch image.
  • the step S300 may include:
  • Step S301 according to the key point information and a preset division rule, determine the minimum circumscribed rectangle corresponding to each face organ.
  • Step S302 according to the minimum circumscribed rectangle corresponding to each face organ, perform Patch segmentation on the face image to obtain a face organ Patch image corresponding to each face organ.
  • a set of division rules is designed, and the rules are as follows: according to the area enclosed by the key point coordinates and the sequence number corresponding to the key point, the specific position of the face organ is determined. Since polygon calculation is relatively redundant and the discrimination of occlusion judgment is of little significance, according to the uppermost, lowermost, leftmost and rightmost coordinate points of the face organ, the minimum circumscribed rectangle of the face organ is determined as the human face. The face organ Patch image is extracted for calculation.
  • the serial numbers corresponding to the key point coordinates are 36, 37, 38, 39, 40, 41, respectively, and the area surrounded by the key point coordinates represents the left eye.
  • the human cheek can also be divided by the 68 key point information.
  • the sequence numbers corresponding to the key point coordinates are 1, 2, 3, 4, 5, 6, 7, 31, 40, 41, 48 , the area enclosed by these 11 key point coordinates represents the left cheek.
  • the smallest rectangle that can contain the left cheek is taken as the left cheek Patch.
  • the face contour can also be divided by the 68 key point information, and the smallest rectangle is taken as the face contour Patch through the serial numbers 0, 8, 16, 19, and 24 corresponding to the key point coordinates.
  • the complexity of calculation is reduced compared with the traditional polygon calculation, and the calculation of the occlusion ratio of the face organ is more convenient.
  • Step S400 preprocessing the face organ Patch image, and inputting the preprocessed face organ Patch image into a pre-trained face occlusion detection model to perform face occlusion detection, and output the corresponding mask.
  • Mask image preprocessing the face organ Patch image, and inputting the preprocessed face organ Patch image into a pre-trained face occlusion detection model to perform face occlusion detection, and output the corresponding mask.
  • FIG. 5 is a schematic effect diagram of a face organ Patch segmentation.
  • the image on the left of Figure 5 is the preprocessed face input image
  • the right side of Figure 5 is the mask image output by the face occlusion detection model.
  • the black part on the right side of Figure 5 is the background
  • the white part is the face area.
  • the step S400 may include:
  • Step S401 Fill the face organ Patch image and adjust the size of the filled image to obtain a square Patch image of the corresponding size.
  • Step S402 Input the square patch image into the pre-trained face occlusion detection model to perform face occlusion detection to obtain the corresponding mask image.
  • Table 1 it is the network structure table of the face occlusion detection model.
  • the square patch image first passes through the left half of the face occlusion detection model, namely the first layer to the fourth layer, for feature extraction, which belongs to the downsampling stage; then passes through the right half of the face occlusion detection model, that is, the first layer. Layers 5, 7, and 10 belong to the upsampling stage. This stage involves the fusion of feature maps of different scales.
  • the fusion method is as shown in Table 1.
  • the function Concat operation is used to accumulate the thickness of the feature maps; the last layer is a filter (filtering). device), the size is 1*1*128, and the depth is 1.
  • the face occlusion detection model outputs a mask image with a size of 128*128.
  • the face organ Patch image is preprocessed and input to the face occlusion detection model, and then the mask image of the face organ is obtained through operations such as feature extraction, image fusion, and convolution, so as to accurately identify the face organ ,
  • the skin is separated from the occluder, which makes the calculation result of the occlusion ratio of the face organs more accurate.
  • Step S500 performing binarization processing on the mask image to obtain the binarized target mask image.
  • the mask image is first subjected to grayscale processing to obtain a corresponding grayscale image, and then the obtained grayscale image is subjected to binarization processing according to a preset pixel threshold to obtain the binarized target mask image.
  • the step 500 may include:
  • Step S501 performing grayscale processing on the mask image to obtain a grayscale image
  • Step S502 comparing the pixel value of each pixel of the grayscale image with a preset pixel threshold
  • Step S503 when the pixel value of the pixel point is higher than the preset pixel threshold, the pixel value of the pixel point is set to a preset pixel value;
  • Step S504 complete the binarization processing of the mask image, and obtain the binarized target mask image.
  • the mask image is binarized so that each pixel of the mask image is between 0 and 1, the preset pixel threshold is set to 0.75, and the pixels larger than the preset pixel threshold are set to is 1 (representing an occlusion area), and other pixels are set to 0 (representing a non-occlusion area) to obtain the binarized target mask image.
  • the preset pixel threshold can be freely set according to the actual situation, which is not limited here.
  • the binarized target mask image is obtained by performing a binarization process on the mask image, so that the target face region in the image is distinguished from the background, and the result of the model is more accurate.
  • FIG. 8 it is an exemplary flowchart of steps of the training method of the face occlusion detection model.
  • the training method of the face occlusion detection model includes:
  • Step S511 obtaining face training image samples and occluder samples
  • Step S512 performing key point detection on the face training image sample to obtain key point information of the face organs in the face training image sample;
  • Step S513 according to the key point information, perform face organ Patch segmentation on the face training image sample to obtain a corresponding face organ Patch image;
  • Step S514 randomly adding the occluder sample to the preset position of the face organ Patch image, to replace the pixels of the preset position of the face organ Patch image with the pixel of the occluder sample. pixels, get face occluder training image samples;
  • Step S515 preprocessing the face occlusion training image sample, and inputting the preprocessed face organ Patch image into the face occlusion detection model to complete the training of the face occlusion detection model.
  • the key point detection is performed on the face training image sample through a key point model to obtain key point information of the face organs in the face training image sample, and then according to the key point information, the face
  • the training image sample is subjected to face organ Patch segmentation to obtain a corresponding face organ Patch image, and the occluder sample is randomly added to the preset position of the face organ Patch image, so that the face organ Patch image is
  • the pixels of the preset position are replaced with the pixels of the occluder samples, and the training image samples of face occluders are obtained, and the pixel values of the regions added by the occluder samples are replaced by the pixel values of the occluder samples.
  • the occlusion samples are captured by web crawlers and captured and extracted by themselves, including fingers, pens, fans, cups, masks, cosmetics, microphones, and the like.
  • the coordinates on the two-dimensional plane of the region where the occluder samples are added to the face training image samples are [x1:x2, y1:y2], where x1, x2, y1, and y2 correspond to people, respectively.
  • the abscissas x1, x2 and y1, y2 of the face organs in the mask image. First initialize an all-zero matrix L with a size of 128*128, and then modify all the pixels in the [x1:x2,y1:y2] area to 1.
  • the modified matrix is the supervision label used in training.
  • the face occlusion detection model is trained by the segmentation loss function IOU Loss, so that the pixel value on the face organ patch image is closer to the pixel value at the corresponding position on the all-zero matrix L, that is, there is occlusion
  • the pixel value of the area of the object is close to 1, and the pixel value of other areas is close to 0, and then the gradient descent method commonly used in deep learning is used for training until the face occlusion detection model converges, that is, the Loss value no longer decreases.
  • the pixel value of the mask image output by the face occlusion detection model is infinitely close to the pixel value of the supervision label, and the training is completed.
  • the function Loss is a commonly used segmentation loss function IOU loss, which is calculated according to the mask image and the all-zero matrix L.
  • various types of occluders are randomly added to the random face area of the face training image sample, and then a large number of face occlusion training image samples are input into the face occlusion detection model for training, so that the face
  • the occlusion detection model is becoming more and more sensitive to the detection of occlusions, so as to achieve the effect of detecting any occlusions.
  • Step S600 Calculate the occlusion ratio of each face organ according to the pixel value of the target mask image.
  • the pixel value of the target mask image is compared with the preset pixel threshold, and all points higher than the preset pixel threshold are counted, and then the occlusion ratio of each face organ is calculated.
  • the step 600 may include:
  • Step S601 according to the pixel value situation of the target mask image, count the number of the preset pixel values in each face organ, and obtain the total number of occlusion pixels;
  • Step S602 according to the total number of occluded pixels, calculate the ratio of the total number of occluded pixels corresponding to the total number of pixel values of face parts, and obtain the occlusion ratio of each face part.
  • the ratio of the pixel value of the mask image corresponding to each face organ Patch image to the preset pixel threshold is calculated, that is, the face organ occlusion percentage.
  • the formula for calculating the percentage of organ occlusion is as follows:
  • x1, y1 are the coordinate positions of the upper left corner of the face organ in the mask image
  • h and w correspond to the height and width of the face organ in the mask image
  • ⁇ ij represents the binarized mask image.
  • the pixel value at position (i, j) Indicates that if the pixel corresponding to the (i, j) coordinate in the mask image is 1, take 1, otherwise take 0.
  • the key point information of the corresponding face organ is obtained by performing key point detection on the face image, so as to perform Patch segmentation on the face organ to obtain the corresponding face organ Patch image, After preprocessing, it is input into the pre-trained face occlusion detection model for face detection, and the corresponding mask image is obtained, and finally the corresponding facial organ occlusion ratio is obtained by calculation. Not only the complexity of face occlusion detection is reduced, but also the face division is accurate to each face organ, which greatly improves the accuracy of face occlusion detection.
  • FIG. 10 a schematic diagram of program modules of a face occlusion detection system 700 according to an embodiment of the present application is shown.
  • the face occlusion detection system 700 can be applied to computer equipment, and the computer equipment can be a mobile phone, a tablet personal computer, a laptop computer, or other equipment with a data transmission function.
  • the face occlusion detection system 700 may include or be divided into one or more program modules, and one or more program modules are stored in a storage medium and processed by one or more processors. Executed to complete the embodiments of the present application, and the above-mentioned face occlusion detection system 700 can be implemented.
  • the program modules referred to in the embodiments of the present application refer to a series of computer program instruction segments capable of completing specific functions, and are more suitable for describing the execution process of the face occlusion detection system 700 in the storage medium than the programs themselves.
  • the face occlusion detection system 700 includes an acquisition module 701, a first detection module 702, a segmentation module 703, a second detection module 704, a processing module 705 and a calculation module 706. The following description will specifically introduce the functions of each program module in the embodiments of the present application:
  • the acquiring module 701 is used for acquiring the face image to be detected.
  • the acquisition module 701 acquires the face image to be detected in the model by taking a photo of the face by a camera device, capturing a face by a video monitoring device, and capturing by a web crawler.
  • the first detection module 702 is configured to perform key point detection on the face image to obtain key point information of the face organs in the face image.
  • the first detection module 702 performs key point detection by inputting the face image to be detected into a preset key point model to obtain corresponding key point information, thereby determining the key points of the face organs information.
  • the first detection module 702 is specifically configured to:
  • the face image to be detected is input into a preset key point model for key point detection and calibration, 68 key points are marked on the face image to be detected, and the The corresponding serial number is also marked, and the corresponding key point information is obtained to determine the corresponding face organ coordinate point information.
  • FIG. 3 is a schematic grayscale image of a face organ Patch segmentation.
  • the serial numbers corresponding to the coordinates of the key points are 36, 37, 38, 39, 40, and 41, respectively, and the area enclosed by the coordinates of the key points represents the left eye.
  • the serial numbers corresponding to the key point coordinates of the left eyebrow are 17, 18, 19, 20, and 21, respectively, and the serial numbers corresponding to the key point coordinates of the right eyebrow are 22, 23, 24, 25, and 26.
  • the serial number The horizontal line where the two points 19 and 24 are located is used as the lower boundary of the forehead.
  • the height of the face frame extending one-fifth of the orientation is used as the upper boundary of the forehead, and the left and right boundaries of the forehead are respectively the serial number 17.
  • the vertical line corresponding to serial number 26 forms a rectangular area as the forehead.
  • the height of the face frame is the distance between the largest point in the key point coordinates of the eyebrows and the smallest point in the key point coordinates of the face contour.
  • the human cheek can also be divided by the 68 key point information.
  • the sequence numbers corresponding to the key point coordinates are 1, 2, 3, 4, 5, 6, 7, 31 respectively. , 40, 41, 48, the area enclosed by these 11 key points is the left cheek.
  • the face contour can also be divided by the 68 key point information.
  • the serial numbers corresponding to the key point coordinates are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13. , 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, the area surrounded by these 27 key points is the face contour.
  • the key point information of the face image is obtained by performing key point detection on the face image, thereby accurately obtaining the corresponding face organs.
  • the segmentation module 703 is configured to perform face organ Patch segmentation on the face image according to the key point information to obtain a corresponding face organ Patch image.
  • the segmentation module 703 performs Patch segmentation on the face image according to the key point information detected by the key point model and the preset division rules, and takes the smallest circumscribed rectangular area containing each face organ to obtain the corresponding human face Face Organ Patch Image.
  • the segmentation module 703 is specifically used for:
  • Patch segmentation is performed on the face image according to the minimum circumscribed rectangle corresponding to each face organ to obtain a face organ Patch image corresponding to each face organ.
  • the segmentation module 703 designs a set of division rules according to the key point information, and the rules are as follows: according to the area enclosed by the coordinates of the key points and the sequence numbers corresponding to the key points, the specific position of the facial organ is determined. Since polygon calculation is relatively redundant and the discrimination of occlusion judgment is of little significance, according to the uppermost, lowermost, leftmost and rightmost coordinate points of the face organ, the minimum circumscribed rectangle of the face organ is determined as the human face. The face organ Patch image is extracted for calculation.
  • the serial numbers corresponding to the key point coordinates are 36, 37, 38, 39, 40, 41, respectively, and the area surrounded by the key point coordinates represents the left eye.
  • the human cheek can also be divided by the 68 key point information.
  • the sequence numbers corresponding to the key point coordinates are 1, 2, 3, 4, 5, 6, 7, 31, 40, 41, 48 , the area enclosed by the coordinates of these 11 key points represents the left cheek.
  • the smallest rectangle that can contain the left cheek is taken as the left cheek Patch.
  • the face contour can also be divided by the 68 key point information, and the smallest rectangle is taken as the face contour Patch through the serial numbers 0, 8, 16, 19, and 24 corresponding to the key point coordinates.
  • the complexity of calculation is reduced compared with the traditional polygon calculation, and the calculation of the occlusion ratio of the face organ is more convenient.
  • the second detection module 704 is configured to preprocess the face organ Patch image, and input the preprocessed face organ Patch image into a pre-trained face occlusion detection model to perform face occlusion detection, And output the corresponding mask image.
  • the second detection module 704 first preprocesses the divided face organ Patch images to obtain images that can be used for the face occlusion detection model, and after pre-training the face occlusion detection model, Input the preprocessed image into the face occlusion detection model for face occlusion detection, so as to output the corresponding mask image.
  • FIG. 5 is a schematic effect diagram of a face organ Patch segmentation.
  • the image on the left of Figure 5 is the preprocessed face input image
  • the right side of Figure 5 is the mask image output by the face occlusion detection model.
  • the black part on the right side of Figure 5 is the background
  • the white part is the face area.
  • the second detection module 704 is specifically configured to:
  • Described face organ Patch image is filled and the image after filling is carried out size adjustment, obtains the square Patch image of corresponding size;
  • the second detection module 704 calls the function Padding 0 to fill the face organ Patch image area into a square, and then calls the function resize to adjust the size of the face organ Patch image area to 128*128, obtaining 128 *128 square patch images.
  • Table 1 it is the network structure table of the face occlusion detection model.
  • the square patch image first passes through the left half of the face occlusion detection model, namely the first layer to the fourth layer, for feature extraction, which belongs to the downsampling stage; then passes through the right half of the face occlusion detection model, that is, the first layer. Layers 5, 7, and 10 belong to the upsampling stage. This stage involves the fusion of feature maps of different scales.
  • the fusion method is as shown in Table 1.
  • the function Concat operation is used to accumulate the thickness of the feature maps; the last layer is a filter (filtering). device), the size is 1*1*128, and the depth is 1.
  • the face occlusion detection model outputs a mask image with a size of 128*128.
  • the second detection module 704 preprocesses the face organ Patch image and inputs it into the face occlusion detection model, and then obtains the face organ through operations such as feature extraction, image fusion, and convolution. mask image, so as to accurately distinguish face organs, skin and occluders, and make the calculation of the occlusion ratio of face organs more accurate.
  • the processing module 705 is configured to perform binarization processing on the mask image to obtain the binarized target mask image.
  • the processing module 705 first performs grayscale processing on the mask image to obtain a corresponding grayscale image, and then performs binarization processing on the obtained grayscale image according to a preset pixel threshold to obtain the two grayscale images. Valued target mask image.
  • processing module 705 is specifically configured to:
  • the pixel value of the pixel point is set to a preset pixel value
  • the binarization processing of the mask image is completed to obtain the binarized target mask image.
  • the processing module 705 performs binarization processing on the mask image, so that each pixel of the mask image is between 0 and 1, and sets the preset pixel threshold to 0.75, which is greater than the preset pixel threshold.
  • the pixel points of the threshold are set to 1 (representing an occlusion area), and other pixels are set to 0 (representing a non-occlusion area) to obtain the binarized target mask image.
  • the preset pixel threshold can be freely set according to the actual situation, which is not limited here.
  • the binarized target mask image is obtained by performing a binarization process on the mask image, so that the target face region in the image is distinguished from the background, and the result of the model is more accurate.
  • the face occlusion detection system 700 includes a training module of a face occlusion detection model, which is used for:
  • the face training image sample is subjected to face organ Patch segmentation to obtain a corresponding face organ Patch image
  • the face occlusion training image samples are preprocessed, and the preprocessed face organ Patch image is input into the face occlusion detection model to complete the training of the face occlusion detection model.
  • the training module of the face occlusion detection model performs key point detection on the face training image sample through a key point model to obtain the key point information of the face organs in the face training image sample, and then according to the The key point information, the face training image sample is subjected to face organ Patch segmentation to obtain a corresponding face organ Patch image, and the occluder sample is randomly added to the preset position of the face organ Patch image , to replace the pixels of the preset position of the face organ Patch image with the pixels of the occluder sample to obtain a face occluder training image sample, and add the area pixel value of the occluder sample. Replaced with the pixel value of the occluder sample.
  • the occlusion samples are captured by web crawlers and captured and extracted by themselves, including fingers, pens, fans, cups, masks, cosmetics, microphones, and the like.
  • the coordinates on the two-dimensional plane of the region where the occluder samples are added to the face training image samples are [x1:x2, y1:y2], where x1, x2, y1, and y2 correspond to people, respectively.
  • the abscissas x1, x2 and y1, y2 of the face organs in the mask image. First initialize an all-zero matrix L with a size of 128*128, and then modify all the pixels in the [x1:x2,y1:y2] area to 1.
  • the modified matrix is the supervision label used in training.
  • the face occlusion detection model is trained by the segmentation loss function IOU Loss, so that the pixel value on the face organ patch image is closer to the pixel value at the corresponding position on the all-zero matrix L, that is, there is occlusion
  • the pixel value of the area of the object is close to 1, and the pixel value of other areas is close to 0, and then the gradient descent method commonly used in deep learning is used for training until the face occlusion detection model converges, that is, the Loss value no longer decreases.
  • the pixel value of the mask image output by the face occlusion detection model is infinitely close to the pixel value of the supervision label, and the training is completed.
  • the function Loss is a commonly used segmentation loss function IOU loss, which is calculated according to the mask image and the all-zero matrix L.
  • the face occlusion detection system 700 randomly adds various types of occluders to random face regions of the face training image samples, and then inputs a large number of face occlusion training image samples into the The face occlusion detection model is trained to make the face occlusion detection model more and more sensitive to the detection of occlusions, so as to achieve the effect of detecting any occlusions.
  • the calculation module 706 is configured to calculate the occlusion ratio of each face organ according to the pixel value of the target mask image.
  • the pixel value of the target mask image is compared with the preset pixel threshold, and all points higher than the preset pixel threshold are counted, and then the occlusion ratio of each face organ is calculated.
  • the computing module 706 is specifically used to:
  • the ratio of the total number of occluded pixels corresponding to the total number of pixel values of face parts is calculated, and the occlusion ratio of each face part is obtained.
  • the calculation module 706 calculates the proportion of the pixel value of the mask image corresponding to the patch image of each face organ according to the pixel value of the target mask image, which is the proportion of the preset pixel threshold, which is the occlusion percentage of the face organ .
  • the formula for calculating the percentage of organ occlusion is as follows:
  • x1, y1 are the coordinate positions of the upper left corner of the face organ in the mask image
  • h and w correspond to the height and width of the face organ in the mask image
  • ⁇ ij represents the binarized mask image.
  • the pixel value at position (i, j) Indicates that if the pixel corresponding to the (i, j) coordinate in the mask image is 1, take 1, otherwise take 0.
  • the face occlusion detection system 700 obtains the key point information of the corresponding face organ by performing key point detection on the face image, so as to perform Patch segmentation on the face organ to obtain the corresponding face organ Patch image , and then input into the pre-trained face occlusion detection model for face detection after preprocessing, to obtain the corresponding mask image, and finally calculate to obtain the corresponding facial organ occlusion ratio. Not only the complexity of face occlusion detection is reduced, but also the face division is accurate to each face organ, which greatly improves the accuracy of face occlusion detection.
  • an embodiment of the present application further provides a schematic diagram of a hardware architecture of a computer device 800 .
  • a computer device 800 Such as smart phones, tablet computers, notebook computers, desktop computers, rack servers, blade servers, tower servers or rack servers (including independent servers, or server clusters composed of multiple servers) that can execute programs, etc. .
  • the computer device 800 is a device that can automatically perform numerical calculation and/or information processing according to pre-set or stored instructions.
  • the computer device 800 at least includes, but is not limited to, a memory 801, a processor 802, and a network interface 803 that can communicate with each other through a device bus. in:
  • the memory 801 includes at least one type of computer-readable storage medium, and the readable storage medium includes a flash memory, a hard disk, a multimedia card, a card-type memory (for example, SD or DX memory, etc.), and random access memory.
  • RAM static random access memory
  • ROM read only memory
  • EEPROM electrically erasable programmable read only memory
  • PROM programmable read only memory
  • magnetic memory magnetic disk, optical disk, and the like.
  • the memory 801 may be an internal storage unit of the computer device 800 , such as a hard disk or a memory of the computer device 800 .
  • the memory 801 may also be an external storage device of the computer device 800, for example, a pluggable hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital) device equipped on the computer device 800 Digital, SD) card, flash card (Flash Card), etc.
  • the memory 801 may also include both the internal storage unit of the computer device 800 and its external storage device.
  • the memory 801 is generally used to store the operating device installed in the computer device 800 and various application software, such as the program code of the face occlusion detection system 700 and the like.
  • the memory 801 can also be used to temporarily store various types of data that have been output or will be output.
  • the processor 802 may be a central processing unit (Central Processing Unit, CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some inventive embodiments.
  • the processor 802 is generally used to control the overall operation of the computer device 800 .
  • the processor 802 is configured to run the program code or process data stored in the memory 801, for example, run the program code of the face occlusion detection system 700, so as to realize the face occlusion detection system 700 described above. Occlusion detection method.
  • the network interface 803 may include a wireless network interface or a wired network interface, and the network interface 803 is generally used to establish a communication connection between the computer device 800 and other electronic devices.
  • the network interface 803 is used to connect the computer device 800 with an external terminal through a network, and establish a data transmission channel and a communication connection between the computer device 800 and the external terminal.
  • the network may be an intranet (Intranet), the Internet (Internet), a Global System of Mobile communication (GSM), a Wideband Code Division Multiple Access (WCDMA), a 4G network, a 5G network Wireless or wired network such as network, Bluetooth (Bluetooth), Wi-Fi, etc.
  • FIG. 11 only shows a computer device 800 having components 801-803, but it should be understood that implementation of all shown components is not required, and that more or less components may be implemented instead.
  • the face occlusion detection system 700 stored in the memory 801 may also be divided into one or more program modules, and the one or more program modules are stored in the memory 801 and are configured by One or more processors (the processor 802 in this embodiment) are executed to complete the face occlusion detection method of the present application.
  • Embodiments of the present application further provide a computer-readable storage medium, where the computer-readable storage medium may be non-volatile or volatile, such as flash memory, hard disk, multimedia card, card-type storage (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), magnetic A memory, a magnetic disk, an optical disc, a server, an App application mall, etc., store a computer program thereon, and when the program is executed by the processor, a corresponding function is realized.
  • the computer-readable storage medium of the embodiment of the present application is used to store the face occlusion detection system 700, so as to implement the face occlusion detection method of the present application when executed by the processor.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Image Analysis (AREA)

Abstract

The present application relates to the field of artificial intelligence, and provides a face occlusion detection method and system. The method comprises: acquiring a face image to be detected; performing keypoint detection on the face image to obtain keypoint information of face organs in the face image; according to the keypoint information, performing face organ block segmentation on the face image to obtain corresponding face organ block images; pre-processing the face organ block images, inputting the pre-processed face organ block images into a pre-trained face occlusion detection model to perform face occlusion detection, and outputting corresponding mask images; performing binarization processing on the mask images to obtain the binarized target mask images; and calculating occlusion ratios of various face organs according to pixel values of the target mask images. According to the present application, the occlusion percentages corresponding to various face organs can be accurately calculated, thereby greatly improving the accuracy of face occlusion detection.

Description

人脸遮挡检测方法、系统、设备及存储介质Face occlusion detection method, system, device and storage medium
本申请要求于2020年12月21日提交中国专利局、申请号为202011520261.8、发明名称为“人脸遮挡检测方法、系统、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在申请中。This application claims the priority of the Chinese patent application filed on December 21, 2020 with the application number 202011520261.8 and the invention titled "Facial occlusion detection method, system, device and storage medium", the entire contents of which are by reference incorporated in the application.
技术领域technical field
本申请涉及人工智能技术领域,具体涉及一种人脸遮挡监测方法、系统、设备及存储介质。The present application relates to the technical field of artificial intelligence, and in particular, to a method, system, device and storage medium for face occlusion monitoring.
背景技术Background technique
随着人工智能技术的发展,人脸识别和活体检测在楼宇通行、金融认证等领域发挥着至关重要的作用,而人脸图像的遮挡情况会对人脸识别和活体检测结果产生直接的影响。因此,人脸遮挡检测是人脸系统中必不可少的环节。With the development of artificial intelligence technology, face recognition and living body detection play a vital role in building traffic, financial authentication and other fields, and the occlusion of face images will have a direct impact on the results of face recognition and living body detection. . Therefore, face occlusion detection is an indispensable link in the face system.
现有的人脸遮挡检测技术方案主要分为两个方向:一是采用传统方法,从色调和纹理上是对肤色和纹理信息进行区别,进而判断人脸图像是否遮挡;二是训练深度神经网络判别人脸是否遮挡,主要采用单任务分类方法判别整张脸是否存在遮挡,或者采用多任务方法与检测模型融合,同时检测各个人脸器官和遮挡物类型及位置,以判别人脸的遮挡情况。The existing face occlusion detection technical solutions are mainly divided into two directions: one is to use traditional methods to distinguish skin color and texture information from hue and texture, and then judge whether the face image is occluded; the other is to train deep neural networks. To determine whether the face is occluded, the single-task classification method is mainly used to determine whether the entire face is occluded, or the multi-task method is used to integrate with the detection model, and the types and positions of various facial organs and occluders are detected at the same time to determine the occlusion of the face. .
然而,针对上述做法,发明人发现,传统方法受人脸特征复杂性和遮挡物多样性的影响,不具有普适性且泛化能力很弱,单任务分类方法无法精确到具体器官,落地场景有局限,而多任务方法直接定位遮挡物时同时检测器官的任务难度大,精度难以保证。However, in response to the above approach, the inventor found that the traditional method is affected by the complexity of face features and the diversity of occluders, and is not universal and has weak generalization ability. The single-task classification method cannot be accurate to specific organs, landing scenes There are limitations, and the task of detecting organs at the same time when the multi-task method directly locates the occluder is difficult, and the accuracy is difficult to guarantee.
发明内容SUMMARY OF THE INVENTION
本申请的主要目的在于提供一种人脸遮挡检测方法、系统、计算机设备及计算机可读存储介质,用于解决现有技术中传统方法不具有普适性且泛化能力很弱,单任务分类方法无法精确到具体器官,落地场景有局限,而多任务方法器官检测难度大,精度难以保证的缺陷。The main purpose of this application is to provide a face occlusion detection method, system, computer equipment and computer-readable storage medium, which are used to solve the problem that traditional methods in the prior art are not universal and have weak generalization ability, and single-task classification The method cannot be accurate to specific organs, and the landing scene is limited, while the multi-task method is difficult to detect organs, and the accuracy is difficult to guarantee.
本申请第一方面提供了一种人脸遮挡检测方法,所述人脸遮挡检测方法包括:A first aspect of the present application provides a face occlusion detection method, and the face occlusion detection method includes:
获取待检测的人脸图像;Obtain the face image to be detected;
将所述人脸图像进行关键点检测,得到所述人脸图像中人脸器官的关键点信息;Perform key point detection on the face image to obtain key point information of the face organs in the face image;
根据所述关键点信息,将所述人脸图像进行人脸器官块分割,得到对应的人脸器官块图像;According to the key point information, the face image is subjected to face organ block segmentation to obtain a corresponding face organ block image;
将所述人脸器官块图像进行预处理,并将预处理后的人脸器官块图像输入到预先训练的人脸遮挡检测模型中,以进行人脸遮挡检测,并输出对应的掩膜图像;Preprocessing the face organ block image, and inputting the preprocessed face organ block image into a pre-trained face occlusion detection model to perform face occlusion detection, and output a corresponding mask image;
根据所述目标掩膜图像的像素值情况计算各个人脸器官的遮挡比例。The occlusion ratio of each face organ is calculated according to the pixel value of the target mask image.
本申请第二方面提供了一种人脸遮挡检测设备,所述人脸遮挡检测设备包括:存储器、处理器以及存储在所述存储器上并可在所述处理器上运行的人脸遮挡检测程序,所述处理器执行所述人脸遮挡检测程序时实现如下步骤:A second aspect of the present application provides a face occlusion detection device, the face occlusion detection device includes: a memory, a processor, and a face occlusion detection program stored in the memory and executable on the processor , the processor implements the following steps when executing the face occlusion detection program:
获取待检测的人脸图像;Obtain the face image to be detected;
将所述人脸图像进行关键点检测,得到所述人脸图像中人脸器官的关键点信息;Perform key point detection on the face image to obtain key point information of the face organs in the face image;
根据所述关键点信息,将所述人脸图像进行人脸器官块分割,得到对应的人脸器官块图像;According to the key point information, the face image is subjected to face organ block segmentation to obtain a corresponding face organ block image;
将所述人脸器官块图像进行预处理,并将预处理后的人脸器官块图像输入到预先训练的人脸遮挡检测模型中,以进行人脸遮挡检测,并输出对应的掩膜图像;Preprocessing the face organ block image, and inputting the preprocessed face organ block image into a pre-trained face occlusion detection model to perform face occlusion detection, and output a corresponding mask image;
根据所述目标掩膜图像的像素值情况计算各个人脸器官的遮挡比例。The occlusion ratio of each face organ is calculated according to the pixel value of the target mask image.
本申请第三方面提供了一种存储介质,一种计算机可读存储介质,所述计算机可读存储介质中存储计算机指令,当所述计算机指令在计算机上运行时,使得计算机执行如下步 骤:A third aspect of the present application provides a storage medium, a computer-readable storage medium, where computer instructions are stored in the computer-readable storage medium, and when the computer instructions are executed on a computer, the computer is caused to perform the following steps:
获取待检测的人脸图像;Obtain the face image to be detected;
将所述人脸图像进行关键点检测,得到所述人脸图像中人脸器官的关键点信息;Perform key point detection on the face image to obtain key point information of the face organs in the face image;
根据所述关键点信息,将所述人脸图像进行人脸器官块分割,得到对应的人脸器官块图像;According to the key point information, the face image is subjected to face organ block segmentation to obtain a corresponding face organ block image;
将所述人脸器官块图像进行预处理,并将预处理后的人脸器官块图像输入到预先训练的人脸遮挡检测模型中,以进行人脸遮挡检测,并输出对应的掩膜图像;Preprocessing the face organ block image, and inputting the preprocessed face organ block image into a pre-trained face occlusion detection model to perform face occlusion detection, and output a corresponding mask image;
根据所述目标掩膜图像的像素值情况计算各个人脸器官的遮挡比例。The occlusion ratio of each face organ is calculated according to the pixel value of the target mask image.
本申请第四方面提供了一种人脸遮挡检测系统,所述人脸遮挡检测系统包括:A fourth aspect of the present application provides a face occlusion detection system, where the face occlusion detection system includes:
获取模块,用于获取待检测的人脸图像;The acquisition module is used to acquire the face image to be detected;
第一检测模块,用于将所述人脸图像进行关键点检测,得到所述人脸图像中人脸器官的关键点信息;a first detection module, configured to perform key point detection on the face image to obtain key point information of the face organs in the face image;
分割模块,用于根据所述关键点信息,将所述人脸图像进行人脸器官块分割,得到对应的人脸器官块图像;a segmentation module, configured to perform facial organ block segmentation on the face image according to the key point information to obtain a corresponding face organ block image;
第二检测模块,用于将所述人脸器官块图像进行预处理,并将预处理后的人脸器官块图像输入到预先训练的人脸遮挡检测模型中,以进行人脸遮挡检测,并输出对应的掩膜图像;The second detection module is used to preprocess the face organ block image, and input the preprocessed face organ block image into a pre-trained face occlusion detection model to perform face occlusion detection, and Output the corresponding mask image;
处理模块,用于将所述掩膜图像进行二值化处理,得到所述二值化的目标掩膜图像;a processing module, configured to perform binarization processing on the mask image to obtain the binarized target mask image;
计算模块,用于根据所述目标掩膜图像的像素值情况计算各个人脸器官的遮挡比例。The calculation module is configured to calculate the occlusion ratio of each face organ according to the pixel value of the target mask image.
本申请提供的一种人脸遮挡检测方法、系统、计算机设备及计算机可读存储介质,通过获取待检测的人脸图像;将所述人脸图像进行关键点检测,得到所述人脸图像中人脸器官的关键点信息;根据所述关键点信息,将所述人脸图像进行人脸器官块分割,得到对应的人脸器官块图像;将所述人脸器官块图像进行预处理,并将预处理后的人脸器官块图像输入到预先训练的人脸遮挡检测模型中,以进行人脸遮挡检测,并输出对应的掩膜图像;根据所述目标掩膜图像的像素值情况计算各个人脸器官的遮挡比例。本申请通过将人脸器官作为块进行像素级的语义分割,能够精确计算出每个部位器官具体遮挡位置以及各个人脸器官的遮挡百分比,不仅减少了人脸遮挡检测的复杂度,而且人脸划分精确到各个人脸器官,大大提高了人脸遮挡检测的精确性。A face occlusion detection method, system, computer equipment and computer-readable storage medium provided by the present application, by acquiring a face image to be detected; key point information of face organs; according to the key point information, the face image is subjected to face organ block segmentation to obtain a corresponding face organ block image; the face organ block image is preprocessed, and Input the preprocessed face organ block image into the pre-trained face occlusion detection model to perform face occlusion detection, and output the corresponding mask image; calculate each pixel value according to the target mask image. Occlusion ratio of individual face organs. In this application, by using face organs as blocks to perform pixel-level semantic segmentation, the specific occlusion position of each part of the organ and the occlusion percentage of each face organ can be accurately calculated, which not only reduces the complexity of face occlusion detection, but also reduces the complexity of face occlusion detection. The division is accurate to each face organ, which greatly improves the accuracy of face occlusion detection.
附图说明Description of drawings
图1为本申请提供的人脸遮挡检测方法的步骤流程示意图;1 is a schematic flowchart of steps of a method for detecting face occlusion provided by the present application;
图2为本申请提供的图1中步骤S200的步骤细化流程示意图;FIG. 2 is a schematic flow chart of step refinement of step S200 in FIG. 1 provided by the present application;
图3为本申请提供的一种示意性的人脸器官块分割灰度图;FIG. 3 is a schematic grayscale image of facial organ block segmentation provided by the application;
图4为本申请提供的图1中步骤S300的步骤细化流程示意图;FIG. 4 is a schematic flowchart of step refinement of step S300 in FIG. 1 provided by the present application;
图5为本申请提供的一种示意性的人脸器官块分割效果图;Fig. 5 is a kind of schematic facial organ block segmentation rendering effect diagram provided by this application;
图6为本申请提供的图1中步骤S400的步骤细化流程示意图;FIG. 6 is a schematic flowchart of step refinement of step S400 in FIG. 1 provided by the present application;
图7为本申请提供的图1中步骤S500的步骤细化流程示意图;FIG. 7 is a schematic flowchart of step refinement of step S500 in FIG. 1 provided by the present application;
图8为本申请提供的人脸遮挡检测方法中人脸遮挡检测模型训练方法的步骤细化流程示意图;8 is a schematic flow chart of step refinement of the training method for a face occlusion detection model in the face occlusion detection method provided by the present application;
图9为本申请提供的图1中步骤S600的步骤细化流程示意图;FIG. 9 is a schematic flowchart of step refinement of step S600 in FIG. 1 provided by the present application;
图10为本申请提供的人脸遮挡检测系统的一种可选的程序模块示意图;10 is a schematic diagram of an optional program module of the face occlusion detection system provided by the application;
图11为本申请提供的计算机设备的一种可选的硬件架构示意图。FIG. 11 is a schematic diagram of an optional hardware architecture of the computer device provided by the present application.
具体实施方式Detailed ways
本申请实施例提供了一种人脸遮挡检测方法、系统、设备及存储介质,通过将人脸器官作为块进行像素级的语义分割,能够精确计算出每个部位器官具体遮挡位置以及各个人脸器官的遮挡百分比,不仅减少了人脸遮挡检测的复杂度,而且人脸划分精确到各个人脸器官,大大提高了人脸遮挡检测的精确性。The embodiments of the present application provide a face occlusion detection method, system, device, and storage medium. By using face organs as blocks to perform pixel-level semantic segmentation, the specific occlusion position of each part and organ and each face can be accurately calculated. The occlusion percentage of organs not only reduces the complexity of face occlusion detection, but also the face division is accurate to each face organ, which greatly improves the accuracy of face occlusion detection.
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”或“具有”及其任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second", "third", "fourth", etc. (if any) in the description and claims of this application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It is to be understood that data so used may be interchanged under appropriate circumstances so that the embodiments described herein can be practiced in sequences other than those illustrated or described herein. Furthermore, the terms "comprising" or "having" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those expressly listed steps or units, but may include other steps or units not expressly listed or inherent to these processes, methods, products or devices.
下面结合附图对本申请实施例进行说明。The embodiments of the present application will be described below with reference to the accompanying drawings.
实施例一Example 1
参阅图1,示出了本申请实施例提供的一种人脸遮挡检测方法的步骤流程示意图。可以理解,本申请实施例中的流程图不用于对执行步骤的顺序进行限定。下面以计算机设备为执行主体进行示例性描述,所述计算机设备可以包括诸如智能手机、平板个人计算机(tablet personal computer)、膝上型计算机(laptop computer)等移动终端,以及诸如台式计算机等固定终端。具体如下:Referring to FIG. 1 , a schematic flowchart of steps of a face occlusion detection method provided by an embodiment of the present application is shown. It can be understood that the flowcharts in the embodiments of the present application are not used to limit the order of executing steps. The following is an exemplary description with a computer device as the execution subject, and the computer device may include mobile terminals such as smart phones, tablet personal computers, laptop computers, etc., as well as fixed terminals such as desktop computers. . details as follows:
步骤S100,获取待检测的人脸图像。Step S100, acquiring a face image to be detected.
具体地,模型获取待检测的人脸图像可通过摄像设备进行人脸拍照、视频监控设备对人脸进行抓拍以及网络爬虫抓取等方式获取。Specifically, the face image to be detected by the model can be obtained by taking a photo of the face by a camera device, capturing a face by a video monitoring device, and capturing by a web crawler.
步骤S200,将所述人脸图像进行关键点检测,得到所述人脸图像中人脸器官的关键点信息。Step S200, performing key point detection on the face image to obtain key point information of the face organs in the face image.
具体地,通过将所述待检测的人脸图像输入到预设的关键点模型中进行关键点检测,得到对应的关键点信息,从而确定人脸器官的关键点信息。Specifically, key point detection is performed by inputting the face image to be detected into a preset key point model, and corresponding key point information is obtained, thereby determining the key point information of the face organs.
在示例性的实施例中,如图2所示,为所述步骤200的细化流程图,所述步骤200可以包括:In an exemplary embodiment, as shown in FIG. 2, which is a detailed flowchart of the step 200, the step 200 may include:
步骤S201,将所述人脸图像输入到预设的关键点模型中进行所述关键点检测,得到所述人脸图像在二维平面上预设数量的关键点信息,其中,所述关键点信息包括关键点坐标和关键点所对应的序号;Step S201, inputting the face image into a preset key point model to perform the key point detection, to obtain a preset number of key point information on the two-dimensional plane of the face image, wherein the key point The information includes the coordinates of the key points and the serial numbers corresponding to the key points;
步骤S202,根据所述预设数量的关键点信息以及各个人脸器官在所述人脸图像的位置,确定所述各个人脸器官的关键点信息,其中,所述人脸器官包括额头、左眉毛、右眉毛、左眼睛、右眼睛、鼻子以及嘴巴。Step S202, according to the preset number of key point information and the position of each face organ in the face image, determine the key point information of each face organ, wherein the face organ includes forehead, left Eyebrows, right eyebrows, left eye, right eye, nose and mouth.
具体地,将所述待检测的人脸图像输入到预设的关键点模型中进行关键点检测和标定,在所述待检测的人脸图像上标记出68个关键点,同时将关键点所对应的序号也标注出来,得到对应的关键点信息,确定对应的人脸器官坐标点信息。Specifically, the face image to be detected is input into a preset key point model for key point detection and calibration, 68 key points are marked on the face image to be detected, and the The corresponding serial number is also marked, and the corresponding key point information is obtained to determine the corresponding face organ coordinate point information.
示例性的,如图3所示,图3为一种示意性的人脸器官块(Patch)分割灰度图。以左眼为例,关键点坐标对应的序号分别为36、37、38、39、40、41,关键点坐标所围成的区域代表左眼。以额头为例,左眉毛的关键点坐标对应的序号分别为17、18、19、20、21,右眉毛的关键点坐标对应的序号分别为22、23、24、25、26,其中,序号19和序号24这两点所在的水平线作为额头下边界,以所述两点所在的水平线为基准,取向上延伸五分之一的人脸框高度作为额头上边界,额头左右边界分别为序号17和序号26对应的垂直线, 形成的矩形区域作为额头。其中,人脸框高度为眉毛的关键点坐标中最大的点到人脸轮廓的关键点坐标中最小的点之间的距离。Exemplarily, as shown in FIG. 3 , FIG. 3 is a schematic grayscale image of facial organ block (Patch) segmentation. Taking the left eye as an example, the serial numbers corresponding to the coordinates of the key points are 36, 37, 38, 39, 40, and 41, respectively, and the area enclosed by the coordinates of the key points represents the left eye. Taking the forehead as an example, the serial numbers corresponding to the key point coordinates of the left eyebrow are 17, 18, 19, 20, and 21, respectively, and the serial numbers corresponding to the key point coordinates of the right eyebrow are 22, 23, 24, 25, and 26. Among them, the serial number The horizontal line where the two points 19 and 24 are located is used as the lower boundary of the forehead. Based on the horizontal line where the two points are located, the height of the face frame extending one-fifth of the orientation is used as the upper boundary of the forehead, and the left and right boundaries of the forehead are respectively the serial number 17. The vertical line corresponding to the serial number 26 forms a rectangular area as the forehead. The height of the face frame is the distance between the largest point in the key point coordinates of the eyebrows and the smallest point in the key point coordinates of the face contour.
请继续参阅图3,人脸脸颊也可以通过这个68个关键点信息划分出来,以左脸颊为例,关键点坐标对应的序号分别为1、2、3、4、5、6、7、31、40、41、48,这11个关键点围成的区域即为左脸颊。人脸轮廓也可以通过这个68个关键点信息划分出来,关键点坐标对应的序号分别为0、1、2、3、4、5、6、7、8、9、10、11、12、13、14、15、16、17、18、19、20、21、22、23、24、25、26,这27个关键点围成的区域即为人脸轮廓。Please continue to refer to Figure 3. The human cheek can also be divided by the 68 key point information. Taking the left cheek as an example, the sequence numbers corresponding to the key point coordinates are 1, 2, 3, 4, 5, 6, 7, 31 respectively. , 40, 41, 48, the area enclosed by these 11 key points is the left cheek. The face contour can also be divided by the 68 key point information. The serial numbers corresponding to the key point coordinates are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13. , 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, the area surrounded by these 27 key points is the face contour.
本申请实施例通过对人脸图像进行关键点检测,得到人脸图像的关键点信息,从而精确地得到对应的人脸器官。The embodiment of the present application obtains the key point information of the face image by performing key point detection on the face image, thereby accurately obtaining the corresponding face organs.
步骤S300,根据所述关键点信息,将所述人脸图像进行人脸器官Patch分割,得到对应的人脸器官Patch图像。Step S300, according to the key point information, perform face organ Patch segmentation on the face image to obtain a corresponding face organ Patch image.
具体地,根据由关键点模型检测出来的关键点信息以及预设的划分规则,对人脸图像进行Patch分割,取包含各个人脸器官的最小外接矩形区域,得到对应的人脸器官Patch图像。Specifically, according to the key point information detected by the key point model and the preset division rules, the face image is patched, and the minimum circumscribed rectangular area containing each face organ is taken to obtain the corresponding face organ Patch image.
在示例性的实施例中,如图4所示,为所述步骤S300的细化流程图,所述步骤S300可以包括:In an exemplary embodiment, as shown in FIG. 4 , which is a detailed flowchart of the step S300, the step S300 may include:
步骤S301,根据所述关键点信息以及预设的划分规则,确定各个人脸器官对应的最小外接矩形。Step S301, according to the key point information and a preset division rule, determine the minimum circumscribed rectangle corresponding to each face organ.
步骤S302,根据各个人脸器官对应的最小外接矩形,对所述人脸图像进行Patch分割,得到各个人脸器官对应的人脸器官Patch图像。Step S302, according to the minimum circumscribed rectangle corresponding to each face organ, perform Patch segmentation on the face image to obtain a face organ Patch image corresponding to each face organ.
具体地,根据所述关键点信息,设计一套划分规则,规则如下:根据关键点坐标围成的区域以及关键点所对应的序号,确定所述人脸器官的具体位置。由于多边形计算比较冗余且对遮挡判断的判别意义不大,故根据所述人脸器官最上、最下、最左及最右的坐标点,确定所述人脸器官的最小外接矩形,作为人脸器官Patch图像提取出来,以便计算。Specifically, according to the key point information, a set of division rules is designed, and the rules are as follows: according to the area enclosed by the key point coordinates and the sequence number corresponding to the key point, the specific position of the face organ is determined. Since polygon calculation is relatively redundant and the discrimination of occlusion judgment is of little significance, according to the uppermost, lowermost, leftmost and rightmost coordinate points of the face organ, the minimum circumscribed rectangle of the face organ is determined as the human face. The face organ Patch image is extracted for calculation.
请继续参阅图3,以左眼为例,关键点坐标对应的序号分别为36、37、38、39、40、41,关键点坐标所围成的区域代表左眼,根据所述关键点坐标,取能够包含左眼的最小矩形作为左眼Patch。人脸脸颊也可以通过这个68个关键点信息划分出来,以左脸颊为例,关键点坐标对应的序号分别为1、2、3、4、5、6、7、31、40、41、48,这11个关键点坐标所围成的区域代表左脸颊,根据所述关键点坐标,取能够包含左脸颊的最小矩形作为左脸颊Patch。人脸轮廓也可以通过这个68个关键点信息划分出来,通过关键点坐标对应的序号0、8、16、19、24取最小矩形作为人脸轮廓Patch。Please continue to refer to Figure 3, taking the left eye as an example, the serial numbers corresponding to the key point coordinates are 36, 37, 38, 39, 40, 41, respectively, and the area surrounded by the key point coordinates represents the left eye. According to the key point coordinates , take the smallest rectangle that can contain the left eye as the left eye Patch. The human cheek can also be divided by the 68 key point information. Taking the left cheek as an example, the sequence numbers corresponding to the key point coordinates are 1, 2, 3, 4, 5, 6, 7, 31, 40, 41, 48 , the area enclosed by these 11 key point coordinates represents the left cheek. According to the key point coordinates, the smallest rectangle that can contain the left cheek is taken as the left cheek Patch. The face contour can also be divided by the 68 key point information, and the smallest rectangle is taken as the face contour Patch through the serial numbers 0, 8, 16, 19, and 24 corresponding to the key point coordinates.
本申请实施例通过取人脸器官的最小外接区域作为人脸器官Patch图像,对比传统多边形计算减少了计算的繁琐性,更加便于对人脸器官遮挡比例的计算。In the embodiment of the present application, by taking the minimum circumscribed area of a face organ as the face organ Patch image, the complexity of calculation is reduced compared with the traditional polygon calculation, and the calculation of the occlusion ratio of the face organ is more convenient.
步骤S400,将所述人脸器官Patch图像进行预处理,并将预处理后的人脸器官Patch图像输入到预先训练的人脸遮挡检测模型中,以进行人脸遮挡检测,并输出对应的掩膜(mask)图像。Step S400, preprocessing the face organ Patch image, and inputting the preprocessed face organ Patch image into a pre-trained face occlusion detection model to perform face occlusion detection, and output the corresponding mask. Mask image.
具体地,先将划分好的人脸器官Patch图像进行预处理,以得到能用于人脸遮挡检测模型的图像,在通过预先对人脸遮挡检测模型进行训练后,将预处理完的图像输入人脸遮挡检测模型中进行人脸遮挡检测,从而输出对应的mask图像。Specifically, first preprocess the divided face organ Patch images to obtain images that can be used for the face occlusion detection model. After pre-training the face occlusion detection model, the preprocessed images are input Face occlusion detection is performed in the face occlusion detection model to output the corresponding mask image.
示例性的,如图5所示,图5为一种示意性的人脸器官Patch分割效果图。图5左边的图像为预处理后的人脸输入图像,图5右边为人脸遮挡检测模型输出的mask图像。其中,图5右边黑色部分为背景,白色部分为人脸区域。Exemplarily, as shown in FIG. 5 , FIG. 5 is a schematic effect diagram of a face organ Patch segmentation. The image on the left of Figure 5 is the preprocessed face input image, and the right side of Figure 5 is the mask image output by the face occlusion detection model. Among them, the black part on the right side of Figure 5 is the background, and the white part is the face area.
在示例性的实施例中,如图6所示,为所述步骤S400的细化步骤流程图,所述步骤 S400可以包括:In an exemplary embodiment, as shown in FIG. 6 , which is a flow chart of the refinement steps of the step S400, the step S400 may include:
步骤S401,将所述人脸器官Patch图像进行填充并对填充后的图像进行尺寸的调整,得到对应尺寸的方形Patch图像。Step S401: Fill the face organ Patch image and adjust the size of the filled image to obtain a square Patch image of the corresponding size.
步骤S402,将所述方形Patch图像输入到所述预先训练的人脸遮挡检测模型中进行人脸遮挡检测,得到所述对应的mask图像。Step S402: Input the square patch image into the pre-trained face occlusion detection model to perform face occlusion detection to obtain the corresponding mask image.
具体地,调用函数Padding 0将所述人脸器官Patch图像区域填充为方形,然后调用函数resize将所述人脸器官Patch图像区域的大小调整为128*128,得到128*128的方形Patch图像。Specifically, call the function Padding 0 to fill the face organ Patch image area into a square, and then call the function resize to adjust the size of the face organ Patch image area to 128*128 to obtain a 128*128 square Patch image.
具体地,如表1所示,为人脸遮挡检测模型的网络结构表。所述方形Patch图像先经过人脸遮挡检测模型的左半部分,即第一层到第四层,进行特征提取,这属于下采样阶段;然后经过人脸遮挡检测模型的右半部分,即第5、7、10层,这属于上采样阶段,此阶段涉及不同尺度的特征图进行融合,融合方式如表1所示的函数Concat操作,将特征图厚度累加;最后一层是一个filter(滤波器),大小为1*1*128,深度为1,经过该层卷积后人脸遮挡检测模型输出一个大小为128*128的mask图像。Specifically, as shown in Table 1, it is the network structure table of the face occlusion detection model. The square patch image first passes through the left half of the face occlusion detection model, namely the first layer to the fourth layer, for feature extraction, which belongs to the downsampling stage; then passes through the right half of the face occlusion detection model, that is, the first layer. Layers 5, 7, and 10 belong to the upsampling stage. This stage involves the fusion of feature maps of different scales. The fusion method is as shown in Table 1. The function Concat operation is used to accumulate the thickness of the feature maps; the last layer is a filter (filtering). device), the size is 1*1*128, and the depth is 1. After this layer of convolution, the face occlusion detection model outputs a mask image with a size of 128*128.
本申请实施例通过将人脸器官Patch图像预处理后输入到人脸遮挡检测模型,然后通过特征提取、图像融合以及卷积等操作,得到人脸器官的mask图像,从而精确地将人脸器官、皮肤与遮挡物区分开,使计算人脸器官遮挡比例结果更为精准。In the embodiment of the present application, the face organ Patch image is preprocessed and input to the face occlusion detection model, and then the mask image of the face organ is obtained through operations such as feature extraction, image fusion, and convolution, so as to accurately identify the face organ , The skin is separated from the occluder, which makes the calculation result of the occlusion ratio of the face organs more accurate.
表1Table 1
Figure PCTCN2021082571-appb-000001
Figure PCTCN2021082571-appb-000001
Figure PCTCN2021082571-appb-000002
Figure PCTCN2021082571-appb-000002
步骤S500,将所述mask图像进行二值化处理,得到所述二值化的目标mask图像。Step S500, performing binarization processing on the mask image to obtain the binarized target mask image.
具体地,将所述mask图像先进行灰度化处理,得到对应的灰度图像,然后根据预设像素阈值,将获取的灰度图像进行二值化处理,得到所述二值化的目标mask图像。Specifically, the mask image is first subjected to grayscale processing to obtain a corresponding grayscale image, and then the obtained grayscale image is subjected to binarization processing according to a preset pixel threshold to obtain the binarized target mask image.
在示例性的实施例中,如图7所示,所述步骤500可以包括:In an exemplary embodiment, as shown in FIG. 7 , the step 500 may include:
步骤S501,将所述mask图像进行图像的灰度化处理,得到灰度图像;Step S501, performing grayscale processing on the mask image to obtain a grayscale image;
步骤S502,将所述灰度图像各个像素点的像素值与预设像素阈值进行比较;Step S502, comparing the pixel value of each pixel of the grayscale image with a preset pixel threshold;
步骤S503,当所述像素点的像素值高于所述预设像素阈值时,则将所述像素点的像素值设置为预设像素值;Step S503, when the pixel value of the pixel point is higher than the preset pixel threshold, the pixel value of the pixel point is set to a preset pixel value;
步骤S504,完成对所述mask图像的二值化处理,得到所述二值化的目标mask图像。Step S504, complete the binarization processing of the mask image, and obtain the binarized target mask image.
具体地,通过将所述mask图像进行二值化处理,使所述mask图像每个像素点都处于0到1之间,设置预设像素阈值为0.75,将大于预设像素阈值的像素点置为1(代表遮挡域),其他像素点置为0(代表非遮挡域),得到所述二值化的目标mask图像。其中,预设像素阈值可以根据实际情况自由设置,在此不作限定。Specifically, the mask image is binarized so that each pixel of the mask image is between 0 and 1, the preset pixel threshold is set to 0.75, and the pixels larger than the preset pixel threshold are set to is 1 (representing an occlusion area), and other pixels are set to 0 (representing a non-occlusion area) to obtain the binarized target mask image. The preset pixel threshold can be freely set according to the actual situation, which is not limited here.
本申请实施例通过将所述mask图像进行二值化处理,得到所述二值化的目标mask图像,使得图像中的目标人脸区域与背景区分开,使模型的结果更具精确性。In the embodiment of the present application, the binarized target mask image is obtained by performing a binarization process on the mask image, so that the target face region in the image is distinguished from the background, and the result of the model is more accurate.
在示例性的实施例中,如图8所示,为示例性的所述人脸遮挡检测模型的训练方法的步骤流程图。所述人脸遮挡检测模型的训练方法包括:In an exemplary embodiment, as shown in FIG. 8 , it is an exemplary flowchart of steps of the training method of the face occlusion detection model. The training method of the face occlusion detection model includes:
步骤S511,获取人脸训练图像样本以及遮挡物样本;Step S511, obtaining face training image samples and occluder samples;
步骤S512,将所述人脸训练图像样本进行关键点检测,得到所述人脸训练图像样本中人脸器官的关键点信息;Step S512, performing key point detection on the face training image sample to obtain key point information of the face organs in the face training image sample;
步骤S513,根据所述关键点信息,将所述人脸训练图像样本进行人脸器官Patch分割,得到对应的人脸器官Patch图像;Step S513, according to the key point information, perform face organ Patch segmentation on the face training image sample to obtain a corresponding face organ Patch image;
步骤S514,将所述遮挡物样本随机添加到所述人脸器官Patch图像的预设位置上,以将所述人脸器官Patch图像的所述预设位置的像素替换为所述遮挡物样本的像素,得到人脸遮挡物训练图像样本;Step S514, randomly adding the occluder sample to the preset position of the face organ Patch image, to replace the pixels of the preset position of the face organ Patch image with the pixel of the occluder sample. pixels, get face occluder training image samples;
步骤S515,将所述人脸遮挡物训练图像样本进行预处理,并将预处理后的人脸器官Patch图像输入到人脸遮挡检测模型中,完成对所述人脸遮挡检测模型的训练。Step S515, preprocessing the face occlusion training image sample, and inputting the preprocessed face organ Patch image into the face occlusion detection model to complete the training of the face occlusion detection model.
具体地,将所述人脸训练图像样本通过关键点模型进行关键点检测,得到所述人脸训练图像样本中人脸器官的关键点信息,然后根据所述关键点信息,将所述人脸训练图像样本进行人脸器官Patch分割,得到对应的人脸器官Patch图像,将所述遮挡物样本随机添加到所述人脸器官Patch图像的预设位置上,以将所述人脸器官Patch图像的所述预设位置的像素替换为所述遮挡物样本的像素,得到人脸遮挡物训练图像样本,并将所述遮挡物样本所添加的区域像素值替换为所述遮挡物样本的像素值。其中,所述遮挡物样本通过网络爬虫抓取以及通过自行拍摄并提取得到,包括手指、笔、扇子、杯子、口罩、化妆品以及话筒等。Specifically, the key point detection is performed on the face training image sample through a key point model to obtain key point information of the face organs in the face training image sample, and then according to the key point information, the face The training image sample is subjected to face organ Patch segmentation to obtain a corresponding face organ Patch image, and the occluder sample is randomly added to the preset position of the face organ Patch image, so that the face organ Patch image is The pixels of the preset position are replaced with the pixels of the occluder samples, and the training image samples of face occluders are obtained, and the pixel values of the regions added by the occluder samples are replaced by the pixel values of the occluder samples. . Wherein, the occlusion samples are captured by web crawlers and captured and extracted by themselves, including fingers, pens, fans, cups, masks, cosmetics, microphones, and the like.
示例性的,假设遮挡物样本添加在所述人脸训练图像样本上的区域在二维平面上的坐标为[x1:x2,y1:y2],其中,x1,x2,y1,y2分别对应人脸器官在mask图像中的横坐标x1,x2以及纵坐标y1,y2。先初始化一个大小为128*128的全零矩阵L,然后将[x1:x2,y1:y2]区域的像素全部修改为1,修改后的矩阵就是训练中用的监督label(标签)。Exemplarily, it is assumed that the coordinates on the two-dimensional plane of the region where the occluder samples are added to the face training image samples are [x1:x2, y1:y2], where x1, x2, y1, and y2 correspond to people, respectively. The abscissas x1, x2 and y1, y2 of the face organs in the mask image. First initialize an all-zero matrix L with a size of 128*128, and then modify all the pixels in the [x1:x2,y1:y2] area to 1. The modified matrix is the supervision label used in training.
具体地,所述人脸遮挡检测模型通过分割损失函数IOU Loss进行训练,使所述人脸器 官patch图像上的像素值和所述全零矩阵L上对应位置的像素值更加接近,即有遮挡物的区域像素值接近1,其他区域的像素值接近0,然后采用深度学习常用的梯度下降法进行训练,直到所述人脸遮挡检测模型收敛,即Loss值不再下降,此时所述人脸遮挡检测模型输出的mask图像的像素值无限接近所述监督label的像素值,完成训练。其中,函数Loss为常用的分割损失函数IOU loss,是根据所述mask图像和所述全零矩阵L进行计算的。Specifically, the face occlusion detection model is trained by the segmentation loss function IOU Loss, so that the pixel value on the face organ patch image is closer to the pixel value at the corresponding position on the all-zero matrix L, that is, there is occlusion The pixel value of the area of the object is close to 1, and the pixel value of other areas is close to 0, and then the gradient descent method commonly used in deep learning is used for training until the face occlusion detection model converges, that is, the Loss value no longer decreases. The pixel value of the mask image output by the face occlusion detection model is infinitely close to the pixel value of the supervision label, and the training is completed. Among them, the function Loss is a commonly used segmentation loss function IOU loss, which is calculated according to the mask image and the all-zero matrix L.
本申请实施例通过随机添加各种类型的遮挡物到人脸训练图像样本的随机人脸区域中,再将大量人脸遮挡物训练图像样本输入到人脸遮挡检测模型中进行训练,使人脸遮挡检测模型对遮挡物的检测越来越灵敏,达到不论什么遮挡物都能检测出来的效果。In the embodiment of the present application, various types of occluders are randomly added to the random face area of the face training image sample, and then a large number of face occlusion training image samples are input into the face occlusion detection model for training, so that the face The occlusion detection model is becoming more and more sensitive to the detection of occlusions, so as to achieve the effect of detecting any occlusions.
步骤S600,根据所述目标mask图像的像素值情况计算各个人脸器官的遮挡比例。Step S600: Calculate the occlusion ratio of each face organ according to the pixel value of the target mask image.
具体地,将所述目标mask图像的像素值与预设像素阈值做比较,并将所有高于预设像素阈值的点统计出来,进而计算各个人脸器官的遮挡比例。Specifically, the pixel value of the target mask image is compared with the preset pixel threshold, and all points higher than the preset pixel threshold are counted, and then the occlusion ratio of each face organ is calculated.
在示例性的实施例中,如图9所示,所述步骤600可以包括:In an exemplary embodiment, as shown in FIG. 9 , the step 600 may include:
步骤S601,根据所述目标mask图像的像素值情况,统计各个人脸器官中所述预设像素值的个数,得到遮挡像素总数;Step S601, according to the pixel value situation of the target mask image, count the number of the preset pixel values in each face organ, and obtain the total number of occlusion pixels;
步骤S602,根据所述遮挡像素总数,计算所述遮挡像素总数对应人脸器官总像素值个数的比值,得到所述各个人脸器官的遮挡比例。Step S602, according to the total number of occluded pixels, calculate the ratio of the total number of occluded pixels corresponding to the total number of pixel values of face parts, and obtain the occlusion ratio of each face part.
具体地,根据所述目标mask图像的像素值情况,计算各个人脸器官Patch图像对应的mask图像像素值为预设像素阈值所占的比例,即为该人脸器官遮挡百分比。器官遮挡百分比的计算公式如下所示:Specifically, according to the pixel value of the target mask image, the ratio of the pixel value of the mask image corresponding to each face organ Patch image to the preset pixel threshold is calculated, that is, the face organ occlusion percentage. The formula for calculating the percentage of organ occlusion is as follows:
Figure PCTCN2021082571-appb-000003
Figure PCTCN2021082571-appb-000003
其中,公式中,x1,y1是人脸器官在mask图像中的左上角坐标位置,h和w分别对应人脸器官在mask图像中的高和宽,σ ij代表二值化后的mask图像中(i,j)位置的像素值,
Figure PCTCN2021082571-appb-000004
表示如果mask图像中(i,j)这个坐标对应的像素是1,则取1,否则取0。
Among them, in the formula, x1, y1 are the coordinate positions of the upper left corner of the face organ in the mask image, h and w correspond to the height and width of the face organ in the mask image, respectively, σ ij represents the binarized mask image. The pixel value at position (i, j),
Figure PCTCN2021082571-appb-000004
Indicates that if the pixel corresponding to the (i, j) coordinate in the mask image is 1, take 1, otherwise take 0.
本申请实施例提供的人脸遮挡检测方法,通过对人脸图像进行关键点检测,得到对应人脸器官的关键点信息,从而对人脸器官进行Patch分割,得到对应的人脸器官Patch图像,再经过预处理后输入到预先训练好的人脸遮挡检测模型中进行人脸检测,得到所述对应的mask图像,最后进行计算得到对应的人脸器官遮挡比例。不仅减少了人脸遮挡检测的复杂度,而且人脸划分精确到各个人脸器官,大大提高了人脸遮挡检测的精确性。In the face occlusion detection method provided by the embodiments of the present application, the key point information of the corresponding face organ is obtained by performing key point detection on the face image, so as to perform Patch segmentation on the face organ to obtain the corresponding face organ Patch image, After preprocessing, it is input into the pre-trained face occlusion detection model for face detection, and the corresponding mask image is obtained, and finally the corresponding facial organ occlusion ratio is obtained by calculation. Not only the complexity of face occlusion detection is reduced, but also the face division is accurate to each face organ, which greatly improves the accuracy of face occlusion detection.
实施例二Embodiment 2
参阅图10,示出了本申请实施例之一种人脸遮挡检测系统700的程序模块示意图。所述人脸遮挡检测系统700可以应用于计算机设备中,所述计算机设备可以是手机、平板个人计算机(tablet personal computer)、膝上型计算机(laptop computer)、等具有数据传输功能的设备。在本申请实施例中,所述人脸遮挡检测系统700可以包括或被分割成一个或多个程序模块,一个或者多个程序模块被存储于存储介质中,并由一个或多个处理器所执行,以完成本申请实施例,并可实现上述人脸遮挡检测系统700。本申请实施例所称的程序模块是指能够完成特定功能的一系列计算机程序指令段,比程序本身更适合于描述所述人脸遮挡检测系统700在存储介质中的执行过程。在示例性的实施例中,该人脸遮挡检测系统 700包括获取模块701、第一检测模块702、分割模块703、第二检测模块704、处理模块705及计算模块706。以下描述将具体介绍本申请实施例各程序模块的功能:Referring to FIG. 10 , a schematic diagram of program modules of a face occlusion detection system 700 according to an embodiment of the present application is shown. The face occlusion detection system 700 can be applied to computer equipment, and the computer equipment can be a mobile phone, a tablet personal computer, a laptop computer, or other equipment with a data transmission function. In this embodiment of the present application, the face occlusion detection system 700 may include or be divided into one or more program modules, and one or more program modules are stored in a storage medium and processed by one or more processors. Executed to complete the embodiments of the present application, and the above-mentioned face occlusion detection system 700 can be implemented. The program modules referred to in the embodiments of the present application refer to a series of computer program instruction segments capable of completing specific functions, and are more suitable for describing the execution process of the face occlusion detection system 700 in the storage medium than the programs themselves. In an exemplary embodiment, the face occlusion detection system 700 includes an acquisition module 701, a first detection module 702, a segmentation module 703, a second detection module 704, a processing module 705 and a calculation module 706. The following description will specifically introduce the functions of each program module in the embodiments of the present application:
获取模块701,用于获取待检测的人脸图像。The acquiring module 701 is used for acquiring the face image to be detected.
具体地,所述获取模块701在模型获取待检测的人脸图像可通过摄像设备进行人脸拍照、视频监控设备对人脸进行抓拍以及网络爬虫抓取等方式获取。Specifically, the acquisition module 701 acquires the face image to be detected in the model by taking a photo of the face by a camera device, capturing a face by a video monitoring device, and capturing by a web crawler.
第一检测模块702,用于将所述人脸图像进行关键点检测,得到所述人脸图像中人脸器官的关键点信息。The first detection module 702 is configured to perform key point detection on the face image to obtain key point information of the face organs in the face image.
具体地,所述第一检测模块702在通过将所述待检测的人脸图像输入到预设的关键点模型中进行关键点检测,得到对应的关键点信息,从而确定人脸器官的关键点信息。Specifically, the first detection module 702 performs key point detection by inputting the face image to be detected into a preset key point model to obtain corresponding key point information, thereby determining the key points of the face organs information.
在示例性的实施例中,所述第一检测模块702具体用于:In an exemplary embodiment, the first detection module 702 is specifically configured to:
将所述人脸图像输入到预设的关键点模型中进行所述关键点检测,得到所述人脸图像在二维平面上预设数量的关键点信息,其中,所述关键点信息包括关键点坐标和关键点所对应的序号;Input the face image into a preset key point model to perform the key point detection, and obtain a preset number of key point information on the two-dimensional plane of the face image, wherein the key point information includes key points. Point coordinates and serial numbers corresponding to key points;
根据所述预设数量的关键点信息以及各个人脸器官在所述人脸图像的位置,确定所述各个人脸器官的关键点信息,其中,所述人脸器官包括额头、左眉毛、右眉毛、左眼睛、右眼睛、鼻子以及嘴巴。Determine the key point information of each face organ according to the preset number of key point information and the position of each face organ in the face image, wherein the face organ includes forehead, left eyebrow, right Eyebrows, left eye, right eye, nose and mouth.
具体地,将所述待检测的人脸图像输入到预设的关键点模型中进行关键点检测和标定,在所述待检测的人脸图像上标记出68个关键点,同时将关键点所对应的序号也标注出来,得到对应的关键点信息,确定对应的人脸器官坐标点信息。Specifically, the face image to be detected is input into a preset key point model for key point detection and calibration, 68 key points are marked on the face image to be detected, and the The corresponding serial number is also marked, and the corresponding key point information is obtained to determine the corresponding face organ coordinate point information.
示例性的,如图3所示,图3为一种示意性的人脸器官Patch分割灰度图。以左眼为例,关键点坐标对应的序号分别为36、37、38、39、40、41,关键点坐标所围成的区域代表左眼。以额头为例,左眉毛的关键点坐标对应的序号分别为17、18、19、20、21,右眉毛的关键点坐标对应的序号分别为22、23、24、25、26,其中,序号19和序号24这两点所在的水平线作为额头下边界,以所述两点所在的水平线为基准,取向上延伸五分之一的人脸框高度作为额头上边界,额头左右边界分别为序号17和序号26对应的垂直线,形成的矩形区域作为额头。其中,人脸框高度为眉毛的关键点坐标中最大的点到人脸轮廓的关键点坐标中最小的点之间的距离。Exemplarily, as shown in FIG. 3 , FIG. 3 is a schematic grayscale image of a face organ Patch segmentation. Taking the left eye as an example, the serial numbers corresponding to the coordinates of the key points are 36, 37, 38, 39, 40, and 41, respectively, and the area enclosed by the coordinates of the key points represents the left eye. Taking the forehead as an example, the serial numbers corresponding to the key point coordinates of the left eyebrow are 17, 18, 19, 20, and 21, respectively, and the serial numbers corresponding to the key point coordinates of the right eyebrow are 22, 23, 24, 25, and 26. Among them, the serial number The horizontal line where the two points 19 and 24 are located is used as the lower boundary of the forehead. Based on the horizontal line where the two points are located, the height of the face frame extending one-fifth of the orientation is used as the upper boundary of the forehead, and the left and right boundaries of the forehead are respectively the serial number 17. The vertical line corresponding to serial number 26 forms a rectangular area as the forehead. The height of the face frame is the distance between the largest point in the key point coordinates of the eyebrows and the smallest point in the key point coordinates of the face contour.
请继续参阅图3,人脸脸颊也可以通过这个68个关键点信息划分出来,以左脸颊为例,关键点坐标对应的序号分别为1、2、3、4、5、6、7、31、40、41、48,这11个关键点围成的区域即为左脸颊。人脸轮廓也可以通过这个68个关键点信息划分出来,关键点坐标对应的序号分别为0、1、2、3、4、5、6、7、8、9、10、11、12、13、14、15、16、17、18、19、20、21、22、23、24、25、26,这27个关键点围成的区域即为人脸轮廓。Please continue to refer to Figure 3. The human cheek can also be divided by the 68 key point information. Taking the left cheek as an example, the sequence numbers corresponding to the key point coordinates are 1, 2, 3, 4, 5, 6, 7, 31 respectively. , 40, 41, 48, the area enclosed by these 11 key points is the left cheek. The face contour can also be divided by the 68 key point information. The serial numbers corresponding to the key point coordinates are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13. , 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, the area surrounded by these 27 key points is the face contour.
本申请实施例通过对人脸图像进行关键点检测,得到人脸图像的关键点信息,从而精确地得到对应的人脸器官。In the embodiment of the present application, the key point information of the face image is obtained by performing key point detection on the face image, thereby accurately obtaining the corresponding face organs.
分割模块703,用于根据所述关键点信息,将所述人脸图像进行人脸器官Patch分割,得到对应的人脸器官Patch图像。The segmentation module 703 is configured to perform face organ Patch segmentation on the face image according to the key point information to obtain a corresponding face organ Patch image.
具体地,所述分割模块703根据由关键点模型检测出来的关键点信息以及预设的划分规则,对人脸图像进行Patch分割,取包含各个人脸器官的最小外接矩形区域,得到对应的人脸器官Patch图像。Specifically, the segmentation module 703 performs Patch segmentation on the face image according to the key point information detected by the key point model and the preset division rules, and takes the smallest circumscribed rectangular area containing each face organ to obtain the corresponding human face Face Organ Patch Image.
在示例性的实施例中,所述分割模块703具体用于:In an exemplary embodiment, the segmentation module 703 is specifically used for:
根据所述关键点信息以及预设的划分规则,确定各个人脸器官对应的最小外接矩形;According to the key point information and the preset division rule, determine the minimum circumscribed rectangle corresponding to each face organ;
根据各个人脸器官对应的最小外接矩形,对所述人脸图像进行Patch分割,得到各个人脸器官对应的人脸器官Patch图像。Patch segmentation is performed on the face image according to the minimum circumscribed rectangle corresponding to each face organ to obtain a face organ Patch image corresponding to each face organ.
具体地,所述分割模块703根据所述关键点信息,设计一套划分规则,规则如下:根据关键点坐标围成的区域以及关键点所对应的序号,确定所述人脸器官的具体位置。由于多边形计算比较冗余且对遮挡判断的判别意义不大,故根据所述人脸器官最上、最下、最左及最右的坐标点,确定所述人脸器官的最小外接矩形,作为人脸器官Patch图像提取出来,以便计算。Specifically, the segmentation module 703 designs a set of division rules according to the key point information, and the rules are as follows: according to the area enclosed by the coordinates of the key points and the sequence numbers corresponding to the key points, the specific position of the facial organ is determined. Since polygon calculation is relatively redundant and the discrimination of occlusion judgment is of little significance, according to the uppermost, lowermost, leftmost and rightmost coordinate points of the face organ, the minimum circumscribed rectangle of the face organ is determined as the human face. The face organ Patch image is extracted for calculation.
请继续参阅图3,以左眼为例,关键点坐标对应的序号分别为36、37、38、39、40、41,关键点坐标所围成的区域代表左眼,根据所述关键点坐标,取能够包含左眼的最小矩形作为左眼Patch。人脸脸颊也可以通过这个68个关键点信息划分出来,以左脸颊为例,关键点坐标对应的序号分别为1、2、3、4、5、6、7、31、40、41、48,这11个关键点坐标所围成的区域代表左脸颊,根据所述关键点坐标,取能够包含左脸颊的最小矩形作为左脸颊Patch。人脸轮廓也可以通过这个68个关键点信息划分出来,通过关键点坐标对应的序号0、8、16、19、24取最小矩形作为人脸轮廓Patch。Please continue to refer to Figure 3, taking the left eye as an example, the serial numbers corresponding to the key point coordinates are 36, 37, 38, 39, 40, 41, respectively, and the area surrounded by the key point coordinates represents the left eye. According to the key point coordinates , take the smallest rectangle that can contain the left eye as the left eye Patch. The human cheek can also be divided by the 68 key point information. Taking the left cheek as an example, the sequence numbers corresponding to the key point coordinates are 1, 2, 3, 4, 5, 6, 7, 31, 40, 41, 48 , the area enclosed by the coordinates of these 11 key points represents the left cheek. According to the coordinates of the key points, the smallest rectangle that can contain the left cheek is taken as the left cheek Patch. The face contour can also be divided by the 68 key point information, and the smallest rectangle is taken as the face contour Patch through the serial numbers 0, 8, 16, 19, and 24 corresponding to the key point coordinates.
本申请实施例通过取人脸器官的最小外接区域作为人脸器官Patch图像,对比传统多边形计算减少了计算的繁琐性,更加便于对人脸器官遮挡比例的计算。In the embodiment of the present application, by taking the minimum circumscribed area of a face organ as the face organ Patch image, the complexity of calculation is reduced compared with the traditional polygon calculation, and the calculation of the occlusion ratio of the face organ is more convenient.
第二检测模块704,用于将所述人脸器官Patch图像进行预处理,并将预处理后的人脸器官Patch图像输入到预先训练的人脸遮挡检测模型中,以进行人脸遮挡检测,并输出对应的mask图像。The second detection module 704 is configured to preprocess the face organ Patch image, and input the preprocessed face organ Patch image into a pre-trained face occlusion detection model to perform face occlusion detection, And output the corresponding mask image.
具体地,所述第二检测模块704先将划分好的人脸器官Patch图像进行预处理,以得到能用于人脸遮挡检测模型的图像,在通过预先对人脸遮挡检测模型进行训练后,将预处理完的图像输入人脸遮挡检测模型中进行人脸遮挡检测,从而输出对应的mask图像。Specifically, the second detection module 704 first preprocesses the divided face organ Patch images to obtain images that can be used for the face occlusion detection model, and after pre-training the face occlusion detection model, Input the preprocessed image into the face occlusion detection model for face occlusion detection, so as to output the corresponding mask image.
示例性的,如图5所示,图5为一种示意性的人脸器官Patch分割效果图。图5左边的图像为预处理后的人脸输入图像,图5右边为人脸遮挡检测模型输出的mask图像。其中,图5右边黑色部分为背景,白色部分为人脸区域。Exemplarily, as shown in FIG. 5 , FIG. 5 is a schematic effect diagram of a face organ Patch segmentation. The image on the left of Figure 5 is the preprocessed face input image, and the right side of Figure 5 is the mask image output by the face occlusion detection model. Among them, the black part on the right side of Figure 5 is the background, and the white part is the face area.
在示例性的实施例中,所述第二检测模块704具体用于:In an exemplary embodiment, the second detection module 704 is specifically configured to:
将所述人脸器官Patch图像进行填充并对填充后的图像进行尺寸的调整,得到对应尺寸的方形Patch图像;Described face organ Patch image is filled and the image after filling is carried out size adjustment, obtains the square Patch image of corresponding size;
将所述方形Patch图像输入到所述预先训练的人脸遮挡检测模型中进行人脸遮挡检测,得到所述对应的mask图像。Inputting the square patch image into the pre-trained face occlusion detection model to perform face occlusion detection to obtain the corresponding mask image.
具体地,所述第二检测模块704调用函数Padding 0将所述人脸器官Patch图像区域填充为方形,然后调用函数resize将所述人脸器官Patch图像区域的大小调整为128*128,得到128*128的方形Patch图像。Specifically, the second detection module 704 calls the function Padding 0 to fill the face organ Patch image area into a square, and then calls the function resize to adjust the size of the face organ Patch image area to 128*128, obtaining 128 *128 square patch images.
具体地,如表1所示,为人脸遮挡检测模型的网络结构表。所述方形Patch图像先经过人脸遮挡检测模型的左半部分,即第一层到第四层,进行特征提取,这属于下采样阶段;然后经过人脸遮挡检测模型的右半部分,即第5、7、10层,这属于上采样阶段,此阶段涉及不同尺度的特征图进行融合,融合方式如表1所示的函数Concat操作,将特征图厚度累加;最后一层是一个filter(滤波器),大小为1*1*128,深度为1,经过该层卷积后人脸遮挡检测模型输出一个大小为128*128的mask图像。Specifically, as shown in Table 1, it is the network structure table of the face occlusion detection model. The square patch image first passes through the left half of the face occlusion detection model, namely the first layer to the fourth layer, for feature extraction, which belongs to the downsampling stage; then passes through the right half of the face occlusion detection model, that is, the first layer. Layers 5, 7, and 10 belong to the upsampling stage. This stage involves the fusion of feature maps of different scales. The fusion method is as shown in Table 1. The function Concat operation is used to accumulate the thickness of the feature maps; the last layer is a filter (filtering). device), the size is 1*1*128, and the depth is 1. After this layer of convolution, the face occlusion detection model outputs a mask image with a size of 128*128.
在示例性的实施例中,所述第二检测模块704将人脸器官Patch图像预处理后输入到人脸遮挡检测模型,然后通过特征提取、图像融合以及卷积等操作,得到人脸器官的mask图像,从而精确地将人脸器官、皮肤与遮挡物区分开,使计算人脸器官遮挡比例结果更为精准。In an exemplary embodiment, the second detection module 704 preprocesses the face organ Patch image and inputs it into the face occlusion detection model, and then obtains the face organ through operations such as feature extraction, image fusion, and convolution. mask image, so as to accurately distinguish face organs, skin and occluders, and make the calculation of the occlusion ratio of face organs more accurate.
表1Table 1
Figure PCTCN2021082571-appb-000005
Figure PCTCN2021082571-appb-000005
处理模块705,用于将所述mask图像进行二值化处理,得到所述二值化的目标mask图像。The processing module 705 is configured to perform binarization processing on the mask image to obtain the binarized target mask image.
具体地,所述处理模块705将所述mask图像先进行灰度化处理,得到对应的灰度图像,然后根据预设像素阈值,将获取的灰度图像进行二值化处理,得到所述二值化的目标mask图像。Specifically, the processing module 705 first performs grayscale processing on the mask image to obtain a corresponding grayscale image, and then performs binarization processing on the obtained grayscale image according to a preset pixel threshold to obtain the two grayscale images. Valued target mask image.
在示例性的实施例中,所述处理模块705具体用于:In an exemplary embodiment, the processing module 705 is specifically configured to:
对所述mask图像进行图像的灰度化处理,得到灰度图像;Perform grayscale processing on the mask image to obtain a grayscale image;
将所述灰度图像各个像素点的像素值与预设像素阈值进行比较;comparing the pixel value of each pixel of the grayscale image with a preset pixel threshold;
当所述像素点的像素值高于所述预设像素阈值时,则将所述像素点的像素值设置为预设像素值;When the pixel value of the pixel point is higher than the preset pixel threshold, the pixel value of the pixel point is set to a preset pixel value;
完成对所述mask图像的二值化处理,得到所述二值化的目标mask图像。The binarization processing of the mask image is completed to obtain the binarized target mask image.
具体地,所述处理模块705通过将所述mask图像进行二值化处理,使所述mask图像每个像素点都处于0到1之间,设置预设像素阈值为0.75,将大于预设像素阈值的像素点置为1(代表遮挡域),其他像素点置为0(代表非遮挡域),得到所述二值化的目标mask图像。其中,预设像素阈值可以根据实际情况自由设置,在此不作限定。Specifically, the processing module 705 performs binarization processing on the mask image, so that each pixel of the mask image is between 0 and 1, and sets the preset pixel threshold to 0.75, which is greater than the preset pixel threshold. The pixel points of the threshold are set to 1 (representing an occlusion area), and other pixels are set to 0 (representing a non-occlusion area) to obtain the binarized target mask image. The preset pixel threshold can be freely set according to the actual situation, which is not limited here.
本申请实施例通过将所述mask图像进行二值化处理,得到所述二值化的目标mask图像,使得图像中的目标人脸区域与背景区分开,使模型的结果更具精确性。In the embodiment of the present application, the binarized target mask image is obtained by performing a binarization process on the mask image, so that the target face region in the image is distinguished from the background, and the result of the model is more accurate.
本申请提供的人脸遮挡检测系统700包括人脸遮挡检测模型的训练模块,用于:The face occlusion detection system 700 provided by the present application includes a training module of a face occlusion detection model, which is used for:
获取人脸训练图像样本以及遮挡物样本;Obtain face training image samples and occlusion samples;
将所述人脸训练图像样本进行关键点检测,得到所述人脸训练图像样本中人脸器官的关键点信息;Perform key point detection on the face training image sample to obtain key point information of the face organs in the face training image sample;
根据所述关键点信息,将所述人脸训练图像样本进行人脸器官Patch分割,得到对应的人脸器官Patch图像;According to the key point information, the face training image sample is subjected to face organ Patch segmentation to obtain a corresponding face organ Patch image;
将所述遮挡物样本随机添加到所述人脸器官Patch图像的预设位置上,以将所述人脸器官Patch图像的所述预设位置的像素替换为所述遮挡物样本的像素,得到人脸遮挡物训练图像样本;Randomly adding the occluder sample to the preset position of the face organ Patch image, to replace the pixel of the preset position of the face organ Patch image with the pixel of the occluder sample, to obtain face occlusion training image samples;
将所述人脸遮挡物训练图像样本进行预处理,并将预处理后的人脸器官Patch图像输入到人脸遮挡检测模型中,完成对所述人脸遮挡检测模型的训练。The face occlusion training image samples are preprocessed, and the preprocessed face organ Patch image is input into the face occlusion detection model to complete the training of the face occlusion detection model.
具体地,所述人脸遮挡检测模型的训练模块将所述人脸训练图像样本通过关键点模型进行关键点检测,得到所述人脸训练图像样本中人脸器官的关键点信息,然后根据所述关键点信息,将所述人脸训练图像样本进行人脸器官Patch分割,得到对应的人脸器官Patch图像,将所述遮挡物样本随机添加到所述人脸器官Patch图像的预设位置上,以将所述人脸器官Patch图像的所述预设位置的像素替换为所述遮挡物样本的像素,得到人脸遮挡物训练图像样本,并将所述遮挡物样本所添加的区域像素值替换为所述遮挡物样本的像素值。其中,所述遮挡物样本通过网络爬虫抓取以及通过自行拍摄并提取得到,包括手指、笔、扇子、杯子、口罩、化妆品以及话筒等。Specifically, the training module of the face occlusion detection model performs key point detection on the face training image sample through a key point model to obtain the key point information of the face organs in the face training image sample, and then according to the The key point information, the face training image sample is subjected to face organ Patch segmentation to obtain a corresponding face organ Patch image, and the occluder sample is randomly added to the preset position of the face organ Patch image , to replace the pixels of the preset position of the face organ Patch image with the pixels of the occluder sample to obtain a face occluder training image sample, and add the area pixel value of the occluder sample. Replaced with the pixel value of the occluder sample. Wherein, the occlusion samples are captured by web crawlers and captured and extracted by themselves, including fingers, pens, fans, cups, masks, cosmetics, microphones, and the like.
示例性的,假设遮挡物样本添加在所述人脸训练图像样本上的区域在二维平面上的坐标为[x1:x2,y1:y2],其中,x1,x2,y1,y2分别对应人脸器官在mask图像中的横坐标x1,x2以及纵坐标y1,y2。先初始化一个大小为128*128的全零矩阵L,然后将[x1:x2,y1:y2]区域的像素全部修改为1,修改后的矩阵就是训练中用的监督label(标签)。Exemplarily, it is assumed that the coordinates on the two-dimensional plane of the region where the occluder samples are added to the face training image samples are [x1:x2, y1:y2], where x1, x2, y1, and y2 correspond to people, respectively. The abscissas x1, x2 and y1, y2 of the face organs in the mask image. First initialize an all-zero matrix L with a size of 128*128, and then modify all the pixels in the [x1:x2,y1:y2] area to 1. The modified matrix is the supervision label used in training.
具体地,所述人脸遮挡检测模型通过分割损失函数IOU Loss进行训练,使所述人脸器官patch图像上的像素值和所述全零矩阵L上对应位置的像素值更加接近,即有遮挡物的区域像素值接近1,其他区域的像素值接近0,然后采用深度学习常用的梯度下降法进行训练,直到所述人脸遮挡检测模型收敛,即Loss值不再下降,此时所述人脸遮挡检测模型输出的mask图像的像素值无限接近所述监督label的像素值,完成训练。其中,函数Loss为常用的分割损失函数IOU loss,是根据所述mask图像和所述全零矩阵L进行计算的。Specifically, the face occlusion detection model is trained by the segmentation loss function IOU Loss, so that the pixel value on the face organ patch image is closer to the pixel value at the corresponding position on the all-zero matrix L, that is, there is occlusion The pixel value of the area of the object is close to 1, and the pixel value of other areas is close to 0, and then the gradient descent method commonly used in deep learning is used for training until the face occlusion detection model converges, that is, the Loss value no longer decreases. The pixel value of the mask image output by the face occlusion detection model is infinitely close to the pixel value of the supervision label, and the training is completed. Among them, the function Loss is a commonly used segmentation loss function IOU loss, which is calculated according to the mask image and the all-zero matrix L.
在示例性的实施例中,所述人脸遮挡检测系统700通过随机添加各种类型的遮挡物到人脸训练图像样本的随机人脸区域中,再将大量人脸遮挡物训练图像样本输入到人脸遮挡检测模型中进行训练,使人脸遮挡检测模型对遮挡物的检测越来越灵敏,达到不论什么遮挡物都能检测出来的效果。In an exemplary embodiment, the face occlusion detection system 700 randomly adds various types of occluders to random face regions of the face training image samples, and then inputs a large number of face occlusion training image samples into the The face occlusion detection model is trained to make the face occlusion detection model more and more sensitive to the detection of occlusions, so as to achieve the effect of detecting any occlusions.
计算模块706,用于根据所述目标mask图像的像素值情况计算各个人脸器官的遮挡比例。The calculation module 706 is configured to calculate the occlusion ratio of each face organ according to the pixel value of the target mask image.
具体地,将所述目标mask图像的像素值与预设像素阈值做比较,并将所有高于预设像素阈值的点统计出来,进而计算各个人脸器官的遮挡比例。Specifically, the pixel value of the target mask image is compared with the preset pixel threshold, and all points higher than the preset pixel threshold are counted, and then the occlusion ratio of each face organ is calculated.
在示例性的实施例中,所述计算模块706具体用于:In an exemplary embodiment, the computing module 706 is specifically used to:
根据所述目标mask图像的像素值情况,统计各个人脸器官中所述预设像素值的个数,得到遮挡像素总数;According to the pixel value situation of the target mask image, count the number of the preset pixel values in each face organ to obtain the total number of occluded pixels;
根据所述遮挡像素总数,计算所述遮挡像素总数对应人脸器官总像素值个数的比值, 得到所述各个人脸器官的遮挡比例。According to the total number of occluded pixels, the ratio of the total number of occluded pixels corresponding to the total number of pixel values of face parts is calculated, and the occlusion ratio of each face part is obtained.
具体地,所述计算模块706根据所述目标mask图像的像素值情况,计算各个人脸器官Patch图像对应的mask图像像素值为预设像素阈值所占的比例,即为该人脸器官遮挡百分比。器官遮挡百分比的计算公式如下所示:Specifically, the calculation module 706 calculates the proportion of the pixel value of the mask image corresponding to the patch image of each face organ according to the pixel value of the target mask image, which is the proportion of the preset pixel threshold, which is the occlusion percentage of the face organ . The formula for calculating the percentage of organ occlusion is as follows:
Figure PCTCN2021082571-appb-000006
Figure PCTCN2021082571-appb-000006
其中,公式中,x1,y1是人脸器官在mask图像中的左上角坐标位置,h和w分别对应人脸器官在mask图像中的高和宽,σ ij代表二值化后的mask图像中(i,j)位置的像素值,
Figure PCTCN2021082571-appb-000007
表示如果mask图像中(i,j)这个坐标对应的像素是1,则取1,否则取0。
Among them, in the formula, x1, y1 are the coordinate positions of the upper left corner of the face organ in the mask image, h and w correspond to the height and width of the face organ in the mask image, respectively, σ ij represents the binarized mask image. The pixel value at position (i, j),
Figure PCTCN2021082571-appb-000007
Indicates that if the pixel corresponding to the (i, j) coordinate in the mask image is 1, take 1, otherwise take 0.
本申请实施例提供的人脸遮挡检测系统700,通过对人脸图像进行关键点检测,得到对应人脸器官的关键点信息,从而对人脸器官进行Patch分割,得到对应的人脸器官Patch图像,再经过预处理后输入到预先训练好的人脸遮挡检测模型中进行人脸检测,得到所述对应的mask图像,最后进行计算得到对应的人脸器官遮挡比例。不仅减少了人脸遮挡检测的复杂度,而且人脸划分精确到各个人脸器官,大大提高了人脸遮挡检测的精确性。The face occlusion detection system 700 provided by the embodiment of the present application obtains the key point information of the corresponding face organ by performing key point detection on the face image, so as to perform Patch segmentation on the face organ to obtain the corresponding face organ Patch image , and then input into the pre-trained face occlusion detection model for face detection after preprocessing, to obtain the corresponding mask image, and finally calculate to obtain the corresponding facial organ occlusion ratio. Not only the complexity of face occlusion detection is reduced, but also the face division is accurate to each face organ, which greatly improves the accuracy of face occlusion detection.
实施例三Embodiment 3
参阅图11,本申请实施例还提供一种计算机设备800的硬件架构示意图。如可以执行程序的智能手机、平板电脑、笔记本电脑、台式计算机、机架式服务器、刀片式服务器、塔式服务器或机柜式服务器(包括独立的服务器,或者多个服务器所组成的服务器集群)等。在本申请实施例中,所述计算机设备800是一种能够按照事先设定或者存储的指令,自动进行数值计算和/或信息处理的设备。如图所示,所述计算机设备800至少包括,但不限于,可通过装置总线相互通信连接存储器801、处理器802、网络接口803。其中:Referring to FIG. 11 , an embodiment of the present application further provides a schematic diagram of a hardware architecture of a computer device 800 . Such as smart phones, tablet computers, notebook computers, desktop computers, rack servers, blade servers, tower servers or rack servers (including independent servers, or server clusters composed of multiple servers) that can execute programs, etc. . In this embodiment of the present application, the computer device 800 is a device that can automatically perform numerical calculation and/or information processing according to pre-set or stored instructions. As shown in the figure, the computer device 800 at least includes, but is not limited to, a memory 801, a processor 802, and a network interface 803 that can communicate with each other through a device bus. in:
本申请实施例中,存储器801至少包括一种类型的计算机可读存储介质,所述可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等。在一些发明实施例中,存储器801可以是计算机设备800的内部存储单元,例如所述计算机设备800的硬盘或内存。在另一些发明实施例中,存储器801也可以是计算机设备800的外部存储设备,例如所述计算机设备800上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。当然,存储器801还可以既包括计算机设备800的内部存储单元也包括其外部存储设备。本申请实施例中,存储器801通常用于存储安装于计算机设备800的操作装置和各类应用软件,例如所述人脸遮挡检测系统700的程序代码等。此外,存储器801还可以用于暂时地存储已经输出或者将要输出的各类数据。In this embodiment of the present application, the memory 801 includes at least one type of computer-readable storage medium, and the readable storage medium includes a flash memory, a hard disk, a multimedia card, a card-type memory (for example, SD or DX memory, etc.), and random access memory. (RAM), static random access memory (SRAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), magnetic memory, magnetic disk, optical disk, and the like. In some inventive embodiments, the memory 801 may be an internal storage unit of the computer device 800 , such as a hard disk or a memory of the computer device 800 . In other embodiments of the invention, the memory 801 may also be an external storage device of the computer device 800, for example, a pluggable hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital) device equipped on the computer device 800 Digital, SD) card, flash card (Flash Card), etc. Of course, the memory 801 may also include both the internal storage unit of the computer device 800 and its external storage device. In the embodiment of the present application, the memory 801 is generally used to store the operating device installed in the computer device 800 and various application software, such as the program code of the face occlusion detection system 700 and the like. In addition, the memory 801 can also be used to temporarily store various types of data that have been output or will be output.
处理器802在一些发明实施例中可以是中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器、或其他数据处理芯片。所述处理器802通常用于控制计算机设备800的总体操作。本申请实施例中,处理器802用于运行存储器801中存储的程序代码或者处理数据,例如运行所述人脸遮挡检测系统700的程序代码,以实现上述各个发明实施例中的所述人脸遮挡检测方法。The processor 802 may be a central processing unit (Central Processing Unit, CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some inventive embodiments. The processor 802 is generally used to control the overall operation of the computer device 800 . In this embodiment of the present application, the processor 802 is configured to run the program code or process data stored in the memory 801, for example, run the program code of the face occlusion detection system 700, so as to realize the face occlusion detection system 700 described above. Occlusion detection method.
所述网络接口803可包括无线网络接口或有线网络接口,所述网络接口803通常用于在所述计算机设备800与其他电子装置之间建立通信连接。例如,所述网络接口803用于通过网络将所述计算机设备800与外部终端相连,在所述计算机设备800与外部终端之间的建立数据传输通道和通信连接等。所述网络可以是企业内部网(Intranet)、互联网(Internet)、全球移动通讯装置(Global System of Mobile communication,GSM)、宽带码分多址(Wideband Code Division Multiple Access,WCDMA)、4G网络、5G网络、蓝牙(Bluetooth)、Wi-Fi等无线或有线网络。The network interface 803 may include a wireless network interface or a wired network interface, and the network interface 803 is generally used to establish a communication connection between the computer device 800 and other electronic devices. For example, the network interface 803 is used to connect the computer device 800 with an external terminal through a network, and establish a data transmission channel and a communication connection between the computer device 800 and the external terminal. The network may be an intranet (Intranet), the Internet (Internet), a Global System of Mobile communication (GSM), a Wideband Code Division Multiple Access (WCDMA), a 4G network, a 5G network Wireless or wired network such as network, Bluetooth (Bluetooth), Wi-Fi, etc.
需要指出的是,图11仅示出了具有部件801-803的计算机设备800,但是应理解的是,并不要求实施所有示出的部件,可以替代的实施更多或者更少的部件。It should be noted that FIG. 11 only shows a computer device 800 having components 801-803, but it should be understood that implementation of all shown components is not required, and that more or less components may be implemented instead.
在本申请实施例中,存储于存储器801中的所述人脸遮挡检测系统700还可以被分割为一个或者多个程序模块,所述一个或者多个程序模块被存储于存储器801中,并由一个或多个处理器(本申请实施例为处理器802)所执行,以完成本申请之人脸遮挡检测方法。In this embodiment of the present application, the face occlusion detection system 700 stored in the memory 801 may also be divided into one or more program modules, and the one or more program modules are stored in the memory 801 and are configured by One or more processors (the processor 802 in this embodiment) are executed to complete the face occlusion detection method of the present application.
实施例四Embodiment 4
本申请实施例还提供一种计算机可读存储介质,所述计算机可读存储介质可以是非易失性,也可以是易失性,如闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘、服务器、App应用商城等等,其上存储有计算机程序,程序被处理器执行时实现相应功能。本申请实施例的计算机可读存储介质用于存储所述人脸遮挡检测系统700,以被处理器执行时实现本申请之人脸遮挡检测方法。Embodiments of the present application further provide a computer-readable storage medium, where the computer-readable storage medium may be non-volatile or volatile, such as flash memory, hard disk, multimedia card, card-type storage (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), magnetic A memory, a magnetic disk, an optical disc, a server, an App application mall, etc., store a computer program thereon, and when the program is executed by the processor, a corresponding function is realized. The computer-readable storage medium of the embodiment of the present application is used to store the face occlusion detection system 700, so as to implement the face occlusion detection method of the present application when executed by the processor.
上述本申请实施例序号仅仅为了描述,不代表发明实施例的优劣。The above-mentioned serial numbers of the embodiments of the present application are only for description, and do not represent the advantages or disadvantages of the embodiments of the invention.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述发明实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。From the description of the above embodiments, those skilled in the art can clearly understand that the method of the above-mentioned embodiments of the invention can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is more best implementation.
以上仅为本申请的优选发明实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。The above are only the preferred invention embodiments of the present application, and are not intended to limit the scope of the patent of the present application. Any equivalent structure or equivalent process transformation made by using the contents of the description and drawings of the present application, or directly or indirectly applied to other related technologies Fields are similarly included within the scope of patent protection of this application.

Claims (20)

  1. 一种人脸遮挡检测方法,其中,所述方法包括:A face occlusion detection method, wherein the method comprises:
    获取待检测的人脸图像;Obtain the face image to be detected;
    将所述人脸图像进行关键点检测,得到所述人脸图像中人脸器官的关键点信息;Perform key point detection on the face image to obtain key point information of the face organs in the face image;
    根据所述关键点信息,将所述人脸图像进行人脸器官块分割,得到对应的人脸器官块图像;According to the key point information, the face image is subjected to face organ block segmentation to obtain a corresponding face organ block image;
    将所述人脸器官块图像进行预处理,并将预处理后的人脸器官块图像输入到预先训练的人脸遮挡检测模型中,以进行人脸遮挡检测,并输出对应的掩膜图像;Preprocessing the face organ block image, and inputting the preprocessed face organ block image into a pre-trained face occlusion detection model to perform face occlusion detection, and output a corresponding mask image;
    将所述掩膜图像进行二值化处理,得到所述二值化的目标掩膜图像;及performing a binarization process on the mask image to obtain the binarized target mask image; and
    根据所述目标掩膜图像的像素值情况计算各个人脸器官的遮挡比例。The occlusion ratio of each face organ is calculated according to the pixel value of the target mask image.
  2. 如权利要求1所述的人脸遮挡检测方法,其中,所述将所述人脸图像进行关键点检测,得到所述人脸图像中人脸器官的关键点信息,包括:The method for detecting face occlusion according to claim 1, wherein the key point detection is performed on the face image to obtain the key point information of the face organs in the face image, comprising:
    将所述人脸图像输入到预设的关键点模型中进行所述关键点检测,得到所述人脸图像在二维平面上预设数量的关键点信息,其中,所述关键点信息包括关键点坐标和关键点所对应的序号;及Input the face image into a preset key point model to perform the key point detection, and obtain a preset number of key point information on the two-dimensional plane of the face image, wherein the key point information includes key points. The point coordinates and the sequence number corresponding to the key point; and
    根据所述预设数量的关键点信息以及各个人脸器官在所述人脸图像的位置,确定所述各个人脸器官的关键点信息,其中,所述人脸器官包括额头、左眉毛、右眉毛、左眼睛、右眼睛、鼻子以及嘴巴。Determine the key point information of each face organ according to the preset number of key point information and the position of each face organ in the face image, wherein the face organ includes forehead, left eyebrow, right Eyebrows, left eye, right eye, nose and mouth.
  3. 如权利要求1所述的人脸遮挡检测方法,其中,所述根据所述关键点信息,将所述人脸图像进行人脸器官块分割,得到对应的人脸器官块图像,包括:The method for detecting face occlusion according to claim 1, wherein, according to the key point information, the face image is subjected to face organ block segmentation to obtain a corresponding face organ block image, comprising:
    根据所述关键点信息以及预设的划分规则,确定各个人脸器官对应的最小外接矩形;及According to the key point information and the preset division rule, determine the minimum circumscribed rectangle corresponding to each face part; and
    根据各个人脸器官对应的最小外接矩形,对所述人脸图像进行块分割,得到各个人脸器官对应的人脸器官块图像。According to the minimum circumscribed rectangle corresponding to each face organ, block segmentation is performed on the face image to obtain a face organ block image corresponding to each face organ.
  4. 如权利要求1所述的人脸遮挡检测方法,其中,所述将所述人脸器官块图像进行预处理,并将预处理后的人脸器官块图像输入到预先训练的人脸遮挡检测模型中,以进行人脸遮挡检测,并输出对应的掩膜图像,包括:The method for detecting face occlusion according to claim 1, wherein the face parts image is preprocessed, and the preprocessed face parts images are input into a pre-trained face occlusion detection model to perform face occlusion detection and output the corresponding mask image, including:
    将所述人脸器官块图像进行填充并对填充后的图像进行尺寸的调整,得到对应尺寸的方形块图像;及Filling the face organ block image and adjusting the size of the filled image to obtain a square block image of the corresponding size; and
    将所述方形块图像输入到所述预先训练的人脸遮挡检测模型中进行人脸遮挡检测,得到所述对应的掩膜图像。Inputting the square block image into the pre-trained face occlusion detection model to perform face occlusion detection to obtain the corresponding mask image.
  5. 如权利要求1所述的人脸遮挡检测方法,其中,所述将所述掩膜图像进行二值化处理,得到所述二值化的目标掩膜图像,包括:The method for detecting face occlusion according to claim 1, wherein, performing a binarization process on the mask image to obtain the binarized target mask image, comprising:
    将所述掩膜图像进行图像的灰度化处理,得到灰度图像;performing grayscale processing on the mask image to obtain a grayscale image;
    将所述灰度图像各个像素点的像素值与预设像素阈值进行比较;comparing the pixel value of each pixel of the grayscale image with a preset pixel threshold;
    当所述像素点的像素值高于所述预设像素阈值时,则将所述像素点的像素值设置为预设像素值;及When the pixel value of the pixel point is higher than the predetermined pixel threshold, setting the pixel value of the pixel point to a predetermined pixel value; and
    完成对所述掩膜图像的二值化处理,得到所述二值化的目标掩膜图像。The binarization processing of the mask image is completed to obtain the binarized target mask image.
  6. 如权利要求1或4所述的人脸遮挡检测方法,其中,所述人脸遮挡检测模型的训练方法包括:The face occlusion detection method according to claim 1 or 4, wherein the training method of the face occlusion detection model comprises:
    获取人脸训练图像样本以及遮挡物样本;Obtain face training image samples and occlusion samples;
    将所述人脸训练图像样本进行关键点检测,得到所述人脸训练图像样本中人脸器官的关键点信息;Perform key point detection on the face training image sample to obtain key point information of the face organs in the face training image sample;
    根据所述关键点信息,将所述人脸训练图像样本进行人脸器官块分割,得到对应的人脸器官块图像;According to the key point information, the face training image sample is subjected to face organ block segmentation to obtain a corresponding face organ block image;
    将所述遮挡物样本随机添加到所述人脸器官块图像的预设位置上,以将所述人脸器官块图像的所述预设位置的像素替换为所述遮挡物样本的像素,得到人脸遮挡物训练图像样本;及The occluder sample is randomly added to the preset position of the face part image, so as to replace the pixels of the preset position of the face part image with the pixels of the occluder sample, obtaining face occluder training image samples; and
    将所述人脸遮挡物训练图像样本进行预处理,并将预处理后的人脸器官块图像输入到人脸遮挡检测模型中,完成对所述人脸遮挡检测模型的训练。The face occlusion training image samples are preprocessed, and the preprocessed face organ block images are input into the face occlusion detection model to complete the training of the face occlusion detection model.
  7. 如权利要求1所述的人脸遮挡检测方法,其中,所述根据所述目标掩膜图像的像素值情况计算各个人脸器官的遮挡比例,包括:The method for detecting face occlusion according to claim 1, wherein the calculating the occlusion ratio of each face organ according to the pixel value of the target mask image comprises:
    根据所述目标掩膜图像的像素值情况,统计各个人脸器官中所述预设像素值的个数,得到遮挡像素总数;及According to the pixel value situation of the target mask image, count the number of the preset pixel values in each face part to obtain the total number of occluded pixels; and
    根据所述遮挡像素总数,计算所述遮挡像素总数与对应人脸器官总像素值个数的比值,得到所述各个人脸器官的遮挡比例。According to the total number of occluded pixels, the ratio of the total number of occluded pixels to the total number of pixel values of corresponding face parts is calculated to obtain the occlusion ratio of each face part.
  8. 一种人脸遮挡检测设备,其中,所述人脸遮挡检测设备包括:存储器、处理器以及存储在所述存储器上并可在所述处理器上运行的人脸遮挡检测程序,所述处理器执行所述人脸遮挡检测程序时实现如下步骤:A face occlusion detection device, wherein the face occlusion detection device comprises: a memory, a processor, and a face occlusion detection program stored in the memory and executable on the processor, the processor When executing the face occlusion detection program, the following steps are implemented:
    获取待检测的人脸图像;Obtain the face image to be detected;
    将所述人脸图像进行关键点检测,得到所述人脸图像中人脸器官的关键点信息;Perform key point detection on the face image to obtain key point information of the face organs in the face image;
    根据所述关键点信息,将所述人脸图像进行人脸器官块分割,得到对应的人脸器官块图像;According to the key point information, the face image is subjected to face organ block segmentation to obtain a corresponding face organ block image;
    将所述人脸器官块图像进行预处理,并将预处理后的人脸器官块图像输入到预先训练的人脸遮挡检测模型中,以进行人脸遮挡检测,并输出对应的掩膜图像;Preprocessing the face organ block image, and inputting the preprocessed face organ block image into a pre-trained face occlusion detection model to perform face occlusion detection, and output a corresponding mask image;
    将所述掩膜图像进行二值化处理,得到所述二值化的目标掩膜图像;及performing a binarization process on the mask image to obtain the binarized target mask image; and
    根据所述目标掩膜图像的像素值情况计算各个人脸器官的遮挡比例。The occlusion ratio of each face organ is calculated according to the pixel value of the target mask image.
  9. 如权利要求8所述的人脸遮挡检测设备,其中,所述处理器执行所述人脸遮挡检测程序实现所述将所述人脸图像进行关键点检测,得到所述人脸图像中人脸器官的关键点信息,包括:The face occlusion detection device according to claim 8, wherein the processor executes the face occlusion detection program to implement the key point detection on the face image to obtain the face in the face image Key point information for organs, including:
    将所述人脸图像输入到预设的关键点模型中进行所述关键点检测,得到所述人脸图像在二维平面上预设数量的关键点信息,其中,所述关键点信息包括关键点坐标和关键点所对应的序号;及Input the face image into a preset key point model to perform the key point detection, and obtain a preset number of key point information on the two-dimensional plane of the face image, wherein the key point information includes key points. The point coordinates and the sequence number corresponding to the key point; and
    根据所述预设数量的关键点信息以及各个人脸器官在所述人脸图像的位置,确定所述各个人脸器官的关键点信息,其中,所述人脸器官包括额头、左眉毛、右眉毛、左眼睛、右眼睛、鼻子以及嘴巴。Determine the key point information of each face organ according to the preset number of key point information and the position of each face organ in the face image, wherein the face organ includes forehead, left eyebrow, right Eyebrows, left eye, right eye, nose and mouth.
  10. 如权利要求8所述的人脸遮挡检测设备,其中,所述处理器执行所述人脸遮挡检测程序实现所述根据所述关键点信息,将所述人脸图像进行人脸器官块分割,得到对应的人脸器官块图像,包括:The face occlusion detection device according to claim 8, wherein the processor executes the face occlusion detection program to implement the face part segmentation on the face image according to the key point information, Obtain the corresponding face organ block images, including:
    根据所述关键点信息以及预设的划分规则,确定各个人脸器官对应的最小外接矩形;及According to the key point information and the preset division rule, determine the minimum circumscribed rectangle corresponding to each face part; and
    根据各个人脸器官对应的最小外接矩形,对所述人脸图像进行块分割,得到各个人脸器官对应的人脸器官块图像。According to the minimum circumscribed rectangle corresponding to each face organ, block segmentation is performed on the face image to obtain a face organ block image corresponding to each face organ.
  11. 如权利要求8所述的人脸遮挡检测设备,其中,所述处理器执行所述人脸遮挡检测程序实现所述将所述人脸器官块图像进行预处理,并将预处理后的人脸器官块图像输入到预先训练的人脸遮挡检测模型中,以进行人脸遮挡检测,并输出对应的掩膜图像,包括:The face occlusion detection device according to claim 8, wherein the processor executes the face occlusion detection program to realize the preprocessing of the face organ block image, and the preprocessed face The organ block image is input into the pre-trained face occlusion detection model for face occlusion detection, and the corresponding mask image is output, including:
    将所述人脸器官块图像进行填充并对填充后的图像进行尺寸的调整,得到对应尺寸的方形块图像;及Filling the face organ block image and adjusting the size of the filled image to obtain a square block image of the corresponding size; and
    将所述方形块图像输入到所述预先训练的人脸遮挡检测模型中进行人脸遮挡检测,得到所述对应的掩膜图像。Inputting the square block image into the pre-trained face occlusion detection model to perform face occlusion detection to obtain the corresponding mask image.
  12. 如权利要求8所述的人脸遮挡检测设备,其中,所述处理器执行所述人脸遮挡检测程序实现所述将所述掩膜图像进行二值化处理,得到所述二值化的目标掩膜图像,包括:The face occlusion detection device according to claim 8, wherein the processor executes the face occlusion detection program to realize the binarization processing of the mask image to obtain the binarized target Mask image, including:
    将所述掩膜图像进行图像的灰度化处理,得到灰度图像;performing grayscale processing on the mask image to obtain a grayscale image;
    将所述灰度图像各个像素点的像素值与预设像素阈值进行比较;comparing the pixel value of each pixel of the grayscale image with a preset pixel threshold;
    当所述像素点的像素值高于所述预设像素阈值时,则将所述像素点的像素值设置为预设像素值;及When the pixel value of the pixel point is higher than the predetermined pixel threshold, setting the pixel value of the pixel point to a predetermined pixel value; and
    完成对所述掩膜图像的二值化处理,得到所述二值化的目标掩膜图像。The binarization processing of the mask image is completed to obtain the binarized target mask image.
  13. 如权利要求8或11所述的人脸遮挡检测设备,其中,所述处理器执行所述人脸遮挡检测程序实现所述人脸遮挡检测模型的训练方法包括:The face occlusion detection device according to claim 8 or 11, wherein the processor executes the face occlusion detection program to realize the training method of the face occlusion detection model comprising:
    获取人脸训练图像样本以及遮挡物样本;Obtain face training image samples and occlusion samples;
    将所述人脸训练图像样本进行关键点检测,得到所述人脸训练图像样本中人脸器官的关键点信息;Perform key point detection on the face training image sample to obtain key point information of the face organs in the face training image sample;
    根据所述关键点信息,将所述人脸训练图像样本进行人脸器官块分割,得到对应的人脸器官块图像;According to the key point information, the face training image sample is subjected to face organ block segmentation to obtain a corresponding face organ block image;
    将所述遮挡物样本随机添加到所述人脸器官块图像的预设位置上,以将所述人脸器官块图像的所述预设位置的像素替换为所述遮挡物样本的像素,得到人脸遮挡物训练图像样本;及The occluder sample is randomly added to the preset position of the face part image, so as to replace the pixels of the preset position of the face part image with the pixels of the occluder sample, obtaining face occluder training image samples; and
    将所述人脸遮挡物训练图像样本进行预处理,并将预处理后的人脸器官块图像输入到人脸遮挡检测模型中,完成对所述人脸遮挡检测模型的训练。The face occlusion training image samples are preprocessed, and the preprocessed face organ block images are input into the face occlusion detection model to complete the training of the face occlusion detection model.
  14. 如权利要求8所述的人脸遮挡检测设备,其中,所述处理器执行所述人脸遮挡检测程序实现所述根据所述目标掩膜图像的像素值情况计算各个人脸器官的遮挡比例,包括:The face occlusion detection device according to claim 8, wherein the processor executes the face occlusion detection program to realize the calculation of the occlusion ratio of each face organ according to the pixel value of the target mask image, include:
    根据所述目标掩膜图像的像素值情况,统计各个人脸器官中所述预设像素值的个数,得到遮挡像素总数;及According to the pixel value situation of the target mask image, count the number of the preset pixel values in each face part to obtain the total number of occluded pixels; and
    根据所述遮挡像素总数,计算所述遮挡像素总数与对应人脸器官总像素值个数的比值,得到所述各个人脸器官的遮挡比例。According to the total number of occluded pixels, the ratio of the total number of occluded pixels to the total number of pixel values of corresponding face parts is calculated to obtain the occlusion ratio of each face part.
  15. 一种计算机可读存储介质,所述计算机可读存储介质中存储计算机指令,当所述计算机指令在计算机上运行时,使得计算机执行如下步骤:A computer-readable storage medium, storing computer instructions in the computer-readable storage medium, when the computer instructions are executed on a computer, the computer is made to perform the following steps:
    获取待检测的人脸图像;Obtain the face image to be detected;
    将所述人脸图像进行关键点检测,得到所述人脸图像中人脸器官的关键点信息;Perform key point detection on the face image to obtain key point information of the face organs in the face image;
    根据所述关键点信息,将所述人脸图像进行人脸器官块分割,得到对应的人脸器官块图像;According to the key point information, the face image is subjected to face organ block segmentation to obtain a corresponding face organ block image;
    将所述人脸器官块图像进行预处理,并将预处理后的人脸器官块图像输入到预先训练的人脸遮挡检测模型中,以进行人脸遮挡检测,并输出对应的掩膜图像;Preprocessing the face organ block image, and inputting the preprocessed face organ block image into a pre-trained face occlusion detection model to perform face occlusion detection, and output a corresponding mask image;
    将所述掩膜图像进行二值化处理,得到所述二值化的目标掩膜图像;及performing a binarization process on the mask image to obtain the binarized target mask image; and
    根据所述目标掩膜图像的像素值情况计算各个人脸器官的遮挡比例。The occlusion ratio of each face organ is calculated according to the pixel value of the target mask image.
  16. 如权利要求15所述的计算机可读存储介质,所述计算机可读存储介质执行所述计算机指令实现所述将所述人脸图像进行关键点检测,得到所述人脸图像中人脸器官的关键点信息,包括:The computer-readable storage medium according to claim 15, wherein the computer-readable storage medium executes the computer instructions to implement the key point detection on the face image to obtain the facial organs in the face image. Key point information, including:
    将所述人脸图像输入到预设的关键点模型中进行所述关键点检测,得到所述人脸图像 在二维平面上预设数量的关键点信息,其中,所述关键点信息包括关键点坐标和关键点所对应的序号;及Input the face image into a preset key point model to perform the key point detection, and obtain a preset number of key point information on the two-dimensional plane of the face image, wherein the key point information includes key points. The point coordinates and the sequence number corresponding to the key point; and
    根据所述预设数量的关键点信息以及各个人脸器官在所述人脸图像的位置,确定所述各个人脸器官的关键点信息,其中,所述人脸器官包括额头、左眉毛、右眉毛、左眼睛、右眼睛、鼻子以及嘴巴。Determine the key point information of each face organ according to the preset number of key point information and the position of each face organ in the face image, wherein the face organ includes forehead, left eyebrow, right Eyebrows, left eye, right eye, nose and mouth.
  17. 如权利要求15所述的计算机可读存储介质,所述计算机可读存储介质执行所述计算机指令实现所述根据所述关键点信息,将所述人脸图像进行人脸器官块分割,得到对应的人脸器官块图像,包括:The computer-readable storage medium according to claim 15, wherein the computer-readable storage medium executes the computer instructions to implement the face image segmentation according to the key point information to obtain the corresponding face organ block images, including:
    根据所述关键点信息以及预设的划分规则,确定各个人脸器官对应的最小外接矩形;及According to the key point information and the preset division rule, determine the minimum circumscribed rectangle corresponding to each face part; and
    根据各个人脸器官对应的最小外接矩形,对所述人脸图像进行块分割,得到各个人脸器官对应的人脸器官块图像。According to the minimum circumscribed rectangle corresponding to each face organ, block segmentation is performed on the face image to obtain a face organ block image corresponding to each face organ.
  18. 如权利要求15所述的计算机可读存储介质,所述计算机可读存储介质执行所述计算机指令实现所述将所述人脸器官块图像进行预处理,并将预处理后的人脸器官块图像输入到预先训练的人脸遮挡检测模型中,以进行人脸遮挡检测,并输出对应的掩膜图像,包括:The computer-readable storage medium according to claim 15, wherein the computer-readable storage medium executes the computer instructions to realize the preprocessing of the face part image, and the preprocessed face part image The image is input into a pre-trained face occlusion detection model for face occlusion detection, and the corresponding mask image is output, including:
    将所述人脸器官块图像进行填充并对填充后的图像进行尺寸的调整,得到对应尺寸的方形块图像;及Filling the face organ block image and adjusting the size of the filled image to obtain a square block image of the corresponding size; and
    将所述方形块图像输入到所述预先训练的人脸遮挡检测模型中进行人脸遮挡检测,得到所述对应的掩膜图像。Inputting the square block image into the pre-trained face occlusion detection model to perform face occlusion detection to obtain the corresponding mask image.
  19. 如权利要求15所述的计算机可读存储介质,所述计算机可读存储介质执行所述计算机指令实现所述将所述掩膜图像进行二值化处理,得到所述二值化的目标掩膜图像,包括:The computer-readable storage medium according to claim 15, wherein the computer-readable storage medium executes the computer instructions to implement the binarization process on the mask image to obtain the binarized target mask images, including:
    将所述掩膜图像进行图像的灰度化处理,得到灰度图像;performing grayscale processing on the mask image to obtain a grayscale image;
    将所述灰度图像各个像素点的像素值与预设像素阈值进行比较;comparing the pixel value of each pixel of the grayscale image with a preset pixel threshold;
    当所述像素点的像素值高于所述预设像素阈值时,则将所述像素点的像素值设置为预设像素值;及When the pixel value of the pixel point is higher than the preset pixel threshold, setting the pixel value of the pixel point to the preset pixel value; and
    完成对所述掩膜图像的二值化处理,得到所述二值化的目标掩膜图像。The binarization processing of the mask image is completed to obtain the binarized target mask image.
  20. 一种人脸遮挡检测系统,其中,所述人脸遮挡检测系统包括:A face occlusion detection system, wherein the face occlusion detection system includes:
    获取模块,用于获取待检测的人脸图像;an acquisition module, used to acquire the face image to be detected;
    第一检测模块,用于将所述人脸图像进行关键点检测,得到所述人脸图像中人脸器官的关键点信息;a first detection module, configured to perform key point detection on the face image to obtain key point information of the face organs in the face image;
    分割模块,用于根据所述关键点信息,将所述人脸图像进行人脸器官块分割,得到对应的人脸器官块图像;a segmentation module, configured to perform facial organ block segmentation on the face image according to the key point information to obtain a corresponding face organ block image;
    第二检测模块,用于将所述人脸器官块图像进行预处理,并将预处理后的人脸器官块图像输入到预先训练的人脸遮挡检测模型中,以进行人脸遮挡检测,并输出对应的掩膜图像;The second detection module is used to preprocess the face organ block image, and input the preprocessed face organ block image into a pre-trained face occlusion detection model to perform face occlusion detection, and Output the corresponding mask image;
    处理模块,用于将所述掩膜图像进行二值化处理,得到所述二值化的目标掩膜图像;a processing module, configured to perform binarization processing on the mask image to obtain the binarized target mask image;
    计算模块,用于根据所述目标掩膜图像的像素值情况计算各个人脸器官的遮挡比例。The calculation module is configured to calculate the occlusion ratio of each face organ according to the pixel value of the target mask image.
PCT/CN2021/082571 2020-12-21 2021-03-24 Face occlusion detection method and system, device, and storage medium WO2022134337A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011520261.8A CN112633144A (en) 2020-12-21 2020-12-21 Face occlusion detection method, system, device and storage medium
CN202011520261.8 2020-12-21

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US18/431,630 Continuation US20240177707A1 (en) 2021-08-06 2024-02-02 Wake-up processing method and device, voice apparatus, and computer-readable storage medium

Publications (1)

Publication Number Publication Date
WO2022134337A1 true WO2022134337A1 (en) 2022-06-30

Family

ID=75321947

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/082571 WO2022134337A1 (en) 2020-12-21 2021-03-24 Face occlusion detection method and system, device, and storage medium

Country Status (2)

Country Link
CN (1) CN112633144A (en)
WO (1) WO2022134337A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116311553A (en) * 2023-05-17 2023-06-23 武汉利楚商务服务有限公司 Human face living body detection method and device applied to semi-occlusion image
CN117727075A (en) * 2023-04-15 2024-03-19 书行科技(北京)有限公司 Face material fusion method, device, equipment and storage medium

Families Citing this family (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113111817B (en) * 2021-04-21 2023-06-27 中山大学 Semantic segmentation face integrity measurement method, system, equipment and storage medium
JP2022171150A (en) * 2021-04-30 2022-11-11 パナソニックIpマネジメント株式会社 Information processing device, information processing method, and program
CN113284041B (en) * 2021-05-14 2023-04-18 北京市商汤科技开发有限公司 Image processing method, device and equipment and computer storage medium
CN113221767B (en) * 2021-05-18 2023-08-04 北京百度网讯科技有限公司 Method for training living body face recognition model and recognizing living body face and related device
CN113222973B (en) * 2021-05-31 2024-03-08 深圳市商汤科技有限公司 Image processing method and device, processor, electronic equipment and storage medium
CN113284219A (en) * 2021-06-10 2021-08-20 北京字跳网络技术有限公司 Image processing method, device, equipment and storage medium
CN113469187B (en) * 2021-07-15 2022-08-23 长视科技股份有限公司 Object shielding ratio calculation method and system based on target detection
CN113537054B (en) * 2021-07-15 2022-11-01 重庆紫光华山智安科技有限公司 Face shielding degree calculation method and device, electronic equipment and computer readable storage medium
CN113743195B (en) * 2021-07-23 2024-05-17 北京眼神智能科技有限公司 Face shielding quantitative analysis method and device, electronic equipment and storage medium
CN113505736B (en) * 2021-07-26 2024-09-20 浙江大华技术股份有限公司 Object identification method and device, storage medium and electronic device
CN113723310B (en) * 2021-08-31 2023-09-05 平安科技(深圳)有限公司 Image recognition method and related device based on neural network
CN113747112B (en) * 2021-11-04 2022-02-22 珠海视熙科技有限公司 Processing method and processing device for head portrait of multi-person video conference
CN114399813B (en) * 2021-12-21 2023-09-26 马上消费金融股份有限公司 Face shielding detection method, model training method, device and electronic equipment
CN114093012B (en) * 2022-01-18 2022-06-10 荣耀终端有限公司 Face shielding detection method and detection device
CN114155561B (en) * 2022-02-08 2022-09-09 杭州迪英加科技有限公司 Helicobacter pylori positioning method and device
CN115100714A (en) * 2022-06-27 2022-09-23 平安银行股份有限公司 Living body detection method and device based on face image and server
CN115941529B (en) * 2022-11-28 2024-07-05 国网江苏省电力工程咨询有限公司 Cable tunnel detection method and system based on robot
CN115938023B (en) * 2023-03-15 2023-05-02 深圳市皇家金盾智能科技有限公司 Intelligent door lock face recognition unlocking method and device, medium and intelligent door lock
CN117392015A (en) * 2023-10-16 2024-01-12 深圳牛学长科技有限公司 Image restoration method, device, computer equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107909065A (en) * 2017-12-29 2018-04-13 百度在线网络技术(北京)有限公司 The method and device blocked for detecting face
CN109840477A (en) * 2019-01-04 2019-06-04 苏州飞搜科技有限公司 Face identification method and device are blocked based on eigentransformation
CN111191616A (en) * 2020-01-02 2020-05-22 广州织点智能科技有限公司 Face shielding detection method, device, equipment and storage medium
CN111428581A (en) * 2020-03-05 2020-07-17 平安科技(深圳)有限公司 Face shielding detection method and system
CN111523480A (en) * 2020-04-24 2020-08-11 北京嘀嘀无限科技发展有限公司 Method and device for detecting face obstruction, electronic equipment and storage medium
CN111814569A (en) * 2020-06-12 2020-10-23 深圳禾思众成科技有限公司 Method and system for detecting human face shielding area

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108319953B (en) * 2017-07-27 2019-07-16 腾讯科技(深圳)有限公司 Occlusion detection method and device, electronic equipment and the storage medium of target object

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107909065A (en) * 2017-12-29 2018-04-13 百度在线网络技术(北京)有限公司 The method and device blocked for detecting face
CN109840477A (en) * 2019-01-04 2019-06-04 苏州飞搜科技有限公司 Face identification method and device are blocked based on eigentransformation
CN111191616A (en) * 2020-01-02 2020-05-22 广州织点智能科技有限公司 Face shielding detection method, device, equipment and storage medium
CN111428581A (en) * 2020-03-05 2020-07-17 平安科技(深圳)有限公司 Face shielding detection method and system
CN111523480A (en) * 2020-04-24 2020-08-11 北京嘀嘀无限科技发展有限公司 Method and device for detecting face obstruction, electronic equipment and storage medium
CN111814569A (en) * 2020-06-12 2020-10-23 深圳禾思众成科技有限公司 Method and system for detecting human face shielding area

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117727075A (en) * 2023-04-15 2024-03-19 书行科技(北京)有限公司 Face material fusion method, device, equipment and storage medium
CN116311553A (en) * 2023-05-17 2023-06-23 武汉利楚商务服务有限公司 Human face living body detection method and device applied to semi-occlusion image
CN116311553B (en) * 2023-05-17 2023-08-15 武汉利楚商务服务有限公司 Human face living body detection method and device applied to semi-occlusion image

Also Published As

Publication number Publication date
CN112633144A (en) 2021-04-09

Similar Documents

Publication Publication Date Title
WO2022134337A1 (en) Face occlusion detection method and system, device, and storage medium
CN109359575B (en) Face detection method, service processing method, device, terminal and medium
JP6636154B2 (en) Face image processing method and apparatus, and storage medium
WO2020199931A1 (en) Face key point detection method and apparatus, and storage medium and electronic device
EP3916627A1 (en) Living body detection method based on facial recognition, and electronic device and storage medium
WO2018086607A1 (en) Target tracking method, electronic device, and storage medium
WO2022078041A1 (en) Occlusion detection model training method and facial image beautification method
WO2018188453A1 (en) Method for determining human face area, storage medium, and computer device
WO2021051611A1 (en) Face visibility-based face recognition method, system, device, and storage medium
CN109271930B (en) Micro-expression recognition method, device and storage medium
CN108428214B (en) Image processing method and device
CN111428581A (en) Face shielding detection method and system
KR20200118076A (en) Biometric detection method and device, electronic device and storage medium
WO2020248848A1 (en) Intelligent abnormal cell determination method and device, and computer readable storage medium
WO2021051547A1 (en) Violent behavior detection method and system
CN111626163B (en) Human face living body detection method and device and computer equipment
CN111598038B (en) Facial feature point detection method, device, equipment and storage medium
CN110046574A (en) Safety cap based on deep learning wears recognition methods and equipment
US20240013572A1 (en) Method for face detection, terminal device and non-transitory computer-readable storage medium
CN111191521B (en) Face living body detection method and device, computer equipment and storage medium
WO2021139167A1 (en) Method and apparatus for facial recognition, electronic device, and computer readable storage medium
US20210012201A1 (en) Center-biased machine learning techniques to determine saliency in digital images
WO2024001095A1 (en) Facial expression recognition method, terminal device and storage medium
CN111222433A (en) Automatic face auditing method, system, equipment and readable storage medium
CN110008943B (en) Image processing method and device, computing equipment and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21908349

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21908349

Country of ref document: EP

Kind code of ref document: A1