Sliding rail screen 2D digital human generation method and system

Extracting feature points and processing video frames through the human posture estimation network solves the problem of non-constant center of gravity and size of characters in the 2D digital human technology on the sliding rail screen, realizes automated video preprocessing, and improves visual effects and production efficiency.

CN118587333APending Publication Date: 2024-09-03SHANDONG INSPUR ULTRA HD INTELLIGENT TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410649219.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-24
Publication Date
2024-09-03

Smart Images

  • Figure CN118587333A
    Figure CN118587333A
Patent Text Reader

Abstract

The invention relates to the technical field of human body posture estimation, and particularly provides a slide rail screen 2D digital human generation method and system, and the method comprises the steps: obtaining an original video containing different motion states of a human body, and reading each image frame of the original video; utilizing a pre-trained human body posture estimation network to extract feature point coordinates of the image frames, and generating gravity center coordinates and human body sizes based on the feature point coordinates; generating constant gravity center point coordinates and constant human body sizes corresponding to different motion states based on the gravity center point coordinates and the human body sizes of the image frames; performing gravity center position and size optimization adjustment on a pre-generated primary processing video by using the average gravity center point coordinates and the average human body size corresponding to different motion states to obtain a full-time-domain pre-reasoning video; and generating the digital human based on the pre-reasoning video and pre-stored driving audio. According to the invention, the position of the figure area of the digital person in the slide rail screen is always constant, and the movement process of the figure is more natural.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of human body posture estimation, and in particular relates to a method and system for generating a 2D digital human on a sliding track screen. Background Art

[0002] The 2D digital human on the sliding screen is an innovative product that combines the sliding screen technology with the digital human technology. It can place the digital human on the sliding screen for vivid content explanations, or allow the digital human to make highly coordinated movements as the screen moves. It provides users with a more immersive viewing experience and has a wide range of applications in exhibitions, performances, advertising and other fields.

[0003] 2D digital human technology is a relatively cutting-edge technology. Through AIGC technologies such as TFG / TPS, voice-driven 2D digital human lip shape, facial expression, head posture and body movements are realized. Representative digital human driving models include Wav2Lip, SadTalker, IP-LAP and other models based on 2D and 2.5D motion fields, and ER-NeRF, SyncTalk and other models based on NeRF. However, there are still many challenges in driving the body movements of 2D digital humans.

[0004] Compared with 2D digital human technology, the sliding screen 2D digital human technology maintains consistency in the driving of the digital human's lip shape, facial expression and head posture, but requires a lot more work in data collection and video preprocessing. The reason is the movement relationship between the digital human and the sliding screen, which requires the visual coordination of the digital human's body movements and the sliding of the screen.

[0005] The 2D digital human technology of the sliding screen uses a pre-shooting method to obtain visual collaborative body movement videos. According to actual production requirements, a wide-angle lens is required to shoot continuous N points of people standing and explaining, and full-time domain videos of people walking between N-1 points as the original video. When pre-processing the original video, a significant problem will arise, that is, in the original video collected, the person is walking in the frame, resulting in irregular changes in the center of gravity of the person, while in the video played on the sliding screen, the center of gravity of the person needs to be kept at the center of the screen; and no matter whether the original video is shot from a fixed perspective or a moving perspective, since the person walks in a straight line, the size of the person cannot be guaranteed to be constant in the imaging airspace, while the size of the person and the position of the person area in the video played on the sliding screen should always be consistent in the full time domain. Existing methods use third-party software such as AE and PR to manually or semi-manually capture the person area from the original video, and perform inaccurate tracking to generate a pre-inference video to solve this problem. However, the effect of making pre-inference videos through third-party software is average. In the video clips of people standing and explaining, there is a problem of perspective jitter; in the starting video clips of people walking, there is a problem of perspective regression; in the full-time domain video, there is a problem of people's size flickering, and the position of the character area cannot be constant. These problems seriously affect the audience's visual experience. On the other hand, this method is contrary to the idea of ​​automation. The manual or semi-manual way of processing the original video limits the commercialization of the sliding screen 2D digital human production tool. Summary of the invention

[0006] In view of the above-mentioned deficiencies in the prior art, the present invention provides a method and system for generating a 2D digital human on a sliding screen to solve the above-mentioned technical problems.

[0007] In a first aspect, the present invention provides a method for generating a 2D digital human using a sliding screen, comprising: Acquire an original video containing different motion states of a human body, and read each image frame of the original video; Using a pre-trained human posture estimation network to extract feature point coordinates from an image frame, and generating center of gravity coordinates and human body dimensions based on the feature point coordinates; Based on the center-of-gravity coordinates and human body dimensions of the image frames under different motion states, constant center-of-gravity coordinates and constant human body dimensions corresponding to different motion states are generated; The center of gravity position and size of the pre-generated preliminary processing video are optimized and adjusted using the average center of gravity coordinates and average human body size corresponding to different motion states to obtain a pre-inference video in the full time domain; The pre-inference video and the pre-stored driving audio are input into a pre-trained human posture estimation network to obtain a digital human with a posture synchronized with the driving audio.

[0008] In an optional embodiment, the training method of the human posture estimation network includes: Acquire a data set, the data set includes an open source data set and a private data set, the open source data set includes multiple images containing human bodies, and a .txt file with the coordinate values ​​of 17 feature points corresponding to each human body contained in each labeled image, and the private data set includes multiple images containing human bodies; the 17 feature points include two eye feature points, nose feature points, two ear feature points, two shoulder feature points, two elbow feature points, two hand feature points, two hip feature points, two knee feature points and two foot feature points; Use annotation tools to annotate feature point coordinates for images in the private dataset, integrate the open source dataset, and construct a training and verification dataset for training a human pose estimation network; Input each image in the training and verification data set into a human posture estimation network, and obtain the predicted coordinates of the feature points in each image through feed-forward reasoning of the human posture estimation network; The human body posture estimation network is trained according to the coordinate values ​​of the marked feature points corresponding to each image and the predicted coordinates of the feature points of each image generated by feed-forward reasoning of the human body posture estimation network to obtain a trained human body posture estimation network.

[0009] In an optional implementation, obtaining an original video containing different motion states of a human body and reading each image frame of the original video includes: Use a wide-angle lens with a fixed viewing angle to shoot a series of N points with people standing and explaining, and a whole video of people walking between N-1 points as the original video; Each image frame of the original video is read using the third-party open source framework OpenCV.

[0010] In an optional embodiment, using a pre-trained human posture estimation network to extract feature point coordinates of an image frame, and generating center of gravity coordinates and human body dimensions based on the feature point coordinates, includes: Using the human body posture estimation network to perform feedforward reasoning and post-processing on each image frame of the original video to obtain the coordinates of feature points of the human body contained in each image frame; Extracting left hip feature point coordinates and right hip feature point coordinates from the feature point coordinates; The midpoint coordinates between the left hip feature point coordinates and the right hip feature point coordinates in the same image frame are set as the center of gravity coordinates of the corresponding image frame, and the distance between the left hip feature point coordinates and the right hip feature point coordinates in the same image frame is set as the human body size of the corresponding image frame; The center of gravity coordinates of the image frames and the human body size are sorted according to the image frame time sequence to obtain the center of gravity coordinate sequence and the size factor sequence.

[0011] In an optional implementation, based on the center-of-gravity coordinates and human body dimensions of the image frames in different motion states, constant center-of-gravity coordinates and constant human body dimensions corresponding to different motion states are generated, including: Extracting a center-of-gravity horizontal coordinate sequence from the center-of-gravity coordinate sequence; Marking the center of gravity coordinate sequence segments whose change values ​​of the horizontal coordinates of the center of gravity are within the set threshold range as standing explanation segments; Mark the coordinate sequence segments of the center of gravity point in which the horizontal coordinates of the center of gravity point change in an orderly manner as walking segments; Calculate the average value of the horizontal coordinates of the center of gravity of the standing explanation segment, and set the average value as the constant horizontal coordinate value of the center of gravity of the standing explanation segment; The horizontal coordinates of the center of gravity of the moving segment are processed using a twice moving average filter to obtain the horizontal coordinate values ​​of the smoothed center of gravity of each image frame in the moving segment.

[0012] In an optional implementation, the method for locating the standing explanation segment and the walking segment includes: Extract the horizontal coordinate values ​​from the horizontal coordinate sequence of the centroid point according to the window size of 5 and the step size of 1, calculate the average value of the 5 horizontal coordinate values ​​in the continuous window, and obtain the average value sequence; According to the average value sequence, extract continuous average values ​​from the average value sequence according to a window size of 2 and a step size of 1, calculate the absolute value of the difference between two average values ​​in the continuous window, and obtain a difference absolute value sequence; Substitute each absolute value of the difference in the absolute value sequence of the difference into the inverse tangent function to obtain an angle value sequence; Traverse each angle value in the angle value sequence and determine whether the angle value is greater than , if greater than is an inflection point, and the sequence number of the inflection point in the angle value sequence is set as the inflection point index value to obtain an inflection point index value sequence; Traverse the inflection point index values ​​in the inflection point index value sequence to determine whether the inflection point index value is divisible by 2. If the inflection point index value is divisible by 2, subtract 25 from the inflection point index value; otherwise, add 25 to the inflection point index value to obtain the starting index of the final explanation segment video or walking segment video.

[0013] In an optional implementation, the center of gravity position and size of the pre-generated preliminary processing video are optimized and adjusted using the average center of gravity coordinates and average human body size corresponding to different motion states to obtain a full-time domain pre-reasoning video, including: According to the center of gravity coordinate sequence, a human body region corresponding to the corresponding center of gravity coordinate is cut out from the corresponding image frame; The third-party open source framework OpenCV is used to stitch the cropped human body area images in time domain order to generate a preliminary processed video; According to the center of gravity coordinate sequence and size factor sequence corresponding to the person in the full-time domain video, the center of gravity position optimization and the human body size optimization are performed on each image frame of the preliminary processed video to obtain a final pre-inference video.

[0014] In an optional implementation, according to the center of gravity coordinate sequence, cutting out a human body region corresponding to the corresponding center of gravity coordinate from the corresponding image frame includes: According to the horizontal coordinate value of the constant center of gravity and each character standing and explaining segment, determine the horizontal coordinate interval of the static cropping area to be the horizontal coordinate value of the constant center of gravity minus plus 408 pixels, and obtain a preliminary video segment of each character standing and explaining, with a video resolution of 816×2160 pixels; According to the horizontal coordinate value of the smooth center of gravity point and each character walking segment, the horizontal coordinate interval of the dynamic cropping area is determined to be the horizontal coordinate value minus plus 408 pixels, and a preliminary video segment of each character walking is obtained, and the video resolution is 816×2160 pixels.

[0015] In an optional implementation, according to the center of gravity coordinate sequence and size factor sequence corresponding to the person in the full time domain video, the center of gravity position optimization and the human body size optimization are performed on each image frame of the preliminary processed video to obtain the final pre-inference video, including: Generate a center of gravity vertical coordinate value sequence based on the center of gravity coordinate sequence corresponding to the person in the full time domain video, calculate the average value of the center of gravity vertical coordinate value, and obtain a constant center of gravity vertical coordinate value; According to the constant center-of-gravity vertical coordinate value, the difference between the center-of-gravity vertical coordinate value of each image frame and the constant center-of-gravity vertical coordinate value is calculated to obtain a vertical coordinate difference sequence; Calculate the absolute value of the difference in the vertical coordinate difference sequence, and select the maximum absolute value of the difference. Set the product of the maximum absolute value of the difference and 2 as the number of expanded pixels. Multiply the number of expanded pixels by 2 and then add 2160 to get the height of the pre-inference video. The width of the pre-inference video is consistent with the preliminary processing video. Use the third-party open source framework OpenCV to construct a green background image with a resolution consistent with the pre-inference video resolution; Performing an addition operation on the vertical coordinate difference sequence, the vertical coordinate value sequence of the center of gravity point and the number of expanded pixels to obtain a vertical difference value of each reply; Filter out the maximum human body size from the size factor sequence, and set the maximum human body size as a constant size factor; Performing a division operation on the size factor sequence and the constant size factor to obtain a scaling multiple sequence; Calculating the hadamard product of the zoom multiple sequence and the reply vertical difference sequence, and performing a rounding operation on the hadamard product to obtain a true reply vertical difference sequence; The zoom factor sequence is multiplied by 816 and 2160 respectively and then rounded to obtain a true size sequence; Using a third-party open source framework OpenCV to read the preliminarily processed video to obtain a preliminarily processed image frame; Use the third-party open source framework OpenCV to scale each of the preliminary processed image frames according to the corresponding real size parameters in the real size sequence to obtain a pre-inference image frame; Calculate the coordinates of the upper left corner and the lower right corner of the reply based on the vertical difference of the reply and the true size sequence; Using the third-party open source framework OpenCV, each pre-inference image frame is posted on the green background image according to the posted upper left corner position coordinates and lower right corner position coordinates; the expanded pixels are cut off on the upper side of the upper left corner position coordinates and the lower side of the lower right corner position coordinates, and the processed pre-inference image frame is saved as a pre-inference video.

[0016] In a second aspect, the present invention provides a sliding screen 2D digital human generation system, comprising: The original acquisition module is used to acquire the original video containing different motion states of the human body and read each image frame of the original video; A feature extraction module, used to extract feature point coordinates from an image frame using a pre-trained human posture estimation network, and generate center of gravity coordinates and human body dimensions based on the feature point coordinates; A coordinate calculation module, for generating constant center-of-gravity coordinates and constant human body dimensions corresponding to different motion states based on the center-of-gravity coordinates and human body dimensions of the image frames under different motion states; The video generation module is used to optimize the center of gravity position and size of the pre-generated preliminary processing video by using the average center of gravity coordinates and average human body size corresponding to different motion states to obtain a pre-inference video in the full time domain; The synchronization generation module is used to input the pre-inference video and the pre-stored driving audio into a pre-trained human posture estimation network to obtain a digital human with a synchronized posture and driving audio.

[0017] The beneficial effect of the present invention is that the method and system for generating a 2D digital human on a sliding screen provided by the present invention can automatically capture a video of a character area from an original video, and the center of gravity of the character in the captured and generated video is always located at the center of the frame (sliding screen). While maintaining the center of gravity of the character, there will be no visual perception of perspective jitter in the video clips of each character standing and explaining, and there will be no perspective regression in the video clips of each character walking. There will be no flickering problem of the character size in the full-time domain video, and the position of the character area is always constant, and the movement process of the character is more natural.

[0018] In addition, the invention has a reliable design principle, a simple structure and a very broad application prospect. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] 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, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0020] Figure 1 is a schematic flow chart of a method according to an embodiment of the present invention.

[0021] Figure 2 is another schematic flow chart of a method according to an embodiment of the present invention.

[0022] Figure 3 It is a schematic diagram of the positions of characteristic points of a method according to an embodiment of the present invention.

[0023] Figure 4 The figure is a schematic flow chart of digital human driven feedforward of a method according to an embodiment of the present invention.

[0024] Figure 5 is a schematic block diagram of a system according to an embodiment of the present invention. DETAILED DESCRIPTION

[0025] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0026] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.

[0027] The sliding screen 2D digital human generation method provided in the embodiment of the present invention is executed by a computer device, and accordingly, the sliding screen 2D digital human generation system runs in the computer device.

[0028] Figure 1 is a schematic flow chart of a method according to an embodiment of the present invention. Figure 1 The execution subject may be a sliding screen 2D digital human generation system. According to different requirements, the order of the steps in the flow chart may be changed, and some may be omitted.

[0029] like Figure 1 As shown, the method includes: Step 110, obtaining an original video containing different motion states of a human body, and reading each image frame of the original video; Step 120, using a pre-trained human posture estimation network to extract feature point coordinates from the image frame, and generating center of gravity coordinates and human body dimensions based on the feature point coordinates; Step 130, based on the center-of-gravity coordinates and human body dimensions of the image frames in different motion states, generating constant center-of-gravity coordinates and constant human body dimensions corresponding to different motion states; Step 140, using the average center of gravity coordinates and average human body size corresponding to different motion states to optimize the center of gravity position and size of the pre-generated preliminary processing video, to obtain a full-time domain pre-inference video; Step 150: input the pre-inference video and the pre-stored driving audio into a pre-trained human posture estimation network to obtain a digital human whose posture is synchronized with the driving audio.

[0030] To facilitate understanding of the present invention, the method for generating a 2D digital human on a sliding screen provided by the present invention is further described below based on the principle of the method for generating a 2D digital human on a sliding screen provided by the present invention and in combination with the process of generating a 2D digital human on a sliding screen in the embodiment.

[0031] For details, please refer to Figure 2 , the method for generating a 2D digital human on a sliding screen includes: S1. A training method for a human posture estimation network. After a human posture estimation model is trained by this method, the original video is used as input to output the 3D coordinate values ​​of 17 feature points of the face corresponding to each frame in the original video.

[0032] S1-1. Obtain a data set, which includes an open source data set and a private data set. The open source data set includes multiple image frames containing human bodies, and a .txt file with 17 3D human feature point coordinate values ​​corresponding to each human body contained in each labeled image. The private data set only contains multiple images containing human bodies.

[0033] S1-1-1. The open source dataset is COCO-POSE, which is based on the COCO Keypoints 2017 dataset. The dataset contains 200,000 images marked with the coordinates of the 17 3D human feature points for the task of human pose estimation; S1-1-2. The private data set is all the original videos accumulated since the development of digital human products. The original videos are private videos shot by professional models in professional studios and used for self-developed digital human driving model training and reasoning.

[0034] S1-2. Use a labeling tool to label the private dataset, which is a third-party open source labeling tool LabelMe. Integrate the open source dataset to construct a training and validation dataset for training the human posture estimation network. The ratio of the training set to the validation set in the training and validation dataset is 8:2.

[0035] The visualization results of 17 3D human feature points are as follows: Figure 3 As shown, it includes: two eye feature points, nose feature points, two ear feature points, two shoulder feature points, two elbow feature points, two hand feature points, two hip feature points, two knee feature points and two foot feature points.

[0036] S1-3. Input each of the image frames into a pre-established human posture estimation network, and obtain 17 3D human feature point coordinate values ​​corresponding to each human body contained in each of the image frames through feed-forward reasoning of the human posture estimation network.

[0037] The feed-forward inference steps of the human pose estimation network include: S1-3-1. Preprocess each image frame to obtain an input feature map ,in , is the total number of training image frames.

[0038] The preprocessing steps include: Use the third-party open source framework OpenCV to read each image frame and scale it to 640×640 pixels. Perform pixel format conversion and convert the pixel format of each image frame from BGR to RGB. ,in , is the total number of training image frames; According to the , and use the third-party open source framework Pytorch to convert the Convert array to tensor and get ,in ; According to the , using the third-party open source framework Pytorch to Expand the dimension from 3D to 4D and obtain ,in The converted dimension types are: Batch, Channel, Height, and Width.

[0039] S1-3-2. According to the characteristic spectrum , through the feedforward reasoning of the feature extraction module of the human posture estimation network, a feature map containing semantic information is obtained ,in .

[0040] S1-3-3. According to the characteristic spectrum , through the feedforward inference of the feature fusion module of the human posture estimation network, a feature map containing both semantic information and position information is obtained ,in .

[0041] S1-3-4. According to the characteristic spectrum , after the feedforward inference of the Head regression module of the human posture estimation network, a heat map containing the confidence of 17 human 3D feature points is obtained ,in .

[0042] S1-3-5. Regarding the heat map Post-processing is performed to obtain 17 3D human body feature point coordinate values ​​corresponding to each human body contained in each of the image frames.

[0043] S1-4. According to the coordinate values ​​of the human feature points marked corresponding to each of the image frames and the coordinate values ​​of the human feature points generated by the feed-forward reasoning of the human posture estimation network for each of the image frames, the human posture estimation network is trained to obtain a trained human posture estimation network.

[0044] S2. A method for smoothing human motion tracking, by which the original video and the 3D coordinate values ​​of 17 feature points of the person in each frame of the original video are used as input to output a pre-inference video. The output pre-inference video will not have the problem of viewpoint jitter or regression, and the problem of flickering of the person's size in the full time domain.

[0045] S2-1. Use a wide-angle lens with a fixed viewing angle to shoot a whole video of people standing and explaining at N consecutive points, and people walking between N-1 points, as the original video; the original video includes 1000 minutes of video of 30 characters.

[0046] S2-2. Based on the original video, use the third-party open source framework OpenCV to read each image frame.

[0047] S2-3. Based on each image frame, use the training method of the human body posture estimation network to perform feedforward reasoning and post-processing to obtain 17 3D human body feature point coordinate values ​​corresponding to the human body contained in each image frame.

[0048] S2-4. Based on the coordinate values ​​of the 17 3D human feature points, obtain the Figure 1 The horizontal and vertical coordinate values ​​of the two feature points whose index values ​​are 11 and 12 respectively. The average values ​​of the horizontal coordinates and the vertical coordinates of the two feature points are calculated as the horizontal and vertical coordinate values ​​of the center of gravity coordinates of each image frame, and the center of gravity horizontal coordinate value sequence and the center of gravity vertical coordinate value sequence corresponding to the original video sequence are obtained; the distance between the horizontal coordinates of the two feature points is calculated as the size factor of each image frame, and the size factor sequence corresponding to the original video sequence is obtained.

[0049] S2-5. Based on the horizontal coordinate value sequence of the center of gravity point, calculate each character's standing and explaining segment and each character's walking segment, obtain the corresponding center of gravity point horizontal coordinate sequence in the corresponding fuzzy interval in the horizontal coordinate value sequence of the center of gravity point, and finally obtain each character's standing and explaining segment and each character's walking segment.

[0050] The steps for calculating each character's standing explanation segment and each character's walking segment include: S2-5-1. According to the horizontal coordinate value sequence of the center of gravity point, with a window size of 5 and a step size of 1, the average value of 5 numbers in the continuous window is calculated to obtain the average value sequence; S2-5-2. According to the average value sequence, with a window size of 2 and a step size of 1, calculate the absolute value of the difference between two numbers in a continuous window to obtain a difference absolute value sequence; S2-5-3. According to the absolute value sequence of the difference, each absolute value of the difference is substituted into the inverse tangent function to obtain each angle value sequence; S2-5-4. According to the angle value sequence, traverse each angle value and determine whether the angle value is greater than , if greater than Then it is the inflection point, and the inflection point index value sequence is obtained; S2-5-5. According to the inflection point index value sequence, traverse each inflection point index value to determine whether its index in the sequence is divisible by 2. If it is divisible, subtract 25 from the inflection point index value; otherwise, add 25 to the inflection point index value to obtain the final starting index of each standing explanation segment video and each character walking segment video.

[0051] S2-6. Calculate the average value of the horizontal coordinate sequence of the center of gravity corresponding to each character standing and explaining segment to obtain the final horizontal coordinate value of each constant center of gravity point, so as to solve the problem of perspective jitter in the video segment of the character standing and explaining.

[0052] S2-7. Based on the horizontal coordinate sequence of the center of gravity points corresponding to each character walking segment, a second moving average filter is used to process them. The moving average filter uses the Smooth function of the third-party open source framework OpenCV to obtain the final horizontal coordinate value of each smoothed center of gravity point to solve the problem of perspective regression in the starting video segment of the character walking.

[0053] S2-8. Based on the horizontal coordinate value of each constant center of gravity point and the horizontal coordinate value of each smooth center of gravity point, each character standing and explaining segment and each character walking segment are regionally cropped, and the third-party open source framework OpenCV is used to generate a preliminary processed video for each cropped frame image in time domain sequence.

[0054] S2-8-1. According to the horizontal coordinate value of the constant center of gravity and the standing explanation clip of each character, determine the coordinate interval of the static cropping area, the horizontal coordinate interval is the horizontal coordinate value minus plus 408 pixels, and obtain a preliminary standing explanation video clip of each character, the video resolution is 816×2160 pixels; S2-8-2. According to the horizontal coordinate value of the smooth center of gravity and each character walking segment, determine the coordinate interval of the dynamic cropping area, the horizontal coordinate interval is the horizontal coordinate value minus plus 408 pixels, and obtain a preliminary video segment of each character walking, the video resolution is 816×2160 pixels; S2-8-3. Based on the original time domain order, use FFmpeg to splice the preliminary video clips of each character standing and explaining and the preliminary video clips of each character walking to obtain a preliminary processed video.

[0055] S2-9. Based on the vertical coordinate value sequence and size factor sequence of the center of gravity points corresponding to the characters in the full-time domain video, each image frame of the preliminary processed video is processed to obtain a final pre-inference video, thereby solving the problem that the size of characters flickers and the position of the character area cannot be constant in the full-time domain video.

[0056] S2-9-1. Calculate the average value of the vertical coordinate value of the center point corresponding to the person in the full time domain video to obtain the constant center point vertical coordinate value; S2-9-2. According to the vertical coordinate value of the constant center point, calculate the difference between the vertical coordinate value of each center point and the constant center point to obtain a difference sequence; S2-9-3. According to the difference sequence, obtain the maximum absolute value of the difference in the sequence, multiply the value by 2 to obtain the number of expanded pixels, multiply the number of expanded pixels by 2 plus 2160, which is the height of the pre-inference video, and the width is consistent with the preliminary processed video; S2-9-4. Use the third-party open source framework OpenCV to construct a green background image with a resolution consistent with the pre-inference video resolution; S2-9-5. According to each difference sequence, each vertical coordinate value sequence, and the expanded pixel number, an addition operation is performed on the three to obtain each reply vertical difference; S2-9-6. According to the size factor sequence, calculate its maximum value to obtain a constant size factor; S2-9-7. According to the size factor sequence and the constant size factor, a division operation is performed to obtain a scaling multiple sequence; S2-9-8. According to the zoom multiple sequence and the reply vertical difference sequence, the hadamard product of the two is calculated and rounded to obtain the true reply vertical difference sequence; S2-9-10. According to the zoom multiple sequence, multiply it by 816 and 2160 respectively and then round it to get the real size sequence; S2-9-11. Based on the preliminary processed video, use the third-party open source framework OpenCV to read it and obtain each preliminary processed image frame; S2-9-12. According to the real size sequence, each real size is obtained, and each pre-processed image frame is scaled according to each real size using the third-party open source framework OpenCV to obtain each pre-processed image frame; S2-9-13. Calculate the position coordinates of the upper left corner and the lower right corner of each reply based on the vertical difference of each reply and the true size sequence; S2-9-14. Based on the position coordinates of the upper left corner and the lower right corner of each reply, use the third-party open source framework OpenCV to post each pre-processed image frame onto the green background image, and then cut off the expanded pixel number up and down on the vertical coordinate, and save it as the final pre-inference video.

[0057] S3. Feedforward reasoning method for driving model of digital human. Using this method, the pre-reasoning video and driving audio are taken as input, and the speaking video that is synchronized with the audio and highly consistent is output. This method can drive the lip shape, facial expression and head posture of 2D digital human. The overall feedforward reasoning process is as follows: Figure 4 shown.

[0058] S3-1. According to the pre-reasoning video, obtaining each pre-reasoning video frame; S3-2. Get the audio file of the driving source, generate a Mel spectrum, and obtain a 0.2s Mel spectrum block; S3-3. According to each pre-inference video frame and each Mel spectrum block, bring in Figure 4 The expression coefficient estimation network shown obtains the 3D motion coefficients of facial expressions; S3-4. According to each pre-inference video frame and each Mel spectrum block, bring in Figure 4 The head posture coefficient estimation network shown above obtains the 3D motion coefficient of the head posture; S3-5 is based on each Mel spectrum block, each facial expression 3D motion coefficient, and each head posture 3D motion coefficient. Figure 4 The face rendering generation network shown above obtains face images that are highly consistent with the audio.

[0059] In some embodiments, the slide screen 2D digital human generation system may include multiple functional modules composed of computer program segments. The computer programs of each program segment in the slide screen 2D digital human generation system may be stored in the memory of a computer device and executed by at least one processor to perform (see Figure 1 Description) The function of generating 2D digital human on the sliding screen.

[0060] In this embodiment, the slide screen 2D digital human generation system can be divided into multiple functional modules according to the functions it performs, such as Figure 5 As shown. The functional modules of the system 500 may include: an original acquisition module 510, a feature extraction module 520, a coordinate calculation module 530, a video generation module 540 and a synchronization generation module 550. The module referred to in the present invention refers to a series of computer program segments that can be executed by at least one processor and can complete fixed functions, which are stored in a memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.

[0061] The original acquisition module is used to acquire the original video containing different motion states of the human body and read each image frame of the original video; A feature extraction module, used to extract feature point coordinates from an image frame using a pre-trained human posture estimation network, and generate center of gravity coordinates and human body dimensions based on the feature point coordinates; A coordinate calculation module, for generating constant center-of-gravity coordinates and constant human body dimensions corresponding to different motion states based on the center-of-gravity coordinates and human body dimensions of the image frames under different motion states; The video generation module is used to optimize the center of gravity position and size of the pre-generated preliminary processing video by using the average center of gravity coordinates and average human body size corresponding to different motion states to obtain a pre-inference video in the full time domain; The synchronization generation module is used to input the pre-inference video and the pre-stored driving audio into a pre-trained human posture estimation network to obtain a digital human with a synchronized posture and driving audio.

[0062] Optionally, as an embodiment of the present invention, using a pre-trained human posture estimation network to extract feature point coordinates of an image frame, and generating center of gravity coordinates and human body dimensions based on the feature point coordinates, including: Using the human body posture estimation network to perform feedforward reasoning and post-processing on each image frame of the original video to obtain the coordinates of feature points of the human body contained in each image frame; Extracting left hip feature point coordinates and right hip feature point coordinates from the feature point coordinates; The midpoint coordinates between the left hip feature point coordinates and the right hip feature point coordinates in the same image frame are set as the center of gravity coordinates of the corresponding image frame, and the distance between the left hip feature point coordinates and the right hip feature point coordinates in the same image frame is set as the human body size of the corresponding image frame; The center of gravity coordinates of the image frames and the human body size are sorted according to the image frame time sequence to obtain the center of gravity coordinate sequence and the size factor sequence.

[0063] Optionally, as an embodiment of the present invention, based on the center-of-gravity coordinates and human body sizes of image frames in different motion states, constant center-of-gravity coordinates and constant human body sizes corresponding to different motion states are generated, including: Extracting a center-of-gravity horizontal coordinate sequence from the center-of-gravity coordinate sequence; Marking the center of gravity coordinate sequence segments whose change values ​​of the horizontal coordinates of the center of gravity are within the set threshold range as standing explanation segments; Mark the coordinate sequence segments of the center of gravity point in which the horizontal coordinates of the center of gravity point change in an orderly manner as walking segments; Calculate the average value of the horizontal coordinates of the center of gravity of the standing explanation segment, and set the average value as the constant horizontal coordinate value of the center of gravity of the standing explanation segment; The horizontal coordinates of the center of gravity of the moving segment are processed using a twice moving average filter to obtain the horizontal coordinate values ​​of the smoothed center of gravity of each image frame in the moving segment.

[0064] Optionally, as an embodiment of the present invention, the method for locating the standing explanation segment and the walking segment includes: Extract the horizontal coordinate values ​​from the horizontal coordinate sequence of the centroid point according to the window size of 5 and the step size of 1, calculate the average value of the 5 horizontal coordinate values ​​in the continuous window, and obtain the average value sequence; According to the average value sequence, extract continuous average values ​​from the average value sequence according to a window size of 2 and a step size of 1, calculate the absolute value of the difference between two average values ​​in the continuous window, and obtain a difference absolute value sequence; Substitute each absolute value of the difference in the absolute value sequence of the difference into the inverse tangent function to obtain an angle value sequence; Traverse each angle value in the angle value sequence and determine whether the angle value is greater than , if greater than is an inflection point, and the sequence number of the inflection point in the angle value sequence is set as the inflection point index value to obtain an inflection point index value sequence; Traverse the inflection point index values ​​in the inflection point index value sequence to determine whether the inflection point index value is divisible by 2. If the inflection point index value is divisible by 2, subtract 25 from the inflection point index value; otherwise, add 25 to the inflection point index value to obtain the starting index of the final explanation segment video or walking segment video.

[0065] Optionally, as an embodiment of the present invention, the center of gravity position and size of the pre-generated preliminary processing video are optimized and adjusted using the average center of gravity coordinates and average human body size corresponding to different motion states to obtain a full-time domain pre-inference video, including: According to the center of gravity coordinate sequence, a human body region corresponding to the corresponding center of gravity coordinate is cut out from the corresponding image frame; The third-party open source framework OpenCV is used to stitch the cropped human body area images in time domain order to generate a preliminary processed video; According to the center of gravity coordinate sequence and size factor sequence corresponding to the person in the full-time domain video, the center of gravity position optimization and the human body size optimization are performed on each image frame of the preliminary processed video to obtain a final pre-inference video.

[0066] Optionally, as an embodiment of the present invention, according to the barycenter coordinate sequence, cutting out a human body region corresponding to the corresponding barycenter coordinate from the corresponding image frame includes: According to the horizontal coordinate value of the constant center of gravity and each character standing and explaining segment, determine the horizontal coordinate interval of the static cropping area to be the horizontal coordinate value of the constant center of gravity minus plus 408 pixels, and obtain a preliminary video segment of each character standing and explaining, with a video resolution of 816×2160 pixels; According to the horizontal coordinate value of the smooth center of gravity point and each character walking segment, the horizontal coordinate interval of the dynamic cropping area is determined to be the horizontal coordinate value minus plus 408 pixels, and a preliminary video segment of each character walking is obtained, and the video resolution is 816×2160 pixels.

[0067] Optionally, as an embodiment of the present invention, according to the center of gravity coordinate sequence and size factor sequence corresponding to the person in the full time domain video, the center of gravity position optimization and the human body size optimization are performed on each image frame of the preliminary processed video to obtain the final pre-inference video, including: Generate a center of gravity vertical coordinate value sequence based on the center of gravity coordinate sequence corresponding to the person in the full time domain video, calculate the average value of the center of gravity vertical coordinate value, and obtain a constant center of gravity vertical coordinate value; According to the constant center-of-gravity vertical coordinate value, the difference between the center-of-gravity vertical coordinate value of each image frame and the constant center-of-gravity vertical coordinate value is calculated to obtain a vertical coordinate difference sequence; Calculate the absolute value of the difference in the vertical coordinate difference sequence, and select the maximum absolute value of the difference. Set the product of the maximum absolute value of the difference and 2 as the number of expanded pixels. Multiply the number of expanded pixels by 2 and then add 2160 to get the height of the pre-inference video. The width of the pre-inference video is consistent with the preliminary processing video. Use the third-party open source framework OpenCV to construct a green background image with a resolution consistent with the pre-inference video resolution; Performing an addition operation on the vertical coordinate difference sequence, the vertical coordinate value sequence of the center of gravity point and the number of expanded pixels to obtain a vertical difference value of each reply; Filter out the maximum human body size from the size factor sequence, and set the maximum human body size as a constant size factor; Performing a division operation on the size factor sequence and the constant size factor to obtain a scaling multiple sequence; Calculating the hadamard product of the zoom multiple sequence and the reply vertical difference sequence, and performing a rounding operation on the hadamard product to obtain a true reply vertical difference sequence; The zoom factor sequence is multiplied by 816 and 2160 respectively and then rounded to obtain a true size sequence; Using a third-party open source framework OpenCV to read the preliminarily processed video to obtain a preliminarily processed image frame; Use the third-party open source framework OpenCV to scale each of the preliminary processed image frames according to the corresponding real size parameters in the real size sequence to obtain a pre-inference image frame; Calculate the coordinates of the upper left corner and the lower right corner of the reply based on the vertical difference of the reply and the true size sequence; Using the third-party open source framework OpenCV, each pre-inference image frame is posted on the green background image according to the posted upper left corner position coordinates and lower right corner position coordinates; the expanded pixels are cut off on the upper side of the upper left corner position coordinates and the lower side of the lower right corner position coordinates, and the processed pre-inference image frame is saved as a pre-inference video.

[0068] Although the present invention has been described in detail with reference to the accompanying drawings and in combination with the preferred embodiments, the present invention is not limited thereto. Without departing from the spirit and essence of the present invention, a person of ordinary skill in the art may make various equivalent modifications or substitutions to the embodiments of the present invention, and these modifications or substitutions shall be within the scope of the present invention. Any person of ordinary skill in the art may easily think of changes or substitutions within the technical scope disclosed by the present invention, and these shall be within the scope of protection of the present invention.

Claims

1. A method for generating a 2D digital human on a sliding screen, characterized in that: include: Acquire an original video containing different motion states of a human body, and read each image frame of the original video; Using a pre-trained human posture estimation network to extract feature point coordinates from an image frame, and generating center of gravity coordinates and human body dimensions based on the feature point coordinates; Based on the center-of-gravity coordinates and human body dimensions of the image frames under different motion states, constant center-of-gravity coordinates and constant human body dimensions corresponding to different motion states are generated; The center of gravity position and size of the pre-generated preliminary processing video are optimized and adjusted using the average center of gravity coordinates and average human body size corresponding to different motion states to obtain a pre-inference video in the full time domain; The pre-inference video and the pre-stored driving audio are input into a pre-trained human posture estimation network to obtain a digital human with a posture synchronized with the driving audio.

2. The method according to claim 1, characterized in that: The training method of the human body posture estimation network includes: Acquire a data set, the data set includes an open source data set and a private data set, the open source data set includes multiple images containing human bodies, and a .txt file with the coordinate values ​​of 17 feature points corresponding to each human body contained in each labeled image, and the private data set includes multiple images containing human bodies; the 17 feature points include two eye feature points, nose feature points, two ear feature points, two shoulder feature points, two elbow feature points, two hand feature points, two hip feature points, two knee feature points and two foot feature points; Use annotation tools to annotate feature point coordinates for images in the private dataset, integrate the open source dataset, and construct a training and verification dataset for training a human pose estimation network; Input each image in the training and verification data set into a human posture estimation network, and obtain the predicted coordinates of the feature points in each image through feed-forward reasoning of the human posture estimation network; The human body posture estimation network is trained according to the coordinate values ​​of the marked feature points corresponding to each image and the predicted coordinates of the feature points of each image generated by feed-forward reasoning of the human body posture estimation network to obtain a trained human body posture estimation network.

3. The method according to claim 1, characterized in that Obtaining an original video containing different motion states of a human body, and reading each image frame of the original video, including: Use a wide-angle lens with a fixed viewing angle to shoot a series of N points with people standing and explaining, and a whole video of people walking between N-1 points as the original video; Each image frame of the original video is read using the third-party open source framework OpenCV.

4. The method according to claim 3, characterized in that The pre-trained human posture estimation network is used to extract the feature point coordinates of the image frame, and the center of gravity coordinates and human body size are generated based on the feature point coordinates, including: Using the human body posture estimation network to perform feedforward reasoning and post-processing on each image frame of the original video to obtain the coordinates of feature points of the human body contained in each image frame; Extracting left hip feature point coordinates and right hip feature point coordinates from the feature point coordinates; The midpoint coordinates between the left hip feature point coordinates and the right hip feature point coordinates in the same image frame are set as the center of gravity coordinates of the corresponding image frame, and the distance between the left hip feature point coordinates and the right hip feature point coordinates in the same image frame is set as the human body size of the corresponding image frame; The center of gravity coordinates of the image frames and the human body size are sorted according to the image frame time sequence to obtain the center of gravity coordinate sequence and the size factor sequence.

5. The method according to claim 4, characterized in that Based on the center-of-gravity coordinates and human body dimensions of the image frames under different motion states, constant center-of-gravity coordinates and constant human body dimensions corresponding to different motion states are generated, including: Extracting a center-of-gravity horizontal coordinate sequence from the center-of-gravity coordinate sequence; Marking the center of gravity coordinate sequence segments whose change values ​​of the horizontal coordinates of the center of gravity are within the set threshold range as standing explanation segments; Mark the coordinate sequence segments of the center of gravity point in which the horizontal coordinates of the center of gravity point change in an orderly manner as walking segments; Calculate the average value of the horizontal coordinates of the center of gravity of the standing explanation segment, and set the average value as the constant horizontal coordinate value of the center of gravity of the standing explanation segment; The horizontal coordinates of the center of gravity of the moving segment are processed using a twice moving average filter to obtain the horizontal coordinate values ​​of the smoothed center of gravity of each image frame in the moving segment.

6. The method according to claim 5, characterized in that The positioning methods for standing explanation segments and walking segments include: Extract the horizontal coordinate values ​​from the horizontal coordinate sequence of the centroid point according to the window size of 5 and the step size of 1, calculate the average value of the 5 horizontal coordinate values ​​in the continuous window, and obtain the average value sequence; According to the average value sequence, extract continuous average values ​​from the average value sequence according to a window size of 2 and a step size of 1, calculate the absolute value of the difference between two average values ​​in the continuous window, and obtain a difference absolute value sequence; Substitute each absolute value of the difference in the absolute value sequence of the difference into the inverse tangent function to obtain an angle value sequence; Traverse each angle value in the angle value sequence and determine whether the angle value is greater than , if greater than is an inflection point, and the sequence number of the inflection point in the angle value sequence is set as the inflection point index value to obtain an inflection point index value sequence; Traverse the inflection point index values ​​in the inflection point index value sequence to determine whether the inflection point index value is divisible by 2. If the inflection point index value is divisible by 2, subtract 25 from the inflection point index value; otherwise, add 25 to the inflection point index value to obtain the starting index of the final explanation segment video or walking segment video.

7. The method according to claim 4, characterized in that The center of gravity position and size of the pre-generated preliminary processing video are optimized and adjusted using the average center of gravity coordinates and average human body size corresponding to different motion states to obtain a full-time domain pre-inference video, including: According to the center of gravity coordinate sequence, a human body region corresponding to the corresponding center of gravity coordinate is cut out from the corresponding image frame; The third-party open source framework OpenCV is used to stitch the cropped human body area images in time domain order to generate a preliminary processed video; According to the center of gravity coordinate sequence and size factor sequence corresponding to the person in the full-time domain video, the center of gravity position optimization and the human body size optimization are performed on each image frame of the preliminary processed video to obtain a final pre-inference video.

8. The method according to claim 7, characterized in that According to the center of gravity coordinate sequence, a human body region corresponding to the corresponding center of gravity coordinate is cut out from the corresponding image frame, including: According to the horizontal coordinate value of the constant center of gravity and each character standing and explaining segment, determine the horizontal coordinate interval of the static cropping area to be the horizontal coordinate value of the constant center of gravity minus plus 408 pixels, and obtain a preliminary video segment of each character standing and explaining, with a video resolution of 816×2160 pixels; According to the horizontal coordinate value of the smooth center of gravity point and each character walking segment, the horizontal coordinate interval of the dynamic cropping area is determined to be the horizontal coordinate value minus plus 408 pixels, and a preliminary video segment of each character walking is obtained, and the video resolution is 816×2160 pixels.

9. The method according to claim 7, characterized in that: According to the center of gravity coordinate sequence and size factor sequence corresponding to the person in the full time domain video, the center of gravity position optimization and the human body size optimization are performed on each image frame of the preliminary processed video to obtain the final pre-inference video, including: Generate a center of gravity vertical coordinate value sequence based on the center of gravity coordinate sequence corresponding to the person in the full time domain video, calculate the average value of the center of gravity vertical coordinate value, and obtain a constant center of gravity vertical coordinate value; According to the constant center-of-gravity vertical coordinate value, the difference between the center-of-gravity vertical coordinate value of each image frame and the constant center-of-gravity vertical coordinate value is calculated to obtain a vertical coordinate difference sequence; Calculate the absolute value of the difference in the vertical coordinate difference sequence, and select the maximum absolute value of the difference. Set the product of the maximum absolute value of the difference and 2 as the number of expanded pixels. Multiply the number of expanded pixels by 2 and then add 2160 to get the height of the pre-inference video. The width of the pre-inference video is consistent with the preliminary processing video. Use the third-party open source framework OpenCV to construct a green background image with a resolution consistent with the pre-inference video resolution; Performing an addition operation on the vertical coordinate difference sequence, the vertical coordinate value sequence of the center of gravity point and the number of expanded pixels to obtain a vertical difference value of each reply; Filter out the maximum human body size from the size factor sequence, and set the maximum human body size as a constant size factor; Performing a division operation on the size factor sequence and the constant size factor to obtain a scaling multiple sequence; Calculating the hadamard product of the zoom multiple sequence and the reply vertical difference sequence, and performing a rounding operation on the hadamard product to obtain a true reply vertical difference sequence; The zoom factor sequence is multiplied by 816 and 2160 respectively and then rounded to obtain a true size sequence; Using a third-party open source framework OpenCV to read the preliminarily processed video to obtain a preliminarily processed image frame; Use the third-party open source framework OpenCV to scale each of the preliminary processed image frames according to the corresponding real size parameters in the real size sequence to obtain a pre-inference image frame; Calculate the coordinates of the upper left corner and the lower right corner of the reply based on the vertical difference of the reply and the true size sequence; Using the third-party open source framework OpenCV, each pre-inference image frame is posted on the green background image according to the posted upper left corner position coordinates and lower right corner position coordinates; the expanded pixels are cut off on the upper side of the upper left corner position coordinates and the lower side of the lower right corner position coordinates, and the processed pre-inference image frame is saved as a pre-inference video.

10. A sliding screen 2D digital human generation system, characterized in that: include: The original acquisition module is used to acquire the original video containing different motion states of the human body and read each image frame of the original video; A feature extraction module, used to extract feature point coordinates from an image frame using a pre-trained human posture estimation network, and generate center of gravity coordinates and human body dimensions based on the feature point coordinates; A coordinate calculation module, for generating constant center-of-gravity coordinates and constant human body dimensions corresponding to different motion states based on the center-of-gravity coordinates and human body dimensions of the image frames under different motion states; The video generation module is used to optimize the center of gravity position and size of the pre-generated preliminary processing video by using the average center of gravity coordinates and average human body size corresponding to different motion states to obtain a pre-inference video in the full time domain; The synchronization generation module is used to input the pre-inference video and the pre-stored driving audio into a pre-trained human posture estimation network to obtain a digital human with a synchronized posture and driving audio.

Citation Information

Patent Citations

  • Human body pose estimation method and mobile terminal

    CN108062526A

  • Intelligent behavior analysis method and intelligent behavior analysis device suitable for narrow space

    CN109830078A

  • A human body three-dimensional posture estimation method based on image retrieval

    CN109949368A

  • Dance music recording and demonstrating method based on three-dimensional posture recognition

    CN110660017A

  • Twin pose detection method and system based on interactive indirect inference

    US20230333633A1