Face segmentation method, apparatus, device, and medium

By performing segmentation uncertainty analysis and secondary classification on pixels in face images, and combining various neural network optimizations, the problem of insufficient face segmentation accuracy in existing technologies has been solved, achieving higher segmentation accuracy and efficiency.

CN114743230BActive Publication Date: 2025-12-09TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202110024017.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-08
Publication Date
2025-12-09
Estimated Expiration
2041-03-26

AI Technical Summary

Technical Problem

Existing technologies fail to effectively consider the angles of the entire face image in face segmentation, leading to a decrease in the accuracy of the segmentation results.

Method used

By performing segmentation uncertainty analysis on pixels in face images, target pixels are selected and secondary classification is performed. Optimization is carried out using low-level and deep features, and by combining a basic segmentation network, a feature aggregation network, and a local optimization network, the accuracy of the segmentation results is improved.

Benefits of technology

Within the entire face image, the accuracy of the segmentation results was improved and the segmentation efficiency was increased.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114743230B_ABST
    Figure CN114743230B_ABST
Patent Text Reader

Abstract

The application discloses a face segmentation method and device, equipment and medium, and relates to the field of image processing. The method comprises the following steps: performing facial feature segmentation on a face image to obtain a preliminary segmentation result of pixel points in the face image; determining a target pixel point set in the face image, wherein the target pixel point set comprises target pixel points with a segmentation uncertainty greater than a threshold; and determining a secondary classification result of the target pixel points based on the preliminary segmentation result and the bottom features of the target pixel points. According to the segmentation uncertainty of the pixel points in the whole face image, the target pixel points are selected and secondary classification is performed, so that the accuracy and precision of the face segmentation result can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of image processing, and in particular to a face segmentation method and device, equipment and medium. BACKGROUND

[0002] Face segmentation is to divide the face in an image according to semantic information and components. The components can be roughly divided into left eye, right eye, nose, upper lip, lower lip, mouth, left eyebrow, right eyebrow, skin, hair, etc.

[0003] The related art places the face in the center position, uses a neural network to predict the position of each component, cuts out the corresponding component region, uses a separate segmentation network for segmentation, and finally recombines and inverse transforms each part of the segmentation result to obtain the final segmentation result.

[0004] However, the related art only considers the influence of the face edge on the segmentation result, and does not consider the problem from the perspective of the entire face image, which reduces the accuracy of the segmentation result. SUMMARY

[0005] The embodiments of the present application provide a face segmentation method, device, equipment and medium. The method places the optimization center of gravity on a target pixel point according to the segmentation uncertainty of the pixel points in the entire face image, and performs secondary optimization, which can effectively improve the precision and accuracy of the face segmentation result. The technical solution is as follows:

[0006] According to one aspect of the present application, a face segmentation method is provided, which includes:

[0007] Segmenting the facial features of a face image to obtain a preliminary segmentation result of pixel points in the face image;

[0008] Determining a target pixel point set in the face image, the target pixel point set including target pixel points with a segmentation uncertainty greater than a threshold value;

[0009] Determining a secondary classification result of the target pixel points based on the bottom features of the target pixel points and the preliminary segmentation result.

[0010] According to another aspect of the present application, a face segmentation device is provided, which includes:

[0011] A segmentation module for segmenting the facial features of a face image to obtain a preliminary segmentation result of pixel points in the face image;

[0012] A set determination module for determining a target pixel point set in the face image, the target pixel point set including target pixel points with a segmentation uncertainty greater than a threshold value;

[0013] A result determination module is configured to determine a secondary classification result of the target pixel point based on the low-level feature of the target pixel point and the preliminary segmentation result.

[0014] In an optional design of the present application, the set determination module is further configured to correct the preliminary segmentation result of the pixel point based on the deep-level feature of the pixel point in the face image to obtain a corrected segmentation result; calculate a segmentation uncertainty of the pixel point according to a distance between the preliminary segmentation result and the corrected segmentation result; and add a target pixel point with a segmentation uncertainty greater than the threshold to the target pixel point set.

[0015] In an optional design of the present application, the set determination module is further configured to call a feature aggregation network, correct the preliminary segmentation result of the pixel point based on the deep-level feature of the pixel point, and determine the corrected segmentation result.

[0016] In an optional design of the present application, the set determination module is further configured to calculate a sum of squared differences between the preliminary segmentation result and the corrected segmentation result; and determine the segmentation uncertainty of the pixel point based on a ratio of the sum of squared differences to a number of channels of the preliminary segmentation result.

[0017] In an optional design of the present application, the result determination module is further configured to divide the face image into n easily confused regions based on two classes with the highest predicted probabilities of the pixel point in the preliminary segmentation result, wherein the two classes with the highest predicted probabilities of the pixel points in a same easily confused region are the same, and n is a positive integer; call a local optimization network corresponding to an i-th easily confused region, and determine a secondary classification result of a target pixel point belonging to the i-th easily confused region based on the low-level feature of the target pixel point and the preliminary segmentation result, wherein i is a positive integer.

[0018] In an optional design of the present application, the result determination module is further configured to, in a case where the i-th easily confused region is a first type region, call an i-th local optimization network corresponding to the i-th easily confused region, and determine a secondary classification result of a target pixel point belonging to the i-th easily confused region based on the low-level feature of the target pixel point and the preliminary segmentation result; and in a case where the i-th easily confused region is a second type region, call a general local optimization network corresponding to the second type region, and determine a secondary classification result of a target pixel point belonging to the i-th easily confused region based on the low-level feature of the target pixel point and the preliminary segmentation result.

[0019] In an optional design of the present application, the segmentation module is further configured to invoke a basic segmentation network to perform facial feature segmentation on the face image, and determine the preliminary segmentation result of the pixel points in the face image.

[0020] In an optional design of the present application, the device further comprises:

[0021] The training module is configured to input a training sample into the basic segmentation network, the training sample comprising a sample face image and a segmentation ground truth of the sample face image; output a preliminary segmentation result of the sample face image by the basic segmentation network; calculate a first error loss between the preliminary segmentation result of the sample face image and the segmentation ground truth; and update network parameters of the basic segmentation network according to the first error loss by using an error back propagation algorithm.

[0022] In an optional design of the present application, the training module is further configured to fix the network parameters of the basic segmentation network; input a training sample into the basic segmentation network, the training sample comprising a sample face image and a segmentation ground truth of the sample face image; input the preliminary segmentation result of the sample face image into the feature aggregation network; output a corrected segmentation result of the sample face image by the feature aggregation network; calculate a second error loss between the corrected segmentation result of the sample face image and the segmentation ground truth; and update network parameters of the feature aggregation network according to the second error loss by using an error back propagation algorithm.

[0023] In an optional design of the present application, the training module is further configured to fix the network parameters of the feature aggregation network and the network parameters of the basic segmentation network; input a training sample into the basic segmentation network, the training sample comprising a sample face image and a segmentation ground truth of the sample face image; input the preliminary segmentation result of the sample face image into the feature aggregation network; output a corrected segmentation result of the sample face image by the feature aggregation network; input a target pixel point of the sample face image into the local optimization network, the target pixel point being determined based on the preliminary segmentation result of the sample face image and the corrected segmentation result of the sample face image; output a secondary classification result of the sample face image by the local optimization network; calculate a third error loss between the secondary classification result of the sample face image and the segmentation ground truth; and update network parameters of the local optimization network according to the third error loss by using an error back propagation algorithm.

[0024] According to another aspect of the present application, a computer device is provided, comprising a processor and a memory, the memory storing at least one instruction, at least one program, a code set or an instruction set, the at least one instruction, at least one program, code set or instruction set being loaded and executed by the processor to implement the face segmentation method according to the above aspect.

[0025] According to another aspect of the present application, a computer storage medium is provided, the computer readable storage medium storing at least one program code, the program code being loaded and executed by a processor to implement the face segmentation method according to the above aspect.

[0026] According to another aspect of the present application, a computer program product or computer program is provided, the computer program product or computer program comprising computer instructions, the computer instructions being stored in a computer readable storage medium. A processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the computer device executes the face segmentation method according to the above aspect.

[0027] The technical scheme provided by the embodiments of the present application has at least the following beneficial effects:

[0028] In the range of the whole face image, the target pixel points with the uncertainty greater than the threshold value are selected, and the secondary classification is performed according to the bottom features of the target pixel points, so that the accuracy of the segmentation result is improved, and the efficiency of the face image segmentation is high. BRIEF DESCRIPTION OF DRAWINGS

[0029] In order to more clearly illustrate the technical schemes in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0030] Figure 1 is a structural schematic diagram of a computer system provided by an example embodiment of the present application;

[0031] Figure 2 is a flowchart of a face segmentation method provided by an example embodiment of the present application;

[0032] Figure 3 is a flowchart of a face segmentation method provided by an example embodiment of the present application;

[0033] Figure 4 is a flowchart of a face segmentation algorithm provided by an example embodiment of the present application;

[0034] Figure 5 is a joint distribution diagram provided by an example embodiment of the present application;

[0035] Figure 6 is a face segmentation model schematic diagram provided by an example embodiment of the present application;

[0036] Figure 7 is a flowchart of a basic segmentation network training method provided by an example embodiment of the present application;

[0037] Figure 8 is a flowchart of a feature aggregation network training method provided by an example embodiment of the present application;

[0038] Figure 9 is a flowchart of a local optimization network training method provided by an example embodiment of the present application;

[0039] Figure 10 is a block diagram of a face segmentation device provided by an example embodiment of the present application;

[0040] Figure 11 is a structural schematic diagram of a computer device provided by an example embodiment of the present application. DETAILED DESCRIPTION

[0041] In order to make the purpose, technical scheme and advantages of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the drawings.

[0042] Firstly, the terms involved in the embodiments of the present application are introduced:

[0043] Artificial Intelligence (AI): using digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceiving the environment, acquiring knowledge and using knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology of computer science, which aims to understand the essence of intelligence and produce a new intelligent machine that can react in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines, so that machines have the functions of perception, reasoning and decision-making.

[0044] Artificial intelligence technology is a comprehensive discipline, involving a wide range of fields, both hardware and software technologies. Artificial intelligence basic technologies generally include technologies such as sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction system, mechatronics, etc. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning, etc.

[0045] Computer Vision (CV): Computer vision is a scientific field that researches how to make machines "see". More specifically, it refers to using cameras and computers to replace human eyes to identify, track and measure targets, and further process graphics so that the computer processing becomes images more suitable for human observation or transmission to instruments for detection. As a scientific discipline, computer vision researches related theories and technologies, trying to establish artificial intelligence systems that can obtain information from images or multi-dimensional data. Computer vision technology usually includes image processing, image recognition, image semantic understanding, image retrieval, OCR, video processing, video semantic understanding, video content / behavior recognition, three-dimensional object reconstruction, 3D technology, virtual reality, augmented reality, simultaneous localization and mapping, and other technologies. It also includes common face recognition, fingerprint recognition and other biometric identification technologies.

[0046] Machine Learning (ML): Machine learning is a multi-disciplinary subject that involves probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory, etc. It is a subject that studies how computers simulate or implement human learning behavior to acquire new knowledge or skills, and reorganize existing knowledge structure to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental approach to making computers intelligent. Its applications are widespread in various fields of artificial intelligence. Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and rule-based learning.

[0047] Face segmentation: According to the semantic information of human face, the face image is divided into pixel level according to region or component. It can be roughly divided into left eye, right eye, nose, upper lip, lower lip, mouth, left eyebrow, right eyebrow, skin, hair, etc. Face segmentation is mainly applied to face recognition.

[0048] Figure 1 A structural schematic diagram of a computer system provided by an example embodiment of the present application is shown. The computer system 100 includes a terminal 120 and a server 140.

[0049] An application related to face segmentation is installed on the terminal 120. The application can be a small program in an app (application), a dedicated application, or a web client. The user performs operations related to face segmentation generation on the terminal 120. The terminal 120 is at least one of a smartphone, a tablet computer, an e-book reader, an MP3 player, an MP4 player, a laptop computer, and a desktop computer.

[0050] The terminal 120 is connected to the server 140 through a wireless network or a wired network.

[0051] Server 140 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. Server 140 is used to provide background services for applications that support face segmentation. Optionally, server 140 undertakes the main computing work, and terminal 120 undertakes the secondary computing work; or, server 140 undertakes the secondary computing work, and terminal 120 undertakes the main computing work; or, server 140 and terminal 120 jointly perform computing using a distributed computing architecture.

[0052] Figure 2 A flowchart illustrating a video generation method provided in an exemplary embodiment of this application is shown. This method can be... Figure 1 The terminal 120 shown executes the method, which includes the following steps:

[0053] Step 202: Perform facial feature segmentation on the face image to obtain preliminary segmentation results of the pixels in the face image.

[0054] A face image refers to an image containing a human face. Optionally, a face image may include the entire face, or it may include a portion of a face. Optionally, a face image may include multiple faces.

[0055] There are various ways to acquire facial images. For example, facial images can be obtained by capturing images in real time with a camera, by accessing local storage space, by being sent by another terminal, or by downloading images from the Internet. This application does not limit the method of acquiring facial images.

[0056] Facial feature segmentation refers to dividing the facial features in a human face image into multiple different organ categories. For example, the organ categories that can be obtained include at least one of the following: left eye, right eye, nose, upper lip, lower lip, mouth, left eyebrow, right eyebrow, skin, and hair.

[0057] The primary segmentation result refers to a segmentation result obtained by performing primary five-wanton segmentation on a face image, and includes all possible probabilities of a pixel point being classified into five-wanton. For example, the five-wanton are eyes, mouth, nose, ears and hair, the probability of a pixel point A being classified into eyes is 60%, the probability of being classified into mouth is 30%, the probability of being classified into nose is 5%, the probability of being classified into ears is 3%, and the probability of being classified into hair is 2%. Since the primary segmentation result is a simple five-wanton segmentation of the face image, there are many unreasonable pixel points in the primary segmentation result, and the primary segmentation result needs to be further optimized. For example, in the primary segmentation result, a certain pixel point is classified into eyes, but the pixel point actually belongs to skin.

[0058] Step 204: determining a target pixel point set in the face image, the target pixel point set including target pixel points with segmentation uncertainty greater than a threshold.

[0059] The target pixel point set includes target pixel points, which refer to pixel points with segmentation uncertainty greater than a threshold. The segmentation uncertainty represents the degree of deviation between the five-wanton category in the primary segmentation result and the true five-wanton category.

[0060] The threshold is set by a technician according to actual conditions.

[0061] Step 206: determining a secondary classification result of the target pixel point based on the bottom feature of the target pixel point and the primary segmentation result.

[0062] The bottom feature refers to the visual feature of a pixel point in the face image. For example, the bottom feature includes at least one of color, shape and number.

[0063] The secondary classification result refers to a new segmentation result obtained by correcting the segmentation result of the target pixel point. Since there may be target pixel points with segmentation errors in the primary segmentation result, the above target pixel points are subjected to secondary classification to correct the segmentation category of the target pixel points. For example, in the primary segmentation result, a certain pixel point is classified into eyes, but the pixel point actually belongs to skin, and in the secondary classification result, the pixel point is reclassified into skin.

[0064] In summary, the embodiment selects target pixel points with uncertainty greater than a threshold in the range of the entire face image, and performs secondary classification according to the bottom feature of the target pixel point, optimizes target pixel points prone to segmentation errors, and can effectively improve the accuracy of the segmentation result.

[0065] Figure 3 A flowchart of a video generation method provided by an example embodiment of the present application is shown. The method can be performed by a video generation device, such as a video generation device 100 shown in FIG. 1. Figure 1The terminal 120 shown executes the method, which includes the following steps:

[0066] Step 301: Call the basic segmentation network to segment the facial features of the face image and determine the preliminary segmentation results of the pixels in the face image.

[0067] Basic segmentation networks are used to perform preliminary facial feature segmentation on face images.

[0068] For example, a method for calculating preliminary segmentation results is given:

[0069] If the initial segmentation result is set to coarse_seg, then

[0070] coarse_seg=softmax(F·W lastconv );

[0071] Where F is the feature output of the penultimate layer of the basic segmentation network, and W is... lastconv The parameters of the last layer of the basic segmentation network are: softmax(), which refers to the normalization exponential function that projects a K-dimensional vector z containing arbitrary real numbers onto another K-dimensional real vector σ(z) to obtain new elements, such that the range of each new element is between (0,1) and the sum of all new elements is 1.

[0072] For example, such as Figure 4 As shown, after the face image 401 is processed by the basic segmentation network, a preliminary segmentation result 402 is obtained, on which the face components are labeled.

[0073] Step 302: Based on the deep features of pixels in the face image, the preliminary segmentation results of the pixels are corrected to obtain the corrected segmentation results.

[0074] Specifically, the feature aggregation network is invoked to correct the initial segmentation result of the pixels based on the deep features of the pixels, and the corrected segmentation result is determined.

[0075] Deep features refer to features that are not visually apparent, built upon the foundation of lower-level features. They typically refer to features corresponding to the task performed by the neural network. For example, deep features are the features output by the penultimate layer of a basic segmentation network.

[0076] The corrected segmentation result refers to the result after fine-tuning the initial segmentation result of the pixels, and is used to represent the actual segmentation result of the pixels.

[0077] For example, if the corrected segmentation result is represented by mod_seg, then mod_seg is calculated using the following method:

[0078] mod_seg = coarse_seg·α;

[0079] a = softmax (normal (F) · W std ) ;

[0080] wherein a represents the preliminary segmentation result, normal() represents a normalization process, and W std is a network parameter of the feature aggregation network.

[0081] As shown in FIG. 4, the preliminary segmentation result 402 is input into the feature aggregation network, and the corrected segmentation result 403 is determined. Figure 4

[0082] Step 303: calculating the segmentation uncertainty of the pixel point according to the distance between the preliminary segmentation result and the corrected segmentation result.

[0083] The segmentation uncertainty represents the difficulty of the segmentation of the pixel point, and can also be represented as the distance between the preliminary segmentation result and the corrected segmentation result.

[0084] Optionally, an algorithm for calculating the segmentation uncertainty is given as follows:

[0085] 1. calculating the sum of the square of the difference between the preliminary segmentation result and the corrected segmentation result.

[0086] 2. determining the segmentation uncertainty of the pixel point based on the ratio of the sum of the square of the difference to the number of channels of the preliminary segmentation result.

[0087] As an example, the segmentation uncertainty is set as uncertatinty, and the above algorithm can be modified as the following calculation formula:

[0088]

[0089] wherein c represents the number of channels of the preliminary segmentation result, and can also be considered as the number of categories obtained by the preliminary segmentation result, as an example, the face image is segmented into four categories of eyes, mouth, nose and skin, and c = 4. Dist() is a Euclidean distance weighting function. i represents a specific pixel point.

[0090] Step 304: adding the target pixel point with the segmentation uncertainty greater than the threshold to the target pixel point set.

[0091] Optionally, the target pixel point with the segmentation uncertainty not greater than the threshold is regarded as a normal pixel point, and the preliminary segmentation result is directly used in the subsequent steps.

[0092] ​Step 305: Based on the two classes with the highest predicted probabilities of the pixel points in the preliminary segmentation result, the face image is divided into n easily confused regions, n is a positive integer.

[0093] The predicted probability refers to the probability obtained by predicting the class to which the pixel point is likely to be divided. For example, the predicted probability of pixel point A being divided into eyes is 50%, the predicted probability of being divided into cheeks is 30%, and the probability of being divided into hair is 20%. The sum of the predicted probabilities is 1.

[0094] Due to the relatively stable structure of the face, the result obtained by face segmentation is relatively stable compared to other segmentation tasks. Generally, a pixel point is most likely to be confused as two classes. For example, the pixel points in or around the eyes are likely to be confused as eyes and skin due to the similar and rich information in the preliminary segmentation process.

[0095] The two classes with the highest probabilities of the pixel points in the same easily confused region are the same. That is, the two classes that the pixel points in the same easily confused region are likely to be confused are the same. The pixel points of the two confused classes are divided into the same region. For example, the pixel points that are likely to be confused as eyes and skin are divided into the same region, and the pixel points that are likely to be confused as lips and skin are divided into the same region.

[0096] For example, according to the division of the easily confused regions in the preliminary segmentation result 402, an easily confused region classification 404 is obtained, in which the pixel points corresponding to the two classes with the highest predicted probabilities are divided into the same region.

[0097] Step 306: Call the local optimization network corresponding to the i-th easily confused region, and determine the secondary classification result of the target pixel point based on the bottom features of the target pixel point belonging to the i-th easily confused region and the preliminary segmentation result. n is a positive integer.

[0098] Based on the bottom features of the target pixel point and the preliminary segmentation result, the corrected target pixel point is replaced by the target pixel point in the preliminary segmentation result to obtain the secondary classification result.

[0099] Generally, the target pixel points in a region will have the same problem. For example, the pixel points near the skin in the lips are likely to be confused as pixel points belonging to the skin. Therefore, dividing the face image into multiple regions and using the same local optimization network for the pixel points in the same region can simplify the optimization process.

[0100] The local optimization network is used to optimize the target pixel points in the easily confused region and correct the confused target pixel points.

[0101] Since the regions obtained from face segmentation are relatively stable, in order to improve efficiency while ensuring optimization results, easily confused regions are divided into two cases, as shown below:

[0102] 1. If the i-th easily confused region is a first-type region, call the i-th local optimization network corresponding to the i-th easily confused region. Based on the low-level features of the target pixel belonging to the i-th easily confused region and the preliminary segmentation result, determine the secondary classification result of the target pixel, where i is a positive integer.

[0103] Type I regions refer to regions that account for a high proportion of all easily confused regions. For example, such as... Figure 5 As shown, the horizontal axis represents the coordinates of the region, the right vertical axis represents the probability of confusion for the region, and the left vertical axis represents the accuracy of the segmentation. Figure 5 The region corresponding to bar 501 is classified as the first type of region. It is worth noting that curve 502 is the region division measured using the LaPa (Landmark guided face parsing dataset, a dataset released by JD.com AI) method.

[0104] Since the first type of region appears frequently and has a significant impact on the segmentation results, a dedicated i-th local optimization network is needed for optimization.

[0105] 2. If the i-th easily confused region is a second-type region, call the general local optimization network corresponding to the second-type region, and determine the secondary classification result of the target pixel based on the low-level features and preliminary segmentation results of the target pixel belonging to the i-th easily confused region.

[0106] The second type of region refers to regions that account for a relatively low proportion of all easily confused regions. For example, [the following is an example]. Figure 5 The areas other than area 501 are classified as the second type of area.

[0107] Since the second type of region occurs less frequently and does not significantly affect the segmentation results, optimization can be achieved simply by using a general local optimization network.

[0108] For example, such as Figure 4 As shown, after selecting target pixels from the corrected segmentation result 403, the target pixels are classified according to easily confused regions 404, resulting in a region classification map 405 for the target pixels. An optimized network is then applied to different regions in the region classification map 405, and combined with the preliminary segmentation result 402, to obtain a more accurate secondary classification result 406.

[0109] In summary, in the embodiment, the neural network is used to process the face image, and the preliminary segmentation result is optimized according to the segmentation uncertainty of the pixel points in the whole face image, so that the optimization effect of the whole face image can be ensured.

[0110] Moreover, the face image is divided into multiple regions, and the same network is used to optimize the same region, so that the optimization effect can be ensured, and the operation cost can be reduced.

[0111] Figure 6 A face segmentation model provided by an example embodiment of the present application is shown. The face segmentation model includes a basic segmentation module 61, a feature aggregation module 62, and a local optimization module 63.

[0112] The basic segmentation module 61 includes an input layer 601, a basic segmentation network 602, and a convolution layer 605 connected in sequence. The input layer 601 is used to input the face image into the basic segmentation network 602. The input end of the basic segmentation network 602 is connected with the input layer 601, and the output end of the basic segmentation network 602 outputs deep features 603 after the face image is input into the basic segmentation network 602. The deep features 603 are connected to the input end of the convolution layer 604 after passing through a 128*long*wide convolution kernel (where “long” represents the length of the face image, and “wide” represents the width of the face image). The output of the output end of the convolution layer 605 is obtained after passing through an 11*long*wide convolution kernel, and a preliminary segmentation result 605 is obtained.

[0113] The feature aggregation module 62 includes a feature aggregation network 606 and a point selection layer 607 connected in sequence. The feature aggregation network 606 is used to input the deep features 603 after passing through the convolution kernel, and outputs a corrected segmentation result. The input end of the point selection layer 607 is connected with the preliminary segmentation result and the output of the feature aggregation network 606, and the point selection layer 607 is used to obtain target pixel points. There is an 11*long*wide convolution kernel between the feature aggregation layer 606 and the point selection layer 607.

[0114] The local optimization module 63 comprises a region determination layer 608 and a local optimization network 609 connected in sequence. The input end of the region determination layer 608 is connected with the output end of the preliminary segmentation result 605 and the output end of the point selection layer 607, and the region determination layer 608 is configured to determine the region where the target pixel point is located. The input end of the local optimization network 609 is connected with the output end of the region determination layer 608, the output end of the point selection layer 607, the output end of the input layer 601 and the output end of the basic segmentation network 602, and the local optimization network 609 is configured to optimize the target pixel points in the same region, and the local optimization network 609 outputs a secondary classification result 610. There is a convolution kernel with a size of 11*length*width between the output end of the point selection layer 607 and the input end of the region determination layer 608. There is a convolution kernel with a size of 11*length*width between the output end of the point selection layer 607 and the input end of the local optimization network 609. There is a convolution kernel with a size of 11*length*width between the output end of the region determination layer 608 and the input end of the local optimization network 609.

[0115] In summary, the neural network model provided in the embodiment can optimize the preliminary segmentation result according to the segmentation uncertainty of the pixel points in the whole face image, and can ensure the accuracy of the segmentation of the whole face image.

[0116] In the foregoing, it is mentioned that the basic segmentation network, the feature aggregation network and the local optimization network are used to implement the scheme of the present application. The training methods of the three neural networks are introduced below.

[0117] Figure 7 A flowchart of a training method of the basic segmentation network provided in an example embodiment of the present application is shown. The method comprises the following steps:

[0118] Step 701: input a training sample into the basic segmentation network.

[0119] The training sample comprises a sample face image and a segmentation ground truth of the sample face image.

[0120] The sample face image in the training sample can be one or more, which is not limited in the present application.

[0121] There are various ways to obtain the sample face image. Exemplarily, the sample face image is obtained by real-time shooting through a camera, or the sample face image is obtained by accessing a local storage space, or the sample face image is obtained by sending from another terminal, or the sample face image is downloaded from the Internet. The present application does not limit the way of obtaining the sample face image.

[0122] The segmentation ground truth refers to the accurate segmentation annotation on the sample face image, which can be considered as the real situation of face segmentation.

[0123] Step 702: outputting a preliminary segmentation result of the sample face image by the basic segmentation network.

[0124] For details, please refer to step 301.

[0125] Step 703: calculating a first error loss between the preliminary segmentation result of the sample face image and the segmentation ground truth.

[0126] Optionally, the first error loss is calculated using a cross-entropy loss function as the loss function. For example, a calculation formula of a cross-entropy loss function is given as follows:

[0127]

[0128] Wherein, M represents the number of categories, and in the process of training the basic segmentation network, M represents the number of categories of the preliminary segmentation result. The value of y is 0 or 1, which is used to represent whether the pixel point o is divided into the category c in the preliminary segmentation result in accordance with the true situation. If it is in accordance with the true situation, y takes 1, and if it is not in accordance with the true situation, y takes 0. For example, in the preliminary segmentation result, the pixel point o is divided into eyes, while the pixel point o actually belongs to skin. At this time, in the preliminary segmentation result, the pixel point o is divided into eyes, which is not in accordance with the true situation, so here y takes 0. log() represents logarithmic operation. P represents the probability of correct segmentation of the pixel point o in the category c.

[0129] Step 704: updating the network parameters of the basic segmentation network by using an error back propagation algorithm according to the first error loss.

[0130] The error back propagation algorithm (Error BackPropagation Algorithm) obtains the error signals of all units in each layer by transmitting the output error back, and then corrects the weights of each unit.

[0131] The network parameters of the basic segmentation network include at least one of the weight, the bias, the number of neural network layers, the hidden unit and the learning rate.

[0132] In summary, the embodiment provides a training method of a basic segmentation network, which can quickly and effectively train the basic segmentation network, so that the function of the basic segmentation network can be realized. Moreover, no additional labeling information is introduced in the training process, which can improve the stability of the neural network.

[0133] Figure 8 A flowchart of a feature aggregation network training method provided by an example embodiment of the present application is shown.

[0134] The input end of the feature aggregation network is also connected to the basic segmentation network. The method comprises the following steps:

[0135] Step 801: fixing network parameters of the basic segmentation network.

[0136] The training sample includes a sample face image and a segmentation ground truth of the sample face image.

[0137] Optionally, the training sample includes a plurality of sample face images.

[0138] The segmentation ground truth refers to an accurate segmentation annotation on the sample face image.

[0139] Step 802: inputting the training sample into the basic segmentation network.

[0140] The training sample includes a sample face image and a segmentation ground truth of the sample face image.

[0141] Step 803: inputting the preliminary segmentation result of the sample face image into the feature aggregation network.

[0142] Step 804: outputting the corrected segmentation result of the sample face image by the feature aggregation network.

[0143] Step 805: calculating a second error loss between the corrected segmentation result of the sample face image and the segmentation ground truth.

[0144] Optionally, a cross-entropy loss function is used as the loss function to calculate the second error loss. The specific formula of the cross-entropy loss function in this step is shown in formula (1). In this step, some parameters of the cross-entropy loss function have changed. Next, the changed parameters are described. M represents the number of categories. In the process of training the feature aggregation network, M represents the number of categories of the preliminary segmentation result. The value of y is 0 or 1, which is used to represent whether the pixel point o is divided into the category c in the corrected segmentation result in accordance with the true situation. If it is in accordance with the true situation, y takes 1; if it is not in accordance with the true situation, y takes 0. For example, in the preliminary segmentation result, the pixel point o is divided into an eye, but the pixel point o actually belongs to skin. At this time, in the preliminary segmentation result, the eye to which the pixel point o is divided is not in accordance with the true situation, so y takes 0 here.

[0145] Step 806: updating the network parameters of the feature aggregation network by using an error back propagation algorithm according to the second error loss.

[0146] The network parameters of the feature aggregation network include at least one of a weight, a bias, a number of neural network layers, a hidden unit, and a learning rate.

[0147] In summary, the embodiment provides a training method of a feature aggregation network, which can quickly and effectively train the feature aggregation network so that the function of the feature aggregation network can be realized. Moreover, no additional labeled information is introduced in the training process, which can improve the stability of the neural network.

[0148] Figure 9 A flowchart of a training method of a local optimization network provided by an example embodiment of the present application is shown. The input end of the local optimization network is also connected to a feature aggregation network, and the input end of the feature aggregation network is connected to a basic segmentation network. The method includes the following steps:

[0149] Step 901: fixing the network parameters of the feature aggregation network and the network parameters of the basic segmentation network.

[0150] Step 902: inputting a training sample into the basic segmentation network.

[0151] The training sample includes a sample face image and a segmentation ground truth of the face image.

[0152] The sample face image in the training sample can be one or multiple, which is not limited in the present application.

[0153] Step 903: inputting a preliminary segmentation result of the sample face image into the feature aggregation network.

[0154] Step 904: outputting a corrected segmentation result of the sample face image by the feature aggregation network.

[0155] Step 905: inputting a target pixel point of the sample face image into the local optimization network.

[0156] The target pixel point is determined based on the preliminary segmentation result of the sample face image and the corrected segmentation result of the sample face image.

[0157] Step 906: outputting a secondary classification result of the sample face image by the local optimization network.

[0158] For details, please refer to step 306.

[0159] Step 907: calculating a third error loss between the secondary classification result of the sample face image and the segmentation ground truth.

[0160] Optionally, the third error loss is calculated using a cross-entropy loss function as a loss function. The specific formula of the cross-entropy loss function in this step is shown in formula (1). In this step, the parameters of the cross-entropy loss function are changed. Next, the changed parameters are described: M represents the number of categories. In the process of training the local optimization network, M represents the number of categories of the preliminary segmentation result. The value of y is 0 or 1, which is used to represent whether the target pixel point o is divided into the category c in the secondary classification result. If it is consistent with the true situation, y is 1; if it is not consistent with the true situation, y is 0. For example, in the preliminary segmentation result, the pixel point o is divided into the eye, but the pixel point o actually belongs to the skin. At this time, in the secondary classification result, the pixel point o is divided into the eye, which is not consistent with the true situation, so y is 0 here. P represents the probability that the target pixel point o is correctly segmented in the category c.

[0161] Step 908: updating the network parameters of the local optimization network using an error back propagation algorithm according to the third error loss.

[0162] The network parameters of the local optimization network include at least one of a weight, a bias, a number of neural network layers, a hidden unit, and a learning rate.

[0163] In the above embodiment, it is mentioned that different local optimization networks are used for optimization of different regions. Therefore, when there are multiple local optimization networks, the local optimization networks corresponding to different regions are trained respectively. Here, the training can be sequential training or simultaneous training. For example, the local optimization network 1 corresponding to the region A is optimized, and the local optimization network 2 corresponding to the region B is optimized.

[0164] When training the local optimization networks of different regions, the same training sample can be used, or different training samples can be used.

[0165] In summary, the embodiment provides a training method of a local optimization network, which can quickly and effectively train the local optimization network, so that the function of the local optimization network can be realized. Moreover, no additional labeled information is introduced in the training process, which can improve the stability of the neural network.

[0166] To prove the correctness and accuracy of the present application, FaceROI (CVPR2019) and EAGRNet (ECCV2020) are used on LFW (Labled Faces in the Wild, a commonly used face dataset), HELEN (a commonly used face database) and Lapa (Landmark guided face Parsing dataset, a dataset released by Jingdong Artificial Intelligence) respectively for comparison, and the effects of mIOU (mean Intersection Over Union, a semantic segmentation evaluation index) and pixel acc (pixel accuracy) are compared. All input and training settings are aligned with the comparison methods (all comparison results refer to the original paper results, and the comparison methods do not have experimental results on some datasets). For details, please refer to Tables 1, 2 and 3.

[0167] Table 1 Comparison table of test results of the present application on LFW

[0168]

[0169] Table 2 Comparison table of test results of the present application on Helen

[0170]

[0171]

[0172] Table 3 Comparison table of test results of the present application on LaPa

[0173]

[0174] After comprehensive comparison, the scheme of the present application is superior to the effects of FaceROI and EAGRNet on the three test sets.

[0175] The following is an apparatus embodiment of the present application. For details not described in the apparatus embodiment, reference can be made to the corresponding description in the above method embodiments, which will not be described herein.

[0176] Figure 10 A structural schematic diagram of a face segmentation apparatus provided by an example embodiment of the present application is shown. The apparatus can be realized by software, hardware or a combination of both to become all or part of a computer device. The apparatus 1000 includes:

[0177] A segmentation module 1001 is configured to perform facial feature segmentation on a face image to obtain a preliminary segmentation result of a pixel point in the face image.

[0178] A set determination module 1002 is configured to determine a target pixel point set in the face image, the target pixel point set including target pixel points with a segmentation uncertainty greater than a threshold.

[0179] A result determination module 1003 is configured to determine a secondary classification result of the target pixel point based on a bottom-level feature of the target pixel point and the preliminary segmentation result.

[0180] In an optional design of the present application, the set determination module 1002 is further configured to correct the preliminary segmentation result of the pixel point based on a deep-level feature of the pixel point in the face image to obtain a corrected segmentation result; calculate a segmentation uncertainty of the pixel point according to a distance between the preliminary segmentation result and the corrected segmentation result; and add a target pixel point with a segmentation uncertainty greater than the threshold to the target pixel point set.

[0181] In an optional design of the present application, the set determination module 1002 is further configured to call a feature aggregation network to correct the preliminary segmentation result of the pixel point based on the deep-level feature of the pixel point to determine the corrected segmentation result.

[0182] In an optional design of the present application, the set determination module 1002 is further configured to calculate a sum of squared differences between the preliminary segmentation result and the corrected segmentation result; and determine the segmentation uncertainty of the pixel point based on a ratio of the sum of squared differences to a channel number of the preliminary segmentation result.

[0183] In an optional design of the present application, the result determination module 1003 is further configured to divide the face image into n ambiguous regions based on the two classes with the highest predicted probabilities of the pixel points in the preliminary segmentation result, and the pixel points in a same ambiguous region correspond to the two classes with the same highest probabilities; call a local optimization network corresponding to the i th ambiguous region, and determine a secondary classification result of a target pixel point belonging to the i th ambiguous region based on the bottom layer feature of the target pixel point and the preliminary segmentation result.

[0184] In an optional design of the present application, the result determination module 1003 is further configured to, in a case where the i th ambiguous region is a first type region, call an i th local optimization network corresponding to the i th ambiguous region, and determine a secondary classification result of a target pixel point belonging to the i th ambiguous region based on the bottom layer feature of the target pixel point and the preliminary segmentation result; and in a case where the i th ambiguous region is a second type region, call a general local optimization network corresponding to the second type region, and determine a secondary classification result of a target pixel point belonging to the i th ambiguous region based on the bottom layer feature of the target pixel point and the preliminary segmentation result.

[0185] In an optional design of the present application, the segmentation module 1001 is further configured to call a basic segmentation network to perform facial feature segmentation on the face image, and determine the preliminary segmentation result of the pixel points in the face image.

[0186] In an optional design of the present application, the apparatus 1000 further includes:

[0187] The training module 1004 is configured to input a training sample into the basic segmentation network, the training sample including a sample face image and a segmentation ground truth of the sample face image; output a preliminary segmentation result of the sample face image by the basic segmentation network; calculate a first error loss between the preliminary segmentation result of the sample face image and the segmentation ground truth; and update network parameters of the basic segmentation network according to the first error loss by using an error back propagation algorithm.

[0188] In an optional design of the present application, the training module 1004 is further configured to fix the network parameters of the basic segmentation network; input a training sample into the basic segmentation network, the training sample comprising a sample face image and a segmentation ground truth of the sample face image; input a preliminary segmentation result of the sample face image into the feature aggregation network; output a corrected segmentation result of the sample face image by the feature aggregation network; calculate a second error loss between the corrected segmentation result of the sample face image and the segmentation ground truth; and update the network parameters of the feature aggregation network according to the second error loss by using an error back propagation algorithm.

[0189] In an optional design of the present application, the training module 1004 is further configured to fix the network parameters of the feature aggregation network and the network parameters of the basic segmentation network; input a training sample into the basic segmentation network, the training sample comprising a sample face image and a segmentation ground truth of the sample face image; input a preliminary segmentation result of the sample face image into the feature aggregation network; output a corrected segmentation result of the sample face image by the feature aggregation network; input a target pixel point of the sample face image into the local optimization network, the target pixel point being determined based on the preliminary segmentation result of the sample face image and the corrected segmentation result of the sample face image; output a secondary classification result of the sample face image by the local optimization network; calculate a third error loss between the secondary classification result of the sample face image and the segmentation ground truth; and update the network parameters of the local optimization network according to the third error loss by using an error back propagation algorithm.

[0190] In summary, the present embodiment selects target pixel points with an uncertainty greater than a threshold value in the range of an entire face image, and performs secondary classification according to the underlying features of the target pixel points, without introducing additional annotation information in the process, thereby improving the accuracy of the segmentation result and the efficiency of face image segmentation.

[0191] Figure 11Figure 1 is a block diagram of a computer device according to an exemplary embodiment. The computer device 1100 includes a central processing unit (CPU) 1101, a system memory 1104, including a random access memory (RAM) 1102 and a read-only memory (ROM) 1103, and a system bus 1105 that couples the system memory 1104 to the central processing unit 1101. The computer device 1100 also includes a basic input / output system (Input / Output, I / O) system 1106 that helps transfer information between elements within the computer device, and a mass storage device 1107 for storing an operating system 1113, application programs 1114, and other program modules 1115.

[0192] The basic input / output system 1106 includes a display 1108 for displaying information and input devices 1109, such as a mouse, keyboard, and the like, for inputting information into the computer device. The display 1108 and input devices 1109 are connected to the central processing unit 1101 through an input / output controller 1110 that is connected to the system bus 1105. The basic input / output system 1106 can also include the input / output controller 1110 for receiving and processing input from a number of other devices, including a keyboard, mouse, or electronic stylus. Similarly, the input / output controller 1110 provides output to a display screen, printer, or other type of output device.

[0193] The mass storage device 1107 is connected to the central processing unit 1101 through a mass storage controller (not shown) that is connected to the system bus 1105. The mass storage device 1107 and its associated computer device readable medium provide non-volatile storage for the computer device 1100. That is, the mass storage device 1107 can include a computer device readable medium (not shown), such as a hard disk or a compact disk read-only memory (CD-ROM) drive.

[0194] Without loss of generality, the computer device readable medium can include computer device storage media and communication media. Computer device storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storage of information such as computer device readable instructions, data structures, program modules or other data. Computer device storage media includes RAM, ROM, Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), CD-ROM, Digital Video Disc (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices. Of course, those skilled in the art will recognize that the computer device storage media described herein can be embodied in any computer device storage media, and that the computer device storage media should not be limited to the above-mentioned types of media. The system memory 1104 and the mass storage device 1107 described above can be collectively referred to as memory.

[0195] According to various embodiments of the present disclosure, the computer device 1100 can also operate in connection with a remote computer device over a network such as the Internet. That is, the computer device 1100 can connect to the network 1111 through the network interface unit 1112 connected to the system bus 1105, or can connect to other types of networks or remote computer device systems (not shown) using the network interface unit 1112.

[0196] The memory further includes one or more programs stored in the memory, and the central processing unit 1101 implements all or part of the steps of the face segmentation method described above by executing the one or more programs.

[0197] In an exemplary embodiment, a computer readable storage medium is also provided, in which at least one instruction, at least one program, a code set or an instruction set is stored, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement the face segmentation method provided by each method embodiment described above.

[0198] The present application also provides a computer readable storage medium, in which at least one instruction, at least one program, a code set or an instruction set is stored, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the face segmentation method provided by the method embodiment described above.

[0199] Optionally, the present application also provides a computer program product comprising instructions which, when executed on a computer device, cause the computer device to perform the face segmentation method of the above aspects.

[0200] The above-mentioned embodiment numbers of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments.

[0201] Those skilled in the art can understand that all or part of the steps of the above-mentioned embodiments can be completed by hardware, or can be instructed by a program to complete the related hardware, and the program can be stored in a computer readable storage medium. The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.

[0202] The above-mentioned is only the optional embodiment of the present application, and does not limit the present application. Any modification, equivalent replacement, improvement, etc. within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A face segmentation method, characterized by, The method comprises: performing facial feature segmentation on a face image to obtain a preliminary segmentation result of a pixel point in the face image; the preliminary segmentation result comprises a predicted probability of the pixel point being classified into a plurality of categories of facial features; determining a target pixel point set in the face image, the target pixel point set comprising target pixel points with a segmentation uncertainty greater than a threshold, the segmentation uncertainty representing a degree of difficulty of segmentation of the pixel point; dividing pixel points in the face image with the same two categories of the highest predicted probability in the preliminary segmentation result into the same region to obtain n easily confused regions, n being a positive integer greater than one; calling a local optimization network corresponding to an i th easily confused region, and determining a secondary classification result of a target pixel point belonging to the i th easily confused region based on a bottom feature of the target pixel point and the preliminary segmentation result, i being a positive integer.

2. The method of claim 1, wherein, The determination of the target pixel point set in the face image comprises: correcting the preliminary segmentation result of the pixel point in the face image based on a deep feature of the pixel point to obtain a corrected segmentation result; calculating the segmentation uncertainty of the pixel point according to a distance between the preliminary segmentation result and the corrected segmentation result; adding a target pixel point with a segmentation uncertainty greater than the threshold to the target pixel point set.

3. The method of claim 2, wherein, The correction of the preliminary segmentation result of the pixel point in the face image based on a deep feature of the pixel point to obtain a corrected segmentation result comprises: calling a feature aggregation network, correcting the preliminary segmentation result of the pixel point based on the deep feature of the pixel point, and determining the corrected segmentation result.

4. The method of claim 2, wherein, The calculation of the segmentation uncertainty of the pixel point according to a distance between the preliminary segmentation result and the corrected segmentation result comprises: calculating a sum of squares of differences between the preliminary segmentation result and the corrected segmentation result; determining the segmentation uncertainty of the pixel point based on a ratio of the sum of squares of differences to a number of channels of the preliminary segmentation result.

5. The method according to any one of claims 1 to 4, characterized in that, The calling of a local optimization network corresponding to an i th easily confused region, and the determination of a secondary classification result of a target pixel point belonging to the i th easily confused region based on a bottom feature of the target pixel point and the preliminary segmentation result, comprises: in a case where the i th easily confused region is a first type region, calling an i th local optimization network corresponding to the i th easily confused region, and determining the secondary classification result of the target pixel point belonging to the i th easily confused region based on the bottom feature of the target pixel point and the preliminary segmentation result; in a case where the i th easily confused region is a second type region, calling a general local optimization network corresponding to the second type region, and determining the secondary classification result of the target pixel point belonging to the i th easily confused region based on the bottom feature of the target pixel point and the preliminary segmentation result.

6. The method according to any one of claims 1 to 4, characterized in that, The facial feature segmentation on a face image to obtain a preliminary segmentation result of a pixel point in the face image comprises: The basic segmentation network is trained by the following method:

7. The method of claim 6, wherein, The training sample is input into the basic segmentation network, and the training sample includes a sample face image and a segmentation real label of the sample face image; The first error loss between the preliminary segmentation result of the sample face image and the segmentation real label is calculated; The network parameters of the basic segmentation network are updated according to the first error loss by using an error back propagation algorithm. The input end of the feature aggregation network is further connected with the basic segmentation network, and the feature aggregation network is trained by the following method: The network parameters of the basic segmentation network are fixed; 8. The method of claim 3, wherein, The training sample is input into the basic segmentation network, and the training sample includes a sample face image and a segmentation real label of the sample face image; The preliminary segmentation result of the sample face image is input into the feature aggregation network; The second error loss between the corrected segmentation result of the sample face image and the segmentation real label is calculated; The network parameters of the feature aggregation network are updated according to the second error loss by using an error back propagation algorithm. The input end of the local optimization network is further connected with the feature aggregation network, and the input end of the feature aggregation network is connected with the basic segmentation network, and the local optimization network is trained by the following method: The network parameters of the feature aggregation network and the network parameters of the basic segmentation network are fixed; The training sample is input into the basic segmentation network, and the training sample includes a sample face image and a segmentation real label of the sample face image; 9. The method of claim 1, wherein, The preliminary segmentation result of the sample face image is input into the feature aggregation network; The corrected segmentation result of the sample face image is output by the feature aggregation network; The target pixel point of the sample face image is input into the local optimization network, and the target pixel point is determined based on the preliminary segmentation result of the sample face image and the corrected segmentation result of the sample face image; The secondary classification result of the sample face image is output by the local optimization network; The third error loss between the secondary classification result of the sample face image and the segmentation real label is calculated; The network parameters of the local optimization network are updated according to the third error loss by using an error back propagation algorithm. The device comprises: A segmentation device is configured to perform facial feature segmentation on a face image to obtain a preliminary segmentation result of a pixel point in the face image, wherein the preliminary segmentation result includes predicted probabilities of the pixel point being classified into multiple categories of facial features; A set determination device is configured to determine a target pixel point set in the face image, wherein the target pixel point set includes target pixel points with segmentation uncertainty greater than a threshold, and the segmentation uncertainty represents a difficulty level of segmentation of the pixel points.

10. A face segmentation apparatus comprising: ​ ​ ​ The result determining apparatus is configured to divide the pixel points with the same two categories having the highest prediction probability in the preliminary segmentation result in the face image into a same region to obtain n easily confused regions, n being a positive integer greater than 1; call a local optimization network corresponding to an i-th easily confused region, and determine a secondary classification result of a target pixel point based on the bottom features of the target pixel point belonging to the i-th easily confused region and the preliminary segmentation result, i being a positive integer.

11. A computer device, comprising: The computer device comprises a processor and a memory, and the memory stores at least one instruction, at least one program, a code set or an instruction set, which are loaded and executed by the processor to implement the face segmentation method according to any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that, The computer readable storage medium stores at least one program code, which is loaded and executed by the processor to implement the face segmentation method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • SAR image fast segmentation method combined with visible light image information

    CN101872481A

  • Forest fire smoke detection method based on image segmentation

    CN110222644A

  • Image processing method, device and equipment

    CN111768425A