Data processing method and device, storage medium and processor

By assigning weights to different categories of images to be identified and combining them with a multi-loss fusion module, the model parameters are adjusted, which solves the problem of insufficient generalization performance of dense face key point detection models in rich scenarios, and achieves higher model reliability and key point localization accuracy.

CN115170905BActive Publication Date: 2026-06-05DUXIAOMAN TECH (BEIJING) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
DUXIAOMAN TECH (BEIJING) CO LTD
Filing Date
2022-06-29
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing dense facial landmark detection models perform well in limited scenarios, but their generalization performance is poor in rich scenarios, resulting in low model reliability.

Method used

By assigning different weights to different categories of images to be identified, and combining the multi-loss fusion module, the model parameters are adjusted to improve the accuracy of key point localization, enhance the type weights of extreme samples, and perform data augmentation to increase sample diversity.

Benefits of technology

It improves the reliability and key point localization accuracy of the model in various scenarios and solves the problem of insufficient generalization performance of the model in rich scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115170905B_ABST
    Figure CN115170905B_ABST
Patent Text Reader

Abstract

The application discloses a data processing method and device, a storage medium and a processor. The method comprises the following steps: obtaining a to-be-recognized image from an image set, wherein the image set comprises images for representing a face; determining at least one loss error corresponding to the to-be-recognized image; determining a target loss error of the to-be-recognized image based on the at least one loss error and a type weight of the to-be-recognized image, wherein the type weight is used for representing an influence degree of the to-be-recognized image on parameters in an original model, and the original model is used for detecting a key region of a face image; and adjusting the parameters of the original model based on the target loss error to obtain a target model. The application solves the technical problem of low model reliability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing, and more specifically, to a data processing method, apparatus, storage medium, and processor. Background Technology

[0002] Currently, for face recognition, simple samples such as unobstructed frontal faces generally have high accuracy, but the training process uses a wide variety of images, and the generalization performance of a large number of images with diverse scenes is poor.

[0003] In related technologies, dense facial landmark detection is mostly based on facial depth information and a relatively simple loss function design. This cannot achieve good results in limited scenarios, resulting in the technical problem of low model reliability.

[0004] There is currently no effective solution to the technical problem of low reliability of the above-mentioned models. Summary of the Invention

[0005] The present invention provides a data processing method, apparatus, storage medium, and processor to at least solve the technical problem of low model reliability.

[0006] According to one aspect of the present invention, a data processing method is provided, comprising: acquiring an image to be identified from an image set, wherein the image set includes images used to characterize a face; determining at least one loss error corresponding to the image to be identified; determining a target loss error of the image to be identified based on the at least one loss error and a type weight of the image to be identified, wherein the type weight is used to characterize the degree of influence of the image to be identified on the parameters in an original model, the original model being used to detect key regions of a face image; and adjusting the parameters of the original model based on the target loss error to obtain a target model.

[0007] Optionally, determining the target loss error of the image to be identified based on at least one loss error and the type weight of the image to be identified includes: determining the actual loss error of the image to be identified based on at least one loss error; and determining the target loss error based on the actual loss error and the type weight.

[0008] Optionally, determining the actual loss error of the image to be identified based on at least one loss error includes: calculating the sum of at least one loss error and determining it as the actual loss error.

[0009] Optionally, the target loss error is determined based on the actual loss error and the type weight, including: calculating the quotient between the type weight and the actual loss error, and determining it as the target loss error.

[0010] Optionally, a first number of images in the image set that are of the same image type as the image to be identified is determined, wherein the image type is used to characterize the face situation in the image set; the type weight of the image to be identified is determined based on the ratio between the first number of images and the second number of images, wherein the second number of images is used to characterize the total number of images in the image set.

[0011] Optionally, determining at least one loss error of the image to be identified includes: extracting feature locations from the image to be identified, determining detection locations of the image to be identified, wherein the detection locations are used to characterize the locations of key facial regions in the image to be identified; and determining at least one loss error of the image to be identified based on the detection locations and the ground truth locations, wherein the ground truth locations are used to characterize the locations of pre-confirmed key facial regions in the image to be identified.

[0012] According to another aspect of the present invention, a data processing apparatus is also provided. The apparatus includes: an acquisition unit for acquiring an image to be recognized from an image set, wherein the image set includes images used to characterize a face; a first determination unit for determining at least one loss error corresponding to the image to be recognized; a second determination unit for determining a target loss error of the image to be recognized based on the at least one loss error and a type weight of the image to be recognized, wherein the type weight is used to characterize the degree of influence of the image to be recognized on parameters in an original model, the original model being used to detect key regions of a face image; and a generation unit for adjusting the parameters of the original model based on the target loss error to obtain a target model.

[0013] According to another aspect of the present invention, a computer-readable storage medium is also provided. The computer-readable storage medium includes a stored program, wherein, when the program is executed, it controls the device where the computer-readable storage medium is located to perform the data processing method of the present invention.

[0014] According to another aspect of the present invention, a processor is also provided. The processor is used to run a program, wherein the program executes the data processing method of the present invention during runtime.

[0015] In this embodiment of the invention, an image to be identified is obtained from an image set, wherein the image set includes images used to represent faces; at least one loss error corresponding to the image to be identified is determined; based on the at least one loss error and the type weight of the image to be identified, a target loss error of the image to be identified is determined, wherein the type weight is used to characterize the degree of influence of the image to be identified on the parameters in the original model, and the original model is used to detect key regions of the face image; based on the target loss error, the parameters of the original model are adjusted to obtain the target model. In other words, during model training, this invention obtains a target loss function by assigning different weights to different categories of images to be identified, and trains the target model based on the target loss function, thereby fully considering images with fewer occurrences, thus achieving the technical effect of improving model reliability and solving the technical problem of low model reliability. Attached Figure Description

[0016] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:

[0017] Figure 1 This is a flowchart of a data processing method according to an embodiment of the present invention;

[0018] Figure 2 This is a schematic diagram of a dense facial key point detection system according to an embodiment of the present invention;

[0019] Figure 3 This is a schematic diagram of a sample classification result according to an embodiment of the present invention;

[0020] Figure 4 This is a schematic diagram of a data augmentation result according to an embodiment of the present invention;

[0021] Figure 5 This is a schematic diagram of a feature extraction module according to an embodiment of the present invention;

[0022] Figure 6 This is a schematic diagram of a data processing apparatus according to an embodiment of the present invention. Detailed Implementation

[0023] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0024] It should be noted that the terms "first," "second," etc., 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 the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0025] Example 1

[0026] According to an embodiment of the present invention, a method embodiment for data processing is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0027] Figure 1 This is a flowchart of a data processing method according to an embodiment of the present invention. Figure 1 As shown, the method includes the following steps:

[0028] Step S102: Obtain the image to be identified from the image set, wherein the image set includes images used to represent human faces.

[0029] In the technical solution provided by step S102 of the present invention, the image to be identified is obtained from the image set. The image set can be used to represent images of human faces and can be a pre-obtained training set. The image to be identified can be a training sample and can include training samples in states such as frontal face (Class1), side face (Class2), occlusion (Class3), and blur (ClassN).

[0030] Optionally, an image can be selected from the image set, and the selected image can be enhanced to obtain the image to be recognized. The enhancement process can include random in-plane flipping, three-dimensional rotation, and texture occlusion, etc. This is only an example of enhancement processing and no specific limitation is made.

[0031] For example, an image is selected from the image set to obtain training data. The training data can be augmented using a data augmentation module. Data augmentation can be performed through operations such as random in-plane flipping, 3D rotation, and texture occlusion to obtain the image to be recognized. After the above augmentation process, the diversity of samples can be effectively increased, which helps the model learn more robust deep image features.

[0032] Step S104: Determine at least one loss error corresponding to the image to be recognized.

[0033] In the technical solution provided in step S104 of the present invention, at least one loss error corresponding to the image to be identified can be determined by calculating the loss error of different loss functions. The loss error can be used to characterize the similarity between the detection box and the ground truth box.

[0034] Optionally, at least one loss function can be selected for loss calculation based on the actual situation to obtain at least one loss error. Multiple loss functions such as Mean Square Error (MSE), Wing Loss, Awing Loss, Heatmap Loss, and Boundary Loss can be used for loss calculation.

[0035] Step S106: Based on at least one loss error and the type weight of the image to be identified, determine the target loss error of the image to be identified, wherein the type weight is used to characterize the degree of influence of the image to be identified on the parameters in the original model, and the original model is used to detect key regions of the face image.

[0036] In the technical solution provided by step S106 of the present invention, the target loss error of the image to be identified is determined based on at least one loss error and the type weight of the image to be identified. The type weight can be used to characterize the degree of influence of the image to be identified on the parameters in the original model. The original model can be a deep learning network model, which can be used to detect key regions of face images.

[0037] In this embodiment of the invention, since the types of images to be identified are diverse and some categories of samples account for a small proportion, such as difficult samples like large-angle samples and occluded samples, each sample can be labeled with a category during model training to obtain the type weight of the image to be identified. When calculating the loss, the weight can be allocated according to the number of samples in the category to which the image belongs, thereby increasing the type weight of extreme samples such as large-angle samples, and thus improving the accuracy of the model in locating extreme images such as large-angle samples.

[0038] Step S108: Based on the target loss error, adjust the parameters of the original model to obtain the target model.

[0039] In the technical solution provided by step S108 of the present invention, the parameters of the original model are adjusted based on the target loss error to obtain the target model.

[0040] In this embodiment of the invention, the gradient can be calculated and the model parameters updated based on the target loss error (fusion loss), thereby improving the reliability of the model.

[0041] In steps S102 to S108 of this application, the image to be identified is obtained from an image set, wherein the image set includes images used to represent faces; at least one loss error corresponding to the image to be identified is determined; based on the at least one loss error and the type weight of the image to be identified, a target loss error of the image to be identified is determined, wherein the type weight is used to characterize the degree of influence of the image to be identified on the parameters in the original model, and the original model is used to detect key regions of the face image; based on the target loss error, the parameters of the original model are adjusted to obtain the target model. In other words, during model training, this invention obtains a target loss function by assigning different weights to different categories of images to be identified, and trains the target model based on the target loss function, thereby fully considering images with fewer occurrences, thus achieving the technical effect of improving model reliability and solving the technical problem of low model reliability.

[0042] The method described in this embodiment will be further described below.

[0043] As an optional implementation, determining the target loss error of the image to be identified based on at least one loss error and the type weight of the image to be identified includes: determining the actual loss error of the image to be identified based on at least one loss error; and determining the target loss error based on the actual loss error and the type weight.

[0044] In this embodiment, at least one loss error of the image to be identified is determined. The actual loss error of the image to be identified can be determined based on the at least one loss error. The target loss error is determined based on the obtained actual loss function and the type weight corresponding to the object to be identified.

[0045] Optionally, at least one loss error of the image to be recognized can be obtained. When the image to be recognized has only one loss error, the loss error is the actual loss error of the image to be recognized. When the image to be recognized has multiple loss functions, a calculation method such as summation or weighted average can be selected according to actual needs. The actual loss error is obtained by calculating multiple loss functions based on the selected calculation method. The calculation method here is only for illustrative purposes and does not impose specific restrictions on the calculation method of the actual loss error.

[0046] Optionally, the actual loss error of the image to be identified is obtained, and the target loss error is determined based on the actual loss error and the type weight. For example, the target loss error can be the product of the actual loss error and (1-type weight), or it can be the quotient between the actual loss error and the type weight.

[0047] Existing methods for dense facial landmark detection are mostly based on facial depth information and relatively simple loss functions for model training. This method can only achieve good results in limited scenarios. For example, it has a high accuracy rate for simple samples such as frontal faces without occlusion, but its generalization performance is poor for a large number of images with rich scene content, making it difficult to achieve ideal results. In the embodiments of this invention, considering that some types of samples account for a small proportion, in order to improve the balance of model training, a larger type weight is assigned to the samples with a smaller number of samples during model training, thereby enhancing the accuracy of landmark localization in extreme samples.

[0048] As an optional implementation, determining the actual loss error of the image to be identified based on at least one loss error includes: calculating the sum of at least one loss error and determining it as the actual loss error.

[0049] In this embodiment, the sum of at least one loss error is calculated, and the calculated sum is determined as the actual loss error.

[0050] Optionally, the sum of at least one loss error can be calculated through a multi-loss fusion module. The multi-loss fusion module can learn the key point positions based on the image features extracted by the feature extraction module. It can arbitrarily select at least one loss function to perform loss fusion to obtain the actual loss error, for example, the function errors of multiple loss functions such as MSE loss function, WingLoss loss function, AwingLoss loss function, HeatmapLoss loss function and BoundaryLoss loss function can be used to calculate the fusion loss and obtain the actual loss error.

[0051] For example, the loss error of the MSE loss function, WingLoss loss function and AwingLoss loss function can be calculated separately through the multi-loss fusion module to obtain the loss error corresponding to the three loss functions. The sum of the loss errors corresponding to the three functions can then be calculated and determined as the actual loss error.

[0052] In related technologies, dense facial landmark detection is mostly based on facial depth information and a relatively simple loss function for model training. This method only achieves good results in limited scenarios, such as high accuracy for simple samples like unobstructed frontal faces. However, its generalization performance is poor for a large number of images with diverse scenes, making it difficult to achieve ideal results. In this embodiment of the invention, the results of multiple losses can be fused through a multi-loss fusion module. This is equivalent to multiple tasks mutually promoting model learning. Compared with the scheme of using a single loss as the model learning target, it effectively improves the localization accuracy of facial landmarks, thereby achieving the technical effect of improving model reliability and solving the technical problem of low model reliability.

[0053] As an optional implementation, the target loss error is determined based on the actual loss error and the type weight, including: calculating the quotient between the type weight and the actual loss error, and determining it as the target loss error.

[0054] In this embodiment, the quotient between the type weight and the actual loss error can be calculated, and the calculated quotient is determined as the target loss error.

[0055] As an optional implementation, a first number of images in the image set that are of the same image type as the image to be identified is determined, wherein the image type is used to characterize the face in the image set; the type weight of the image to be identified is determined based on the ratio between the first number of images and the second number of images, wherein the second number of images is used to characterize the total number of images in the image set.

[0056] In this embodiment, the image types of the images in the image set are determined, the number of images with the same image type as the image to be identified is determined to obtain the first number of images, the number of images in the image set is determined to obtain the second number of images, and the ratio between the first number of images and the second number of images is determined to obtain the type weight of the image to be identified. In this embodiment, the image type may include seven major categories such as frontal face, side face, occlusion, and blur. It should be noted that the image type classification here is only for illustrative purposes and does not impose specific limitations on the image type and classification. Anything that aims to improve the influence of a small number of samples on the model parameters should be within the protection scope of this invention.

[0057] Optionally, images can be classified according to the image pre-classification assignment module. During model training, each sample can be labeled with a category to determine the type weight of each image type.

[0058] Optionally, due to the diversity of samples, some categories of samples account for a small proportion, such as difficult samples like large-angle samples and occluded samples. When training the model, each sample can be labeled with a category. When calculating the loss, the weight can be allocated according to the number of samples in the category to which the sample belongs, thereby increasing the type weight of extreme samples such as large-angle samples, and thus improving the accuracy of the model in locating extreme samples such as large-angle samples.

[0059] As an optional implementation, determining at least one loss error of the image to be recognized includes: extracting feature locations from the image to be recognized, determining the detection location of the image to be recognized, wherein the detection location is used to characterize the location of a key facial region in the image to be recognized; and determining at least one loss error of the image to be recognized based on the detection location and the true location, wherein the true location is used to characterize the location of a pre-confirmed key facial region in the image to be recognized.

[0060] In this embodiment, feature locations can be extracted from the image to be recognized to determine the detection location of the image to be recognized. Based on the determined detection location and the pre-determined ground truth location, at least one loss error of the image to be recognized is determined. The detection location can be used to characterize the location of key facial regions in the image to be recognized, for example, it can be represented by a detection box. The ground truth location can be a location pre-determined in the image to be recognized, which can be used to characterize the pre-confirmed location of key facial regions in the image to be recognized. The value of each key point in the detection location and the ground truth location that matches can be represented by 1, and the value of the location that does not match can be represented by 0.

[0061] Optionally, a feature extraction module can be used to perform deep image feature extraction on the image to be recognized. The feature extraction module can be a convolutional neural network used to extract features, such as a deep convolutional neural network module, or a convolutional neural network module used to extract image features, such as AlexNet, DenseNet, or SeNet. No specific restrictions are placed on the feature extraction module here.

[0062] Optionally, a Residual Neural Network (ResNet) model from deep learning networks can be used. An attention module and an atrous spatial pyramid pooling (ASPP) module can be added to the ResNet model to extract feature locations from the image to be recognized, thereby determining the detection location of the image to be recognized. The ASPP module can sample the given input image to be recognized in parallel with dilated convolutions at different sampling rates. The ResNet model itself has strong feature learning capabilities. The attention module and the ASPP module improve the accuracy of facial landmark localization by adding weight supervision and sampling the given input features at different ratios to capture the image.

[0063] In this embodiment of the invention, multiple modules can be added to the convolutional neural network of the feature extraction module. For example, attention and ASPP modules can be added to automatically extract multi-dimensional and deep-level facial image features for subsequent facial key points, thereby improving the reliability of the model.

[0064] In this embodiment of the invention, during model training, different weights are assigned to different categories of images to be identified to obtain a target loss function. The target model is then trained based on the target loss function, thereby fully considering images that occur less frequently and thus achieving the technical effect of improving model reliability and solving the technical problem of low model reliability.

[0065] Example 2

[0066] The technical solutions of the embodiments of the present invention will be illustrated below with reference to preferred embodiments.

[0067] Currently, dense facial landmark detection refers to locating key facial regions, including eyebrows, eyes, nose, mouth, and facial contours, given a facial image. With the development of deep learning technology and the increase in facial data, the number of facial landmarks to be detected has gradually expanded from 5 points, through 29 points, 68 points, and 106 points, to over 1000 points, and accuracy has also made significant progress. However, due to factors such as facial angle and occlusion, the limited sample diversity in publicly available datasets and the distribution deviation from samples in real-world scenarios, as well as the difficulty in annotating dense landmarks, subsequent face alignment, face beautification, and facial expression analysis are all affected, resulting in persistent low accuracy in facial landmark detection.

[0068] Methods for detecting dense facial landmarks include traditional methods and deep learning-based methods. Traditional methods extract edge features such as local descriptors and gradient histograms from images and estimate landmark coordinates from these features. However, these shallow feature extraction processes limit the accuracy of landmark detection. Deep learning-based methods use convolutional neural networks (CNNs) to extract deep features, which can obtain deeper semantic features and thus locate landmarks more accurately. However, this method is affected by factors such as scene, pose, and expression, which reduces the accuracy of landmark coordinate localization.

[0069] Furthermore, existing methods for detecting dense facial landmarks are mostly based on facial depth information and relatively simple loss functions for model training. This method can only achieve good results in limited scenarios. For example, it has a high accuracy rate for simple samples such as frontal faces without occlusion, but its generalization performance is poor for a large number of images with rich scene content, making it difficult to achieve ideal results.

[0070] To improve the reliability of the model, thereby enhancing the accuracy of facial landmark localization and the model's generalization ability in various scenarios, this invention proposes a multi-loss fusion method for detecting dense facial landmarks, which can more accurately locate facial landmarks. The method is further described below with reference to preferred embodiments.

[0071] Figure 2 This is a schematic diagram of a dense facial landmark detection system according to an embodiment of the present invention, as shown below. Figure 2 As shown, a dense face key point detection system may include the following four modules: image pre-classification and allocation module 201, data augmentation module 202, feature extraction module 203, and multi-loss fusion module 204.

[0072] In this embodiment of the invention, the image pre-classification allocation module 201 can be used to classify training data. Due to the diversity of samples, some categories of samples account for a small proportion, such as difficult samples like large-angle samples and occluded samples. When training the model, each sample can be labeled with a category. When calculating the loss, the weight can be allocated according to the number of samples in the category to which the sample belongs, increasing the type weight of extreme samples such as large-angle samples, thereby improving the model's accuracy in locating extreme samples such as large-angle samples.

[0073] Figure 3 This is a schematic diagram of a sample classification result according to an embodiment of the present invention, such as... Figure 3 As shown, all training samples can be divided into 7 categories (i.e., N=7) according to the type of image: frontal face (Class1), side face (Class2), occluded (Class3), blurred (ClassN).

[0074] In this embodiment of the invention, the data augmentation module 202 can be used to augment the training data. Before extracting depth features from the face image, the recognition image can undergo data augmentation processing through operations such as random in-plane flipping, three-dimensional rotation, and texture occlusion. Figure 4 This is a schematic diagram of a data augmentation result according to an embodiment of the present invention, such as... Figure 4 As shown, the image is occluded and flipped to obtain occluded and flipped images. After the above data augmentation, the diversity of samples can be effectively increased, which helps the model learn more robust deep image features.

[0075] In this embodiment of the invention, the feature extraction module 203 can be a deep convolutional neural network module, which can be used to extract deep image features from face images.

[0076] Optionally, Figure 5 This is a schematic diagram of a feature extraction module according to an embodiment of the present invention, such as... Figure 5 As shown, in this embodiment of the invention, a residual network model (Residual Neural Network, or ResNet for short) can be used in deep learning network models. An attention module and an atrous spatial pyramid pooling (ASPP) module are added to the residual network model. The ASPP module can sample the given input image to be recognized in parallel with dilated convolutions at different sampling rates. The ResNet model itself has strong feature learning capabilities. The attention module and the ASPP module improve the accuracy of facial landmark localization by adding weight supervision and sampling the given input features at different ratios to capture the image.

[0077] Optionally, the feature extraction module can be other convolutional neural networks used for feature extraction, such as AlexNet, DenseNet, SeNet, etc., which are convolutional neural network modules used for extracting image features. No specific restrictions are placed on the feature extraction module here.

[0078] In this embodiment of the invention, the multi-loss fusion module 204 can learn the key point position based on the image features extracted by the feature extraction module, and can arbitrarily select at least one loss function to perform loss fusion to obtain the actual loss error according to the actual situation. It can use the fusion of multiple losses such as MSE loss, WingLoss loss, AwingLoss loss, HeatmapLoss loss and BoundaryLoss loss to perform loss calculation.

[0079] Optionally, the mean squared error loss can be calculated by combining the landmark heatmap formed by each keypoint and the face boundary map obtained by the keypoints through algorithms such as ellipse fitting. In this case, the value of each keypoint in the true label can be 1, and the value of other positions can be 0.

[0080] It should be noted that the loss calculation module can select a combination of loss functions based on the model's performance on different data distributions, or it can choose loss calculation methods such as cross-entropy. It can calculate the gradient based on the fused loss and update the model parameters, thereby improving the reliability of the model.

[0081] In this embodiment of the invention, a multi-loss fusion method for detecting dense facial key points is proposed. The image pre-classification and allocation module classifies the data to be identified. Since some categories of samples, such as large-angle or occluded samples, have a relatively small proportion, to improve the balance of model training, larger type weights are assigned to the fewer samples during model training, thereby enhancing the accuracy of key point localization in extreme samples. Furthermore, a data augmentation module increases sample diversity, thereby improving the model's generalization ability. Simultaneously, the convolutional neural network of the feature extraction module, after incorporating attention and ASPP modules, can automatically extract multi-dimensional, deep-level facial image features for subsequent facial key point detection. By fusing the results of multiple losses through a multi-loss fusion module, it is equivalent to multiple tasks mutually promoting model learning. Compared to schemes that use a single loss as the model learning target, this embodiment of the invention effectively improves the localization accuracy of facial key points, thereby achieving the technical effect of improving model reliability and solving the technical problem of low model reliability.

[0082] Example 3

[0083] According to an embodiment of the present invention, a data processing apparatus is also provided. It should be noted that this data processing apparatus can be used to execute the data processing method in Embodiment 1.

[0084] Figure 6 This is a schematic diagram of a data processing apparatus according to an embodiment of the present invention. Figure 6 As shown, the data processing apparatus 600 may include: an acquisition unit 601, a first determination unit 602, a second determination unit 603, and a generation unit 604.

[0085] The acquisition unit 601 is used to acquire the image to be identified from the image set, wherein the image set includes images used to represent human faces.

[0086] The first determining unit 602 is used to determine at least one loss error corresponding to the image to be recognized.

[0087] The second determining unit 603 is used to determine the target loss error of the image to be identified based on at least one loss error and the type weight of the image to be identified, wherein the type weight is used to characterize the degree of influence of the image to be identified on the parameters in the original model, and the original model is used to detect key regions of the face image.

[0088] The generation unit 604 is used to adjust the parameters of the original model based on the target loss error to obtain the target model.

[0089] In the data processing apparatus of this embodiment, an acquisition unit acquires an image to be recognized from an image set, wherein the image set includes images used to represent faces; a first determining unit determines at least one loss error corresponding to the image to be recognized; a second determining unit determines a target loss error of the image to be recognized based on the at least one loss error and the type weight of the image to be recognized, wherein the type weight is used to characterize the degree of influence of the image to be recognized on the parameters in the original model, and the original model is used to detect key regions of the face image; a generation unit adjusts the parameters of the original model based on the target loss error to obtain a target model. In other words, in the model training process of this embodiment, different weights are assigned to different categories of images to be recognized to obtain a target loss function, and a target model is trained based on the target loss function, thereby fully considering images with fewer occurrences and thus achieving the technical effect of improving model reliability and solving the technical problem of low model reliability.

[0090] Example 4

[0091] According to an embodiment of the present invention, a storage medium is also provided, the storage medium including a stored program, wherein the program is executed by a processor to control the device where the computer-readable storage medium is located to perform the data processing method in embodiment 1 of the present invention.

[0092] Example 5

[0093] According to an embodiment of the present invention, a processor is also provided for running a program, wherein the program executes the data processing method described in Embodiment 1 during runtime.

[0094] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0095] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0096] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0097] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0098] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0099] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0100] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A data processing method, characterized in that, include: The image to be identified is obtained from an image set, wherein the image set includes images used to represent human faces; Determine at least one loss error corresponding to the image to be identified; Based on the at least one loss error and the type weight of the image to be identified, the target loss error of the image to be identified is determined, wherein the type weight is used to characterize the degree of influence of the image to be identified on the parameters in the original model, the original model is used to detect key regions of the face image, and the original model is a deep learning network model; Based on the target loss error, the parameters of the original model are adjusted to obtain the target model; Determining the target loss error of the image to be identified based on the at least one loss error and the type weight of the image to be identified includes: determining the actual loss error of the image to be identified based on the at least one loss error; and determining the quotient between the type weight and the actual loss error as the target loss error. The method further includes: determining the number of first images in the image set that have the same image type as the image to be identified, wherein the image type is used to characterize the face situation in the image set, and the image type includes at least one of the following: frontal face, side face; determining the type weight of the image to be identified based on the ratio between the first image number and the second image number, wherein the second image number is used to characterize the total number of images in the image set, and the type weight is negatively correlated with the ratio; Determining at least one loss error of the image to be identified includes: extracting feature locations from the image to be identified, determining detection locations of the image to be identified, wherein the detection locations are used to characterize the locations of key facial regions in the image to be identified, and the detection locations are represented by detection boxes; and determining at least one loss error of the image to be identified based on the detection locations and the ground truth locations, wherein the ground truth locations are used to characterize the locations of pre-confirmed key facial regions in the image to be identified.

2. The method according to claim 1, characterized in that, Determining the actual loss error of the image to be recognized based on the at least one loss error includes: The sum of the at least one loss error is calculated and determined as the actual loss error.

3. A data processing apparatus, characterized in that, include: An acquisition unit is configured to acquire an image to be identified from an image set, wherein the image set includes images used to characterize a human face; The first determining unit is used to determine at least one loss error corresponding to the image to be identified; The second determining unit is used to determine the target loss error of the image to be identified based on the at least one loss error and the type weight of the image to be identified, wherein the type weight is used to characterize the degree of influence of the image to be identified on the parameters in the original model, and the original model is used to detect key regions of the face image. A generation unit is used to adjust the parameters of the original model based on the target loss error to obtain the target model; The second determining unit is further configured to determine the actual loss error of the image to be identified based on the at least one loss error; and to determine the quotient between the type weight and the actual loss error as the target loss error; The second determining unit is further configured to determine the number of first images in the image set that have the same image type as the image to be identified, wherein the image type is used to characterize the face situation in the image set, and the image type includes at least one of the following: frontal face, side face; and to determine the type weight of the image to be identified based on the ratio between the first image number and the second image number, wherein the second image number is used to characterize the total number of images in the image set, and the type weight is negatively correlated with the ratio; The first determining unit is further configured to determine at least one loss error of the image to be identified through the following steps: extracting feature positions from the image to be identified to determine the detection position of the image to be identified, wherein the detection position is used to characterize the position of a key facial region in the image to be identified, and the detection position is represented by a detection box; and determining at least one loss error of the image to be identified based on the detection position and the true position, wherein the true position is used to characterize the pre-confirmed position of a key facial region in the image to be identified.

4. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein, when the program is executed, it controls the device on which the computer-readable storage medium is located to perform the data processing method according to any one of claims 1 to 2.

5. A processor, characterized in that, The processor is used to run a program, wherein the program, when run by the processor, performs the data processing method according to any one of claims 1 to 2.