Method and device for shaping human face in video, storage medium and equipment

By receiving drag operation data in video editing and building a mapping relationship between face and offset texture, the problem that cannot meet the video editing needs in the existing technology is solved, and free editing and personalized customization of the faces of characters in videos is realized. , improves the freedom and quality of editing.

CN119295585APending Publication Date: 2025-01-10GUANGZHOU GUANGZHUIYUAN INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411359762.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

Existing video editing software cannot meet users' needs for high-precision, freedom and personalized customization functions of video portrait beautification, especially in video editing, the fine control of the character's face cannot be achieved.

Method used

By receiving the user's drag operation data, performing liquidation analysis to obtain pixel offset information, constructing a mapping relationship between the face and the offset texture of the current frame screen and other frame screens, and applying offset texture to synchronize the current frame screen with other frame screens. The pixel offset of the frame screen enables free editing of the faces of the characters in the video.

Benefits of technology

It provides the function of freely editing the faces of characters during video playback. The editing results are automatically mapped to other video frames to meet users' personalized needs, enhance the fun and creativity of video editing, and provide a higher quality editing experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119295585A_ABST
    Figure CN119295585A_ABST
Patent Text Reader

Abstract

The invention provides a human face shaping method and device in a video, a storage medium and equipment, and the method comprises the steps: receiving dragging operation data of a user for a human face in a current frame image, and carrying out the liquefaction analysis of the dragging operation data, and obtaining pixel offset information; based on the face key point data in the current frame of picture and preset model face key point data, constructing a first mapping relation between the face and the offset texture in the current frame of picture; calculating offset textures corresponding to all pixel offset information in the current frame of picture; aiming at the face key point data and model face key point data of other frames except the current frame in the video, constructing a second mapping relation between the face and the offset texture in each other frame; and applying the offset texture to each other frame of picture, so that each other frame of picture synchronizes the pixel offset of the current frame of picture. According to the method and the device, the effect of freely editing the human face shaping in the video in a high-quality and detailed manner is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of video processing, and in particular to a method and device for shaping the face of a person in a video, a storage medium, and equipment. Background Art

[0002] With the development and improvement of mobile devices and the increasing demand for image and video sharing on Internet platforms, users' aesthetic pursuit for video portrait beautification has gradually improved, and the requirements for the precision, freedom and personalized customization of video portrait and face shaping editing have become increasingly higher, but existing video editing software can hardly meet such needs.

[0003] On the one hand, existing video editing software usually provides some preset face shaping functions. Users can only adjust the deformation degree through the slider and shape the face according to the preset method, but cannot freely customize the face shaping method. This method limits the user's creative freedom and cannot meet personalized editing needs.

[0004] On the other hand, existing face editing software usually only provides the function of freely editing the face shaping of people in image editing, and cannot be used for video editing. This limits users' more detailed control over the face of people in video editing and cannot meet the needs of richer video editing. Summary of the invention

[0005] To this end, the present invention provides a method and device for shaping the face of a person in a video, a storage medium, and a device, aiming to solve the technical problem that the prior art cannot meet the personalized editing needs and video editing needs.

[0006] To achieve the above objectives, the present invention adopts the following technical solutions:

[0007] According to a first aspect of the present invention, the present invention provides a method for shaping a person's face in a video, the method comprising:

[0008] receiving dragging operation data of a user on a face in a current frame, performing liquefaction analysis on the dragging operation data, and obtaining pixel offset information;

[0009] Based on the facial key point data in the current frame and the preset model facial key point data, construct a first mapping relationship between the face in the current frame and the offset texture;

[0010] Based on the first mapping relationship, calculating the offset texture corresponding to all pixel offset information in the current frame;

[0011] For the facial key point data of other frames in the video except the current frame and the facial key point data of the model, construct a second mapping relationship between the face in each of the other frames and the offset texture;

[0012] Based on the second mapping relationship, the offset texture is applied to each of the other frame pictures, so that each of the other frame pictures is synchronized with the pixel offset of the current frame picture.

[0013] Optionally, the drag operation data includes a drag initial position and a drag target position;

[0014] The liquefaction analysis of the drag operation data includes:

[0015] Decomposing the path from the initial drag position to the target drag position into a plurality of intervals, performing a liquefaction operation on each of the intervals to obtain pixel offset information;

[0016] The pixel offset information is the pixel offset amount generated by the user's dragging operation on the current frame.

[0017] Optionally, constructing a first mapping relationship between the face in the current frame and the offset texture includes:

[0018] The facial key point data and the facial key point data of the model are used as partial vertices, and the points around the face are used as boundary points to construct a triangular mesh mapping, which is the first mapping relationship.

[0019] Optionally, the first mapping relationship is that for each pixel point position in the offset texture, there is a unique corresponding pixel point position in the current frame picture;

[0020] The calculating, based on the first mapping relationship, the offset texture corresponding to all pixel offset information in the current frame picture includes:

[0021] The pixel offset generated by the user's operation in the current frame is accumulated into the offset texture using the following formula:

[0022] colorP.xy=colorP.xy+warp(c,fromPoint,toPoint,radius)

[0023] Among them, the unique corresponding pixel position of any pixel point p in the offset texture in the current frame is the coordinate of point c; colorP.xy is the offset value of the offset texture point p; warp(c,fromPoint,toPoint,radius) is the pixel offset of the pixel position c in the current frame after liquefaction deformation.

[0024] Optionally, the second mapping relationship is that for each pixel point position of the other picture frame, the offset texture has a unique corresponding pixel point position;

[0025] The step of applying the offset texture to each of the other frames based on the second mapping relationship so that each of the other frames synchronizes the pixel offset of the current frame, includes:

[0026] The pixel color values ​​in each of the other frames are calculated using the following formula:

[0027] colorC=texture(videoFrameTexture,c+colorP.xy)

[0028] Among them, the unique corresponding pixel position of any pixel point p in the offset texture in the other frame pictures is the point c coordinate; colorC is the color value of the pixel position c coordinate in each of the other frame pictures; colorP.xy is the offset value of the offset texture point p coordinate; videoFrameTexture is the original image texture of each of the other frame pictures; texture is the texture sampling method.

[0029] Optionally, the method further comprises:

[0030] Each of the other frames is rendered using the pixel color value of each of the other frames, so that the video is synchronized with the deformation effect of the current frame.

[0031] According to a second aspect of the present invention, the present invention provides a device for shaping a person's face in a video, the device comprising:

[0032] An operation data receiving module, used for receiving the drag operation data of the user on the face in the current frame, performing liquefaction analysis on the drag operation data, and obtaining pixel offset information;

[0033] A first data mapping module, configured to construct a first mapping relationship between a face in the current frame and an offset texture based on face key point data in the current frame and preset model face key point data;

[0034] A first offset corresponding module, used for calculating the offset texture corresponding to all pixel offset information in the current frame based on the first mapping relationship;

[0035] A second data mapping module, for constructing a second mapping relationship between a face in each of the other frames except the current frame and the model's face key point data, and between the face in each of the other frames and the offset texture;

[0036] The second offset corresponding module is used to apply the offset texture to each of the other frames based on the second mapping relationship, so that each of the other frames synchronizes the pixel offset of the current frame.

[0037] Optionally, the device further comprises:

[0038] The picture rendering deformation module is used to render each of the other picture frames using the pixel color values ​​of each of the other frames, so as to synchronize the deformation effect of the current frame with the video.

[0039] According to a third aspect of the present invention, the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor executes a method for shaping a person's face in a video as described in any one of the first aspect of the present invention.

[0040] According to a fourth aspect of the present invention, the present invention provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements a method for shaping a person's face in a video as described in any one of the first aspects of the present invention when executing the computer program.

[0041] The present invention adopts the above technical solution and has at least the following beneficial effects:

[0042] Through the scheme of the present invention, the drag operation data of the user on the face in the current frame is received, the drag operation data is liquefied and analyzed to obtain pixel offset information; based on the face key point data in the current frame and the preset model face key point data, a first mapping relationship between the face in the current frame and the offset texture is constructed; based on the first mapping relationship, the offset texture corresponding to all pixel offset information in the current frame is calculated; for the face key point data of other frames in the video except the current frame and the model face key point data, a second mapping relationship between the face in each of the other frames and the offset texture is constructed; based on the second mapping relationship, the offset texture is applied to each of the other frames, so that each of the other frames synchronizes the pixel offset of the current frame. Thus, a method for manually and freely editing the face shaping of a person in a video on a mobile terminal is provided, and the user can edit the face shape in any frame paused during video playback, and the editing result will be automatically mapped to other video frames and synchronously follow the dynamic changes of the face, thereby achieving the functional effect of freely editing the face shaping of a person in a video. The present invention is simple and easy to use, has a high degree of freedom, meets the user's needs for personalized customization and custom editing and adjustment, and can effectively enhance the fun and creativity of video editing; and provides users with a richer video editing experience, allowing users to edit video faces as finely as editing pictures, providing higher quality and detailed editing function effects, and solving the defects in the prior art.

[0043] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0045] Figure 1 A schematic diagram showing a flow chart of a method for shaping a person's face in a video provided by an embodiment of the present invention;

[0046] Figure 2 A schematic diagram of the structure of a device for shaping a person's face in a video provided by an embodiment of the present invention is shown;

[0047] Figure 3 A schematic diagram of the structure of a device for shaping a person's face in a video provided by another embodiment of the present invention is shown;

[0048] Figure 4A schematic diagram of the physical structure of a computer device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0049] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0050] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0051] The embodiment of the present invention provides a method for shaping the face of a person in a video, such as Figure 1 As shown, at least the following steps S101 to S105 may be included:

[0052] Step S101, receiving the dragging operation data of the user on the face in the current frame, performing liquefaction analysis on the dragging operation data, and obtaining pixel offset information.

[0053] The current frame in the embodiment of the present invention refers to the frame where the video is paused when the user is shaping the face of the video. The user can perform editing interaction based on the current frame, and drag the face contour shape with a finger to achieve the shaping operation of the character's face. For example, drag the chin of the face downward to achieve the effect of a "pointed chin". The drag operation data may include the initial drag position and the target drag position, such as the pressed position b and the lifted position e of the user's finger.

[0054] Further, the drag operation data is liquefied and analyzed. Specifically, the path from the initial drag position to the target drag position can be decomposed into multiple intervals, and each interval is liquefied to obtain pixel offset information. That is, the embodiment of the present invention uses image liquefaction technology to achieve a freely editable character face shaping function. Image liquefaction is an image processing technology that can change the shape and appearance of an image by distorting image pixels. For example, the path from b to e is decomposed into multiple intervals, and each interval is liquefied by radius, direction, and radius. The liquefaction operation is performed, and the liquefaction analysis parameters include the center point fromPoint, the deformation end point toPoint, and the deformation range radius radius. It can be understood that the positions of the center point fromPoint and the deformation end point toPoint are in the current frame coordinate system. Thus, the pixel offset information of the current frame after the user performs the drag operation is obtained, that is, the pixel offset generated by the user's drag operation on the current frame.

[0055] Step S102: constructing a first mapping relationship between the face in the current frame and the offset texture based on the face key point data in the current frame and the preset model face key point data.

[0056] The model face in the embodiment of the present invention is a standard model image with the face facing the screen. The offset texture refers to all pixel offset information of the person's face. The offset texture is a half-floating point precision format texture with a fixed shape, and can usually be constructed with reference to the portrait model image. Among them, the rg value of each pixel represents the xy offset value between the current face position and the actual sampling position.

[0057] It can be understood that in order to accumulate the pixel offset generated by the liquefaction operation to the offset texture, the embodiment of the present invention records the offset pixel offset information of the face in the current frame by constructing a mapping relationship between the face in the current frame and the offset texture of the standard model face image.

[0058] The face key point data and the model face key point data in the embodiment of the present invention can be determined based on the existing key point recognition model. Furthermore, the face key points in the face key point data and the model face key point data can be used as partial vertices, and the points around the face can be used as boundary points to construct a triangular mesh mapping, that is, a first mapping relationship. The first mapping relationship in the embodiment of the present invention means that for each pixel point position in the offset texture constructed based on the model face key point data, there is a unique corresponding pixel point position in the current frame. Therefore, when the user drags the face in the current frame, a new set of offsets can be calculated through liquefaction analysis, and the direction, size and pixel position of this set of offsets are based on the current frame. Through the first mapping relationship, all pixel offsets in the current frame can be mapped to the pixel position corresponding to the offset texture, and the direction and size are also adjusted accordingly. Finally, the adjusted offset is added to the offset texture to obtain the offset texture that records all pixel offset information of the face in the current frame. Furthermore, the offset texture recording all pixel offset information of the human face in the current frame is applied to other frames, so that the pixel offset of other frames can be synchronized with the current frame.

[0059] Step S103: calculating the offset texture corresponding to all pixel offset information in the current frame based on the first mapping relationship.

[0060] It can be understood that the first mapping relationship in the embodiment of the present invention can be that for each pixel point position in the offset texture, there is a unique corresponding pixel point position in the current frame. Then, for any pixel point p coordinate in the offset texture, there is a unique corresponding pixel position c coordinate in the current frame; wherein, the calculation formula of the offset texture position p coordinate can be:

[0061] colorP.xy=colorP.xy+warp(c,fromPoint,toPoint,radius)

[0062] Among them, colorP.xy is the offset value of the offset texture point p coordinates; warp(c,fromPoint,toPoint,radius) is the pixel offset of the pixel position point c in the current frame after liquefaction deformation.

[0063] By applying the above calculations to all pixel points of the offset texture respectively, an offset texture that records the offset information of all pixels of the face in the current frame can be obtained.

[0064] Step S104, for the facial key point data and the model's facial key point data of other frames except the current frame in the video, construct a second mapping relationship between the face in each other frame and the offset texture.

[0065] In the embodiment of the present invention, other frames refer to other video frames in the video except the current frame. By establishing a second mapping relationship between the face and the offset texture in other frames, the editing effect of the user in the current frame is synchronously mapped to other frames. The acquisition of the face key point data of other frames and the face key point data of the model and the establishment of the second preset relationship can refer to the corresponding description in step S102, and the present invention will not repeat them.

[0066] Step S105: Based on the second mapping relationship, the offset texture is applied to each other frame picture, so that each other frame picture is synchronized with the pixel offset of the current frame picture.

[0067] It can be understood that the second mapping relationship can be that for each pixel position of other frames, the offset texture has a unique corresponding pixel position. Then, for any pixel point p coordinate in the offset texture, there is a unique corresponding pixel position c coordinate in other frames; wherein, the calculation formula of the pixel color value in other frames can be:

[0068] colorC=texture(videoFrameTexture,c+colorP.xy)

[0069] Among them, colorC is the color value of the coordinates of the pixel position c in each other frame; colorP.xy is the offset value of the coordinates of the offset texture point p; videoFrameTexture is the original image texture of each other frame; texture is the texture sampling method.

[0070] By applying the above calculation to the face area of ​​each other video frame, all corresponding pixel offset information can be obtained.

[0071] Furthermore, each other frame is rendered using the pixel color value of each other frame, so that the video synchronizes the deformation effect of the current frame.

[0072] Specifically, a graphics rendering API such as OpenGL or Metal can be used to render the face images in other frames, and the corresponding pixel colors can be obtained according to the second mapping relationship, and applied to the corresponding pixel positions to obtain the result image after the deformation effect. For example, when a user drags the chin of the face downward to shape a "pointed chin" in the current video frame, when playing the video or switching the video frame, it can be seen that the character in the video always has a "pointed chin" effect.

[0073] The embodiment of the present invention provides a method for shaping the face of a person in a video, including receiving drag operation data performed by a user on a face in a current frame, performing liquefaction analysis on the drag operation data, and obtaining pixel offset information; constructing a first mapping relationship between the face in the current frame and the offset texture based on the face key point data in the current frame and the preset model face key point data; calculating the offset texture corresponding to all pixel offset information in the current frame; constructing a second mapping relationship between the face in each other frame and the offset texture for the face key point data and the model face key point data of other frames in the video except the current frame; applying the offset texture to each other frame, so that each other frame synchronizes the pixel offset of the current frame. Through the present invention, based on face key point detection, texture mapping and other technologies, the offset texture is used to record deformation information to synchronize the deformation effects of different frames of the video; the user can edit the face shape in any frame paused during video playback, and the editing result will be automatically mapped to other video frames, thereby achieving the function of freely editing the face shaping of the person in the video.

[0074] Further, as Figure 1 In a specific implementation, an embodiment of the present invention provides a device for shaping a person's face in a video, such as Figure 2 As shown, the apparatus may include: an operation data receiving module 210 , a first data mapping module 220 , a first offset corresponding module 230 , a second data mapping module 240 and a second offset corresponding module 250 .

[0075] The operation data receiving module 210 may be used to receive the drag operation data of the user on the face in the current frame, and perform liquefaction analysis on the drag operation data to obtain pixel offset information;

[0076] The first data mapping module 220 can be used to construct a first mapping relationship between the face in the current frame and the offset texture based on the face key point data in the current frame and the preset model face key point data;

[0077] The first offset corresponding module 230 may be used to calculate the offset texture corresponding to all pixel offset information in the current frame based on the first mapping relationship;

[0078] The second data mapping module 240 can be used to construct a second mapping relationship between the face and the offset texture in each frame except the current frame in the video for the face key point data and the model face key point data of the other frames.

[0079] The second offset corresponding module 250 can be used to apply the offset texture to each other frame picture based on the second mapping relationship, so that each other frame picture synchronizes the pixel offset of the current frame picture.

[0080] Alternatively, if Figure 3 As shown, another embodiment of the present invention provides a device for shaping the face of a person in a video, which also includes: a picture rendering deformation module 260.

[0081] The picture rendering deformation module 260 can be used to render each other picture frame by using the pixel color value of each other frame, so as to synchronize the deformation effect of the current frame with the video.

[0082] Optionally, the operation data receiving module 210 may also be used to decompose the path from the initial drag position to the target drag position into multiple intervals, perform a liquefaction operation on each interval, and obtain pixel offset information;

[0083] The pixel offset information is the pixel offset amount generated by the user's dragging operation on the current frame.

[0084] Optionally, the first data mapping module 220 can also be used to construct a triangular mesh mapping by using the facial key point data and the facial key point data of the model as partial vertices and the points around the face as boundary points, which is the first mapping relationship.

[0085] Optionally, the first offset corresponding module 230 may also be used to accumulate the pixel offset generated by the user's operation in the current frame to the offset texture using the following formula:

[0086] colorP.xy=colorP.xy+warp(c,fromPoint,toPoint,radius)

[0087] Among them, the only corresponding pixel position of any pixel point p in the offset texture in the current frame is the coordinate of point c; colorP.xy is the offset value of the offset texture point p; warp(c,fromPoint,toPoint,radius) is the pixel offset of the pixel position c in the current frame after liquefaction deformation.

[0088] Optionally, the second offset corresponding module 250 may also be used to calculate the pixel color value in each other frame using the following formula:

[0089] colorC=texture(videoFrameTexture,c+colorP.xy)

[0090] Among them, the unique corresponding pixel position of any pixel point p in the offset texture in other frames is the pixel position c; colorC is the color value of the pixel position c in each other frame; colorP.xy is the offset value of the offset texture point p; videoFrameTexture is the original image texture of each other frame; texture is the texture sampling method.

[0091] It should be noted that for other corresponding descriptions of the functional modules involved in the device for shaping the face of a person in a video provided by an embodiment of the present invention, reference can be made to Figure 1 The corresponding description of the method shown will not be repeated here.

[0092] Based on the above Figure 1 The method shown, accordingly, an embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method for shaping the face of a person in a video described in any of the above embodiments are implemented.

[0093] Based on the above Figure 1 The method shown and Figure 3 The embodiment of the device shown in the figure, the embodiment of the present invention also provides a physical structure diagram of a computer device, such as Figure 4 As shown, the computer device may include a communication bus, a processor, a memory and a communication interface, and may also include an input / output interface and a display device, wherein each functional unit may communicate with each other through the bus. The memory stores a computer program, and the processor is used to execute the program stored in the memory and execute the steps of the method for shaping the face of a person in a video described in the above embodiment.

[0094] Those skilled in the art can clearly understand that the specific working processes of the systems, devices, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and for the sake of brevity, they are not further described here.

[0095] In addition, the functional units in various embodiments of the present invention may be physically independent of each other, or two or more functional units may be integrated together, or all functional units may be integrated into one processing unit. The above integrated functional units may be implemented in the form of hardware, or in the form of software or firmware.

[0096] Those skilled in the art can understand that if the integrated functional unit is implemented in the form of software and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention can essentially 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, which includes a number of instructions to enable a computing device (such as a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention when running the instructions. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program codes.

[0097] Alternatively, all or part of the steps of implementing the aforementioned method embodiments may be accomplished by hardware associated with program instructions (such as a computing device such as a personal computer, a server, or a network device), and the program instructions may be stored in a computer-readable storage medium. When the program instructions are executed by a processor of a computing device, the computing device executes all or part of the steps of the methods described in the embodiments of the present invention.

[0098] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that within the spirit and principles of the present invention, the technical solutions described in the aforementioned embodiments can still be modified, or some or all of the technical features therein can be replaced by equivalents. However, these modifications or replacements do not deviate from the protection scope of the present invention.

Claims

1. A method for shaping a person's face in a video, characterized in that: The method comprises: receiving dragging operation data of a user on a face in a current frame, performing liquefaction analysis on the dragging operation data, and obtaining pixel offset information; Based on the facial key point data in the current frame and the preset model facial key point data, construct a first mapping relationship between the face in the current frame and the offset texture; Based on the first mapping relationship, calculating the offset texture corresponding to all pixel offset information in the current frame; For the facial key point data of other frames in the video except the current frame and the facial key point data of the model, construct a second mapping relationship between the face in each of the other frames and the offset texture; Based on the second mapping relationship, the offset texture is applied to each of the other frame pictures, so that each of the other frame pictures is synchronized with the pixel offset of the current frame picture.

2. The method according to claim 1, characterized in that The drag operation data includes a drag initial position and a drag target position; The liquefaction analysis of the drag operation data includes: Decomposing the path from the initial drag position to the target drag position into a plurality of intervals, performing a liquefaction operation on each of the intervals to obtain pixel offset information; The pixel offset information is the pixel offset amount generated by the user's dragging operation on the current frame.

3. The method according to claim 1, characterized in that The constructing a first mapping relationship between the face in the current frame and the offset texture includes: The facial key point data and the facial key point data of the model are used as partial vertices, and the points around the face are used as boundary points to construct a triangular mesh mapping, which is the first mapping relationship.

4. The method according to claim 1, characterized in that: The first mapping relationship is that for each pixel point position in the offset texture, there is a unique corresponding pixel point position in the current frame picture; The calculating, based on the first mapping relationship, the offset texture corresponding to all pixel offset information in the current frame picture includes: The pixel offset generated by the user's operation in the current frame is accumulated into the offset texture using the following formula: colorP.xy=colorP.xy+warp(c,fromPoint,toPoint,radius) Among them, the unique corresponding pixel position of any pixel point p in the offset texture in the current frame is the coordinate of point c; colorP.xy is the offset value of the offset texture point p; warp(c,fromPoint,toPoint,radius) is the pixel offset of the pixel position c in the current frame after liquefaction deformation.

5. The method according to claim 4, characterized in that The second mapping relationship is that for each pixel point position of the other frame picture, the offset texture has a unique corresponding pixel point position; The step of applying the offset texture to each of the other frames based on the second mapping relationship so that each of the other frames synchronizes the pixel offset of the current frame, includes: The pixel color values ​​in each of the other frames are calculated using the following formula: colorC=texture(videoFrameTexture,c+colorP.xy) Among them, the unique corresponding pixel position of any pixel point p in the offset texture in the other frame pictures is the point c coordinate; colorC is the color value of the pixel position c coordinate in each of the other frame pictures; colorP.xy is the offset value of the offset texture point p coordinate; videoFrameTexture is the original image texture of each of the other frame pictures; texture is the texture sampling method.

6. The method according to claim 5, characterized in that The method further comprises: Each of the other frames is rendered using the pixel color value of each of the other frames, so that the video is synchronized with the deformation effect of the current frame.

7. A device for shaping the face of a person in a video, characterized in that: The device comprises: An operation data receiving module, used for receiving the drag operation data of the user on the face in the current frame, performing liquefaction analysis on the drag operation data, and obtaining pixel offset information; A first data mapping module, configured to construct a first mapping relationship between a face in the current frame and an offset texture based on face key point data in the current frame and preset model face key point data; A first offset corresponding module, used for calculating the offset texture corresponding to all pixel offset information in the current frame based on the first mapping relationship; A second data mapping module, for constructing a second mapping relationship between a face in each of the other frames except the current frame and the model's face key point data, and between the face in each of the other frames and the offset texture; The second offset corresponding module is used to apply the offset texture to each of the other frames based on the second mapping relationship, so that each of the other frames synchronizes the pixel offset of the current frame.

8. The device according to claim 7, characterized in that The device also includes: The picture rendering deformation module is used to render each of the other picture frames using the pixel color values ​​of each of the other frames, so as to synchronize the deformation effect of the current frame with the video.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor executes the method for shaping the face of a person in a video as described in any one of claims 1 to 6.

10. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method for shaping the face of a person in a video as described in any one of claims 1 to 6 is implemented.