Face part positioning method and device based on multi-region perception, and medium

Through the multi-region perception-based face positioning method, combined with multi-scale feature extraction and recursive feature pyramid network, the problem that traditional diagnostic methods cannot provide real-time health status monitoring is solved, and the precise positioning of faces and health management is achieved.

CN119851330AActive Publication Date: 2025-04-18NINGBO FIRST HOSPITAL
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510330537.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-20
Publication Date
2025-04-18
Estimated Expiration
2045-03-20

AI Technical Summary

Technical Problem

Traditional coronary heart disease diagnosis methods cannot provide real-time, non-invasive health status monitoring, and the equipment is complex and requires professional operation, which limits its application in daily health management.

Method used

Using a face positioning method based on multi-region perception, a geometric relationship and feature correlation model between sub-region is constructed by extracting rectangular boundary images, sub-region division, multi-scale feature extraction and interactive optimization of the face area, and a multi-scale feature fusion is carried out through a recursive feature pyramid network, and finally precise positioning of face parts is performed through a dual detection head architecture.

Benefits of technology

It realizes accurate positioning of various parts of the face, provides real-time and non-invasive health status monitoring, reduces detection complexity and radiation exposure risks, improves detection accuracy and robustness, and achieves efficient real-time processing in resource-constrained environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119851330A_ABST
    Figure CN119851330A_ABST
Patent Text Reader

Abstract

The invention discloses a face part positioning method and device based on multi-region perception and a medium, and relates to the technical field of image processing, and the method comprises the steps: extracting a rectangular boundary image of a face region in an input image, and carrying out the sub-region division of the face region in the rectangular boundary image based on face key points; by extracting multi-scale features of each sub-region and performing interactive optimization, constructing a geometrical relationship between the sub-regions and constructing a feature relevance model; further fusing and optimizing multi-scale features through a recursive feature pyramid by taking the constructed model as priori knowledge; the fused features are used as the input of a main detection head, the features before fusion are used as the input of an auxiliary detection head, and the face part is positioned through a double-detection-head framework. According to the invention, accurate positioning and division of the face region are ensured, the detection precision is improved, and the robustness of the system in a complex scene is also improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to a method, device and medium for locating facial parts based on multi-region perception. Background Art

[0002] As a common and serious cardiovascular disease, the early symptoms of coronary heart disease are often very hidden and difficult to detect. However, during the progression of the disease, the patient may experience some subtle physiological changes on his face, which, although subtle, may be important clues for early diagnosis. Traditional diagnostic methods such as blood tests, electrocardiograms, echocardiograms, and CT scans, although important in diagnosing coronary heart disease, usually fail to provide real-time, non-invasive health status monitoring. In addition, these detection methods often require complex equipment and professional operations, limiting their widespread use in daily health management.

[0003] In view of this, facial image-based facial part localization technology has gradually emerged as an emerging tool for assisting the diagnosis of coronary heart disease. This technology uses an efficient facial part localization model combined with multi-scale feature extraction technology to accurately capture subtle facial changes related to coronary heart disease. Summary of the invention

[0004] In order to achieve accurate positioning of various parts of a face, the present invention proposes a method for positioning face parts based on multi-region perception, comprising the steps of: S1: extracting a rectangular boundary image of a face region in an input image, and dividing the face region in the rectangular boundary image into sub-regions based on face key points; S2: By extracting multi-scale features of each sub-region and performing interactive optimization, the geometric relationship between sub-regions and the construction of feature correlation model are constructed; S3: Using the constructed model as prior knowledge, multi-scale features are further integrated and optimized through recursive feature pyramid; S4: The fused features are used as the input of the main detection head, and the features before fusion are used as the input of the auxiliary detection head. The facial parts are located through the dual detection head architecture.

[0005] Furthermore, the step S1 further includes the following steps: By calculating the proportion of the face area in the rectangular boundary image and the image acquisition quality, when the proportion is lower than a preset ratio range and / or the image acquisition quality is lower than a preset threshold, a prompt is given to adjust the shooting distance and / or angle, and the process returns to step S1.

[0006] Furthermore, the face area ratio is calculated using the following formula: In the formula, is the face area ratio, and are the coordinates of the upper left corner and lower right corner of the rectangular boundary image, respectively, and W and H are the width and height of the input image, respectively.

[0007] Furthermore, the image acquisition quality is obtained by the following formula: Where Q is the image acquisition quality, is the preset weight coefficient, C is the image clarity, B is the image contrast, and L is the image brightness.

[0008] Furthermore, in the step S1, the deep feature extraction module is replaced with the HRNet with deep separable convolution to recognize the key points of the face.

[0009] Furthermore, in the S2 step, in each sub-region, the detail features in the current sub-region are first extracted by using depthwise separable convolution, and then the features across sub-regions are interacted through a multi-head self-attention mechanism to model the geometric relationship and feature correlation between sub-regions, and the global information and local details are integrated through a shared feature representation layer.

[0010] Furthermore, in the S3 step, ordinary convolution is replaced by depthwise separable convolution, and a recursive feature pyramid network combining channel attention and spatial attention mechanisms is used to achieve recursive fusion of multi-layer features through residual connections.

[0011] Furthermore, in steps S2 to S4, the computational complexity is optimized through lightweight pruning and knowledge distillation methods.

[0012] The present invention also includes a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the method for locating facial parts based on multi-region perception are implemented.

[0013] Also included is a device for processing data, comprising: a memory having a computer program stored thereon; The processor is used to execute the computer program in the memory to implement the steps of the method for locating facial parts based on multi-region perception.

[0014] Compared with the prior art, the present invention has at least the following beneficial effects: (1) The method, device and medium for locating facial parts based on multi-region perception described in the present invention use a pre-trained face detection model and a high-resolution network (HRNet) to detect key points, ensuring accurate positioning and division of facial regions. This high-precision positioning lays a solid foundation for subsequent feature extraction and analysis. (2) Compared with traditional blood tests and imaging methods, facial image analysis technology provides a real-time, non-invasive way to monitor health status. Patients do not need to go through a complicated testing process and avoid the risk of radiation exposure, making health management more convenient and safer. (3) By using the recursive feature pyramid network (RFPN), the system can fuse multi-scale features and enhance the ability to capture features of different sizes and details. This method not only improves the detection accuracy, but also improves the robustness of the system in complex scenarios. (4) A dual detection head architecture is adopted. The main detection head is responsible for high-precision classification and boundary regression, while the auxiliary detection head adopts a loose label strategy to improve the recall rate. This design balances the accuracy and coverage of detection and reduces the possibility of missed detection. (5) Through lightweight pruning and knowledge distillation methods, the system significantly reduces the computational complexity while maintaining high detection performance and achieves efficient real-time processing, which is of great significance for large-scale applications and deployment, especially in resource-constrained environments. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 A step diagram of a method for locating face parts based on multi-region perception; Figure 2 Schematic diagram of the dual detection head architecture. DETAILED DESCRIPTION

[0016] The following are specific embodiments of the present invention and the accompanying drawings to further describe the technical solution of the present invention, but the present invention is not limited to these embodiments.

[0017] Coronary heart disease is a heart disease caused by stenosis or blockage of the blood vessels that supply the heart (coronary arteries). Traditionally, the diagnosis of coronary heart disease mainly relies on invasive examinations such as coronary angiography, non-invasive stress tests, or imaging examinations. However, these methods are usually costly and have certain risks. In recent years, with the increasing application of artificial intelligence in the medical field, health status assessment based on facial features has become an emerging research direction.

[0018] This paper focuses on developing an efficient face part localization model that can accurately identify and extract multi-scale features of different parts of the face. Specifically, through deep learning algorithms, the model can capture subtle facial changes and landmarks at different resolutions that may be associated with the presence of coronary heart disease. Figure 1 As shown, the present invention proposes a method for locating face parts based on multi-region perception, comprising the steps of: S1: extracting a rectangular boundary image of a face region in an input image, and dividing the face region in the rectangular boundary image into sub-regions based on face key points; S2: By extracting multi-scale features of each sub-region and performing interactive optimization, the geometric relationship between sub-regions and the construction of feature correlation model are constructed; S3: Using the constructed model as prior knowledge, multi-scale features are further integrated and optimized through recursive feature pyramid; S4: The fused features are used as the input of the main detection head, and the features before fusion are used as the input of the auxiliary detection head. The facial parts are located through the dual detection head architecture.

[0019] According to the scheme adopted by the present invention, the input image is first processed by a pre-trained face detection model. Here, the face detection model we adopt can be any one of the mature face recognition technologies such as Viola-Jones framework, HOG+SVM, DPM deformable component model, CNN convolutional neural network and YOLO11. By training on a large-scale data set, a general face feature representation is learned, and then the learned knowledge is transferred to a small-scale data set of the face recognition task to improve the model performance and generalization ability.

[0020] Assume that the input image is L, and the size of the image is W×H. Use the pre-trained face detection model to detect the complete face area in the image. Assume that the detected face area is a rectangular box ,in and are the coordinates of the upper left and lower right corners of the face rectangle. Then, calculate the proportion P of the face area in the image: The image quality P needs to be within a certain range to ensure the quality of the captured image. If it is detected that P is not within the range, the system will adjust the angle or distance of image capture in real time according to the current situation, and guide the collector to adjust the shooting position so that the face ratio reaches the set range.

[0021] Furthermore, in order to improve the accuracy and quality of the collected images, the system will determine whether the image quality of the collected images is qualified through real-time analysis. The image quality is obtained through the following formula: Where Q is the image acquisition quality, is the preset weight coefficient, C is the image clarity, B is the image contrast, and L is the image brightness.

[0022] The image quality value is calculated based on factors such as image clarity, contrast, and lighting conditions. If If the image meets the acquisition standard, it will prompt you to readjust it. Ultimately, it will reduce unqualified images and ensure that each image collected has good details and clarity. According to the ROC curve analysis of sensitivity and specificity, the best balance point is selected. In this embodiment, the clarity adopts the Laplacian algorithm, C>10 is set to represent clarity, B>0.5 is selected for contrast, and L∈[80,200] is selected for illumination conditions. And the initial weight coefficient is set They are 0.5, 0.3, and 0.2 respectively, and are adjusted appropriately according to different environments based on the image quality feedback from users.

[0023] Here, the present invention marks images that meet the acquisition criteria as positive classes by setting a threshold value T, and marks them as negative classes otherwise. The ROC curve is generated by adjusting the decision threshold T of the binary classification model and calculating the sensitivity (TruePositive Rate, TPR) and false positive rate (FalsePositive Rate, FPR) under different thresholds. First, the samples are sorted from high to low according to the prediction scores output by the model, and then the decision threshold is gradually adjusted. The corresponding TPR and FPR are calculated under each threshold, and these points are plotted on a two-dimensional coordinate axis, with the horizontal axis being FPR and the vertical axis being TPR, to finally form a curve. The point closest to the upper left corner is selected as the optimal point balance point on the ROC curve.

[0024] After obtaining the facial region image that meets the conditions, the facial image segmentation stage is entered. The present invention combines geometric prior knowledge with deep learning technology to construct an efficient region segmentation process. This method first designs a facial geometry template, which is defined based on a series of key proportional parameters, including but not limited to the ratio of eye width to nose bridge length, mouth width to face jaw width, etc. Through statistical analysis of large-scale facial data sets, these proportional parameters are carefully selected to ensure that they can adapt to a variety of facial morphologies, thereby providing a general and flexible basic model.

[0025] In order to construct this facial geometry template, we first extracted feature points from a large number of facial images, and conducted detailed measurements and analyses of the distances and angles between these feature points. By comprehensively considering data from different races, genders, and age groups, we determined the most representative proportional parameters. These parameters not only take into account static facial features (such as the relative positions of the facial features), but also dynamic features (such as the impact of facial expression changes on facial structure).

[0026] Considering the various postures, sizes or expressions that a face may present in practical applications, affine transformation is introduced in template design. This mathematical transformation allows the template to be dynamically adjusted in scale and angle, so that it can accurately fit the face area under different conditions. Affine transformation can not only maintain the parallelism of lines and the relative distance relationship in the original image, but also effectively handle problems such as rotation, scaling and translation, thereby improving the applicability and robustness of the model in complex environments. The mathematical expression of this process is: in, represents the template point set, is the affine transformation matrix, is the point set after transformation.

[0027] In order to accurately obtain the location of facial key points, a high-resolution network (HRNet) is used for key point detection. HRNet achieves high-precision key point positioning by fusing feature maps of different resolutions step by step. This method can not only capture local details, but also maintain the consistency of the global structure, thereby improving the robustness and accuracy of key point detection.

[0028] The design concept of HRNet lies in its unique multi-resolution parallel processing mechanism. Traditional convolutional neural networks usually process images by gradually downsampling and upsampling, which may lead to the loss of detail information. HRNet always maintains high-resolution representation throughout the network process and exchanges information through multiple cross-resolution connections, ensuring the effective fusion of low-level to high-level features. This design gives HRNet a significant advantage in processing complex scenes, especially in facial key point detection.

[0029] In the specific implementation, the system uses HRNet to extract 68 key points from the face area. These key points are widely distributed, covering important parts such as eyes, eyebrows, nose, mouth, and facial contours. The position of each key point is precisely calculated to ensure that they can accurately reflect the geometric characteristics of each part of the face. For example, the eye key points can be used to analyze the degree of eyelid opening and eyeball position; the mouth key points help evaluate the size of the mouth opening and changes in lip shape.

[0030] Although HRNet provides powerful feature extraction capabilities, in practical applications, key point positioning may still be biased due to posture changes, occlusion or lighting conditions. To this end, a geometric consistency check module is introduced to verify the key points output by HRNet. This module calculates the Euclidean distance and angle difference between adjacent key points to filter out abnormal points that do not conform to the expected distribution.

[0031] This method of combining HRNet with geometric consistency checking has shown significant advantages in a variety of application scenarios. For example, in face recognition systems, accurate key point positioning helps improve recognition rates, especially in the face of complex backgrounds or non-ideal shooting conditions.

[0032] In order to further improve the robustness of key point positioning, the present invention also introduces the random sampling consensus (RANSAC) algorithm as a post-processing step. RANSAC filters out erroneous key points affected by noise through iterative sampling and model fitting, and ensures that the final result has higher global consistency. In this process, the system divides the 68 key points into multiple functional groups, such as eyebrow groups, eye groups, and mouth groups, and then applies local geometric fitting models to each group of key points. Through this grouping strategy, it can better adapt to the deformation of local features and reduce the error accumulation problem that may occur in global fitting.

[0033] After the key point positions are optimized, the next step is to define the boundaries of the facial region based on these key points. To achieve this goal, the system uses the Delaunay triangulation algorithm to divide the facial region. This method not only maximizes the minimum angle of each triangle, thereby avoiding the generation of overly flat triangles, but also ensures the rationality and uniformity of the regional distribution. This feature is crucial for accurately capturing and representing complex facial structures.

[0034] Taking the eye area as an example, a polygonal area is formed by connecting the key points of the upper and lower eyelids. Specifically, the system first identifies the key points related to the eyelids, and then uses the Delaunay triangulation algorithm to generate a series of triangles, which together form a closed eye area. This method can not only accurately describe the shape of the eyes, but also adapt to the eye structure under different postures and expressions.

[0035] Similarly, the mouth area generates a closed area based on the contour points of the upper and lower lips. By identifying key points related to the lips and applying the same triangulation method, the system is able to create an accurate and flexible representation of the lip area. This helps in the subsequent analysis of features such as lip movements and mouth opening size, providing a solid foundation for areas such as emotion recognition and speech synthesis.

[0036] Although the Delaunay triangulation algorithm can effectively generate reasonable region divisions, in practical applications, the boundaries of adjacent regions may overlap or conflict. To avoid this, the system further combines the Non-Maximum Suppression (NMS) algorithm to optimize region boundaries.

[0037] By using the Delaunay triangulation algorithm to divide facial regions and combining it with the non-maximum suppression algorithm to optimize region boundaries, this method not only improves the accuracy of region division, but also enhances the robustness of the system. It can provide reliable facial region information under different environments and conditions, providing strong support for various applications based on facial features. Future research can also further explore how to optimize the parameter settings of the triangulation algorithm and how to more efficiently integrate other types of geometric prior knowledge to deal with more complex practical problems. This comprehensive approach opens up new possibilities for facial feature analysis and lays the foundation for further improving the practical application of computer vision technology.

[0038] After completing the region division, the system refines the image information of each region by combining the lightweight target detection network YOLO11n and the local feature extraction module. Taking the eye region as an example, the specific network branch focuses on the extraction of pupil position, eyelid curve and texture details; the nose region focuses on analyzing the curvature of the nose bridge and the shape of the nose wing; the mouth region focuses on the texture characteristics and dynamic changes of the upper and lower lips. In order to further improve the independence of feature extraction, a decoupled feature extraction strategy is adopted. Through the decoupled head structure, the regional features are independently encoded while avoiding interference between different regions.

[0039] After feature extraction, the shared feature representation layer is used to achieve information interaction and optimization between regions. The shared feature representation layer models the geometric and feature associations between different regions through a multi-head self-attention mechanism, thereby capturing complementary information of each facial region. For example, the curvature information of the nose region can be used as a geometric constraint to optimize the spatial distribution of key points in the eye region; and the symmetry information of the mouth region can help correct the features of the cheek region. In addition, in order to further improve accuracy and efficiency in the process of sharing features, the deep separable convolution and channel attention mechanism are used to strengthen cross-regional feature interaction through recursive iteration. The final output feature expression contains both global context information and retains the refined details of local features.

[0040] Later, in order to further fuse and optimize multi-scale features, the system introduced a recursive feature pyramid network (RFPN). The core of this network lies in its unique recursive fusion strategy, which generates richer multi-scale feature representations by gradually exchanging and superimposing information between multiple layers of feature maps.

[0041] At the initial stage of the network, the system extracts basic features from feature maps of different resolutions. These feature maps cover different levels from low resolution to high resolution, and each layer captures information at a specific scale. Specifically: Low-resolution top-level feature map: mainly retains global context information, which is crucial for understanding the overall layout of the entire facial structure; High-resolution underlying feature maps: focus on capturing fine-grained local details, such as the specific morphology and texture features of eyes, lips, etc.

[0042] The recursive feature pyramid network uses a recursive fusion strategy to carry out information flow and feature enhancement between different levels, and the feature transformation operations in the recursive process are uniformly managed through shared parameters.

[0043] Through the recursive fusion strategy, the system can capture rich feature information at different scales, thereby improving the accuracy and robustness of feature extraction. This is particularly important for tasks such as facial recognition and sentiment analysis. By adopting an efficient parameter sharing mechanism, the entire system can achieve real-time processing while maintaining high accuracy. This is particularly critical for application scenarios that require fast response (such as virtual reality, augmented reality, real-time monitoring, etc.).

[0044] On the basis of the above, in order to balance the amount of computation and performance, the present invention further adopts a lightweight design strategy for the Recursive Feature Pyramid Network (RFPN). Specifically, by introducing deep separable convolution, channel attention mechanism and spatial attention mechanism, the system not only reduces the number of parameters and computational complexity, but also significantly improves the quality of feature extraction, especially in capturing key local information.

[0045] Due to its fully connected nature, traditional convolution operations often require a large number of parameters and computing resources when processing high-resolution images. In order to reduce this burden, the present invention uses depthwise separable convolution to replace traditional convolution operations. Depthwise separable convolution decomposes the standard convolution into two steps: 1. Deep convolution: Each input channel is convolved separately to process the features of each channel independently.

[0046] 2. Point-by-point convolution: Use a 1×1 convolution kernel to linearly combine the results of the depthwise convolution to generate the final output feature map.

[0047] This approach can significantly reduce the number of parameters and computational complexity while maintaining high feature extraction quality. For example, in facial recognition tasks, depthwise separable convolution can significantly reduce the computational overhead of the model without sacrificing accuracy, making the system more suitable for deployment in resource-constrained environments.

[0048] In order to further improve the quality of feature fusion, the present invention introduces a channel attention mechanism. The channel attention mechanism dynamically weights the importance of different channels, allowing the model to adaptively focus on the features that are most helpful for the task. In addition to the channel attention mechanism, the present invention also introduces a spatial attention mechanism to improve the ability to capture features in key spatial areas.

[0049] By adopting deep separable convolution, channel attention mechanism and spatial attention mechanism, the present invention significantly reduces the amount of computation and the number of parameters while ensuring the quality of feature extraction. This enables the system to run efficiently in resource-constrained environments (such as mobile devices or embedded systems) while maintaining high detection accuracy and generalization capabilities.

[0050] The lightweight design strategy not only reduces the complexity of the model, but also improves the quality of feature fusion by introducing the attention mechanism. In particular, when capturing key local information, the channel attention mechanism and the spatial attention mechanism can dynamically adjust the weights of each channel and spatial region, allowing the model to more accurately locate and analyze facial features. This is especially important for tasks such as facial recognition and sentiment analysis.

[0051] By comprehensively applying multiple optimization techniques, the present invention enhances the robustness of the model, enabling it to better cope with challenges such as different lighting conditions, posture changes, and expression changes. For example, in actual application scenarios, even in low-light environments or extreme angle face images, the system can still maintain high recognition accuracy and stability.

[0052] Also, see Figure 2As shown in the figure, in the middle layer of the detection network, an auxiliary detection head is added and a looser label standard is used for target detection to improve the recall rate. Loose labels have a larger tolerance range and can cover blurry or smaller targets, thereby capturing more candidate targets and reducing missed detections. The main detection head uses precise labels and focuses on improving the accuracy of target positioning. The loss function still focuses on the optimization of target classification and bounding box regression to achieve the "few but fine" detection goal. During the training process, the auxiliary detection head adopts a "coarse to fine" label strategy. The loose labels first generate larger candidate target areas to provide training samples, and the precise labels are then further screened in these areas to optimize the capabilities of the main detection head. In addition, the intermediate features of the auxiliary detection head are used as the input of the main detection head. The performance of the main detection head is enhanced through feature fusion, and contextual information is provided through cross-layer feature flow to further improve detection accuracy and robustness.

[0053] After training is completed, the L1 norm (the sum of the absolute values ​​of each weight) of each convolutional layer or fully connected layer is calculated. For the weight matrix W, the L1 norm calculation formula is: in, is the i-th element in the weight matrix, is the absolute value of the i-th element.

[0054] After calculating the L1 norm of all weights, the smallest 30% of weights are selected by sorting, and then the element with the smallest L1 norm is selected for pruning, shrinking its weight to close to zero, but not completely zero, to maintain the smoothness of the network.

[0055] In the final stage of model optimization, pruning and fine-tuning, a technique called knowledge distillation is used to recover the accuracy that may be lost due to pruning. This process not only focuses on reducing the complexity and computational cost of the model, but also aims to maintain or even improve the performance of the model.

[0056] First, a strong teacher model needs to be built - in this case, RT-DETR-R50. This model is known for its large number of parameters and rich feature representation capabilities, and can provide high-quality prediction results. At the same time, the pruned YOLO11n model is selected as the student model. Although the pruning operation effectively reduces the size and computational burden of the model, it may also lead to a decrease in the expressiveness of the model. Therefore, the knowledge distillation method is introduced to make up for this shortcoming, so that the student model can learn more knowledge from the teacher model.

[0057] The core of knowledge distillation is to let the student model enhance its own feature representation ability by imitating the behavior of the teacher model. Specifically, the student model not only needs to learn the final output of the teacher model, but also needs to imitate the activation values ​​of the intermediate layers of the teacher model. This multi-level learning method helps the student model capture richer feature information and improve its ability to understand the input data.

[0058] In order to achieve the above goals, a composite distillation loss function is designed, which consists of two parts: 1. Output layer loss: This part of the loss is used to measure the difference in the final output between the student model and the teacher model. It is usually calculated using cross entropy loss to ensure that the student model can simulate the prediction results of the teacher model as accurately as possible.

[0059] 2. Intermediate layer loss: In addition to the output layer, the student model also needs to match the activation values ​​of the intermediate layers of the teacher model. This part of the loss helps the student model learn the high-level feature representation used by the teacher model when processing the input. By minimizing the difference between the intermediate layers, the feature extraction ability of the student model can be further strengthened.

[0060] In this way, the student model can still achieve good performance even after pruning. On the one hand, due to the high-quality guidance provided by the teacher model, the student model can learn complex feature representations without adding too many parameters; on the other hand, this cross-layer knowledge transfer mechanism also helps to solve the overfitting problem, making the student model more robust.

[0061] In addition, this method is of great significance for model deployment in resource-constrained environments. For example, when running deep learning models on mobile devices or embedded systems, it is often necessary to achieve efficient and accurate predictions with limited computing resources. Using knowledge distillation technology, the computing cost can be greatly reduced while ensuring the accuracy of the model, providing strong support for practical applications.

[0062] In short, knowledge distillation, as an effective means of model compression and optimization, can not only help reduce model size and improve reasoning speed, but also significantly improve the model's generalization ability and feature learning ability by imparting knowledge from the teacher model to the student model. This is of great value in promoting the widespread application of deep learning technology in more fields.

[0063] By matching the intermediate layer features of the student model and the teacher model, the student model not only learns the final category prediction, but also imitates the feature representations learned by the teacher model at different network levels. This method greatly improves the performance of the student model, especially after pruning or compression, helping to recover some detection performance that may be lost due to model simplification and enhancing its generalization ability.

[0064] This is because traditional knowledge distillation methods focus on the loss of the output layer, that is, the student model tries to imitate the final prediction results of the teacher model. However, this method ignores the important information contained in the features of the intermediate layers. By introducing the intermediate layer feature matching mechanism, the student model can learn the knowledge of the teacher model at each layer, thereby significantly enhancing its feature expression ability.

[0065] The rich semantic information contained in the intermediate layer features is crucial for understanding the input data. For example, in facial recognition tasks, low-level features may capture pixel-level details (such as edges and textures), while high-level features contain more abstract concepts (such as the positional relationship of facial features and the overall facial structure). By having the student model imitate the intermediate layer features of the teacher model, it can ensure that the student model can not only make accurate classification decisions, but also better understand and process complex patterns in the input data.

[0066] Finally, the loss function can be expressed as: In the formula, is the cross entropy loss, is the mean squared error loss of the middle layer, Control the weight of the two. Describe the predicted output of the student model, Indicates the actual label, and They represent the intermediate layer features in the knowledge distillation of the student model and the teacher model respectively.

[0067] By matching the intermediate layer features of the student model and the teacher model, the student model can not only learn the final category prediction, but also imitate the feature representation learned by the teacher model in different network layers. This method effectively restores some detection performance lost due to pruning or compression, and significantly improves the generalization ability of the student. Whether it is deploying efficient models in resource-constrained environments or achieving high-precision recognition in complex and changing practical application scenarios, this strategy has demonstrated its unique advantages and potential.

[0068] The present invention also includes a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the method for locating facial parts based on multi-region perception are implemented.

[0069] Also included is a device for processing data, comprising: a memory having a computer program stored thereon; The processor is used to execute the computer program in the memory to implement the steps of the method for locating facial parts based on multi-region perception.

[0070] In summary, the method, device and medium for locating facial parts based on multi-region perception described in the present invention use a pre-trained face detection model and a high-resolution network (HRNet) to perform key point detection, ensuring the accurate positioning and division of facial areas. This high-precision positioning lays a solid foundation for subsequent feature extraction and analysis.

[0071] Compared with traditional blood tests and imaging methods, facial image analysis technology provides a real-time, non-invasive way to monitor health status. Patients do not need to go through a complicated testing process and avoid the risk of radiation exposure, making health management more convenient and safer. Using the recursive feature pyramid network (RFPN), the system can fuse multi-scale features and enhance the ability to capture features of different sizes and details. This method not only improves detection accuracy, but also improves the robustness of the system in complex scenarios.

[0072] A dual detection head architecture is adopted. The main detection head is responsible for high-precision classification and boundary regression, while the auxiliary detection head adopts a loose label strategy to improve the recall rate. This design balances the accuracy and coverage of detection and reduces the possibility of missed detection.

[0073] Through lightweight pruning and knowledge distillation methods, the system significantly reduces the computational complexity while maintaining high detection performance and achieves efficient real-time processing, which is of great significance for large-scale applications and deployment, especially in resource-constrained environments.

[0074] It should be noted that all directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of the present invention are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.

[0075] In addition, in the present invention, descriptions such as "first", "second", "one", etc. are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0076] In the present invention, unless otherwise clearly specified and limited, the terms "connection", "fixation", etc. should be understood in a broad sense. For example, "fixation" can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements, unless otherwise clearly defined. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0077] In addition, the technical solutions between the various embodiments of the present invention can be combined with each other, but it must be based on the fact that ordinary technicians in the field can implement it. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by the present invention.

Claims

1. A method for locating face parts based on multi-region perception, characterized in that: Includes steps: S1: extracting a rectangular boundary image of a face region in an input image, and dividing the face region in the rectangular boundary image into sub-regions based on face key points; S2: By extracting multi-scale features of each sub-region and performing interactive optimization, the geometric relationship between sub-regions and the construction of feature correlation model are constructed; S3: Using the constructed model as prior knowledge, multi-scale features are further integrated and optimized through recursive feature pyramid; S4: The fused features are used as the input of the main detection head, and the features before fusion are used as the input of the auxiliary detection head. The facial parts are located through the dual detection head architecture.

2. The method for locating face parts based on multi-region perception as claimed in claim 1, characterized in that: The step S1 further includes the following steps: By calculating the proportion of the face area in the rectangular boundary image and the image acquisition quality, when the proportion is lower than a preset ratio range and / or the image acquisition quality is lower than a preset threshold, a prompt is given to adjust the shooting distance and / or angle, and the process returns to step S1.

3. The method for locating face parts based on multi-region perception as claimed in claim 2, characterized in that: The face area ratio is calculated using the following formula: In the formula, is the face area ratio, and are the coordinates of the upper left corner and lower right corner of the rectangular boundary image, respectively, and W and H are the width and height of the input image, respectively.

4. The method for locating face parts based on multi-region perception as claimed in claim 2, characterized in that: The image acquisition quality is obtained by the following formula: Where Q is the image acquisition quality, is the preset weight coefficient, C is the image clarity, B is the image contrast, and L is the image brightness.

5. The method for locating face parts based on multi-region perception as claimed in claim 1, characterized in that: In the step S1, the deep feature extraction module is replaced with the HRNet with deep separable convolution to recognize the key points of the face.

6. The method for locating face parts based on multi-region perception as claimed in claim 1, characterized in that: In the S2 step, in each sub-region, the detailed features in the current sub-region are first extracted by using depthwise separable convolution, and then the features across sub-regions are interacted through a multi-head self-attention mechanism to model the geometric relationship and feature correlation between sub-regions, and the global information and local details are integrated through a shared feature representation layer.

7. The method for locating face parts based on multi-region perception as claimed in claim 1, characterized in that: In the S3 step, ordinary convolution is replaced by depthwise separable convolution, and a recursive feature pyramid network is combined with channel attention and spatial attention mechanisms to achieve recursive fusion of multi-layer features through residual connections.

8. The method for locating face parts based on multi-region perception as claimed in claim 1, characterized in that: In steps S2 to S4, the computational complexity is optimized through lightweight pruning and knowledge distillation methods.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the positioning method described in any one of claims 1 to 8 are implemented.

10. A device for processing data, characterized in that: include: a memory having a computer program stored thereon; A processor, configured to execute the computer program in the memory to implement the steps of the positioning method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Lightweight complex background continuous face emotion recognition algorithm and system

    CN114067382A

  • Coronary heart disease preliminary screening method and device based on facial feature analysis and medium

    CN119560141A

  • Face mask detection method for resisting shielding counterfeit attack based on YOLOv8

    CN119600670A

  • System for estimating a pose of one or more persons in a scene

    US12094159B1