Face image segmentation and illumination quality evaluation method, device, equipment and medium

CN117764941BActive Publication Date: 2026-10-27CHINA UNITED NETWORK COMM GRP CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311768106.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-20
Publication Date
2026-10-27
Estimated Expiration
2043-12-20

AI Technical Summary

Technical Problem

[0004]然而上述现有技术中,在一些特殊情况下,审核系统可能面临一些挑战

Benefits of technology

[0072]本申请提供一种图像分割的人脸光照质量评估方法、装置、设备和介质。获取待评估图像,并将所述待评估图像输入至目标精细分割深度网络模型中,得到分割后的目标图像,所述目标图像包括:至少一个人脸中的目标区域的子图像,所述目标精细分割深度网络模型用于按照人脸中的多个区域对图像进行分割处理;对所述目标图像进行聚类处理,得到至少一个目标区域的子图像对应的像素信息;根据所述像素信息和目标像素阈值对所述待评估图像进行光照质量评估处理,得到所述待评估图像的目标评估结果。该方法可以高效地对照片进行准确的光照质量评估,判定照片是否过亮、过暗、阴阳脸或正常,通过对照片环境的分类能够更加精确地评估各个面部区域的光照条件,从而判断是否存在过亮或阴阳脸的情况,进而大幅度提高照片审核的准确性和效率,因此该方法不仅确保了照片质量符合规定的标准,还提升了系统对复杂和多变光照条件的适应能力,进一步提高了评估的实用性和可靠性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117764941B_ABST
    Figure CN117764941B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of image processing, in particular to a face light quality evaluation method and device for image segmentation, equipment and medium. The method comprises the following steps: obtaining an image to be evaluated, inputting the image to be evaluated into a target fine segmentation deep network model to obtain a segmented target image, the target image comprising a sub-image of a target region in at least one face, and the target fine segmentation deep network model being used for image segmentation processing according to multiple regions in the face; performing clustering processing on the target image to obtain pixel information corresponding to the sub-image of the at least one target region; performing light quality evaluation processing on the image to be evaluated according to the pixel information and a target pixel threshold to obtain a target evaluation result of the image to be evaluated. The method not only ensures that the photo quality meets the specified standard, but also improves the adaptability of the system to complex and variable light conditions, and further improves the practicability and reliability of photo evaluation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and in particular to a method, apparatus, device and medium for evaluating the lighting quality of faces in image segmentation. Background Technology

[0002] Real-name authentication is a method of verifying a user's real identity information to ensure their authenticity in cyberspace. Facial recognition technology plays a crucial role in real-name authentication, ensuring the accuracy and security of the authentication process. With the popularization and development of the internet, various online services and social platforms have increasingly demanded user identity verification. Traditional identity verification methods, such as usernames and passwords, while simple, are easily impersonated and cannot effectively prevent fraudulent activities. Therefore, real-name authentication has gradually become a widely adopted authentication method, especially in fields such as finance, e-commerce, and social networks.

[0003] In existing technologies, facial recognition technology has become a mainstream means of identity authentication. It utilizes computer vision and pattern recognition methods to analyze user-uploaded photos to determine if the user is genuine. However, in real-world scenarios, we also need to analyze environmental factors and lighting conditions in the photos. Key technologies in existing real-name authentication technologies include: Face detection: Using efficient and accurate algorithms, the system can quickly locate the face region in a photo, ensuring the accuracy of subsequent face recognition and key point localization. During this process, environmental factors, such as background complexity, must be considered to ensure accurate detection of faces under different backgrounds; Facial key point localization: Algorithms extract the positions of key points such as eyes, nose, and mouth from the selected face image. This information is crucial for subsequent portrait-background segmentation and lighting quality assessment; Portrait-background segmentation: Key point information is used to distinguish between the portrait and background for more precise analysis of the face region. Environmental classification is particularly important, requiring the identification and processing of various background environments, such as indoor, outdoor, and complex lighting scenes; Facial lighting quality calculation: By calculating the average brightness of the face region and comparing it with a set lighting threshold, the lighting quality of the face in the photo is evaluated. This step helps identify whether the photos were uploaded by genuine users, enhancing the credibility of the authentication. Environmental classification is also crucial in this stage, as different environments (such as natural light, artificial light, and shadows) have varying effects on lighting quality.

[0004] However, the aforementioned existing technologies may face challenges in certain special circumstances. When the background and portrait in a photo are too bright or too dark, or due to issues with the shooting angle or pose, or when the portrait is partially obscured, it can lead to inaccurate face localization and key point information extraction, thus affecting the integrity and clarity of the face in the photo and reducing the accuracy of face recognition. Furthermore, using semantic segmentation technology to separate the face from the background and perform light analysis on the entire face can encounter problems in certain situations. For example, when the person in the photo is wearing glasses, the reflection of light from the eyes is stronger, which can also cause recognition difficulties for the verification system. Therefore, improving the accuracy of the real-name photo verification system in verifying the lighting quality of faces in photos and accurately assessing the impact of photo background and special circumstances on real-name authentication are urgent problems to be solved. Summary of the Invention

[0005] This application provides a method, apparatus, device, and medium for evaluating the lighting quality of faces in image segmentation, in order to solve the aforementioned problems existing in the prior art.

[0006] In a first aspect, this application provides a method for evaluating the lighting quality of a face in an image segmentation image, the method comprising:

[0007] The image to be evaluated is acquired and input into the target fine segmentation deep network model to obtain the segmented target image. The target image includes at least one sub-image of a target region in a face. The target fine segmentation deep network model is used to segment the image according to multiple regions in the face.

[0008] Clustering is performed on the target image to obtain pixel information corresponding to at least one sub-image of the target region;

[0009] The illumination quality of the image to be evaluated is evaluated based on the pixel information and the target pixel threshold to obtain the target evaluation result of the image to be evaluated.

[0010] Optionally, the step of performing illumination quality assessment processing on the image to be evaluated based on the pixel information and the target pixel threshold to obtain the target evaluation result of the image to be evaluated includes:

[0011] The image to be evaluated is input into the environmental classification model to obtain the environmental classification result corresponding to the photo to be evaluated. The environmental classification result includes: indoor result or outdoor result.

[0012] When the environmental classification result is an indoor result, the initial pixel threshold in the database is subjected to a first optimization process to obtain the target pixel threshold corresponding to the image to be evaluated;

[0013] When the environmental classification result is an outdoor result, the initial pixel threshold in the database is subjected to a second optimization process to obtain the target pixel threshold corresponding to the image to be evaluated;

[0014] The illumination quality of the image to be evaluated is evaluated based on the pixel information and the optimized target pixel threshold to obtain the target evaluation result of the image to be evaluated.

[0015] Optionally, before inputting the image to be evaluated into the environment classification model, the method further includes:

[0016] Acquire historical environmental data from historical data, and divide the historical environmental data into training data and test data;

[0017] The training data is input into the classification model to train the classification model and obtain an environment classification model.

[0018] The test data is input into the environmental classification model to obtain the test results;

[0019] When the test results meet the preset conditions, the training of the environment classification model is determined to be complete.

[0020] Optionally, the pixel information includes: bright spot pixels, bright spot pixel percentage, dark spot pixels, and dark spot pixel percentage; the target pixel threshold includes: bright spot pixel threshold, bright spot pixel percentage threshold, dark spot pixel threshold, and dark spot pixel percentage threshold; the step of performing illumination quality assessment processing on the image to be evaluated based on the pixel information and the optimized target pixel threshold to obtain the target evaluation result of the image to be evaluated includes:

[0021] Based on the bright spot pixels, bright spot pixel percentage, bright spot pixel threshold, and bright spot pixel percentage threshold, the first evaluation result of the image to be evaluated is determined;

[0022] The second evaluation result of the image to be evaluated is determined based on the dark spot pixels, the percentage of dark spot pixels, the dark spot pixel threshold, and the dark spot pixel percentage threshold.

[0023] Based on the first evaluation result and the second evaluation result, the target evaluation result of the image to be evaluated is determined.

[0024] Optionally, determining the first evaluation result of the image to be evaluated based on the bright spot pixels, the bright spot pixel percentage, the bright spot pixel threshold, and the bright spot pixel percentage threshold includes:

[0025] Determine whether the bright spot pixel is greater than the bright spot pixel threshold;

[0026] If so, determine whether the percentage of bright spot pixels is greater than the percentage of bright spot pixels threshold;

[0027] When the percentage of bright spot pixels is greater than the percentage of bright spot pixels threshold, the first evaluation result is determined as the first sub-evaluation result;

[0028] When the number of bright spots is not greater than the number of bright spots thresholds and / or the percentage of bright spots is not greater than the percentage of bright spots thresholds, the first evaluation result is determined as the second sub-evaluation result.

[0029] Optionally, determining the second evaluation result of the image to be evaluated based on the dark spot pixels, the percentage of dark spot pixels, the dark spot pixel threshold, and the dark spot pixel percentage threshold includes:

[0030] Determine whether the dark spot pixel is greater than the dark spot pixel threshold;

[0031] If so, determine whether the percentage of dark spot pixels is greater than the threshold value for dark spot pixels;

[0032] When the percentage of dark spot pixels is greater than the threshold for dark spot pixels, the second evaluation result is determined as the third sub-evaluation result;

[0033] When the number of dark spot pixels is not greater than the dark spot pixel threshold and / or the percentage of dark spot pixels is not greater than the dark spot pixel percentage threshold, the second evaluation result is determined as the fourth sub-evaluation result.

[0034] Optionally, determining the target evaluation result of the image to be evaluated based on the first evaluation result and the second evaluation result includes:

[0035] If the first evaluation result is a first sub-evaluation result and the second evaluation result is a third sub-evaluation result, then the target evaluation result is determined to be the first target result;

[0036] If the first evaluation result is the first sub-evaluation result and the second evaluation result is the fourth sub-evaluation result, then the target evaluation result is determined to be the second target result;

[0037] If the first evaluation result is the second sub-evaluation result, and the second evaluation result is the third sub-evaluation result, then the target evaluation result is determined to be the third target result;

[0038] If the first evaluation result is the second sub-evaluation result, and the second evaluation result is the fourth sub-evaluation result, then the target evaluation result is determined to be the fourth target result.

[0039] Secondly, this application provides a face illumination quality assessment device for image segmentation, the device comprising:

[0040] An acquisition module is used to acquire an image to be evaluated and input the image to be evaluated into a target fine segmentation deep network model to obtain a segmented target image. The target image includes at least one sub-image of a target region in a face. The target fine segmentation deep network model is used to segment the image according to multiple regions in the face.

[0041] The processing module is used to perform clustering processing on the target image to obtain pixel information corresponding to at least one sub-image of the target region;

[0042] The processing module is further configured to perform illumination quality assessment processing on the image to be evaluated based on the pixel information and the target pixel threshold, so as to obtain the target evaluation result of the image to be evaluated.

[0043] Optionally, the processing module is further configured to input the image to be evaluated into an environmental classification model to obtain the environmental classification result corresponding to the photo to be evaluated, wherein the environmental classification result includes: indoor result or outdoor result;

[0044] The processing module is further configured to perform a first optimization process on the initial pixel threshold in the database when the environmental classification result is an indoor result, so as to obtain the target pixel threshold corresponding to the image to be evaluated.

[0045] The processing module is further configured to perform a second optimization process on the initial pixel threshold in the database when the environment classification result is an outdoor result, so as to obtain the target pixel threshold corresponding to the image to be evaluated.

[0046] The processing module is further configured to perform illumination quality assessment processing on the image to be evaluated based on the pixel information and the optimized target pixel threshold, so as to obtain the target evaluation result of the image to be evaluated.

[0047] Optionally, the device further includes: an input module and a determination module;

[0048] The acquisition module is also used to acquire historical environmental data from historical data and divide the historical environmental data into training data and test data;

[0049] The input module is used to input the training data into the classification model to train the classification model and obtain an environment classification model.

[0050] The input module is also used to input the test data into the environmental classification model to obtain test results;

[0051] The determining module is used to determine that the training of the environment classification model is complete when the test results meet preset conditions.

[0052] Optionally, the determining module is further configured to determine a first evaluation result of the image to be evaluated based on the bright spot pixels, the bright spot pixel percentage, the bright spot pixel threshold, and the bright spot pixel percentage threshold;

[0053] The determining module is further configured to determine a second evaluation result of the image to be evaluated based on the dark spot pixels, the percentage of dark spot pixels, the dark spot pixel threshold, and the dark spot pixel percentage threshold.

[0054] The determining module is further configured to determine the target evaluation result of the image to be evaluated based on the first evaluation result and the second evaluation result.

[0055] Optionally, the device further includes: a determination module;

[0056] The judgment module is used to determine whether the bright spot pixel is greater than the bright spot pixel threshold;

[0057] The judgment module is further configured to determine whether the percentage of bright spot pixels is greater than the percentage of bright spot pixels if the condition is met.

[0058] The determining module is further configured to determine the first evaluation result as the first sub-evaluation result when the percentage of bright spot pixels is greater than the percentage of bright spot pixels threshold;

[0059] The determining module is further configured to determine the first evaluation result as the second sub-evaluation result when the bright spot pixel is not greater than the bright spot pixel threshold and / or the bright spot pixel percentage is not greater than the bright spot pixel percentage threshold.

[0060] Optionally, the determining module is further configured to determine whether the dark spot pixel is greater than the dark spot pixel threshold;

[0061] The judgment module is further configured to determine whether the percentage of dark spot pixels is greater than the threshold of dark spot pixels if the condition is met.

[0062] The determining module is further configured to determine the second evaluation result as the third sub-evaluation result when the percentage of dark spot pixels is greater than the percentage of dark spot pixels threshold;

[0063] The determining module is further configured to determine the second evaluation result as the fourth sub-evaluation result when the dark spot pixel is not greater than the dark spot pixel threshold and / or the dark spot pixel percentage is not greater than the dark spot pixel percentage threshold.

[0064] Optionally, the determining module is further configured to determine the target evaluation result as the first target result if the first evaluation result is a first sub-evaluation result and the second evaluation result is a third sub-evaluation result;

[0065] The determining module is further configured to determine the target evaluation result as the second target result if the first evaluation result is the first sub-evaluation result and the second evaluation result is the fourth sub-evaluation result;

[0066] The determining module is further configured to determine the target evaluation result as the third target result if the first evaluation result is the second sub-evaluation result and the second evaluation result is the third sub-evaluation result;

[0067] The determining module is further configured to determine the target evaluation result as the fourth target result if the first evaluation result is the second sub-evaluation result and the second evaluation result is the fourth sub-evaluation result.

[0068] Thirdly, this application provides a face illumination quality assessment device for image segmentation, comprising: at least one processor and a memory;

[0069] The memory stores computer-executed instructions;

[0070] The at least one processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the face illumination quality assessment method for image segmentation as described in the first aspect and various possible implementations thereof.

[0071] Fourthly, embodiments of the present invention provide a readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the face illumination quality assessment method for image segmentation as described in the first aspect and various possible implementations of the first aspect.

[0072] This application provides a method, apparatus, device, and medium for evaluating facial illumination quality in image segmentation. The method involves acquiring an image to be evaluated and inputting it into a target fine-segmentation deep network model to obtain a segmented target image. The target image includes at least one sub-image of a target region within a face. The target fine-segmentation deep network model is used to segment the image according to multiple regions within the face. The target image is then clustered to obtain pixel information corresponding to the sub-images of at least one target region. Illumination quality evaluation is performed on the image to be evaluated based on the pixel information and a target pixel threshold to obtain the target evaluation result. This method can efficiently and accurately evaluate the illumination quality of photos, determining whether a photo is too bright, too dark, has uneven lighting, or is normal. By classifying the photo environment, it can more accurately evaluate the illumination conditions of each facial region, thereby determining whether there are cases of excessive brightness or uneven lighting, significantly improving the accuracy and efficiency of photo review. Therefore, this method not only ensures that the photo quality meets the prescribed standards but also enhances the system's adaptability to complex and variable lighting conditions, further improving the practicality and reliability of the evaluation. Attached Figure Description

[0073] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0074] Figure 1 This application provides a flowchart for the face illumination quality assessment method for image segmentation. Figure 1 ;

[0075] Figure 2 This application provides a flowchart for the face illumination quality assessment method for image segmentation. Figure 2 ;

[0076] Figure 3 This application provides a flowchart for the face illumination quality assessment method for image segmentation. Figure 3 ;

[0077] Figure 4 This is a schematic diagram of the face illumination quality assessment device for image segmentation provided in this application;

[0078] Figure 5 This is a schematic diagram of the face illumination quality assessment device for image segmentation provided in this application.

[0079] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0080] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0081] The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented, for example, in orders other than those illustrated or described herein.

[0082] In this application, the terms "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.

[0083] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or refuse.

[0084] First, let me explain the terms used in this application:

[0085] Grounded-Segment-Anything (GSA) model is a powerful zero-shot segmentation model. This model can find any object in an image based on a text description, and then use the powerful segmentation capabilities of Grounded-Segment-Anything (GSA) to segment the object into a fine-grained model. When using the GSA model, the following steps are typically followed: 1. Set a goal: Clearly define the goal you want to achieve. This goal should be specific, measurable, achievable, relevant, and time-bound. 2. Develop a strategy: Based on the goal, develop a corresponding strategy. This strategy should include specific steps and plans for achieving the goal. 3. Take action: Based on the strategy, take specific actions to achieve the goal. These actions should be specific, measurable, actionable, relevant, and time-bound.

[0086] The VGGNet model is a deep convolutional network architecture proposed by the Visual Geometry Group (VGG) at Oxford University. This model is known for its simple and unified design, primarily characterized by the use of multiple small convolutional kernels and a deep network structure. By stacking multiple convolutional layers and max-pooling layers, and using several fully connected layers at the end, VGGNet achieves efficient extraction of image features. This architecture makes VGGNet perform exceptionally well in image recognition and classification tasks.

[0087] Genetic Algorithm (GA): First proposed by John Holland in the 1970s, this algorithm is designed based on the evolutionary laws of organisms in nature. It's a computational model that simulates the biological evolutionary process based on Darwin's theory of evolution, specifically natural selection and genetic mechanisms. It's a method for searching for optimal solutions by simulating natural evolution. Through mathematical methods and computer simulation, the GA transforms the problem-solving process into processes similar to the crossover and mutation of chromosomes and genes in biological evolution. When solving complex combinatorial optimization problems, it often achieves better optimization results faster than some conventional optimization algorithms. GA has been widely applied in combinatorial optimization, machine learning, signal processing, adaptive control, and artificial life.

[0088] Clustering algorithms are unsupervised learning algorithms that group objects in a dataset such that objects within the same group (i.e., a cluster) are highly similar to each other (based on a chosen similarity metric) and highly different from objects in other groups. Common clustering algorithms include k-means, hierarchical clustering, DBSCAN, OPTICS, and STING. Cluster analysis, also known as group analysis, is a statistical analysis method for studying classification problems (of samples or indicators) and is also an important algorithm in data mining. Cluster analysis consists of several patterns, typically a vector of measurements or a point in a multidimensional space. Cluster analysis is based on similarity; patterns within a cluster are more similar than patterns in different clusters.

[0089] Currently, facial recognition technology has become a mainstream means of identity authentication. It uses computer vision and pattern recognition methods to analyze uploaded user photos to determine if the user is genuine. However, in real-world scenarios, we also need to analyze environmental factors and lighting conditions in the photos. Key technologies in existing real-name authentication systems include: Face detection: Utilizing efficient and accurate algorithms, the system can quickly locate the face region in a photo, ensuring the accuracy of subsequent face recognition and key point localization. During this process, environmental factors, such as background complexity, must be considered to ensure accurate detection of faces under different backgrounds; Facial key point localization: Algorithms extract the positions of key points such as eyes, nose, and mouth from the selected face image. This information is crucial for subsequent portrait-background segmentation and lighting quality assessment; Portrait-background segmentation: Key point information is used to distinguish between the portrait and background for more precise analysis of the face region. Environmental classification is particularly important, requiring the identification and processing of various background environments, such as indoor, outdoor, and complex lighting scenes; Facial lighting quality calculation: By calculating the average brightness of the face region and comparing it with a set lighting threshold, the lighting quality of the photo is evaluated.

[0090] However, the aforementioned existing technologies may present some challenges for the review system under certain circumstances. When the background and portrait in a photo are too bright or too dark, or due to issues with the shooting angle or pose, or when the portrait is partially obscured, it can lead to inaccurate face localization and key point information extraction, thus affecting the integrity and clarity of the face in the photo and reducing the accuracy of face recognition. Furthermore, using semantic segmentation technology to separate the face from the background and perform lighting analysis on the entire face can also encounter problems in certain situations.

[0091] To address the aforementioned issues, this application provides a face illumination quality assessment method for image segmentation. The method involves acquiring an image to be assessed and inputting it into a target fine-grained segmentation deep network model capable of segmenting multiple regions of the face. This results in a target image segmented into sub-images comprising multiple target regions of the face. The segmented target image is then clustered to obtain pixel information corresponding to the sub-images of each target region. Based on this pixel information and a target pixel threshold, illumination quality assessment is performed on the image to be assessed, yielding the target assessment result. This method can efficiently and accurately assess the illumination quality of photos, determining whether they are normal. By using comparative classification, it can more precisely assess the illumination conditions of each facial region, thereby identifying any anomalies and significantly improving the accuracy and efficiency of photo review. Therefore, this method not only ensures that photo quality meets the prescribed standards but also enhances the system's adaptability to complex and variable illumination conditions, further improving the practicality and reliability of the assessment.

[0092] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0093] Figure 1 This is a flowchart illustrating the face illumination quality assessment method for image segmentation provided in this application. Figure 1 .like Figure 1 As shown in this embodiment, the face illumination quality assessment method for image segmentation includes:

[0094] S101: Obtain the image to be evaluated and input the image to be evaluated into the target fine segmentation deep network model to obtain the segmented target image, wherein the target image includes: at least one sub-image of the target region in a face.

[0095] Among them, the target fine segmentation deep network model is used to segment the image according to multiple regions in the face. The target fine segmentation deep network model can be, for example, the GSA model, and the segmented target image can be, for example, the nose region, eye region, mouth region, etc.

[0096] Understandably, the target fine segmentation deep network model can be any existing model capable of achieving face region segmentation, and no specific restrictions are imposed here. The segmentation process of this target fine segmentation deep network model can be, for example, as follows: First, a target fine segmentation deep network (GSA) model is established. This model processes complex image scenes by understanding and executing cue-based tasks. The model consists of an image encoder, a cue encoder, and a mask decoder. The model is deployed according to existing technology, and a real-name photo is input into the model. Through the set text information, the corresponding face region photo and the finely segmented face photo are obtained.

[0097] S102: Perform clustering processing on the target image to obtain pixel information corresponding to at least one sub-image of the target region.

[0098] Clustering processing can be, for example, using a clustering algorithm to obtain pixel information corresponding to sub-images of at least one target region of the target image.

[0099] Understandably, this clustering process could be, for example, using the DBSCAN algorithm. The core idea of ​​this algorithm is to discover cluster structures through the density of data points. This algorithm divides data points into core points, boundary points, and noise points, and uses density reachability and accessibility relationships to group data points with similar densities into the same cluster. The core principle of this algorithm is that for a data point, if it contains at least a specified number of MinPts of data points (including itself) within a specified radius ε (Epsilon), then that point is called a core point. Density reachability means that data point q is located within the ε (Epsilon) neighborhood of data point p, and data point p is a core point (containing at least a specified number of MinPts of data points within the ε neighborhood centered on p). Density reachability is not transitive; that is, if p and q are density reachable, and q and r are density reachable, it cannot be inferred that p and r are density reachable. Density reachability: Two data points p and q are density reachable if there exists a path connecting p and q such that the distance between all data points on the path is no greater than ε, and each intermediate point on the path is a core point. Density reachability is a transitive relationship; that is, if p and q are density reachable, and q and r are density reachable, then p and r are also density reachable. For each core point, all density reachable data points are recursively found through density reachability and accessibility relationships, and these are clustered into a cluster. A specified radius ε (Epsilon) is set to 1, and a specified number of MinPts data points is set to 3. If there are pixels with a brightness greater than or equal to T1 and a number greater than or equal to the specified number of MinPts within the range, then the region is a dense region containing the core point.

[0100] Based on the results of this clustering process, pixels with brightness greater than or equal to the target bright spot in each fine region of the face are first selected. The target bright spot pixels can be, for example, pixels that meet the critical value of the bright spot determined by a genetic algorithm. Then, these sample points are scanned. If the number of points within the radius of a sample point meets the requirements of the specified radius, it is included in the core point list, and the points directly reached by its density form the corresponding temporary cluster. For each temporary cluster, it is checked whether the points in it are core points. If they are core points, the temporary cluster corresponding to that point is merged with the current temporary cluster to obtain a new temporary cluster. This checking operation is repeated until every point in the current temporary cluster is not in the core point list or all the points directly reached by its density are already in the temporary cluster. The temporary cluster is then upgraded to a cluster. The same merging operation is then performed on the remaining temporary clusters until all temporary clusters are processed, thus completing the clustering process for the bright spot cluster. The clustering process for dark spot clusters is similar to that for bright spot clusters and will not be described in detail here.

[0101] S103: Perform illumination quality assessment processing on the image to be evaluated based on the pixel information and the target pixel threshold to obtain the target evaluation result of the image to be evaluated.

[0102] The illumination quality assessment process can be, for example, by inputting the image to be assessed into an environment classification model to obtain the environment classification result corresponding to the photo being assessed. The environment classification result includes: indoor result or outdoor result. The environment classification model can be, for example, the VGGNet model. This model is a deep convolutional neural network architecture that achieves efficient extraction of image features by stacking multiple convolutional layers and max pooling layers, and using several fully connected layers at the end. This model can be developed by first creating training data, manually screening images to select effective photos, and then inputting the selected images into an open-source object detection and calibration application for calibration by professional calibrators to obtain the object information contained in the image. The XML file is used to create the images and corresponding XML files in the format required by the model, which is the final training data. Test data is created using the same steps as the training data. Training and testing the model: First, download the pre-trained VGG model and modify the relevant configuration parameters, including: input image size, batch size, number of output channels, dataset path, and pre-trained model path. Specific parameter values ​​can be determined based on the actual situation of the photos. The environment classification model is trained using the above training data, and then tested on the test data using the trained environment classification model. When the desired standard is met, the trained environment classification model is obtained.

[0103] When the environmental classification model results in an indoor result, the initial pixel threshold of the indoor result image is subjected to a first optimization process to obtain the target pixel threshold corresponding to the image to be evaluated; when the environmental classification result is an outdoor result, the initial pixel threshold of the outdoor result image is subjected to a second optimization process to obtain the target pixel threshold corresponding to the image to be evaluated; then, based on the pixel information and the optimized target pixel threshold, the image to be evaluated is subjected to illumination quality evaluation processing to obtain the target evaluation result of the image to be evaluated.

[0104] Understandably, the first or second optimization process in the above-mentioned illumination quality assessment process can be, for example, as follows: Based on the environmental classification results, an adaptive algorithm is used to automatically adjust the threshold values ​​of various parameters. This algorithm can be, for example, a genetic algorithm in optimization algorithms. A genetic algorithm is a search and optimization technique inspired by natural evolution. It utilizes mechanisms such as fitness evaluation, natural selection, genetic crossover, and gene mutation to simulate the evolutionary process in a population of candidate solutions, effectively exploring the solution space to find the optimal or near-optimal solution to complex problems. Applying the environmental classification results to the adaptive algorithm can be, for example, as follows: For different environments, a genetic algorithm is used to automatically adjust the bright spot pixel threshold, dark spot pixel threshold, and corresponding percentage threshold to obtain the target pixel threshold. This process first requires establishing a fitness function, with the following steps:

[0105] Calculate the TP, FP, FN, and TN of bright and dark spots under different environments, where:

[0106] TP represents the number of pixels that were correctly identified as bright or dark spots (true example);

[0107] FP represents the number of pixels that were incorrectly identified as bright or dark spots (false positives);

[0108] FN represents the number of pixels in actual bright or dark spots that were not identified (false negatives);

[0109] TN represents the number of pixels correctly identified as neither bright nor dark spots (true negatives);

[0110] We can use precision and recall to construct the fitness function: precision is the ratio of correctly identified bright or dark pixels to all pixels identified as bright or dark pixels. The formula for calculating precision can be, for example:

[0111]

[0112] Recall is the ratio of correctly identified bright spot pixels to actual bright spot pixels. The formula for calculating recall can be, for example:

[0113]

[0114] The fitness function can be derived from the combined precision and recall. We can use the F1 score as the fitness function, which is the harmonic mean of precision and recall, striking a balance between the two. The formula for calculating the fitness function can be, for example:

[0115]

[0116] The F1 score ranges from 0 to 1, with higher values ​​indicating better threshold selection. To select a suitable F1 score, the following steps are performed for each threshold: First, define a fitness function to clarify how the threshold to be optimized evaluates its effectiveness. The fitness function should accurately reflect the performance of the threshold, for example, scoring it based on its accuracy or efficiency for a specific task (such as image segmentation or classification). Second, create an initial population containing multiple randomly generated candidate thresholds, each representing a potential solution, typically represented as a number or binary string. Then, evaluate the fitness by using the fitness function to assess the performance of each candidate threshold (individual). Individuals with higher fitness are better suited to the problem and are therefore prioritized in subsequent steps. Finally, selection is based on fitness, with individuals having a greater chance of being selected. To generate the next generation, common selection methods include roulette wheel selection and tournament selection. Selected individuals are paired and new individuals are generated through crossover (e.g., single-point crossover or uniform crossover). The crossover process simulates the recombination of biological chromosomes, which helps to explore new solutions. Mutations are randomly introduced into the new generation of individuals, such as randomly changing the threshold. Mutations increase the genetic diversity of the population and prevent the algorithm from converging to a local optimum too early. The formation of the new generation population is achieved by repeating the process of selection, crossover, and mutation to generate a new generation of population and replace the old population. Termination conditions are checked, such as reaching a preset number of iterations, fitness exceeding a certain threshold, or the improvement is too small. Finally, the algorithm outputs the threshold with the highest fitness as the optimal solution to the problem, thus completing the optimization process of the genetic algorithm.

[0117] The face illumination quality assessment method for image segmentation provided in this embodiment acquires the image to be assessed and inputs it into a target fine-grained segmentation deep network model capable of segmenting multiple regions of the face. This results in a target image segmented into sub-images comprising multiple target regions of the face. The segmented target image is then clustered to obtain pixel information corresponding to the sub-images of multiple target regions. Based on this pixel information and a target pixel threshold, illumination quality assessment is performed on the image to be assessed, yielding the target assessment result. This method can efficiently and accurately assess the illumination quality of photos, determining whether they are normal. Through comparative classification, it can more accurately assess the illumination conditions of each facial region, thereby identifying any abnormalities and significantly improving the accuracy and efficiency of photo review. Therefore, this method not only ensures that photo quality meets the prescribed standards but also enhances the system's adaptability to complex and variable illumination conditions, further improving the practicality and reliability of the assessment.

[0118] Figure 2 A flowchart illustrating the face illumination quality assessment method for image segmentation provided in this application embodiment. Figure 2 .like Figure 2 As shown, this embodiment is... Figure 1 Based on the embodiments, a method for evaluating the lighting quality of faces in image segmentation is described in detail. The image segmentation method for evaluating the lighting quality of faces shown in this embodiment includes:

[0119] S201: Obtain the image to be evaluated and input the image to be evaluated into the target fine segmentation deep network model to obtain the segmented target image, wherein the target image includes: at least one sub-image of the target region in a face.

[0120] Step S201 is similar to step S101, and will not be described in detail here.

[0121] S202: Perform clustering processing on the target image to obtain pixel information corresponding to at least one sub-image of the target region. The pixel information includes: bright spot pixels, bright spot pixel percentage, dark spot pixels, and dark spot pixel percentage.

[0122] Step S202 is similar to step S102, and will not be described in detail here.

[0123] S203: Input the image to be evaluated into the environmental classification model to obtain the environmental classification result corresponding to the photo to be evaluated. The environmental classification result includes: indoor result or outdoor result.

[0124] The process of inputting the image to be evaluated into the environmental classification model can be, for example, by inputting the image to be evaluated into the environmental classification model to obtain the environmental classification result corresponding to the photo to be evaluated. The environmental classification result includes: indoor result or outdoor result; the environmental classification model can be, for example, the VGGNet model.

[0125] Understandably, this model can be developed by first creating training data. Images are manually selected to identify valid photos. These selected images are then input into an open-source object detection and calibration application, where professional calibrators calibrate them to obtain an XML file containing the object information. The images and corresponding XML files are then formatted according to the model's requirements, resulting in the final training data. Next, test data is created using the same steps as the training data. Finally, the model is trained and tested: a pre-trained VGG model is downloaded, and relevant configuration parameters are modified, including input image size, batch size, number of output channels, dataset path, and pre-trained model path. Specific parameter values ​​can be determined based on the actual situation of the photos. An environment classification model is trained using the training data, and then tested on the test data using the trained environment classification model. Once the desired standard is met, the trained environment classification model is obtained.

[0126] S204: When the environmental classification result is an indoor result, the initial pixel threshold in the database is subjected to a first optimization process to obtain the target pixel threshold corresponding to the image to be evaluated. The target pixel threshold includes: dark spot pixel threshold and dark spot pixel percentage threshold.

[0127] The first optimization process can be, for example, using an adaptive algorithm to automatically adjust the threshold values ​​of each parameter based on the environmental classification results. This algorithm can be, for example, a genetic algorithm in the optimization algorithm. The process of the genetic algorithm automatically adjusting the threshold values ​​of each parameter in S103 above is similar to that described above, and will not be elaborated here. This step is the process of the genetic algorithm processing the dark spot clusters.

[0128] Understandably, this application assumes that the pixels in the indoor environment are darker than those in the outdoor environment based on the image attributes. That is, the indoor result is the processing of dark spots, and the outdoor result is the processing of bright spots.

[0129] S205: When the environmental classification result is an outdoor result, the initial pixel threshold in the database is subjected to a second optimization process to obtain the target pixel threshold corresponding to the image to be evaluated. The target pixel threshold includes: bright spot pixel threshold and bright spot pixel percentage threshold.

[0130] The second optimization process is similar to the first optimization process, except that the dark spot cluster processing is replaced with the bright spot cluster processing, which will not be elaborated here.

[0131] S206: Determine the first evaluation result of the image to be evaluated based on the bright spot pixels, bright spot pixel percentage, bright spot pixel threshold, and bright spot pixel percentage threshold.

[0132] The first evaluation result may include, for example, determining the first evaluation result as the first sub-evaluation result when the number of bright spot pixels is greater than the bright spot pixel threshold and the percentage of bright spot pixels is greater than the bright spot pixel percentage threshold.

[0133] When the number of bright spot pixels is not greater than the bright spot pixel threshold and / or the percentage of bright spot pixels is not greater than the bright spot pixel percentage threshold, the first evaluation result is determined as the second sub-evaluation result.

[0134] S207: Determine the second evaluation result of the image to be evaluated based on the dark spot pixels, dark spot pixel percentage, dark spot pixel threshold, and dark spot pixel percentage threshold.

[0135] The second evaluation result may include, for example, determining the second evaluation result as the third sub-evaluation result when the number of dark spot pixels is greater than the dark spot pixel threshold and the percentage of dark spot pixels is greater than the dark spot pixel percentage threshold.

[0136] When the number of dark spot pixels is not greater than the dark spot pixel threshold and / or the percentage of dark spot pixels is not greater than the dark spot pixel percentage threshold, the second evaluation result is determined as the fourth sub-evaluation result.

[0137] S208: Determine the target evaluation result of the image to be evaluated based on the first evaluation result and the second evaluation result.

[0138] The determination of the target evaluation result can be as follows: by combining the first and third sub-evaluation results, the target evaluation result can be determined as the first target result; by combining the first and fourth sub-evaluation results, the target evaluation result can be determined as the second target result; by combining the second and third sub-evaluation results, the target evaluation result can be determined as the third target result; and by combining the second and fourth sub-evaluation results, the target evaluation result can be determined as the fourth target result.

[0139] Optionally, before inputting the image to be evaluated into the environment classification model, the method further includes:

[0140] Acquire historical environmental data from historical data, and divide the historical environmental data into training data and test data;

[0141] The training data is input into the classification model to train the classification model and obtain an environment classification model.

[0142] The test data is input into the environmental classification model to obtain the test results;

[0143] When the test results meet the preset conditions, the training of the environment classification model is determined to be complete.

[0144] The face illumination quality assessment method for image segmentation provided in this embodiment clusters the segmented target image to obtain pixel information corresponding to sub-images of multiple target regions. The image to be assessed is then input into an environment classification model to obtain the environment classification result. When the environment classification result is indoors, the initial pixel threshold in the database is first optimized to obtain the target pixel threshold corresponding to the indoor environment of the image to be assessed. When the environment classification result is outdoor, the initial pixel threshold in the database is second optimized to obtain the target pixel threshold corresponding to the outdoor environment of the image to be assessed. This method uses different pixel thresholds for different environments, thus making the assessment results more accurate. Furthermore, this method determines the first assessment result of the image to be assessed based on the bright spot pixels, bright spot pixel percentage, bright spot pixel threshold, and bright spot pixel percentage threshold in the pixel information. It also determines the second assessment result of the image to be assessed based on the dark spot pixels, dark spot pixel percentage, dark spot pixel threshold, and dark spot pixel percentage threshold in the pixel information. Finally, the target assessment result of the image to be assessed is obtained through the first and second assessment results.

[0145] This method can efficiently and accurately assess the lighting quality of photos, determine whether the photos are normal, and more accurately assess the lighting conditions of each facial area through comparative classification, thereby identifying any abnormalities. This significantly improves the accuracy and efficiency of photo review. Therefore, this method not only ensures that the photo quality meets the prescribed standards, but also enhances the system's adaptability to complex and variable lighting conditions, further improving the practicality and reliability of the assessment.

[0146] Figure 3 A flowchart illustrating the face illumination quality assessment method for image segmentation provided in this application embodiment. Figure 3 .like Figure 3 As shown, this embodiment is... Figure 1 Implementation examples or Figure 2 Based on the embodiments, this paper details the illumination quality assessment process performed on the image to be evaluated according to the pixel information and the optimized target pixel threshold, to obtain the target evaluation result of the image to be evaluated. The face illumination quality assessment method for image segmentation shown in this embodiment includes:

[0147] S301: Determine whether the bright spot pixel is greater than the bright spot pixel threshold. If yes, proceed to step S302; otherwise, proceed to step S304.

[0148] In this process, once it is determined that the number of bright spot pixels is greater than the bright spot pixel threshold, the subsequent comparison between the bright spot pixel percentage and the bright spot pixel percentage threshold can be performed to complete the evaluation of the image to be evaluated.

[0149] S302: Determine whether the percentage of bright spot pixels is greater than the percentage of bright spot pixels threshold. If yes, proceed to step S303; otherwise, proceed to step S304.

[0150] S303: Determine the first evaluation result as the first sub-evaluation result.

[0151] When the percentage of bright spot pixels is greater than the percentage of bright spot pixels threshold, the first evaluation result is determined as the first sub-evaluation result.

[0152] S304: Determine the first evaluation result as the second sub-evaluation result.

[0153] Specifically, when the number of bright spot pixels is not greater than the bright spot pixel threshold and / or the percentage of bright spot pixels is not greater than the bright spot pixel percentage threshold, the first evaluation result is determined as the second sub-evaluation result.

[0154] S305: Determine whether the dark spot pixel is greater than the dark spot pixel threshold. If yes, proceed to step S306; otherwise, proceed to step S308.

[0155] In this process, once it is determined that the number of dark spot pixels is greater than the dark spot pixel threshold, the subsequent comparison between the dark spot pixel percentage and the dark spot pixel percentage threshold can be performed to complete the evaluation of the image to be evaluated.

[0156] S306: Determine whether the percentage of dark spot pixels is greater than the threshold of dark spot pixels. If yes, proceed to step S307; otherwise, proceed to step S308.

[0157] S307: Determine the second evaluation result as the third sub-evaluation result.

[0158] Specifically, when the percentage of dark spot pixels is greater than the threshold for the percentage of dark spot pixels, the second evaluation result is determined as the third sub-evaluation result.

[0159] S308: Determine the second evaluation result as the fourth sub-evaluation result.

[0160] Specifically, when the number of dark spot pixels is not greater than the dark spot pixel threshold and / or the percentage of dark spot pixels is not greater than the dark spot pixel percentage threshold, the second evaluation result is determined as the fourth sub-evaluation result.

[0161] S309: If the first evaluation result is a first sub-evaluation result and the second evaluation result is a third sub-evaluation result, then the target evaluation result is determined to be the first target result;

[0162] If the first evaluation result is the first sub-evaluation result and the second evaluation result is the fourth sub-evaluation result, then the target evaluation result is determined to be the second target result;

[0163] If the first evaluation result is the second sub-evaluation result, and the second evaluation result is the third sub-evaluation result, then the target evaluation result is determined to be the third target result;

[0164] If the first evaluation result is the second sub-evaluation result, and the second evaluation result is the fourth sub-evaluation result, then the target evaluation result is determined to be the fourth target result.

[0165] The face illumination quality assessment method for image segmentation provided in this embodiment divides the image quality assessment into several assessment results. When the number of bright spot pixels exceeds a bright spot pixel threshold, and consequently the percentage of bright spot pixels exceeds a bright spot pixel percentage threshold, while the number of dark spot pixels does not exceed a dark spot pixel threshold and / or the percentage of dark spot pixels does not exceed a dark spot pixel percentage threshold, the image is determined to be overexposed. Similarly, when the number of bright spot pixels exceeds a bright spot pixel threshold, and consequently the percentage of bright spot pixels exceeds a bright spot pixel percentage threshold, while the percentage of dark spot pixels does not exceed a dark spot pixel threshold and / or the percentage of dark spot pixels does not exceed a dark spot pixel percentage threshold, the image is determined to be overexposed. If the percentage of bright spots is not greater than the bright spot pixel percentage threshold, and the percentage of dark spots is greater than the dark spot pixel threshold, then the photo is determined to be too dark. If the percentage of bright spots is not greater than the bright spot pixel threshold and / or the percentage of bright spots is not greater than the bright spot pixel percentage threshold, and the percentage of dark spots is not greater than the dark spot pixel threshold and / or the percentage of dark spots is not greater than the dark spot pixel percentage threshold, then the photo is determined to be a photo with uneven lighting.

[0166] This method can efficiently and accurately assess the lighting quality of photos, determining whether a photo is too bright, too dark, has uneven lighting, or is normal.

[0167] Figure 4 This is a schematic diagram of the structure of the face illumination quality assessment device for image segmentation provided in an embodiment of this application. Figure 4 As shown, the face illumination quality assessment device 400 for image segmentation provided in this application includes:

[0168] The acquisition module 401 is used to acquire the image to be evaluated and input the image to be evaluated into the target fine segmentation deep network model to obtain the segmented target image. The target image includes: at least one sub-image of a target region in a face. The target fine segmentation deep network model is used to segment the image according to multiple regions in the face.

[0169] Processing module 402 is used to perform clustering processing on the target image to obtain pixel information corresponding to at least one sub-image of the target region;

[0170] The processing module 402 is further configured to perform illumination quality assessment processing on the image to be evaluated based on the pixel information and the target pixel threshold, so as to obtain the target evaluation result of the image to be evaluated.

[0171] Optionally, the processing module 402 is further configured to input the image to be evaluated into an environmental classification model to obtain the environmental classification result corresponding to the photo to be evaluated, wherein the environmental classification result includes: indoor result or outdoor result;

[0172] The processing module 402 is further configured to perform a first optimization process on the initial pixel threshold in the database when the environmental classification result is an indoor result, so as to obtain the target pixel threshold corresponding to the image to be evaluated.

[0173] The processing module 402 is further configured to perform a second optimization process on the initial pixel threshold in the database when the environment classification result is an outdoor result, so as to obtain the target pixel threshold corresponding to the image to be evaluated.

[0174] The processing module 402 is further configured to perform illumination quality assessment processing on the image to be evaluated based on the pixel information and the optimized target pixel threshold, so as to obtain the target evaluation result of the image to be evaluated.

[0175] Optionally, the device further includes: an input module 403 and a determination module 404;

[0176] The acquisition module 401 is also used to acquire historical environmental data from historical data and divide the historical environmental data into training data and test data;

[0177] The input module 403 is used to input the training data into the classification model to train the classification model and obtain an environment classification model.

[0178] The input module 403 is also used to input the test data into the environmental classification model to obtain test results;

[0179] The determining module 404 is used to determine that the training of the environment classification model is complete when the test results meet the preset conditions.

[0180] Optionally, the determining module 404 is further configured to determine a first evaluation result of the image to be evaluated based on the bright spot pixels, the bright spot pixel percentage, the bright spot pixel threshold, and the bright spot pixel percentage threshold.

[0181] The determining module 404 is further configured to determine a second evaluation result of the image to be evaluated based on the dark spot pixels, dark spot pixel percentage, dark spot pixel threshold, and dark spot pixel percentage threshold.

[0182] The determining module 404 is further configured to determine the target evaluation result of the image to be evaluated based on the first evaluation result and the second evaluation result.

[0183] Optionally, the device further includes: a determination module 405;

[0184] The judgment module 405 is used to determine whether the bright spot pixel is greater than the bright spot pixel threshold;

[0185] The judgment module 405 is further configured to determine whether the percentage of bright spot pixels is greater than the percentage of bright spot pixels if the condition is met.

[0186] The determining module 404 is further configured to determine the first evaluation result as the first sub-evaluation result when the percentage of bright spot pixels is greater than the percentage of bright spot pixels threshold.

[0187] The determining module 404 is further configured to determine the first evaluation result as the second sub-evaluation result when the bright spot pixel is not greater than the bright spot pixel threshold and / or the bright spot pixel percentage is not greater than the bright spot pixel percentage threshold.

[0188] Optionally, the judgment module 405 is further configured to determine whether the dark spot pixel is greater than the dark spot pixel threshold;

[0189] The judgment module 405 is further configured to determine whether the percentage of dark spot pixels is greater than the threshold of dark spot pixels if the condition is met.

[0190] The determining module 404 is further configured to determine the second evaluation result as the third sub-evaluation result when the percentage of dark spot pixels is greater than the percentage of dark spot pixels threshold.

[0191] The determining module 404 is further configured to determine the second evaluation result as the fourth sub-evaluation result when the dark spot pixel is not greater than the dark spot pixel threshold and / or the dark spot pixel percentage is not greater than the dark spot pixel percentage threshold.

[0192] Optionally, the determining module 404 is further configured to determine the target evaluation result as the first target result if the first evaluation result is a first sub-evaluation result and the second evaluation result is a third sub-evaluation result;

[0193] The determining module 404 is further configured to determine the target evaluation result as the second target result if the first evaluation result is the first sub-evaluation result and the second evaluation result is the fourth sub-evaluation result;

[0194] The determining module 404 is further configured to determine the target evaluation result as the third target result if the first evaluation result is the second sub-evaluation result and the second evaluation result is the third sub-evaluation result;

[0195] The determining module 404 is further configured to determine the target evaluation result as the fourth target result if the first evaluation result is the second sub-evaluation result and the second evaluation result is the fourth sub-evaluation result.

[0196] Figure 5 A schematic diagram of the face illumination quality assessment device for image segmentation provided in this application. Figure 5 As shown, this application provides a face illumination quality assessment device for image segmentation. The face illumination quality assessment device 500 for image segmentation includes: a receiver 501, a transmitter 502, a processor 503, and a memory 504.

[0197] Receiver 501 is used to receive instructions and data;

[0198] Transmitter 502 is used to send commands and data;

[0199] Memory 504 is used to store instructions executed by the computer;

[0200] Processor 503 is used to execute computer execution instructions stored in memory 504 to implement the various steps of the face illumination quality assessment method for image segmentation in the above embodiments. For details, please refer to the relevant descriptions in the foregoing embodiments of the face illumination quality assessment method for image segmentation.

[0201] Optionally, the memory 504 can be either standalone or integrated with the processor 503.

[0202] When the memory 504 is set up independently, the electronic device also includes a bus for connecting the memory 504 and the processor 503.

[0203] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the face illumination quality assessment method for image segmentation as described above by the face illumination quality assessment device for image segmentation.

[0204] It will be understood by those skilled in the art that all or some of the steps, systems, or apparatuses disclosed above, and their functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof. In hardware implementations, the division between functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software may be distributed on a computer-readable medium, which may include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0205] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.

[0206] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.

Claims

1. A method for evaluating the illumination quality of faces in image segmentation, characterized in that, The method includes: The image to be evaluated is acquired and input into the target fine segmentation deep network model to obtain the segmented target image. The target image includes at least one sub-image of a target region in a face. The target fine segmentation deep network model is used to segment the image according to multiple regions in the face. Clustering is performed on the target image to obtain pixel information corresponding to at least one sub-image of the target region; The image to be evaluated is subjected to illumination quality assessment processing based on the pixel information and the target pixel threshold to obtain the target evaluation result of the image to be evaluated, including: The image to be evaluated is input into the environmental classification model to obtain the environmental classification result corresponding to the photo to be evaluated. The environmental classification result includes: indoor result or outdoor result. When the environmental classification result is an indoor result, the initial pixel threshold in the database is subjected to a first optimization process to obtain the target pixel threshold corresponding to the image to be evaluated; When the environmental classification result is an outdoor result, the initial pixel threshold in the database is subjected to a second optimization process to obtain the target pixel threshold corresponding to the image to be evaluated; Based on the pixel information and the optimized target pixel threshold, the image to be evaluated is subjected to illumination quality evaluation processing to obtain the target evaluation result of the image to be evaluated. The pixel information includes: bright spot pixels, bright spot pixel percentage, dark spot pixels, and dark spot pixel percentage; the target pixel threshold includes: bright spot pixel threshold, bright spot pixel percentage threshold, dark spot pixel threshold, and dark spot pixel percentage threshold; the step of performing illumination quality assessment processing on the image to be evaluated based on the pixel information and the optimized target pixel threshold to obtain the target evaluation result of the image to be evaluated includes: Based on the bright spot pixels, bright spot pixel percentage, bright spot pixel threshold, and bright spot pixel percentage threshold, the first evaluation result of the image to be evaluated is determined; The second evaluation result of the image to be evaluated is determined based on the dark spot pixels, the percentage of dark spot pixels, the dark spot pixel threshold, and the dark spot pixel percentage threshold. Based on the first evaluation result and the second evaluation result, the target evaluation result of the image to be evaluated is determined.

2. The method according to claim 1, characterized in that, Before inputting the image to be evaluated into the environment classification model, the method further includes: Acquire historical environmental data from historical data, and divide the historical environmental data into training data and test data; The training data is input into the classification model to train the classification model and obtain an environment classification model. The test data is input into the environmental classification model to obtain the test results; When the test results meet the preset conditions, the training of the environment classification model is determined to be complete.

3. The method according to claim 1, characterized in that, The step of determining the first evaluation result of the image to be evaluated based on the bright spot pixels, the percentage of bright spot pixels, the bright spot pixel threshold, and the bright spot pixel percentage threshold includes: Determine whether the bright spot pixel is greater than the bright spot pixel threshold; If so, determine whether the percentage of bright spot pixels is greater than the percentage of bright spot pixels threshold; When the percentage of bright spot pixels is greater than the percentage of bright spot pixels threshold, the first evaluation result is determined as the first sub-evaluation result; When the number of bright spots is not greater than the number of bright spots thresholds and / or the percentage of bright spots is not greater than the percentage of bright spots thresholds, the first evaluation result is determined as the second sub-evaluation result.

4. The method according to claim 1, characterized in that, The step of determining the second evaluation result of the image to be evaluated based on the dark spot pixels, the percentage of dark spot pixels, the dark spot pixel threshold, and the dark spot pixel percentage threshold includes: Determine whether the dark spot pixel is greater than the dark spot pixel threshold; If so, determine whether the percentage of dark spot pixels is greater than the threshold value for dark spot pixels; When the percentage of dark spot pixels is greater than the threshold for dark spot pixels, the second evaluation result is determined as the third sub-evaluation result; When the number of dark spot pixels is not greater than the dark spot pixel threshold and / or the percentage of dark spot pixels is not greater than the dark spot pixel percentage threshold, the second evaluation result is determined as the fourth sub-evaluation result.

5. The method according to claim 1, characterized in that, The step of determining the target evaluation result of the image to be evaluated based on the first evaluation result and the second evaluation result includes: If the first evaluation result is a first sub-evaluation result and the second evaluation result is a third sub-evaluation result, then the target evaluation result is determined to be the first target result; If the first evaluation result is the first sub-evaluation result and the second evaluation result is the fourth sub-evaluation result, then the target evaluation result is determined to be the second target result; If the first evaluation result is the second sub-evaluation result, and the second evaluation result is the third sub-evaluation result, then the target evaluation result is determined to be the third target result; If the first evaluation result is the second sub-evaluation result, and the second evaluation result is the fourth sub-evaluation result, then the target evaluation result is determined to be the fourth target result.

6. A face illumination quality assessment device for image segmentation, characterized in that, include: An acquisition module is used to acquire an image to be evaluated and input the image to be evaluated into a target fine segmentation deep network model to obtain a segmented target image. The target image includes at least one sub-image of a target region in a face. The target fine segmentation deep network model is used to segment the image according to multiple regions in the face. The processing module is used to perform clustering processing on the target image to obtain pixel information corresponding to at least one sub-image of the target region; The processing module is further configured to perform illumination quality assessment processing on the image to be evaluated based on the pixel information and the target pixel threshold to obtain a target evaluation result for the image to be evaluated, including: inputting the image to be evaluated into an environment classification model to obtain an environment classification result corresponding to the image to be evaluated, wherein the environment classification result includes: an indoor result or an outdoor result; when the environment classification result is an indoor result, performing a first optimization processing on the initial pixel threshold in the database to obtain a target pixel threshold corresponding to the image to be evaluated; when the environment classification result is an outdoor result, performing a second optimization processing on the initial pixel threshold in the database to obtain a target pixel threshold corresponding to the image to be evaluated; and performing illumination quality assessment processing on the image to be evaluated based on the pixel information and the optimized target pixel threshold to obtain a target evaluation result for the image to be evaluated; wherein the pixel information includes: bright spot pixels, bright spot pixel percentage, dark spot pixels, and dark spot pixel percentage, and the target pixel threshold includes: bright spot pixel threshold, bright spot pixel percentage threshold, dark spot pixel threshold, and dark spot pixel percentage threshold; The determining module is configured to determine a first evaluation result of the image to be evaluated based on the bright spot pixels, the percentage of bright spot pixels, the bright spot pixel threshold, and the bright spot pixel percentage threshold; determine a second evaluation result of the image to be evaluated based on the dark spot pixels, the percentage of dark spot pixels, the dark spot pixel threshold, and the dark spot pixel percentage threshold; and determine a target evaluation result of the image to be evaluated based on the first evaluation result and the second evaluation result.

7. A face illumination quality assessment device for image segmentation, characterized in that, include: Memory; processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the face illumination quality assessment method for image segmentation as described in any one of claims 1-5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the face illumination quality assessment method for image segmentation as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Face image quality evaluation method and device and terminal

    CN110147744A

  • Face illumination quality evaluation method and system, server and computer readable medium

    CN112991159A