Face image migration method and device, equipment and medium

By normalizing the feature position, orientation and proportion of the logo points of the face image, the problem of mismatch between facial features and face shapes in the existing AI face swap technology is solved, and a more natural and harmonious face swap effect is achieved, improving the applicability and reality of the technology in multiple application scenarios.

CN120298203APending Publication Date: 2025-07-11GUANGZHOU HUYA INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510154822.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-12
Publication Date
2025-07-11

AI Technical Summary

Technical Problem

Due to the differences in the characteristics, position, orientation and proportion of the face, the existing AI face swap technology leads to mismatch between facial features and facial shape, and obvious edge marks or unnatural concave and convex feeling, reducing the credibility and realism of the face swap effect.

Method used

By acquiring multiple marking points of the first face image and the second face image, normalizing the feature position, orientation and proportion into the same normalized coordinate system, the offset intensity is calculated, and inputting it into the rendering pipeline to achieve face image migration.

Benefits of technology

It improves the harmony of facial features, improves the credibility and realism of the face-changing effect, and enhances its applicability in application scenarios such as film and television production, virtual reality and social media.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120298203A_ABST
    Figure CN120298203A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, and discloses a face image migration method and device, equipment and a medium. The face image migration method comprises the steps that a plurality of first mark points corresponding to a first face image and a plurality of second mark points corresponding to a second face image are acquired, and the first mark points and the second mark points are in one-to-one correspondence according to feature positions; normalizing feature positions, feature orientations and feature proportions represented by the first mark points and the second mark points; mapping the normalized first mark point and the normalized second mark point into the same standardized coordinate system; calculating the offset intensity of each first mark point and the corresponding second mark point in the standardized coordinate system; and inputting each offset intensity to a rendering pipeline to migrate the first face image to the second face image. The face migration method can effectively adapt to the face shape difference and the five sense organ difference of the face to carry out face migration, and is beneficial to improving the accuracy, the applicability and the sense of reality of face migration in various application scenes.
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, equipment and medium for face image migration. Background Art

[0002] With the rapid development of AI (Artificial Intelligence), the AI face-swapping technology of Deepfake has been widely applied in multiple fields such as film and television production, virtual reality, and social media.

[0003] The existing AI face-swapping technology mainly focuses on replacing the facial features of the target face with those of the source face. However, due to the differences in the positions, orientations, and proportions of facial features, as well as the anisotropy of facial features under different face shapes, the problem of mismatch between facial features and face shapes often occurs in existing AI face-swapping, resulting in disharmony between facial features and the overall face shape. Obvious edge traces or unnatural concavities and convexities often appear in the facial contour, destroying the overall harmony of the human face and bringing a strong sense of incongruity to the observer, greatly reducing the credibility and realism of the face-swapping effect, and making the existing face-swapping technology still lack applicability in multiple application scenarios such as film and television production, virtual reality, and social media. Summary of the Invention

[0004] The main purpose of the present invention is to provide a method, device, equipment and medium for face image migration, aiming to solve the technical problem of the lack of overall harmony in the existing face-swapping technology.

[0005] The present invention provides a face image migration method in the first aspect. The face image migration method includes:

[0006] Obtaining a plurality of first landmark points corresponding to a first face image and a plurality of second landmark points corresponding to a second face image, where the first landmark points and the second landmark points correspond one by one according to the feature positions;

[0007] Normalizing the feature positions, feature orientations, and feature proportions represented by the first landmark points and the second landmark points;

[0008] Mapping the normalized first landmark points and second landmark points to the same standardized coordinate system;

[0009] Calculating the offset intensity between each of the first landmark points and the corresponding second landmark point in the standardized coordinate system;

[0010] Inputting each of the offset intensities into a rendering pipeline to migrate the first face image to the second face image.

[0011] Optionally, in the first implementation manner of the first aspect of the present invention, the feature positions at least include a first feature position, a second feature position, a third feature position, and a fourth feature position;

[0012] The normalization of the feature positions, feature orientations, and feature ratios represented by the first fiducial points and the second fiducial points includes:

[0013] Translate each of the first fiducial points and each of the second fiducial points so that the first fiducial point and the second fiducial point corresponding to the first feature position coincide;

[0014] Taking the line connecting the first fiducial points of the first feature position and the second feature position as a reference, rotate each of the first fiducial points, and taking the line connecting the corresponding second fiducial points as a reference, rotate each of the second fiducial points so that the feature orientation represented by the first fiducial point is consistent with the feature orientation represented by the second fiducial point;

[0015] Determine a scaling factor based on the ratio of the first connection length of the first fiducial points of the third feature position and the fourth feature position to the second connection length of the corresponding second fiducial points, and scale each of the first fiducial points or each of the second fiducial points based on the scaling factor to reduce the difference in the feature ratios of the first feature points and the second feature points.

[0016] Optionally, in the second implementation manner of the first aspect of the present invention, the first feature position is the feature position corresponding to the root of the nose feature;

[0017] The second feature position is the feature position corresponding to the tip of the chin feature;

[0018] The third feature position is the feature position corresponding to the left temple;

[0019] The fourth feature position is the feature position corresponding to the right temple.

[0020] Optionally, in the third implementation manner of the first aspect of the present invention, the standardized coordinate system takes the first fiducial point or the second fiducial point corresponding to the first feature position as the coordinate origin;

[0021] The unit vector of the first reference axis of the standardized coordinate system is the normalized vector of the vector difference between the third feature position and the fourth feature position;

[0022] The unit vector of the second reference axis of the standardized coordinate system is the normalized vector of the vector difference between the first feature position and the second feature position.

[0023] Optionally, in the fourth implementation manner of the first aspect of the present invention, calculating the offset intensity between each of the first landmark points and the corresponding second landmark points in the standardized coordinate system includes:

[0024] Obtaining a first offset amount between each of the first landmark points corresponding to the facial feature in the standardized coordinate system and the corresponding second landmark point, where the first offset amount is used to represent the deviation between the deviation value of the first landmark point corresponding to the facial feature relative to the first central position of the facial feature scaled by the facial scaling ratio and the deviation value of the second landmark point corresponding to the facial feature relative to the second central position of the facial feature;

[0025] Obtaining a second offset amount between each of the first landmark points corresponding to the cheek feature in the standardized coordinate system and the corresponding second landmark point, where the second offset amount is used to represent the deviation between the first landmark point corresponding to the cheek feature and the second landmark point of the cheek feature with the closest distance;

[0026] Determining the offset intensity between each of the first landmark points and the corresponding second landmark point based on the first offset amount and the offset amount, where the offset intensity is used to represent the offset degree of the first offset amount and the second offset amount in the direction of the unit vector.

[0027] Optionally, in the fifth implementation manner of the first aspect of the present invention, the first central position is the average coordinate position of each first landmark point corresponding to the facial feature, and the second central position is the average coordinate position of each second landmark point corresponding to the facial feature;

[0028] The facial scaling ratio is a transformation matrix used to scale the maximum height difference of each first landmark point to be consistent with the maximum height difference of the second landmark point, and to scale the maximum width difference of each first landmark point to be consistent with the maximum width difference of the second landmark point.

[0029] Optionally, in the sixth implementation manner of the first aspect of the present invention, obtaining a plurality of first landmark points corresponding to the first face image and a plurality of second landmark points corresponding to the second face image includes:

[0030] Performing discretization processing on the first face image and the second face image based on a preset dissection algorithm to obtain a plurality of first discretized grid regions corresponding to the first face image and a plurality of second discretized grid regions corresponding to the second face image;

[0031] Performing feature recognition on each of the first discretized grid regions and each of the second discretized grid regions based on a preset image recognition model to determine the corresponding first landmark point and second landmark point;

[0032] Among them, the preset image recognition model is used to identify and locate the first discrete grid area and the second discretized grid area corresponding to a preset number of key feature points, so as to obtain the first landmark point and the second landmark point.

[0033] The second aspect of the present invention also provides a face image migration device, which includes:

[0034] An acquisition module, configured to acquire a plurality of first landmark points corresponding to a first face image and a plurality of second landmark points corresponding to a second face image, wherein the first landmark points and the second landmark points correspond one by one according to the feature positions;

[0035] A normalization module, configured to normalize the feature positions, feature orientations, and feature ratios represented by the first landmark points and the second landmark points;

[0036] A mapping module, configured to map the normalized first landmark points and second landmark points into the same standardized coordinate system;

[0037] A calculation module, configured to calculate the offset intensity between each of the first landmark points and the corresponding second landmark point in the standardized coordinate system;

[0038] A migration module, configured to input each of the offset intensities into a rendering pipeline to migrate the first face image to the second face image.

[0039] The third aspect of the present invention also provides a computer device, which includes: a memory and at least one processor, and instructions are stored in the memory; the at least one processor calls the instructions in the memory to enable the computer device to execute the face image migration method as described above.

[0040] The fourth aspect of the present invention also provides a computer-readable storage medium, on which instructions are stored, and when the instructions are executed by a processor, the face image migration method as described above is implemented.

[0041] A face image migration method, device, equipment and storage medium provided by an embodiment of the present invention first obtain a plurality of first landmark points corresponding to a first face image and a plurality of second landmark points corresponding to a second face image, and then normalize and map the feature positions, feature orientations and feature ratios represented by the first landmark points and the second landmark points into the same standardized coordinate system to calculate the offset intensities of each first landmark point and the corresponding second landmark point in the standardized coordinate system. Finally, input each offset intensity into a rendering pipeline to migrate the first face image to the second face image. Through this migration method, it is possible to improve the consistency level of feature positions, feature orientations and feature ratios according to the facial features of the first face image and the second face image, eliminate the facial position differences caused by different shooting positions, the inconsistency of facial orientations caused by different head postures, and the ratio differences caused by different shooting distances or facial sizes. Through the pipeline rendering based on the calculated offset intensities, it is possible to solve the influence on the harmony of facial features caused by different face shapes, effectively maintain the harmonious relationship between various parts of the face, improve the credibility of the face-changing effect, and achieve a more natural and harmonious face-changing effect, which is beneficial to improving the applicability and realism of face-changing technology in application scenarios such as film and television production, virtual reality, and social media. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 It is a schematic flowchart of the first embodiment of the face image migration method in the embodiment of the present invention;

[0043] Figure 2 It is a schematic diagram of an embodiment of the landmark points corresponding to the face in the present invention;

[0044] Figure 3 In the present invention Figure 1 It is a schematic flowchart of an embodiment of 101 in the embodiment of the present invention;

[0045] Figure 4 In the present invention Figure 1 It is a schematic flowchart of an embodiment of 102 in the embodiment of the present invention;

[0046] Figure 5 It is a schematic diagram of the functional modules of an embodiment of the face image migration device in the embodiment of the present invention;

[0047] Figure 6 It is a schematic diagram of the functional modules of an embodiment of the computer equipment in the embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0048] In the description, claims and the above drawings of the present invention, terms such as "first", "second", "third", "fourth", etc. (if any) are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances so that the embodiments described herein can be implemented in an order different from that shown or described herein. In addition, the term "comprising" or "having" and any variation thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0049] For ease of understanding, the specific process of the face image migration method in the embodiments of the present invention will be described below. The face image migration method of this embodiment is applied to an electronic device, which may be a terminal, such as a smart phone, a laptop computer, a tablet computer, a desktop computer, etc., or a development board, a chip system, etc. Please refer to Figure 1 , Figure 1 which is a schematic flowchart of the first embodiment of the face image migration method in the embodiments of the present invention. In this embodiment, the face image migration method includes:

[0050] 101. Obtain a plurality of first landmark points corresponding to the first face image and a plurality of second landmark points corresponding to the second face image, where the first landmark points and the second landmark points correspond one by one according to the feature positions;

[0051] In this embodiment, the first face image and the second face image respectively correspond to the image of the source face and the image of the target face in face migration, and the landmark points are key feature points on the face, mainly involving facial features and cheek features. The selection method of the landmark points may specifically be the 106-point standard face key feature points, 68-point standard face key feature points or 186-point standard face key feature points of face feature recognition, etc., or the landmark point annotation method determined according to the preset facial feature division method and the requirement of recognition and positioning accuracy.

[0052] In this embodiment, refer to Figure 2 , Figure 2It is a schematic diagram of landmark points corresponding to a human face. The legend shows the way of annotating the key feature points of a face with 106 points. In this way, 106 key points are extracted from the face, including 33 key points evenly sampled on the outer contour of the cheeks, 20 key points of the mouth, 15 key points of the nose, 20 key points of the eyes. There are 8 key points on the contour of each eye and 2 key points at the center of the eyeball, as well as 18 key points that distinguish the boundary features of the two eyebrows. It should be noted that the legend is only an example of a way of landmark point annotation, and different numbers and distributions of landmark point annotation methods can be specifically adopted to obtain the first landmark point and the second landmark point.

[0053] In this embodiment, the first face image and the second face image have the same number of landmark points corresponding to the feature positions. Accordingly, the first landmark point and the second landmark point correspond one by one according to the positions of the key feature points, that is, the feature positions. For example, the root point of the nose bridge in the first face image corresponds to the root point of the nose bridge in the second face image, and the tip point of the chin in the first face image corresponds to the tip point of the chin in the second face image. Thus, in the subsequent face migration process, the morphological and texture features at the feature positions of the source face can be accurately migrated to the corresponding feature positions of the target face.

[0054] Optionally, in an embodiment, obtaining a plurality of first landmark points corresponding to the first face image and a plurality of second landmark points corresponding to the second face image includes:

[0055] 1011: Discretize the first face image and the second face image based on a preset dissection algorithm to obtain a plurality of first discretized grid regions corresponding to the first face image and a plurality of second discretized grid regions corresponding to the second face image;

[0056] 1012: Perform feature recognition on each first discretized grid region and each second discretized grid region based on a preset image recognition model to determine the corresponding first landmark point and second landmark point.

[0057] In this alternative embodiment, the preset dissection algorithm is a preset algorithm for dividing a face image into multiple grid regions to facilitate subsequent feature recognition and processing. Specifically, image dissection algorithms such as Delaunay triangulation algorithm, Voronoi Diagram dissection algorithm, Ear Clipping dissection algorithm, etc. can be adopted, or a preset dissection rule or dissection model can be used to dissect the face image, so as to obtain discretized grid regions, and each discretized grid region contains a part of the information of the face.

[0058] In this alternative embodiment, after obtaining multiple first discretized grid regions corresponding to the first face image and multiple second discretized grid regions corresponding to the second face image, feature recognition can be performed on each first discretized grid region and each second discretized grid region based on a preset image recognition model to determine the corresponding first landmark points and second landmark points. Among them, the preset image recognition model can be a deep learning model, such as a Convolutional Neural Network (CNN) model, a Recurrent Neural Network (RNN) model, a Generative Adversarial Network (GAN) model, etc., or a model constructed based on traditional machine learning algorithms, such as a Support Vector Machine (SVM) or a Random Forest. These models can learn a large amount of face image data, identify the key feature points in the face image, and match them with the preset grid regions, so as to determine the positions of the feature points in each grid region for annotation, obtaining the corresponding first landmark points and second landmark points. The first landmark points and the second landmark points correspond to the texture information of their position information. When performing face migration subsequently, the texture information between the landmark points can be combined for transition, thereby replicating the face features.

[0059] 102. Normalize the feature positions, feature orientations, and feature ratios represented by the first landmark points and the second landmark points;

[0060] In this embodiment, there are usually inconsistencies between different face images. For example, due to different shooting positions, the face is on the left in one face image and on the right in another face image, resulting in a translational difference in feature positions; because of the different head postures of the subjects, one face is tilted to the left and the other face is tilted to the right, resulting in a rotational difference in feature orientations; due to different shooting distances and face shape differences, one face is larger and the other face is smaller, resulting in a scaling difference in feature ratios. These differences will affect the effect of face migration, making the migrated feature positions, feature orientations, and feature ratios mismatched, resulting in a lack of realism and credibility in the face-swapping effect. To address this, this solution normalizes the landmark points to eliminate the above differences.

[0061] In this embodiment, the normalization operation can be specifically implemented by means of affine transformation operations such as translation, rotation, scaling, and inclination, or can be implemented by pixel value-based methods such as min-max normalization and Z-score normalization, or by means of per-sample mean subtraction, feature standardization, etc. Through normalization processing, the landmark points in different face images can be unified into a coordinate system, thereby realizing the normalization of feature positions. In this way, when performing face migration, the consistency of the feature positions, feature orientations, and feature ratios between the source face and the target face can be ensured, improving the realism and credibility of the face-swapping effect.

[0062] Optionally, in one embodiment, the feature positions at least include a first feature position, a second feature position, a third feature position, and a fourth feature position; normalizing the feature positions, feature orientations, and feature ratios represented by the first landmark points and the second landmark points includes:

[0063] 1021: Translate each first landmark point and each second landmark point so that the first landmark point and the second landmark point corresponding to the first feature position coincide;

[0064] 1022: Taking the line connecting the first landmark points of the first feature position and the second feature position as a reference, rotate each first landmark point, and taking the line connecting the corresponding second landmark points as a reference, rotate each second landmark point so that the feature orientation represented by the first landmark point is consistent with the feature orientation represented by the second landmark point;

[0065] 1023: Determine a scaling factor based on the ratio of the first connection length of the first landmark points of the third feature position and the fourth feature position and the second connection length of the corresponding second landmark points, and scale each first landmark point or each second landmark point based on the scaling factor to reduce the difference in the standard feature ratios of the first feature points and the second feature points.

[0066] In this optional embodiment, the normalization of landmark points is realized by means of affine transformation methods of translation, rotation, and scaling, and specifically, at least four landmark points corresponding to feature positions are selected as a reference for implementation. Specifically, the first feature position is used to benchmark the consistency of the overall feature position. By translation, the first landmark point and the second landmark point of the first feature position are made to coincide to ensure the consistency of the overall feature position. Then, taking the line connecting the first feature position and the second feature position as a reference, through rotation operations, the feature orientations of the first landmark point and the second landmark point are made consistent, thus ensuring the consistency of the feature orientations. Finally, by calculating the ratio of the connection lengths of the third feature position and the fourth feature position, a scaling factor is determined, and the landmark points are scaled to reduce the difference in feature ratios and ensure the consistency of the face images in terms of feature ratios.

[0067] In this alternative embodiment, the translation operation can normalize the coordinates of the fiducial points corresponding to the first feature position to the coordinate origin (0, 0). Therefore, specifically, the coordinate position (x i -x r1 , y i -y r1 ) can be used as the coordinate position of each individual fiducial point. This position coordinate can specifically be the pixel coordinate, image coordinate, or camera coordinate system corresponding to the fiducial point, as long as it conforms to the position definition of the right-angle system of the two reference axes. In the formula, (x i , y i ) represents the coordinate position of this individual fiducial point before translation, while (x r1 , y r1 ) is used as the coordinate position of this reference point in the set of fiducial points, and (x i -x r1 , y i -y r1 ) is the relative position coordinate of this individual fiducial point with respect to the reference point, i.e., the coordinate origin. Using this coordinate as the coordinate position of each fiducial point after translation can achieve the normalization of the feature position.

[0068] In this alternative embodiment, the rotation operation can use the line connecting the fiducial points corresponding to the first feature position and the second feature position of the reference as a reference axis, so that the reference axes corresponding to the first fiducial point and the second fiducial point are in the same orientation to ensure the overall orientation of the fiducial points is consistent. When performing rotation, the rotation angle of the reference axis of this reference can be calculated first, and then the corresponding rotation matrix can be used with this rotation angle to rotate each fiducial point to achieve the alignment of the fiducial points with the reference. Specifically, the rotation angle can be obtained based on the formula , where θ is the rotation angle, (x r1 , y r1 ) are the coordinates of the fiducial point corresponding to this first feature position, and (x r2 , y r2 ) are the coordinates of the fiducial point corresponding to this second feature position. Based on this, the position coordinates of each point after rotation can be obtained by applying the rotation matrix based on the formula , where (x, y) represents the position coordinates before the rotation operation, and (x', y') represents the position coordinates after the rotation operation.

[0069] In this alternative embodiment, the scaling operation can use the line connecting the landmark points corresponding to the third feature position and the fourth feature position as a reference axis, so that the size of the reference axis is consistent, thereby making the feature ratios represented by the first landmark point and the second landmark point more consistent. Therefore, when the foregoing feature positions and feature orientations are the same, the relative position sizes of other landmark points and the coordinate origin can be scaled based on the ratio difference of this reference axis. Specifically, the scaling factor can be first determined based on the formula where S is the scaling factor, L a is the length of the reference axis obtained from the first landmark point, and L b is the length of the reference axis obtained from the second landmark point. Then, based on the formula the landmark point coordinates (x', y') after scaling the first landmark point coordinates (x, y) can be obtained, so that the overall ratio of the first landmark point and the overall ratio of the second landmark point are the same. It should be noted that in the calculation of this formula, relevant scaling processing is performed on the first landmark point. Specifically, relevant scaling processing can also be performed on the second landmark point or both of them simultaneously, and only the parameter order in the above formula needs to be adjusted. Therefore, as long as the scaling of the landmark point coordinates based on the scaling factor is understandable, it is within the protection scope of this embodiment.

[0070] Through the above normalization process, this alternative embodiment can effectively eliminate the facial position differences caused by different shooting positions, the inconsistency of facial orientations caused by different head postures, and the scaling ratio differences caused by different shooting distances or facial sizes. It can initially solve the impact on the harmony of facial features due to different face shapes, effectively maintain the harmonious relationship between various parts of the face, improve the credibility of the face swapping effect, and achieve a more natural and harmonious face swapping effect, which is beneficial to improving the applicability and realism of face swapping technology in application scenarios such as film and television production, virtual reality, and social media.

[0071] Optionally, in one embodiment, the first feature position is the feature position corresponding to the root of the nose bridge; the second feature position is the feature position corresponding to the tip of the chin; the third feature position is the feature position corresponding to the left temple; the fourth feature position is the feature position corresponding to the right temple.

[0072] In this alternative embodiment, the selection of the four feature positions is specified. Among them, the root of the nose bridge is usually a center point of the human face. Refer to Figure 2 the example point 43. By using the feature position corresponding to the root of the nose bridge as the first feature position and this point as the coordinate origin, the human face can be better located, thereby providing a stable basis for subsequent translation, rotation, and scaling operations. And the tip of the chin, as the lower feature of the human face, can be referred to Figure 2The example point 16, the determination of whose position helps to ensure the vertical alignment of the human face, making the face swapping effect more natural. For the position of the temple, reference can be made to Figure 2 the example points 0 and 32. The selection of these points helps to capture the width and side profile of the human face, providing more comprehensive geometric information for the face swapping technology. It should be noted that the above Figure 2 is only used as an illustrative example. When other methods for marking landmark points are adopted, other point numbers and specific positions can be used, as long as they correspond to the positions of the corresponding root of the nose bridge, tip of the chin, and temples, which can be understood to be within the protection scope of this embodiment.

[0073] 103. Map the normalized first landmark points and second landmark points to the same standardized coordinate system;

[0074] In this embodiment, after the aforementioned normalization process, the first landmark points and second landmark points are accurately and reliably mapped to the same standardized coordinate system. The specific coordinate system mapping method can refer to the relevant solutions in step 102 and its alternative embodiments described above, which will not be elaborated here. By establishing this standardized coordinate system, a consistent measurement standard can be provided for subsequent steps, facilitating the calculation of the corresponding offset amounts, thereby achieving a better face migration effect.

[0075] Optionally, in one embodiment, the standardized coordinate system takes the first landmark point or the second landmark point corresponding to the first feature position as the coordinate origin; the unit vector of the first reference axis of the standardized coordinate system is the normalized vector of the vector difference between the third feature position and the fourth feature position; the unit vector of the second reference axis of the standardized coordinate system is the normalized vector of the vector difference between the first feature position and the second feature position.

[0076] In this alternative embodiment, the establishment of the origin of the standardized coordinate system and the reference axis benchmark can refer to the relevant embodiments of step 102 and its alternative embodiments described above, which will not be elaborated here. By setting the first feature position as the origin, the center of the human face can be better located, ensuring the accuracy of subsequent operations. At the same time, the setting of the first reference axis and the second reference axis also provides a clear direction benchmark for calculating the positions of other landmark points, making the coordinate transformation in the entire face swapping process more orderly and accurate, facilitating subsequent face migration steps. The unit vector of the first reference axis and the unit vector of the second reference axis are determined by the normalized vector of the vector difference between the third feature position and the fourth feature position and the normalized vector of the vector difference between the first feature position and the second feature position. These two vectors represent the width direction and height direction of the human face respectively. Using them as the reference axes of the standardized coordinate system can make the coordinate system better conform to the geometric features of the human face, improving the accuracy and efficiency of coordinate transformation. On this basis, the normalized first landmark point and second landmark point can be mapped into this standardized coordinate system to obtain the coordinate positions of each landmark point in the standardized coordinate system. In this way, when performing face migration, coordinate transformation and feature matching can be carried out based on this standardized coordinate system, ensuring that the face features after migration can be effectively fused with the target face, further enhancing the realism and credibility of the face swapping effect.

[0077] In this alternative embodiment, specifically, the unit vector of the first reference axis and the unit vector of the second reference axis can be obtained through normalization processing based on the following formula:

[0078]

[0079] where X is the unit vector of the first reference axis, Y is the unit vector of the second reference axis, P1 is the position coordinate corresponding to the first feature position, P2 is the position coordinate corresponding to the second feature position, P3 is the position coordinate corresponding to the third feature position, and P4 is the position coordinate corresponding to the fourth feature position.

[0080] In this alternative embodiment, first, the vector representations of the first reference axis and the second reference axis need to be determined, and then the unit vectors are obtained through the vector normalization process. This process ensures the standardization of the coordinate system, making the length and direction of the coordinate axes conform to specific measurement standards, thus providing a unified and standardized reference framework for subsequent face swapping technology operations. Specifically, the unit vector of the first reference axis can be obtained by dividing the vector between the third feature position and the fourth feature position by its length, while the unit vector of the second reference axis is obtained by dividing the vector between the first feature position and the second feature position by its length. Through such unitization processing, it can be ensured that the lengths of the first reference axis and the second reference axis are 1, and the directions correspond to the X-axis and Y-axis in the standardized coordinate system respectively.

[0081] Through the above normalization process, this alternative embodiment can further improve the accuracy and reliability of the face swapping technology. Since all calculations in the standardized coordinate system are based on unit vectors, it can effectively avoid errors caused by inconsistent axis lengths, providing an accurate and reliable coordinate reference system for the face swapping technology. This not only helps to improve the naturalness and harmony of the face swapping effect, but also simplifies the calculation steps in the face swapping process, improves the overall processing efficiency, and further ensures the applicability and realism of the face swapping technology in various application scenarios.

[0082] 104. Calculate the offset intensity between each first landmark point and the corresponding second landmark point in the standardized coordinate system;

[0083] In this embodiment, face migration is performed through face reshaping. In the core stage of this face reshaping, a coordinate system based on specific facial landmark points is established to allow precise control of the position of each landmark point. By inputting the horizontal and vertical offset intensities of each point, the facial features are offset according to the coordinate system to achieve facial feature adjustments from subtle to significant. Finally, the calculated new fixed-point positions and corresponding texture information are input into the rendering pipeline for rendering, thus realizing real-time face migration. Therefore, face migration can improve the applicability of face image migration by optimizing the accuracy and reliability of offset intensity calculation.

[0084] In this embodiment, the calculation of the offset intensity can specifically adopt an offset intensity calculation method based on pixel matching, calculate through a specific offset formula, and use an algorithm to find the minimum offset to evaluate the offset intensity. It can also adopt an offset intensity calculation method based on feature matching, and evaluate the offset intensity by extracting feature points, matching feature points, and calculating the offset. It can also adopt a comparison method of line scan intensity distribution, and evaluate the offset intensity by extracting the line scan intensity distribution, calculating the average absolute intensity, and finding the minimum offset, etc.

[0085] Optionally, in one embodiment, calculating the offset intensity between each first landmark point and the corresponding second landmark point in the standardized coordinate system includes:

[0086] (1). Obtain the first offset between each first landmark point corresponding to the facial feature in the standardized coordinate system and the corresponding second landmark point. The first offset is used to represent the deviation between the deviation value of the first landmark point corresponding to the facial feature relative to the first center position of the facial feature after being scaled by the facial feature scaling ratio and the deviation value of the second landmark point corresponding to the facial feature relative to the second center position of the facial feature.

[0087] In this alternative embodiment, the calculation of the first offset mainly considers the position differences between the respective first landmark points corresponding to the facial features and the corresponding second landmark points in the standardized coordinate system. Specifically, first, the first central position and the second central position of the facial features are determined, which can usually be obtained by calculating the average position or the geometric center of all the landmark points within the facial features. Then, the deviation values of each first landmark point relative to the first central position of its corresponding facial feature, and the deviation values of each second landmark point relative to the second central position of its corresponding facial feature are calculated. On this basis, the deviation values of the first landmark points are scaled according to the scaling ratio of the facial features, so that the scaled deviation values have the same measurement benchmark as the deviation values of the second landmark points. Finally, the deviation between the scaled deviation value and the deviation value of the second landmark point is calculated, that is, the first offset is obtained. This calculation process fully considers the relative positions and scaling ratios of the facial features, and can more accurately reflect the changes in the facial features during the face migration process, thereby further improving the accuracy and naturalness of the face migration.

[0088] In this alternative embodiment, specifically, the first offset of each first landmark point corresponding to the facial features and the corresponding second landmark points in the standardized coordinate system can be calculated based on the following formula:

[0089]

[0090] Where O j is the first offset, is the first central position of the facial feature, is the second central position of the facial feature, is the position coordinate of the first landmark point corresponding to the facial feature, is the position coordinate of the corresponding second landmark point, S j is the facial feature scaling ratio for converting the first landmark point corresponding to the facial feature to the second landmark point corresponding to the facial feature;

[0091] In this alternative embodiment, different calculation methods for the offset intensity are adopted for the facial features and the cheek features. When calculating the offset of the facial features, this method calculates the first offset by calculating the difference between the position coordinates of the scaled first landmark point and the landmark points of the corresponding facial feature of the second landmark point. It should be noted that the relevant parameters using this formula are not limited to performing relevant scaling processing on the first landmark point. Specifically, relevant scaling processing can also be performed on the second landmark point or on both of them simultaneously, and only the parameter order in the above formula needs to be adjusted. Therefore, as long as the processing based on the facial feature scaling ratio and the corresponding difference calculation can be understood to be within the protection scope of this embodiment.

[0092] In this alternative embodiment, further optionally, the first central position is the average coordinate position of the first landmark points corresponding to the facial feature, and the second central position is the average coordinate position of the second landmark points corresponding to the facial feature. The first central position and the second central position of the facial feature can be specifically calculated based on the following formula:

[0093] j ∈ facial feature;

[0094] where P ct,j is the position coordinate corresponding to the central position feature of the facial feature, and P j is used to traverse the position coordinates corresponding to the feature positions of the N points included in the corresponding facial feature. This formula calculates the central position coordinate of the facial feature by calculating the mean of the position coordinates corresponding to the facial feature position, and the calculation by the mean method can effectively reduce the calculation complexity and ensure the accuracy of the offset intensity calculation.

[0095] In this alternative embodiment, further optionally, the facial scaling ratio is a transformation matrix used to scale the maximum height difference of the first landmark points to be the same as the maximum height difference of the second landmark points, and to scale the maximum width difference of the first landmark points to be the same as the maximum width difference of the second landmark points. The facial scaling ratio can be specifically calculated based on the following formula:

[0096] j ∈ facial feature;

[0097] where is the position coordinate of the second landmark point corresponding to the topmost point of the facial feature, is the position coordinate of the second landmark point corresponding to the bottommost point of the facial feature, P top,j,a1 is the position coordinate of the first landmark point corresponding to the topmost point of the facial feature, P bottom,j,a1 is the position coordinate of the first landmark point corresponding to the bottommost point of the facial feature, P left,j,b1 is the position coordinate of the second landmark point corresponding to the leftmost point of the facial feature, P right,j,b1 is the position coordinate of the second landmark point corresponding to the rightmost point of the facial feature, P left,j,a1 is the position coordinate of the first landmark point corresponding to the leftmost point of the facial feature, P right,j,a1 is the position coordinate of the first landmark point corresponding to the rightmost point of the facial feature.

[0098] In this alternative embodiment, the scaling ratio of the facial feature is calculated according to the area of the region formed by the topmost, bottommost, leftmost, and rightmost parts of the relevant facial feature, which can comprehensively integrate the width and height features of the facial feature. After the corresponding facial feature is scaled, the size of the facial feature of the source face can better suit the target face and can more accurately reflect the size change of the facial feature in the face image.

[0099] (2) Obtain the second offset of each first landmark corresponding to the cheek feature and the corresponding second landmark in the standardized coordinate system, where the second offset is used to represent the deviation between the first landmark corresponding to the cheek feature and the second landmark of the nearest cheek feature;

[0100] In this alternative embodiment, the calculation of the second offset mainly considers the relative position relationship between each first landmark corresponding to the cheek feature and the corresponding second landmark in the standardized coordinate system. Specifically, for each first landmark of the cheek feature, we find the second landmark of the nearest cheek feature and calculate the deviation between these two points, which is the second offset. This calculation process can accurately capture the subtle changes of the cheek feature during the face migration, thereby further improving the naturalness and harmony of the face migration.

[0101] In this alternative embodiment, specifically, the second offset of each first landmark corresponding to the cheek feature and the corresponding second landmark in the standardized coordinate system can be calculated based on the following formula:

[0102] O f =P i,b2,closest -P i,a2 ;

[0103] where O f is the second offset, P i,a2 is the position coordinate of the first landmark corresponding to the cheek feature, and P i,b2,closest is the position coordinate of the second landmark closest to P i,a2 ;

[0104] In this alternative embodiment, the cheek feature includes multiple landmarks corresponding to features, such as Figure 2For the points 0 to 32 of the cheek contour shown in the figure, the area of the length-width region is relatively large, and it is difficult to reflect the facial shape features through the length-width region. Therefore, in this alternative embodiment, a calculation method different from the offset of the facial feature is adopted. In this formula, specifically, the offset is obtained by calculating the coordinate difference between the nearest points of the first landmark point and the second landmark point. It can also be understood that the offset can be obtained by calculating the coordinate difference between the nearest points of the second landmark point and the first landmark point, as long as the former and the latter of the landmark points are distinguished in the subsequent offset intensity calculation process. Among them, the nearest landmark point can be calculated one by one through the traversal and enumeration method, or the nearest landmark point can be determined through geometric analysis methods, or the nearest landmark point can be predicted based on a machine learning model or a preset algorithm. Through these methods, the second offset of the cheek feature can be calculated more accurately, so as to better maintain the shape and features of the target face during the face image migration process.

[0105] In this alternative embodiment, specifically, the position coordinates of the second landmark point closest to the first landmark point are calculated based on the following formula:

[0106]

[0107] Among them, m is used to traverse the second landmark points corresponding to n cheek features.

[0108] In this alternative embodiment, the position coordinates of the nearest landmark point are calculated by the traversal and enumeration method, which can accurately reflect the regional distribution of the cheek features. Therefore, when calculating the offset, the second landmark point of the cheek features can be more accurately located, ensuring that the shape and features of the cheeks are better maintained during the face image migration process.

[0109] (3) Determine the offset intensity of each first landmark point and the corresponding second landmark point based on the first offset and the offset. The offset intensity is used to characterize the offset degree of the first offset and the second offset in the direction of the unit vector.

[0110] In this alternative embodiment, the offset intensity is a quantitative representation of the first offset and the second offset in the direction of the unit vector. Specifically, the offset intensity can be obtained by calculating the projection lengths of the first offset and the second offset on the unit vector. The unit vector can be any direction in the standardized coordinate system, such as the horizontal direction, the vertical direction, or any oblique direction. By decomposing the first offset and the second offset onto the unit vector, their offset components in this direction can be obtained, and this offset component is the offset intensity. The calculation of the offset intensity can more intuitively reflect the position changes of the first landmark point and the second landmark point during the face migration process, thereby providing more accurate guidance for subsequent face image migration. When calculating the offset intensity, different unit vector directions can be selected according to actual needs to obtain the offset intensities in different directions, so as to more comprehensively evaluate the effect of face migration.

[0111] In this alternative embodiment, the offset intensity of each first landmark point and the corresponding second landmark point in the standardized coordinate system can be calculated based on the following formula:

[0112]

[0113] where S i is the offset intensity, O i is the first offset or the second offset of the corresponding first landmark point and the second landmark point, X is the unit vector of the first reference axis as described above, and Y is the unit vector of the second reference axis as described above.

[0114] In this alternative embodiment, after obtaining the first offset of the facial feature and the second offset of the cheek feature, the offset intensity of each first landmark point and the corresponding second landmark point can be calculated through this formula, and then the movement degree of each landmark point during the face image migration can be determined. In the subsequent face migration process, corresponding adjustments can be made through this offset intensity to ensure the natural transition of the face image and the accurate migration of features.

[0115] 105. Input each offset intensity into the rendering pipeline to migrate the first face image to the second face image.

[0116] In this embodiment, the rendering pipeline can specifically be an OpenGL (Open Graphics Library) rendering pipeline, a DirectX rendering pipeline, or a rendering pipeline based on deep learning models such as generative adversarial networks and convolutional neural networks, etc. Through the rendering pipeline, the calculated offset intensity can be applied to the first face image, thereby realizing the image migration from the source face to the target face. In the rendering pipeline, the movement degree of each landmark point will be adjusted according to its offset intensity to ensure the natural transition of the face during the image migration process and the accurate migration of features.

[0117] Through the face migration method of the above embodiment, this embodiment can improve the consistency level of feature positions, feature orientations, and feature ratios according to the facial features of the first face image and the second face image, eliminate the facial position differences caused by different shooting positions, the inconsistency of facial orientations caused by different head postures, and the ratio differences caused by different shooting distances or facial sizes. Through the pipeline rendering based on the calculated offset intensity, it can solve the influence on the harmony of facial features caused by different face shapes, effectively maintain the harmonious relationship between various parts of the face, improve the credibility of the face swapping effect, and achieve a more natural and harmonious face swapping effect, which is beneficial to improving the applicability and realism of face swapping technology in application scenarios such as film and television production, virtual reality, and social media.

[0118] To execute the corresponding steps in the above method embodiments and all possible implementation manners, the following provides an implementation manner of a face image migration device. Please refer to Figure 5 , Figure 5 FIG. is a schematic diagram of functional modules of an embodiment of a face image migration device in an embodiment of the present invention. In this embodiment, the face image migration device is applied to an electronic device, and the face image migration device includes:

[0119] An acquisition module 201, configured to acquire a plurality of first landmark points corresponding to the first face image and a plurality of second landmark points corresponding to the second face image, where the first landmark points and the second landmark points are in one-to-one correspondence according to feature positions;

[0120] A normalization module 202, configured to normalize the feature positions, feature orientations, and feature ratios represented by the first landmark points and the second landmark points;

[0121] A mapping module 203, configured to map the normalized first landmark points and second landmark points to the same standardized coordinate system;

[0122] A calculation module 204, configured to calculate the offset intensity between each first landmark point and the corresponding second landmark point in the standardized coordinate system;

[0123] A migration module 205, configured to input each offset intensity into a rendering pipeline to migrate the first face image to the second face image.

[0124] Optionally, in an embodiment, the acquisition module 201 is further specifically configured to: perform discretization processing on the first face image and the second face image based on a preset dissection algorithm to obtain a plurality of first discretized grid regions corresponding to the first face image and a plurality of second discretized grid regions corresponding to the second face image; perform feature recognition on each first discretized grid region and each second discretized grid region based on a preset image recognition model to determine the corresponding first landmark points and second landmark points.

[0125] Optionally, in one embodiment, the normalization module 202 is further specifically configured to: translate each first landmark point and each second landmark point so that the first landmark point and the second landmark point corresponding to the first feature position coincide; with the line connecting the first landmark point of the first feature position and the second feature position as a reference, rotate each first landmark point, and with the line connecting the corresponding second landmark point as a reference, rotate each second landmark point so that the feature orientations represented by the first landmark points are consistent with the feature orientations represented by the second landmark points; determine a scaling factor based on the ratio of the first connection length of the first landmark points of the third feature position and the fourth feature position and the second connection length of the corresponding second landmark points, and scale each first landmark point or each second landmark point based on the scaling factor to reduce the difference in the standard feature ratios of the first feature points and the second feature points.

[0126] Optionally, in one embodiment, the first feature position is the feature position corresponding to the root of the nose feature; the second feature position is the feature position corresponding to the tip of the chin feature; the third feature position is the position corresponding to the left temple; the fourth feature position is the position corresponding to the right temple.

[0127] Optionally, in one embodiment, the standardized coordinate system takes the first landmark point or the second landmark point corresponding to the first feature position as the coordinate origin; the unit vector of the first reference axis of the standardized coordinate system is the normalized vector of the vector difference between the third feature position and the fourth feature position; the unit vector of the second reference axis of the standardized coordinate system is the normalized vector of the vector difference between the first feature position and the second feature position.

[0128] Optionally, in one embodiment, the calculation module 204 is further specifically configured to: obtain a first offset of each first landmark point corresponding to the facial feature in the standardized coordinate system and the corresponding second landmark point, where the first offset is used to represent the deviation of the first landmark point corresponding to the facial feature from the first center position of the facial feature after being scaled according to the facial scaling ratio, and the deviation of the second landmark point corresponding to the facial feature from the second center position of the facial feature; obtain a second offset of each first landmark point corresponding to the cheek feature in the standardized coordinate system and the corresponding second landmark point, where the second offset is used to represent the deviation of the first landmark point corresponding to the cheek feature from the second landmark point of the nearest cheek feature; determine the offset intensity of each first landmark point and the corresponding second landmark point based on the first offset and the offset, where the offset intensity is used to represent the offset degree of the first offset and the second offset in the direction of the unit vector.

[0129] Optionally, in one embodiment, the first central position is the average coordinate position of each first landmark corresponding to the facial feature, and the second central position is the average coordinate position of each second landmark corresponding to the facial feature; the facial scaling ratio is a transformation matrix used to scale the maximum height difference of each first landmark to be the same as the maximum height difference of the second landmark, and to scale the maximum width difference of each first landmark to be the same as the maximum width difference of the second landmark.

[0130] The present invention also provides a computer device, which includes a memory and a processor. When the computer-readable instructions stored in the memory are executed by the processor, the processor is caused to execute the face image migration method as described above. Figure 3 FIG. is a schematic diagram of the functional modules of a computer device provided by an embodiment of the present invention. The computer device 300 may vary greatly due to different configurations or performances, and may include one or more processors (central processing units, CPUs) 310 (for example, one or more processors) and a memory 320, and one or more storage media 330 (for example, one or more mass storage devices) storing application programs 333 or data 332. Among them, the memory 320 and the storage media 330 may be transient storage or persistent storage. The program stored in the storage media 330 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the computer device 300. Further, the processor 310 may be configured to communicate with the storage media 330 and execute a series of instruction operations in the storage media 330 on the computer device 300.

[0131] The computer device 300 may further include one or more power supplies 340, one or more wired or wireless network interfaces 350, one or more input / output interfaces 360, and / or one or more operating systems 331, such as Windows Serve, Mac OS X, Unix, Linux, FreeBSD, and so on. Those skilled in the art can understand that Figure 6 the computer device structure shown does not constitute a limitation on the computer device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0132] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are run on a computer, the computer is caused to execute the face image migration method as described above.

[0133] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working process of the above-described device can refer to the corresponding process in the foregoing method embodiments, which will not be elaborated herein. If the integrated module or unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an 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. The computer software product is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs that can store program codes.

[0134] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments or equivalently replace some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A method for face image migration, characterized in that, The described face image migration method includes: Obtaining a plurality of first landmark points corresponding to a first face image and a plurality of second landmark points corresponding to a second face image, wherein the first landmark points and the second landmark points are in one-to-one correspondence according to the feature positions; Normalizing the feature positions, feature orientations, and feature ratios represented by the first landmark points and the second landmark points; Mapping the normalized first landmark points and second landmark points into the same standardized coordinate system; Calculating the offset intensity between each of the first landmark points and the corresponding second landmark points in the standardized coordinate system; Inputting each of the offset intensities into a rendering pipeline to migrate the first face image to the second face image.

2. The face image migration method according to claim 1, wherein The feature positions at least include a first feature position, a second feature position, a third feature position, and a fourth feature position; The normalizing the feature positions, feature orientations, and feature ratios represented by the first landmark points and the second landmark points includes: Translating each of the first landmark points and each of the second landmark points so that the first landmark points corresponding to the first feature position and the second landmark points coincide; Taking the connection line of the first landmark points at the first feature position and the second feature position as a reference, rotating each of the first landmark points, and taking the connection line of the corresponding second landmark points as a reference, rotating each of the second landmark points so that the feature orientation represented by the first landmark points is consistent with the feature orientation represented by the second landmark points; Determining a scaling factor based on the ratio of the first connection line length of the first landmark points at the third feature position and the fourth feature position to the second connection line length of the corresponding second landmark points, and scaling each of the first landmark points or each of the second landmark points based on the scaling factor to reduce the difference in the feature ratios of the first landmark points and the second landmark points; 3. The face image migration method according to claim 2, wherein The first feature position is the feature position corresponding to the root of the nose feature; The second feature position is the feature position corresponding to the tip of the chin feature; The third feature position is the feature position corresponding to the left temple; The fourth feature position is the feature position corresponding to the right temple.

4. The face image migration method according to claim 3, wherein The standardized coordinate system takes the first landmark point or the second landmark point corresponding to the first feature position as the coordinate origin; The unit vector of the first reference axis of the standardized coordinate system is the normalized vector of the vector difference between the third feature position and the fourth feature position; The unit vector of the second reference axis of the standardized coordinate system is the normalized vector of the vector difference between the first feature position and the second feature position.

5. The face image migration method according to claim 4, wherein The calculating the offset intensity between each of the first landmark points and the corresponding second landmark points in the standardized coordinate system includes: Obtain the first offset between each of the first landmark points corresponding to the facial feature in the standardized coordinate system and the corresponding second landmark point, where the first offset is used to represent the deviation between the deviation value of the first landmark point corresponding to the facial feature relative to the first central position of the facial feature after being scaled by the facial feature scaling ratio and the deviation value of the second landmark point corresponding to the facial feature relative to the second central position of the facial feature; Obtain the second offset between each of the first landmark points corresponding to the cheek feature in the standardized coordinate system and the corresponding second landmark point, where the second offset is used to represent the deviation between the first landmark point corresponding to the cheek feature and the second landmark point of the cheek feature with the closest distance; Determine the offset intensity of each of the first landmark points and the corresponding second landmark point based on the first offset and the offset, where the offset intensity is used to represent the degree of offset of the first offset and the second offset in the direction of the unit vector.

6. The face image migration method according to claim 5, wherein The first central position is the average coordinate position of each of the first landmark points corresponding to the facial feature, and the second central position is the average coordinate position of each of the second landmark points corresponding to the facial feature; The facial feature scaling ratio is a transformation matrix used to scale the maximum height difference of each of the first landmark points to be consistent with the maximum height difference of the second landmark points, and to scale the maximum width difference of each of the first landmark points to be consistent with the maximum width difference of the second landmark points.

7. The face image migration method according to any one of claims 1-6, characterized in that The obtaining of the multiple first landmark points corresponding to the first face image and the multiple second landmark points corresponding to the second face image includes: Perform discretization processing on the first face image and the second face image based on a preset dissection algorithm to obtain multiple first discretized grid regions corresponding to the first face image and multiple second discretized grid regions corresponding to the second face image; Perform feature recognition on each of the first discretized grid regions and each of the second discretized grid regions based on a preset image recognition model to determine the corresponding first landmark points and second landmark points; Among them, the preset image recognition model is used to recognize and locate the first discretized grid region and the second discretized grid region corresponding to the matching of a preset number of key feature points to obtain the first landmark points and the second landmark points.

8. A face image migration device, characterized in that The face image migration device includes: An obtaining module, configured to obtain multiple first landmark points corresponding to a first face image and multiple second landmark points corresponding to a second face image, where the first landmark points and the second landmark points correspond one by one according to the feature positions; A normalization module, configured to normalize the feature positions, feature orientations, and feature ratios represented by the first landmark points and the second landmark points; A mapping module, configured to map the normalized first landmark points and second landmark points to the same standardized coordinate system; A calculation module, configured to calculate the offset intensity of each of the first landmark points and the corresponding second landmark points in the standardized coordinate system; A migration module, configured to input each of the offset intensities into a rendering pipeline to migrate the first face image to the second face image.

9. A computer device, characterized in that, The computer device includes: a memory and at least one processor, and instructions are stored in the memory; The at least one processor invokes the instructions in the memory to cause the computer device to execute the face image migration method according to any one of claims 1-7.

10. A computer-readable storage medium, on which instructions are stored, characterized in that, When the instructions are executed by the processor, the face image migration method according to any one of claims 1-7 is implemented.