Three-dimensional human body reconstruction method, device, equipment, storage medium and program product
By performing three-dimensional human body timing model training and filtering on consecutive frames in the video, the problem of timing jitter in the three-dimensional human body reconstruction video is solved, and the stability and accuracy of the video are improved.
Patent Information
- Application Number
- CN202311239021.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-23
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2043-09-23
AI Technical Summary
The 3D human body reconstruction video has jitter in the timing, which affects the user experience.
By training and filtering the three-dimensional human body timing model on consecutive frames in the video, the human body parameter information is adjusted and smoothed, and the three-dimensional human body reconstruction information is updated to reduce jitter.
It improves the stability and accuracy of the timing of the 3D human body reconstruction video, ensuring the de-shaking of consecutive frames and the stability of the information.
Smart Images

Figure CN117726746B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer application technology, and in particular to a three-dimensional human body reconstruction method, device, equipment, storage medium and program product. Background Art
[0002] Computer vision has many application scenarios in today's information society and is used in many fields, such as military, security and medical care. Among them, the research on three-dimensional reconstruction occupies a very high position in the field of computer vision. With the development of three-dimensional human body reconstruction (i.e. 3D human body reconstruction) technology, when applied to video analysis, human body movement, scene change or lens movement will cause the three-dimensional human body reconstruction information to have temporal jitter. Taking the human body 3D special effects business scenario as an example, the jitter of the special effects causes a very poor user experience. Therefore, how to avoid the jitter of the three-dimensional human body reconstruction video in timing is a technical problem that needs to be solved urgently. Summary of the invention
[0003] The embodiments of the present application provide a three-dimensional human body reconstruction method, apparatus, device, storage medium and program product, which can effectively improve the timing stability and accuracy of three-dimensional human body reconstruction video.
[0004] On the one hand, an embodiment of the present application provides a three-dimensional human body reconstruction method, the method comprising:
[0005] Extracting three-dimensional human body reconstruction information of at least one object contained in each frame in the video to obtain three-dimensional human body reconstruction information of the at least one object in each frame; wherein the three-dimensional human body reconstruction information includes human body parameter information;
[0006] Determine N consecutive frames in which the target object appears in the video, where N is a positive integer;
[0007] Inputting the human body parameter information of the target object in the N frames into a three-dimensional human body timing model, and performing timing adjustment on the human body parameter information of the target object in the N frames by using the three-dimensional human body timing model to obtain the adjusted human body parameter information of the target object in the N frames;
[0008] Based on the adjusted human body parameter information of the target object in the N frames, updating the 3D human body reconstruction information of the at least one object in each of the frames to obtain updated 3D human body reconstruction information of the at least one object in each of the frames;
[0009] Based on the updated three-dimensional human body reconstruction information of the at least one object in each of the frames, three-dimensional human body reconstruction is performed to obtain a reconstructed video.
[0010] In one embodiment, the training method of the three-dimensional human body temporal model includes:
[0011] Acquire a training sample, wherein the training sample includes a training video and first annotation information of a target training object, wherein the first annotation information is used to annotate human body parameter information of the target training object in K frames of the training video, wherein the K frames refer to consecutive frames in which the target training object appears in the training video, and K is a positive integer;
[0012] Extracting three-dimensional human body reconstruction information of a target training object contained in the K frame of the training video to obtain human body parameter information of the target training object in the K frame of the training video;
[0013] Calling the initial three-dimensional human body time series model, performing time series adjustment on the human body parameter information of the target training object in the K frame of the training video, and obtaining the adjusted human body parameter information of the target training object in the K frame of the training video;
[0014] The initial three-dimensional human body timing model is trained according to a training direction of reducing the difference between the adjusted human body parameter information of the target training object in the K frame of the training video and the first annotation information of the target training object to obtain the three-dimensional human body timing model.
[0015] In one embodiment, the 3D human body reconstruction information of the at least one object in each frame is obtained through a 3D human body reconstruction model, and the training method of the 3D human body reconstruction model includes:
[0016] Acquire a training sample, wherein the training sample includes a training video and second annotation information of at least one training object contained in each frame of the training video, wherein the second annotation information is used to annotate human body parameter information of the corresponding training object in each frame;
[0017] Calling an initial 3D human body reconstruction model, extracting 3D human body reconstruction information of at least one object contained in each frame of the training video, and obtaining human body parameter information of the at least one training object in each frame of the training video;
[0018] The initial three-dimensional human body reconstruction model is trained according to a training direction of reducing the difference between the human body parameter information of the at least one training object in each frame of the training video and the second annotation information of the at least one training object to obtain the three-dimensional human body reconstruction model.
[0019] In one embodiment, the training sample further includes third annotation information of the at least one training object, and the third annotation information is used to annotate the coordinates of the three-dimensional human body key points of the corresponding training object in each frame; and the training method of the three-dimensional human body reconstruction model further includes:
[0020] Based on the human body parameter information of the at least one training object in each frame of the training video, identifying the three-dimensional human body key points of the at least one training object in each frame of the training video, and obtaining the three-dimensional human body key point coordinates of the at least one training object in each frame of the training video;
[0021] The step of training the initial 3D human body reconstruction model according to a training direction of reducing the difference between the human body parameter information of the at least one training object in each frame of the training video and the second annotation information of the at least one training object to obtain the 3D human body reconstruction model comprises:
[0022] The initial three-dimensional human body reconstruction model is trained according to a training direction of reducing the difference between the human body parameter information of the at least one training object in each frame of the training video and the second annotation information of the at least one training object, and the difference between the three-dimensional human body key point coordinates of the at least one training object in each frame of the training video and the third annotation information of the at least one training object to obtain the three-dimensional human body reconstruction model.
[0023] In one embodiment, the training sample further includes fourth annotation information of the at least one training object, and the fourth annotation information is used to annotate the coordinates of two-dimensional human body key points of the corresponding training object in each frame; and the training method of the three-dimensional human body reconstruction model further includes:
[0024] Based on the human body parameter information of the at least one training object in each frame of the training video, identifying the three-dimensional human body key points of the at least one training object in each frame of the training video, and obtaining the three-dimensional human body key point coordinates of the at least one training object in each frame of the training video;
[0025] According to the three-dimensional human body key point coordinates of the at least one training object in each frame of the training video and the camera extrinsic parameter information of each frame of the training video, the two-dimensional human body key points of the at least one training object in each frame of the training video are identified to obtain the two-dimensional human body key point coordinates of the at least one training object in each frame of the training video;
[0026] The step of training the initial 3D human body reconstruction model according to a training direction of reducing the difference between the human body parameter information of the at least one training object in each frame of the training video and the second annotation information of the at least one training object to obtain the 3D human body reconstruction model comprises:
[0027] The initial three-dimensional human body reconstruction model is trained according to a training direction of reducing the difference between the human body parameter information of the at least one training object in each frame of the training video and the second annotation information of the at least one training object, and the difference between the two-dimensional human body key point coordinates of the at least one training object in each frame of the training video and the fourth annotation information of the at least one training object to obtain the three-dimensional human body reconstruction model.
[0028] In one embodiment, the updating of the three-dimensional human body reconstruction information of the at least one object in each frame based on the adjusted human body parameter information of the target object in the N frames to obtain the updated three-dimensional human body reconstruction information of the at least one object in each frame includes:
[0029] Performing temporal smoothing processing on the adjusted human body parameter information of the target object in the N frames through a preset filter to obtain smoothed human body parameter information of the target object in the N frames;
[0030] Based on the smoothed human body parameter information of the target object in the N frames, the three-dimensional human body reconstruction information of the at least one object in each of the frames is updated to obtain updated three-dimensional human body reconstruction information of the at least one object in each of the frames.
[0031] In one embodiment, the 3D human body reconstruction information further includes camera extrinsic parameter information; and updating the 3D human body reconstruction information of the at least one object in each frame based on the smoothed human body parameter information of the target object in the N frames to obtain the updated 3D human body reconstruction information of the at least one object in each frame includes:
[0032] Performing time-series smoothing processing on the camera extrinsic parameter information of the N frames through a preset filter to obtain smoothed camera extrinsic parameter information of the N frames;
[0033] Based on the smoothed human body parameter information of the target object in the N frames and the smoothed camera extrinsic parameter information of the N frames, the three-dimensional human body reconstruction information of the at least one object in each of the frames is updated to obtain the updated three-dimensional human body reconstruction information of the at least one object in each of the frames.
[0034] On the other hand, an embodiment of the present application provides a 3D human body reconstruction device, the 3D human body reconstruction device comprising:
[0035] An information extraction unit, configured to extract three-dimensional human body reconstruction information of at least one object contained in each frame in the video, and obtain three-dimensional human body reconstruction information of the at least one object in each frame; wherein the three-dimensional human body reconstruction information includes human body parameter information;
[0036] A continuous frame determination unit, used to determine N consecutive frames in which the target object appears in the video, where N is a positive integer;
[0037] A timing adjustment unit, used for inputting the human body parameter information of the target object in the N frames into a three-dimensional human body timing model, and performing timing adjustment on the human body parameter information of the target object in the N frames through the three-dimensional human body timing model to obtain the adjusted human body parameter information of the target object in the N frames;
[0038] an information updating unit, configured to update the 3D human body reconstruction information of the at least one object in each of the frames based on the adjusted human body parameter information of the target object in the N frames, so as to obtain the updated 3D human body reconstruction information of the at least one object in each of the frames;
[0039] The three-dimensional human body reconstruction unit is used to perform three-dimensional human body reconstruction based on the updated three-dimensional human body reconstruction information of the at least one object in each frame to obtain a reconstructed video.
[0040] On the other hand, an embodiment of the present application provides a computer device, including a processor, a storage device, and a communication interface, wherein the processor, the storage device, and the communication interface are connected to each other, wherein the storage device is used to store a computer program that supports the computer device to execute the above method, the computer program includes program instructions, and the processor is configured to call the program instructions to perform the following steps:
[0041] Extracting three-dimensional human body reconstruction information of at least one object contained in each frame in the video to obtain three-dimensional human body reconstruction information of the at least one object in each frame; wherein the three-dimensional human body reconstruction information includes human body parameter information;
[0042] Determine N consecutive frames in which the target object appears in the video, where N is a positive integer;
[0043] Inputting the human body parameter information of the target object in the N frames into a three-dimensional human body timing model, and performing timing adjustment on the human body parameter information of the target object in the N frames by using the three-dimensional human body timing model to obtain the adjusted human body parameter information of the target object in the N frames;
[0044] Based on the adjusted human body parameter information of the target object in the N frames, updating the 3D human body reconstruction information of the at least one object in each of the frames to obtain updated 3D human body reconstruction information of the at least one object in each of the frames;
[0045] Based on the updated three-dimensional human body reconstruction information of the at least one object in each of the frames, three-dimensional human body reconstruction is performed to obtain a reconstructed video.
[0046] On the other hand, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. The computer program includes program instructions, and when the program instructions are executed by a processor, the processor executes the above-mentioned three-dimensional human body reconstruction method.
[0047] On the other hand, an embodiment of the present application provides a computer program product, which includes a computer program, and the computer program is suitable for being loaded by a processor and executing the above-mentioned three-dimensional human body reconstruction method.
[0048] In the embodiment of the present application, the human body parameter information of the target object in N frames is adjusted in time by using a three-dimensional human body timing model to obtain the adjusted human body parameter information of the target object in N frames, which can achieve de-jittering of consecutive frames and ensure that the adjusted human body parameter information of the target object in N frames is stable and accurate in time. Based on this, according to the adjusted human body parameter information of the target object in N frames, the three-dimensional human body reconstruction information of at least one object in each frame is updated to obtain the updated three-dimensional human body reconstruction information of at least one object in each frame, and based on the updated three-dimensional human body reconstruction information of at least one object in each frame, a three-dimensional human body reconstruction is performed to obtain a reconstructed video, which can ensure the stability and accuracy of the three-dimensional human body reconstruction video in time. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the embodiments of the present application 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 application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0050] Figure 1 is a schematic diagram of the architecture of a three-dimensional human body reconstruction system provided in an embodiment of the present application;
[0051] Figure 2 is a flow chart of a three-dimensional human body reconstruction method provided in an embodiment of the present application;
[0052] Figure 3 is a flow chart of another three-dimensional human body reconstruction method provided in an embodiment of the present application;
[0053] Figure 4 It is a structural schematic diagram of a three-dimensional human body timing model provided in an embodiment of the present application;
[0054] Figure 5 It is a structural diagram of a Block layer provided in an embodiment of the present application;
[0055] Figure 6 is a structural schematic diagram of a three-dimensional human body reconstruction device provided in an embodiment of the present application;
[0056] Figure 7 It is a structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0057] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0058] The embodiment of the present application determines N consecutive frames in which the target object appears in the video, inputs the human body parameter information of the target object in the N frames into the three-dimensional human body timing model, and adjusts the human body parameter information of the target object in the N frames in timing through the three-dimensional human body timing model to obtain the adjusted human body parameter information of the target object in the N frames. It can be seen that the embodiment of the present application can achieve the de-jittering of the consecutive frames by utilizing the prior information of the consecutive frames in timing. Furthermore, based on the adjusted human body parameter information of the target object in the N frames, the three-dimensional human body reconstruction information of at least one object in the frames is updated to obtain the updated three-dimensional human body reconstruction information of at least one object in each frame, and based on the updated three-dimensional human body reconstruction information of at least one object in each frame, the three-dimensional human body is reconstructed to obtain the reconstructed video, which can effectively improve the stability and accuracy of the three-dimensional human body reconstruction video in timing.
[0059] The 3D human body reconstruction method provided in the embodiment of the present application can be applied in a client, a server or a computer device. The client or the server can be installed or integrated in a content publishing platform or a browser, and the content publishing platform or the browser can be run in a computer device. The computer device includes but is not limited to a smart phone, a camera, a wearable device or a computer.
[0060] In the specific implementation of this application, user-related data, such as videos, etc., is involved. When the embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data must comply with local laws, regulations and standards.
[0061] See also Figure 1 , Figure 11 is a schematic diagram of the architecture of a three-dimensional human body reconstruction system provided in an embodiment of the present application. The three-dimensional human body reconstruction system may include a human body detection model, a 3D human body reconstruction model (i.e., a three-dimensional human body reconstruction model), and a 3D human body timing model (i.e., a three-dimensional human body timing model). Specifically, the three-dimensional human body reconstruction system may implement three-dimensional human body reconstruction through the following steps S1 to S8.
[0062] S1. After acquiring the video, images of all frames of the input video may be obtained through preprocessing (eg, frame extraction).
[0063] S2, use the human body detection model (i.e., 2D human body detection model) to process all frames and obtain the human body bounding box information of each image (i.e., Figure 1 bounding box information in ).
[0064] S3, through the 3D human body reconstruction model and the human body bounding box information obtained in S2, predict the 3D human body reconstruction information of each human body in each image (i.e. Figure 1 Human body reconstruction information in ).
[0065] Among them, the 3D human body reconstruction information may include parameter information of the human body three-dimensional model (i.e., human body parameter information) and the external parameter information of the camera. The human body three-dimensional model may include a (skinned multi-person linear model, SMPL) model, which is a vertex-based parametric human body model that drives the generation of a three-dimensional human body mesh through shape and pose parameters. In other words, the human body parameter information may include shape parameter information and pose parameter information. The external parameter information of the camera may include rotation and translation parameters. Each human body in each image in the video has corresponding 3D human body reconstruction information, i.e., parameters such as shape, pose, camera rotation and displacement.
[0066] S4. Match the human body frames of the previous and next frames through Intersection over Union (IOU) to obtain the 3D human body reconstruction information of each person in the video in consecutive frames.
[0067] Among them, IOU is a measure of the accuracy of detecting corresponding objects in a specific dataset. Given a video, the IOU measurement gives the similarity between the predicted region and the ground truth region of the object present in the video.
[0068] For example, suppose there are person A, person B and person X in the video. Person A appears in the first frame, the second frame and the third frame in the video, then the frames in which person A appears continuously in the video can be determined, that is, the continuous frames in which person A appears in the video include the first frame, the second frame and the third frame, and then the 3D human body reconstruction information of person A in the first frame, the second frame and the third frame can be obtained.
[0069] Assuming that character B appears in the first frame, fourth frame, fifth frame and sixth frame in the video, then the frames in which character B appears continuously in the video can be determined, that is, the continuous frames in which character B appears in the video, including the fourth frame, fifth frame and sixth frame, and then the 3D human body reconstruction information of character B in the fourth frame, fifth frame and sixth frame can be obtained.
[0070] Assuming that person X appears in the first frame, the sixth frame, the seventh frame, the eighth frame, and the tenth frame in the video, the frames in which person X appears continuously in the video can be determined, that is, the continuous frames in which person X appears in the video include the sixth frame, the seventh frame, and the eighth frame, and then the 3D human body reconstruction information of person X in the sixth frame, the seventh frame, and the eighth frame can be obtained.
[0071] S5. Process the 3D human body reconstruction information of each person's continuous frames in S4 separately, and obtain n data blocks through a sliding window, each data block having M frames of 3D human body reconstruction information.
[0072] Here, M refers to the size of the sliding window. For example, if the number of consecutive frames in which a person appears in a video is 160 and the size of the sliding window is 32, then 32 frames of 3D human body reconstruction information can be processed each time.
[0073] Where n = number of consecutive frames / size of sliding window. For example, assuming that the number of consecutive frames in which a certain person appears in a video is 160 and the size of the sliding window is 32, then 5 data blocks can be obtained through the sliding window. For example, assuming that the frames in which person A appears continuously in the video include frames 1 to 160 and the size of the sliding window is 32, then the first data block can be obtained in the first processing, and the first data block includes 3D human body reconstruction information from frames 1 to 32. Similarly, in the second processing, the second data block is obtained, and the second data block includes 3D human body reconstruction information from frames 33 to 64. In the third processing, the third data block is obtained, and the third data block includes 3D human body reconstruction information from frames 65 to 96. In the fourth processing, the fourth data block is obtained, and the fourth data block includes 3D human body reconstruction information from frames 97 to 128. In the fifth processing, the fifth data block is obtained, and the fifth data block includes 3D human body reconstruction information from frames 129 to 160.
[0074] S6. Extract the posture parameters to obtain the MxD matrix X, input the matrix X into the 3D human temporal network model, and the 3D human temporal network model outputs a new MxD matrix X', which is smoothed with a (Savitzky-Golay, SG) filter to obtain X". The SG filter is a digital filter used for signal processing and data smoothing.
[0075] Specifically, human body parameter information, such as posture parameters, can be extracted from each data block contained in the above n data blocks to obtain a matrix X. The dimension of the matrix X is MxD, M can represent the size of the sliding window, and D can represent the dimension of the posture parameter. Then, the matrix X is input into the 3D human body timing network model, and the matrix X is time-adjusted through the 3D human body timing model, and the adjusted human body parameter information, that is, the MxD matrix X', can be output. Furthermore, the matrix X' can be time-smoothed through a Savitzky-Golay filter to obtain the smoothed human body parameter information, that is, the matrix X".
[0076] Among them, the Savitzky-Golay filter determines the appropriate filtering parameters according to the average trend of the Normalized Difference Vegetation Index (NDVI) time series curve, and uses a polynomial to achieve least squares fitting within the sliding window; the Savitzky-Golay filtering method (convolution fitting algorithm based on least squares) is used for iterative calculations to simulate the entire NDVI time series data to obtain long-term change trends.
[0077] S7. Extract the camera extrinsic displacement parameters to obtain the Mx3 matrix Y, and use the Savitzky-Golay filter to smooth the new Mx3 matrix Y".
[0078] Specifically, the camera extrinsic information, such as the camera extrinsic displacement parameters, can be extracted from each data block contained in the above n data blocks to obtain the matrix Y. The dimension of the matrix Y is Mx3, where M can represent the size of the sliding window and 3 can represent the dimension of the camera extrinsic displacement parameters. Then, the matrix Y is time-series smoothed by a Savitzky-Golay filter to obtain the smoothed camera extrinsic information, i.e., the matrix Y".
[0079] S8. Update the smoothed posture parameter X'' and camera extrinsic displacement parameter Y'' obtained in S6 and S7 to the original 3D human body reconstruction information.
[0080] Specifically, the 3D human body reconstruction information obtained in S4 can be updated based on the smoothed human body parameter information and the smoothed camera extrinsic parameter information to obtain updated 3D human body reconstruction information, and then 3D human body reconstruction can be performed based on the updated 3D human body reconstruction information to obtain a 3D human body reconstruction video.
[0081] Among them, the method of updating the smoothed posture parameters X" and camera extrinsic displacement parameters Y", obtained in S6 and S7 to the original 3D human body reconstruction information can be: assuming that the smoothed posture parameters X", are for the posture parameters of the character A in N consecutive frames, then the posture parameters of the character A in N consecutive frames in the original 3D human body reconstruction information can be replaced with the smoothed posture parameters X", and the camera extrinsic displacement parameters of the character A in N consecutive frames in the original 3D human body reconstruction information can be replaced with the smoothed camera extrinsic displacement parameters Y".
[0082] The three-dimensional human body reconstruction system provided in the embodiment of the present application improves the stability and accuracy of the timing of the 3D human body reconstruction information by performing timing modeling and smoothing on the 3D human body reconstruction information obtained in each frame of the video.
[0083] Based on the above description, see Figure 2 , Figure 2 is a flow chart of a 3D human body reconstruction method provided in an embodiment of the present application, and the 3D human body reconstruction method can be executed by a client, a server or a computer device; Figure 2 The three-dimensional human body reconstruction scheme shown includes but is not limited to steps S201 to S205, wherein:
[0084] S201, extracting 3D human body reconstruction information of at least one object contained in each frame in a video to obtain 3D human body reconstruction information of at least one object in each frame, where the 3D human body reconstruction information includes human body parameter information.
[0085] For example, if a user wants to perform a 3D human reconstruction operation on a video, the user can submit a 3D human reconstruction request for the video, and the embodiment of the present application can respond to the 3D human reconstruction request, obtain the video, and extract 3D human reconstruction information of at least one object contained in each frame of the video to obtain 3D human reconstruction information of at least one object in each frame. The object can refer to an object with vital signs, such as a human body.
[0086] In one implementation, object detection can be performed on each frame in the video first. If a frame in the video does not contain any object, there is no need to extract 3D human body reconstruction information for the frame; if a frame in the video contains at least one object, 3D human body reconstruction information can be further extracted for the frame. For example, assuming that the first frame in the video does not contain any object, the second frame in the video can be traversed. If the second frame contains an object, 3D human body reconstruction information can be extracted for each object contained in the second frame to obtain 3D human body reconstruction information for each object in the second frame. Furthermore, the third frame in the video can be traversed to determine whether the third frame contains an object, until all frames in the video are traversed.
[0087] In one implementation, the 3D human body reconstruction information of at least one object in each frame is obtained through a 3D human body reconstruction model. On this basis, the training method of the 3D human body reconstruction model may include: obtaining training samples, the training samples include a training video, and second annotation information of at least one training object contained in each frame of the training video, the second annotation information is used to annotate the human body parameter information of the corresponding training object in each frame; calling the initial 3D human body reconstruction model, extracting the 3D human body reconstruction information of at least one object contained in each frame of the training video, and obtaining the human body parameter information of at least one training object in each frame of the training video; training the initial 3D human body reconstruction model in accordance with the training direction of reducing the difference between the human body parameter information of at least one training object in each frame of the training video and the second annotation information of at least one training object, and obtaining the 3D human body reconstruction model.
[0088] Exemplarily, the 3D human reconstruction model can be a 3D human reconstruction model network built based on ResNet50. Optionally, the 3D human reconstruction model can also include Skinned Multi-Person Linear Model (SMPL), SMPLify, SMPL-X or real-time scanning stitching algorithm. SMPL is a skinned, vertex-based 3D human model that can accurately represent different shapes and poses of the human body. SMPLify first uses DeepCut, a method based on Convolutional Neural Network (CNN), to predict the position of 2D body joints, and then fits them to the 2D joints using SMPL. SMPLify is a method for automatically estimating the 3D pose of the human body and its 3D shape from a single unconstrained image. SMPL-X is an optimization of the SMPL model, adding facial expressions, hand gestures, foot postures and human gender, improving the reconstruction of the 3D details of the human body, and better reflecting the real 3D structure of the human body. Real-time scanning stitching algorithms can include Kinect Fusion, or Dynamic Fusion, etc. Kinect Fusion is a technology that uses the depth data of the Kinect camera for real-time 3D reconstruction. Dynamic Fusion is based on Kinect Fusion and adds deformation estimation of non-rigid bodies to solve the problem of real-time dynamic reconstruction of non-rigid bodies.
[0089] Specifically, the second annotation information can be used to annotate the shape parameter information and posture parameter information of the corresponding training object in each frame. After calling the initial three-dimensional human body reconstruction model, extracting the three-dimensional human body reconstruction information of at least one object contained in each frame of the training video, and obtaining the shape parameter information and posture parameter information of at least one training object in each frame of the training video, the shape parameter error loss of the training object in the frame can be obtained based on the shape parameter information of a certain training object in a certain frame, and the annotated shape parameter information of the training object in the frame. Similarly, the posture parameter error loss of the training object in the frame can also be obtained based on the posture parameter information of a certain training object in a certain frame, and the annotated posture parameter information of the training object in the frame. After obtaining the shape parameter error loss and posture parameter error loss of each training object in each frame, the loss value of the three-dimensional human body reconstruction model can be obtained based on the shape parameter error loss and posture parameter error loss of each training object in each frame, and then the initial three-dimensional human body reconstruction model is trained with reducing the loss value as the training goal to obtain a three-dimensional human body reconstruction model.
[0090] In one implementation, the training sample may also include third annotation information of at least one training object, and the third annotation information is used to annotate the coordinates of the three-dimensional human key points of the corresponding training object in each frame. Based on this, the training method of the three-dimensional human reconstruction model may also include: based on the human body parameter information of at least one training object in each frame of the training video, identifying the three-dimensional human key points of at least one training object in each frame of the training video, and obtaining the three-dimensional human key point coordinates of at least one training object in each frame of the training video; training the initial three-dimensional human reconstruction model in accordance with the training direction of reducing the difference between the human body parameter information of at least one training object in each frame of the training video and the second annotation information of at least one training object, and the difference between the three-dimensional human key point coordinates of at least one training object in each frame of the training video and the third annotation information of at least one training object, and obtaining the three-dimensional human reconstruction model.
[0091] Specifically, based on the human body parameter information of each training object in each frame and the second annotation information of each training object in each frame, the human body parameter error loss of each training object in each frame can be obtained. In addition, based on the three-dimensional human body key point coordinates of each training object in each frame and the third annotation information of each training object in each frame, the three-dimensional human body key point error loss of each training object in each frame can be obtained. Further, based on the human body parameter error loss of each training object in each frame and the three-dimensional human body key point error loss of each training object in each frame, the loss value of the three-dimensional human body reconstruction model can be obtained, and then the initial three-dimensional human body reconstruction model is trained with reducing the loss value as the training goal to obtain the three-dimensional human body reconstruction model.
[0092] In one implementation, the training sample may further include fourth annotation information of at least one training object, and the fourth annotation information is used to annotate the coordinates of the two-dimensional human key points of the corresponding training object in each frame. Based on this, the training method of the three-dimensional human reconstruction model may further include: based on the human body parameter information of at least one training object in each frame of the training video, identifying the three-dimensional human body key points of at least one training object in each frame of the training video, and obtaining the coordinates of the three-dimensional human body key points of at least one training object in each frame of the training video; according to the coordinates of the three-dimensional human body key points of at least one training object in each frame of the training video and the camera external parameter information of each frame of the training video, identifying the two-dimensional human body key points of at least one training object in each frame of the training video, and obtaining the coordinates of the two-dimensional human body key points of at least one training object in each frame of the training video; according to the training direction of reducing the difference between the human body parameter information of at least one training object in each frame of the training video and the second annotation information of at least one training object, and the difference between the two-dimensional human body key point coordinates of at least one training object in each frame of the training video and the fourth annotation information of at least one training object, the initial three-dimensional human reconstruction model is trained to obtain the three-dimensional human reconstruction model.
[0093] Specifically, based on the human body parameter information of each training object in each frame and the second annotation information of each training object in each frame, the human body parameter error loss of each training object in each frame can be obtained. In addition, based on the two-dimensional human body key point coordinates of each training object in each frame and the fourth annotation information of each training object in each frame, the two-dimensional human body key point error loss of each training object in each frame can be obtained. Further, based on the human body parameter error loss of each training object in each frame and the two-dimensional human body key point error loss of each training object in each frame, the loss value of the three-dimensional human body reconstruction model can be obtained, and then the initial three-dimensional human body reconstruction model is trained with reducing the loss value as the training goal to obtain the three-dimensional human body reconstruction model.
[0094] In one implementation, the training sample may include a training video, and second annotation information, third annotation information, and fourth annotation information of at least one training object contained in each frame of the training video. The second annotation information is used to annotate the human body parameter information of the corresponding training object in each frame, the third annotation information is used to annotate the three-dimensional human body key point coordinates of the corresponding training object in each frame, and the fourth annotation information is used to annotate the two-dimensional human body key point coordinates of the corresponding training object in each frame. The training method of the three-dimensional human body reconstruction model may include: calling the initial three-dimensional human body reconstruction model, performing three-dimensional human body reconstruction on at least one object contained in each frame of the training video, and obtaining the human body parameter information of at least one training object in each frame of the training video. In addition, calling the initial three-dimensional human body reconstruction model, based on the human body parameter information of at least one training object in each frame of the training video, identifying the three-dimensional human body key points of at least one training object in each frame of the training video, and obtaining the three-dimensional human body key point coordinates of at least one training object in each frame of the training video. Based on the human body parameter information of at least one training object in each frame of the training video, identifying the three-dimensional human body key points of at least one training object in each frame of the training video, and obtaining the three-dimensional human body key point coordinates of at least one training object in each frame of the training video. Furthermore, the initial three-dimensional human body reconstruction model is trained according to a training direction of reducing the difference between human body parameter information of at least one training object in each frame of a training video and second annotation information of at least one training object, the difference between three-dimensional human body key point coordinates of at least one training object in each frame of a training video and third annotation information of at least one training object, and the difference between two-dimensional human body key point coordinates of at least one training object in each frame of a training video and fourth annotation information of at least one training object to obtain a three-dimensional human body reconstruction model.
[0095] S202, determining N consecutive frames in which the target object appears in the video.
[0096] Wherein, N is a positive integer, N≥2. Continuous N frames refer to the frames in which the target object appears continuously in the video. If the frames in which the target object appears are discrete frames, the discrete frames will not be determined as continuous frames. For example, assuming that an object appears in the first frame, the second frame, and the third frame in the video, then the frames in which the object appears continuously in the video can be determined, that is, the continuous frames in which the object appears in the video include the first frame, the second frame, and the third frame, that is, N=3. Assuming that an object appears in the first frame, the fourth frame, the fifth frame, and the sixth frame in the video, then the frames in which the object appears continuously in the video can be determined, that is, the continuous frames in which the object appears in the video include the fourth frame, the fifth frame, and the sixth frame, that is, N=3. Assuming that an object appears in the first frame, the third frame, the sixth frame, the seventh frame, the eighth frame, the ninth frame, and the tenth frame in the video, then the frames in which the object appears continuously in the video can be determined, that is, the continuous frames in which the object appears in the video include the sixth frame to the tenth frame, that is, N=5.
[0097] Among them, the target object can refer to a specific object, or it can refer to any object in at least one object. For example, assuming that at least one object appearing in the video includes object A, object B, and object C, then object A can be used as the target object, and N consecutive frames in which object A appears in the video are determined, and the human body parameter information of object A in N frames is input into the three-dimensional human body timing model, and the human body parameter information of object A in N frames is adjusted in time by the three-dimensional human body timing model to obtain the adjusted human body parameter information of object A in N frames. Then, object B can be used as the target object, and N consecutive frames in which object B appears in the video are determined, and the human body parameter information of object B in N frames is input into the three-dimensional human body timing model, and the human body parameter information of object B in N frames is adjusted in time by the three-dimensional human body timing model to obtain the adjusted human body parameter information of object B in N frames. It is also possible to take object C as the target object, determine N consecutive frames in which object C appears in the video, input the human body parameter information of object C in N frames into the three-dimensional human body timing model, and perform timing adjustment on the human body parameter information of object C in N frames through the three-dimensional human body timing model to obtain the adjusted human body parameter information of object C in N frames. Further, based on the adjusted human body parameter information of object A in N frames, the adjusted human body parameter information of object B in N frames, and the adjusted human body parameter information of object C in N frames, the three-dimensional human body reconstruction information of object A, object B, and object C in each frame can be updated to obtain the updated three-dimensional human body reconstruction information of object A, object B, and object C in each frame.
[0098] S203, inputting the human body parameter information of the target object in N frames into the three-dimensional human body timing model, and performing timing adjustment on the human body parameter information of the target object in N frames through the three-dimensional human body timing model to obtain the adjusted human body parameter information of the target object in N frames.
[0099] In one implementation, a training method for a three-dimensional human body timing model may include: obtaining a training sample, the training sample including a training video, and first annotation information of a target training object, the first annotation information being used to annotate the human body parameter information of the target training object in K frames of the training video, where K frames refer to continuous frames in which the target training object appears in the training video, and K is a positive integer; extracting three-dimensional human body reconstruction information of the target training object contained in the K frames of the training video to obtain the human body parameter information of the target training object in the K frames of the training video; calling an initial three-dimensional human body timing model to perform timing adjustment on the human body parameter information of the target training object in the K frames of the training video to obtain the adjusted human body parameter information of the target training object in the K frames of the training video; training the initial three-dimensional human body timing model in a training direction of reducing the difference between the adjusted human body parameter information of the target training object in the K frames of the training video and the first annotation information of the target training object to obtain a three-dimensional human body timing model.
[0100] The target training object may refer to a specific training object, or may refer to any training object among at least one training object appearing in the training video.
[0101] In this embodiment, since the human body parameter information of the target training object annotated by the first annotation information in the continuous frames is stable in time sequence, while the human body parameter information in the three-dimensional human body reconstruction information obtained by the three-dimensional human body reconstruction model is jittery in time sequence. Therefore, the human body parameter information obtained by the three-dimensional human body reconstruction model is input into the three-dimensional human body timing model, and the three-dimensional human body timing model is trained. The convergence condition is: the human body parameter information obtained by the three-dimensional human body reconstruction model is adjusted so that the adjusted human body parameter information is infinitely close to the annotated human body parameter information. Therefore, the trained three-dimensional human body timing model can obtain human body parameter information that is stable in time sequence.
[0102] S204, based on the adjusted human body parameter information of the target object in N frames, updating the 3D human body reconstruction information of at least one object in each frame to obtain updated 3D human body reconstruction information of at least one object in each frame.
[0103] In a specific implementation, the human body parameter information of the target object in N frames in the three-dimensional human body reconstruction information of at least one object in each frame can be replaced with the adjusted human body parameter information of the target object in the corresponding frame, so as to update the three-dimensional human body reconstruction information of at least one object in each frame and obtain the updated three-dimensional human body reconstruction information of at least one object in each frame.
[0104] In one implementation, after obtaining the adjusted human body parameter information of the target object in N frames, the human body parameter information can be smoothed, and then based on the smoothed human body parameter information, the three-dimensional human body reconstruction information of at least one object in each frame can be updated, which can further improve the stability and accuracy of the updated three-dimensional human body reconstruction information in terms of timing. Specifically, the adjusted human body parameter information of the target object in N frames can be time-series smoothed by a preset filter to obtain the smoothed human body parameter information of the target object in N frames; based on the smoothed human body parameter information of the target object in N frames, the three-dimensional human body reconstruction information of at least one object in each frame can be updated to obtain the updated three-dimensional human body reconstruction information of at least one object in each frame.
[0105] In one implementation, after obtaining the adjusted human body parameter information of the target object in N frames, the human body parameter information and the camera extrinsic parameter information of the target object in N frames can be smoothed respectively, and then based on the smoothed human body parameter information and the camera extrinsic parameter information, the three-dimensional human body reconstruction information of at least one object in each frame can be updated, which can further improve the stability and accuracy of the updated three-dimensional human body reconstruction information in terms of timing. Specifically, the three-dimensional human body reconstruction information can also include camera extrinsic parameter information, then the camera extrinsic parameter information of N frames can be time-series smoothed by a preset filter to obtain the smoothed camera extrinsic parameter information of N frames; based on the smoothed human body parameter information of the target object in N frames and the smoothed camera extrinsic parameter information of N frames, the three-dimensional human body reconstruction information of at least one object in each frame is updated to obtain the updated three-dimensional human body reconstruction information of at least one object in each frame.
[0106] Among them, the preset filter may include a Savitzky-Golay filter, a Gaussian smoothing filter or a Euro smoothing filter, etc.
[0107] S205 , performing 3D human body reconstruction based on the updated 3D human body reconstruction information of at least one object in each frame to obtain a reconstructed video.
[0108] For example, for each frame in the video, a 3D human body reconstruction can be performed based on the updated 3D human body reconstruction information of at least one object in the frame to obtain the 3D human body of each object, and then at least one object in the frame is replaced with the corresponding 3D human body to obtain an updated image. Furthermore, the updated images of each frame and the audio data of the corresponding frame can be assembled to obtain a reconstructed video.
[0109] In the embodiment of the present application, the human body parameter information of the target object in N frames is adjusted in time by using a three-dimensional human body timing model to obtain the adjusted human body parameter information of the target object in N frames, which can achieve de-jittering of consecutive frames and ensure that the adjusted human body parameter information of the target object in N frames is stable and accurate in time. Based on this, according to the adjusted human body parameter information of the target object in N frames, the three-dimensional human body reconstruction information of at least one object in each frame is updated to obtain the updated three-dimensional human body reconstruction information of at least one object in each frame, and based on the updated three-dimensional human body reconstruction information of at least one object in each frame, a three-dimensional human body reconstruction is performed to obtain a reconstructed video, which can ensure the stability and accuracy of the three-dimensional human body reconstruction video in time.
[0110] Based on the above description, see Figure 3 , Figure 3 FIG. 1 is a flow chart of another method for reconstructing a three-dimensional human body provided in an embodiment of the present application. The method for reconstructing a three-dimensional human body can be executed by a client, a server or a computer device. Figure 3 The three-dimensional human body reconstruction method shown includes but is not limited to steps S301 to S307, wherein:
[0111] S301, training an initial three-dimensional human body reconstruction model to obtain a three-dimensional human body reconstruction model.
[0112] Exemplarily, the method of training the initial 3D human body reconstruction model may include the following steps:
[0113] S1. Collect training data, including a large amount of image and video data. The video needs to be preprocessed to obtain image data of all frames. The human body in all image data has corresponding annotation information. The annotation information can include the shape and posture parameters of the SMPL model, 3D human body key point coordinates, and 2D human body key point coordinates.
[0114] S2. Build a 3D human body reconstruction model network based on ResNet50. The input is an image containing a human body cropped based on the human body position. The output is a vector with a dimension of 85, where the shape parameter of the SMPL model is 10 dimensions, the posture parameter is 72 dimensions, and the camera extrinsic displacement parameter is 3 dimensions.
[0115] S3. Use the shape and attitude parameters of the output SMPL model to obtain the predicted 3D key point coordinates, and combine the camera extrinsic unit rotation matrix and the output camera extrinsic displacement parameters to obtain the predicted 2D key point coordinates.
[0116] S4. Based on the shape parameters predicted by the 3D human body reconstruction model and the annotated shape parameters, the shape parameter error loss L is obtained. shapeIn addition, based on the posture parameters predicted by the 3D human body reconstruction model and the annotated posture parameters, the posture parameter error loss L is obtained. pose . The 3D key point error loss L can also be obtained based on the predicted 3D key point coordinates and the annotated 3D human body key point coordinates. 3d The projected 2D key point error loss L can also be obtained based on the predicted 2D key point coordinates and the annotated 2D human body key point coordinates. 2d Then, based on the shape parameter error loss L shape , attitude parameter error loss L pose , 3D key point error loss L 3d , Projection 2D key point error loss L 2d Get the loss L of the 3D human body reconstruction model, for example, L = L shape +L pose +L 3d +L 2d .
[0117] S5. Use the data of S1, the model network of S2 and the loss function of S4 to train and obtain a 3D human body reconstruction model.
[0118] S302, training the initial three-dimensional human body time series model to obtain a three-dimensional human body time series model.
[0119] Exemplarily, the method of training the initial three-dimensional human body temporal model may include the following steps:
[0120] S6, collect all images and corresponding annotation information obtained from the video data in S1 above, each person appearing in each video corresponds to an NxD matrix A, where N represents the number of frames in which the person appears continuously in the video, and D represents the dimension of the posture parameter, i.e. 72). The body bounding box information of each human body appearing in all images contained in the video can also be collected.
[0121] S7. Use the 3D human body reconstruction model obtained through the above training and the human body bounding box information in S6 to predict the 3D human body reconstruction information of each person in the video in consecutive frames, retain the posture information in the 3D human body reconstruction information of each person in consecutive frames, and obtain a corresponding NxD matrix B.
[0122] S8. Build a 3D human temporal model.
[0123] like Figure 4Taking the structural diagram of the 3D human temporal model shown in FIG. 1 as an example, the input dimension can be BxMxD, where B represents the batch length, M represents the size of the sliding window, and D represents the dimension of the posture parameter. For example, assuming that the number of consecutive frames of a person in a video is 356, if the batch length is 4 and the window size is 32, then it means that the number of consecutive frames in each batch is 32*4=128 frames.
[0124] exist Figure 4 In the example, the BxMxD matrix is input to the first fully connected layer. The first fully connected layer is a Dx256 matrix. The BxMx256 matrix can be obtained through the first fully connected layer, and the final BxMxD matrix can be obtained through gradient descent.
[0125] like Figure 5 Taking the structural schematic diagram of the Block layer in the three-dimensional human body timing model shown as an example, the Block layer may include a fully connected layer and a ReLU activation layer.
[0126] During the training of the 3D human temporal model, the adjusted parameters can be Figure 4 and Figure 5 The weights of each layer in .
[0127] S9. Several matrices A and B obtained from S6 and S7 can be used to obtain the entire training set through a sliding window, that is, N–M+1 MxD matrices. Data from A is used as the predicted value, and data from B is used as the true value. The MxD matrix error loss is used as the objective function to train a 3D human body time series model.
[0128] S303, calling a 3D human body reconstruction model, extracting 3D human body reconstruction information of at least one object contained in each frame in the video, and obtaining 3D human body reconstruction information of at least one object in each frame, wherein the 3D human body reconstruction information includes human body parameter information.
[0129] In the process of 3D human reconstruction of a video, images of all frames of the input video can be obtained through preprocessing, and then all frames of the video can be processed with a 2D human body detection model to obtain human body bounding box information of each image. Furthermore, the 3D human body reconstruction model and human body bounding box information obtained through the above training can be used to predict the 3D human body reconstruction information of each human body.
[0130] S304, determining N consecutive frames in which the target object appears in the video.
[0131] S305 , calling a three-dimensional human body temporal model, performing temporal adjustment on the human body parameter information of the target object in N frames, and obtaining the adjusted human body parameter information of the target object in N frames.
[0132] S306 , based on the adjusted human body parameter information of the target object in the N frames, updating the 3D human body reconstruction information of at least one object in each frame to obtain updated 3D human body reconstruction information of at least one object in each frame.
[0133] Exemplarily, steps S304 to S306 may be implemented by the following steps:
[0134] S10. The human body frames of the previous and next frames can be matched by IOU to obtain the 3D human body reconstruction information of each person in the video in consecutive frames.
[0135] S11, separately process the 3D human body reconstruction information of each person's continuous frames in S10, and obtain n data blocks through a sliding window, each data block having M frames of 3D human body reconstruction information.
[0136] S12. By extracting the posture parameters, an MxD matrix X can be obtained, which is sent to the 3D human body time series model obtained by the above training. The model outputs a new MxD matrix X', which is smoothed with a Savitzky-Golay filter to obtain X".
[0137] S13, extracting the camera extrinsic displacement parameters, we can get the Mx3 matrix Y, and use the Savitzky-Golay filter to smooth it to get the new Mx3 matrix Y".
[0138] S14: Update the smoothed posture parameter X'' and camera extrinsic displacement parameter Y'' obtained in S12 and S13 to the original 3D human body reconstruction information.
[0139] S307, performing 3D human body reconstruction based on the updated 3D human body reconstruction information of at least one object in each frame to obtain a reconstructed video.
[0140] In the embodiment of the present application, the initial 3D human body reconstruction model is trained to obtain the 3D human body reconstruction model, and the initial 3D human body timing model is trained to obtain the 3D human body timing model. Then, the 3D human body reconstruction model is called to extract the 3D human body reconstruction information of at least one object contained in each frame of the video to obtain the 3D human body reconstruction information of at least one object in each frame, the 3D human body reconstruction information includes human body parameter information, and the continuous N frames in which the target object appears in the video are determined, and the 3D human body timing model is called to adjust the human body parameter information of the target object in N frames in time sequence to obtain the adjusted human body parameter information of the target object in N frames, and based on the adjusted human body parameter information of the target object in N frames, the 3D human body reconstruction information of at least one object in each frame is updated to obtain the updated 3D human body reconstruction information of at least one object in each frame, and based on the updated 3D human body reconstruction information of at least one object in each frame, the 3D human body reconstruction is performed to obtain the reconstructed video, which can ensure the stability and accuracy of the 3D human body reconstruction video in time sequence.
[0141] An embodiment of the present application further provides a computer storage medium, in which program instructions are stored. When the program instructions are executed, they are used to implement the corresponding methods described in the above embodiments.
[0142] See also Figure 6 , Figure 6 It is a structural schematic diagram of a three-dimensional human body reconstruction device provided in an embodiment of the present application.
[0143] In one implementation of the three-dimensional human body reconstruction device of the embodiment of the present application, the three-dimensional human body reconstruction device includes the following structure.
[0144] The information extraction unit 601 is used to extract 3D human body reconstruction information of at least one object contained in each frame in the video, and obtain 3D human body reconstruction information of the at least one object in each frame; wherein the 3D human body reconstruction information includes human body parameter information;
[0145] A continuous frame determination unit 602 is used to determine N continuous frames in which the target object appears in the video, where N is a positive integer;
[0146] A timing adjustment unit 603 is used to input the human body parameter information of the target object in the N frames into a three-dimensional human body timing model, and perform timing adjustment on the human body parameter information of the target object in the N frames through the three-dimensional human body timing model to obtain the adjusted human body parameter information of the target object in the N frames;
[0147] An information updating unit 604 is used to update the 3D human body reconstruction information of the at least one object in each of the frames based on the adjusted human body parameter information of the target object in the N frames, so as to obtain updated 3D human body reconstruction information of the at least one object in each of the frames;
[0148] The 3D human body reconstruction unit 605 is configured to perform 3D human body reconstruction based on the updated 3D human body reconstruction information of the at least one object in each frame to obtain a reconstructed video.
[0149] In one embodiment, the 3D human body reconstruction apparatus may further include an acquisition unit 606 and a training unit 607, wherein:
[0150] An acquisition unit 606 is used to acquire a training sample, where the training sample includes a training video and first annotation information of a target training object, where the first annotation information is used to annotate human body parameter information of the target training object in K frames of the training video, where K frames refer to consecutive frames in which the target training object appears in the training video, and K is a positive integer;
[0151] The information extraction unit 601 is further used to extract 3D human body reconstruction information of the target training object contained in the K frame of the training video to obtain human body parameter information of the target training object in the K frame of the training video;
[0152] The timing adjustment unit 603 is further used to call the initial three-dimensional human timing model to perform timing adjustment on the human body parameter information of the target training object in the K frame of the training video to obtain the adjusted human body parameter information of the target training object in the K frame of the training video;
[0153] The training unit 607 is used to train the initial three-dimensional human body timing model in a training direction of reducing the difference between the adjusted human body parameter information of the target training object in the K frame of the training video and the first annotation information of the target training object to obtain the three-dimensional human body timing model.
[0154] In one embodiment, the 3D human body reconstruction information of the at least one object in each frame is obtained by a 3D human body reconstruction model. The 3D human body reconstruction device may also include an acquisition unit 606 and a training unit 607, wherein:
[0155] An acquisition unit 606 is used to acquire a training sample, where the training sample includes a training video and second annotation information of at least one training object contained in each frame of the training video, where the second annotation information is used to annotate human body parameter information of the corresponding training object in each frame;
[0156] The information extraction unit 601 is further used to call the initial 3D human body reconstruction model, extract 3D human body reconstruction information of at least one object contained in each frame of the training video, and obtain human body parameter information of the at least one training object in each frame of the training video;
[0157] The training unit 607 is used to train the initial three-dimensional human body reconstruction model in a training direction of reducing the difference between the human body parameter information of the at least one training object in each frame of the training video and the second annotation information of the at least one training object to obtain the three-dimensional human body reconstruction model.
[0158] In one embodiment, the training sample further includes third annotation information of the at least one training object, and the third annotation information is used to annotate the coordinates of the three-dimensional human key points of the corresponding training object in each frame. The three-dimensional human reconstruction device may also include an identification unit 608, wherein:
[0159] The recognition unit 608 is used to recognize the three-dimensional human key points of the at least one training object in each frame of the training video based on the human body parameter information of the at least one training object in each frame of the training video, and obtain the coordinates of the three-dimensional human key points of the at least one training object in each frame of the training video;
[0160] The training unit 607 trains the initial 3D human body reconstruction model according to a training direction of reducing the difference between the human body parameter information of the at least one training object in each frame of the training video and the second annotation information of the at least one training object to obtain the 3D human body reconstruction model, including:
[0161] The initial three-dimensional human body reconstruction model is trained according to a training direction of reducing the difference between the human body parameter information of the at least one training object in each frame of the training video and the second annotation information of the at least one training object, and the difference between the three-dimensional human body key point coordinates of the at least one training object in each frame of the training video and the third annotation information of the at least one training object to obtain the three-dimensional human body reconstruction model.
[0162] In one embodiment, the training sample further includes fourth annotation information of the at least one training object, and the fourth annotation information is used to annotate the coordinates of the two-dimensional human body key points of the corresponding training object in each frame. The three-dimensional human body reconstruction device may also include an identification unit 608, wherein:
[0163] The recognition unit 608 is used to recognize the three-dimensional human key points of the at least one training object in each frame of the training video based on the human body parameter information of the at least one training object in each frame of the training video, and obtain the coordinates of the three-dimensional human key points of the at least one training object in each frame of the training video;
[0164] The recognition unit 608 is further configured to recognize the two-dimensional human key points of the at least one training object in each frame of the training video according to the three-dimensional human key point coordinates of the at least one training object in each frame of the training video and the camera extrinsic parameter information of each frame of the training video, so as to obtain the two-dimensional human key point coordinates of the at least one training object in each frame of the training video;
[0165] The training unit 607 trains the initial 3D human body reconstruction model according to a training direction of reducing the difference between the human body parameter information of the at least one training object in each frame of the training video and the second annotation information of the at least one training object to obtain the 3D human body reconstruction model, including:
[0166] The initial three-dimensional human body reconstruction model is trained according to a training direction of reducing the difference between the human body parameter information of the at least one training object in each frame of the training video and the second annotation information of the at least one training object, and the difference between the two-dimensional human body key point coordinates of the at least one training object in each frame of the training video and the fourth annotation information of the at least one training object to obtain the three-dimensional human body reconstruction model.
[0167] In one embodiment, the information updating unit 604 updates the 3D human body reconstruction information of the at least one object in each frame based on the adjusted human body parameter information of the target object in the N frames to obtain the updated 3D human body reconstruction information of the at least one object in each frame, including:
[0168] Performing temporal smoothing processing on the adjusted human body parameter information of the target object in the N frames through a preset filter to obtain smoothed human body parameter information of the target object in the N frames;
[0169] Based on the smoothed human body parameter information of the target object in the N frames, the three-dimensional human body reconstruction information of the at least one object in each of the frames is updated to obtain updated three-dimensional human body reconstruction information of the at least one object in each of the frames.
[0170] In one embodiment, the 3D human body reconstruction information further includes camera extrinsic parameter information; the information updating unit 604 updates the 3D human body reconstruction information of the at least one object in each frame based on the smoothed human body parameter information of the target object in the N frames, and obtains the updated 3D human body reconstruction information of the at least one object in each frame, including:
[0171] Performing time-series smoothing processing on the camera extrinsic parameter information of the N frames through a preset filter to obtain smoothed camera extrinsic parameter information of the N frames;
[0172] Based on the smoothed human body parameter information of the target object in the N frames and the smoothed camera extrinsic parameter information of the N frames, the three-dimensional human body reconstruction information of the at least one object in each of the frames is updated to obtain the updated three-dimensional human body reconstruction information of the at least one object in each of the frames.
[0173] In the embodiment of the present application, the timing adjustment unit 603 performs timing adjustment on the human body parameter information of the target object in N frames through the three-dimensional human body timing model, and obtains the adjusted human body parameter information of the target object in N frames, which can achieve the de-jittering of continuous frames and ensure that the adjusted human body parameter information of the target object in N frames is stable and accurate in timing. Based on this, the information update unit 604 updates the three-dimensional human body reconstruction information of at least one object in each frame according to the adjusted human body parameter information of the target object in N frames, and obtains the updated three-dimensional human body reconstruction information of at least one object in each frame. The three-dimensional human body reconstruction unit 605 performs three-dimensional human body reconstruction based on the updated three-dimensional human body reconstruction information of at least one object in each frame to obtain a reconstructed video, which can ensure the stability and accuracy of the three-dimensional human body reconstruction video in timing.
[0174] See also Figure 7 , Figure 7 7 is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. The computer device in the embodiment of the present application includes a power supply module and other structures, and includes a processor 701, a storage device 702, and a communication interface 703. The processor 701, the storage device 702, and the communication interface 703 can exchange data, and the processor 701 implements the corresponding three-dimensional human body reconstruction method.
[0175] The storage device 702 may include a volatile memory, such as a random-access memory (RAM); the storage device 702 may also include a non-volatile memory, such as a flash memory, a solid-state drive (SSD), etc.; the storage device 702 may also include a combination of the above-mentioned types of memory.
[0176] The processor 701 may be a central processing unit (CPU). The processor 701 may also be a combination of a CPU and a GPU. In the server, multiple CPUs and GPUs may be included as needed to perform corresponding three-dimensional human body reconstruction. In one embodiment, the storage device 702 is used to store program instructions. The processor 701 may call program instructions to implement various methods involved in the embodiments of the present application.
[0177] In a first possible implementation, the processor 701 of the computer device calls the program instructions stored in the storage device 702 to extract three-dimensional human body reconstruction information of at least one object contained in each frame of the video, and obtain three-dimensional human body reconstruction information of the at least one object in the each frame; wherein the three-dimensional human body reconstruction information includes human body parameter information; determine N consecutive frames in which the target object appears in the video, where N is a positive integer; input the human body parameter information of the target object in the N frames into a three-dimensional human body timing model, and perform timing adjustment on the human body parameter information of the target object in the N frames through the three-dimensional human body timing model to obtain adjusted human body parameter information of the target object in the N frames; based on the adjusted human body parameter information of the target object in the N frames, update the three-dimensional human body reconstruction information of the at least one object in the each frame to obtain updated three-dimensional human body reconstruction information of the at least one object in the each frame; perform three-dimensional human body reconstruction based on the updated three-dimensional human body reconstruction information of the at least one object in the each frame to obtain a reconstructed video.
[0178] In one embodiment, the processor 701 is further configured to perform the following operations:
[0179] Acquire a training sample, wherein the training sample includes a training video and first annotation information of a target training object, wherein the first annotation information is used to annotate human body parameter information of the target training object in K frames of the training video, wherein the K frames refer to consecutive frames in which the target training object appears in the training video, and K is a positive integer;
[0180] Extracting three-dimensional human body reconstruction information of a target training object contained in the K frame of the training video to obtain human body parameter information of the target training object in the K frame of the training video;
[0181] Calling the initial three-dimensional human body time series model, performing time series adjustment on the human body parameter information of the target training object in the K frame of the training video, and obtaining the adjusted human body parameter information of the target training object in the K frame of the training video;
[0182] The initial three-dimensional human body timing model is trained according to a training direction of reducing the difference between the adjusted human body parameter information of the target training object in the K frame of the training video and the first annotation information of the target training object to obtain the three-dimensional human body timing model.
[0183] In an embodiment, the 3D human body reconstruction information of the at least one object in each frame is obtained by a 3D human body reconstruction model. The processor 701 is further configured to perform the following operations:
[0184] Acquire a training sample, wherein the training sample includes a training video and second annotation information of at least one training object contained in each frame of the training video, wherein the second annotation information is used to annotate human body parameter information of the corresponding training object in each frame;
[0185] Calling an initial 3D human body reconstruction model, extracting 3D human body reconstruction information of at least one object contained in each frame of the training video, and obtaining human body parameter information of the at least one training object in each frame of the training video;
[0186] The initial three-dimensional human body reconstruction model is trained according to a training direction of reducing the difference between the human body parameter information of the at least one training object in each frame of the training video and the second annotation information of the at least one training object to obtain the three-dimensional human body reconstruction model.
[0187] In one embodiment, the training sample further includes third annotation information of the at least one training object, and the third annotation information is used to annotate the coordinates of the three-dimensional human body key points of the corresponding training object in each frame. The processor 701 is also used to perform the following operations:
[0188] Based on the human body parameter information of the at least one training object in each frame of the training video, identifying the three-dimensional human body key points of the at least one training object in each frame of the training video, and obtaining the three-dimensional human body key point coordinates of the at least one training object in each frame of the training video;
[0189] The processor 701 is used to perform the following operations when training the initial 3D human body reconstruction model according to a training direction of reducing the difference between the human body parameter information of the at least one training object in each frame of the training video and the second annotation information of the at least one training object to obtain the 3D human body reconstruction model:
[0190] The initial three-dimensional human body reconstruction model is trained according to a training direction of reducing the difference between the human body parameter information of the at least one training object in each frame of the training video and the second annotation information of the at least one training object, and the difference between the three-dimensional human body key point coordinates of the at least one training object in each frame of the training video and the third annotation information of the at least one training object to obtain the three-dimensional human body reconstruction model.
[0191] In one embodiment, the training sample further includes fourth annotation information of the at least one training object, and the fourth annotation information is used to annotate the two-dimensional human body key point coordinates of the corresponding training object in each frame. The processor 701 is also used to perform the following operations:
[0192] Based on the human body parameter information of the at least one training object in each frame of the training video, identifying the three-dimensional human body key points of the at least one training object in each frame of the training video, and obtaining the three-dimensional human body key point coordinates of the at least one training object in each frame of the training video;
[0193] According to the three-dimensional human body key point coordinates of the at least one training object in each frame of the training video and the camera extrinsic parameter information of each frame of the training video, the two-dimensional human body key points of the at least one training object in each frame of the training video are identified to obtain the two-dimensional human body key point coordinates of the at least one training object in each frame of the training video;
[0194] The processor 701 is used to perform the following operations when training the initial 3D human body reconstruction model according to a training direction of reducing the difference between the human body parameter information of the at least one training object in each frame of the training video and the second annotation information of the at least one training object to obtain the 3D human body reconstruction model:
[0195] The initial three-dimensional human body reconstruction model is trained according to a training direction of reducing the difference between the human body parameter information of the at least one training object in each frame of the training video and the second annotation information of the at least one training object, and the difference between the two-dimensional human body key point coordinates of the at least one training object in each frame of the training video and the fourth annotation information of the at least one training object to obtain the three-dimensional human body reconstruction model.
[0196] In one embodiment, the processor 701 updates the 3D human body reconstruction information of the at least one object in each frame based on the adjusted human body parameter information of the target object in the N frames to obtain the updated 3D human body reconstruction information of the at least one object in each frame, and is used to perform the following operations:
[0197] Performing temporal smoothing processing on the adjusted human body parameter information of the target object in the N frames through a preset filter to obtain smoothed human body parameter information of the target object in the N frames;
[0198] Based on the smoothed human body parameter information of the target object in the N frames, the three-dimensional human body reconstruction information of the at least one object in each of the frames is updated to obtain updated three-dimensional human body reconstruction information of the at least one object in each of the frames.
[0199] In one embodiment, the 3D human body reconstruction information further includes camera extrinsic parameter information; when the processor 701 updates the 3D human body reconstruction information of the at least one object in each frame based on the smoothed human body parameter information of the target object in the N frames to obtain the updated 3D human body reconstruction information of the at least one object in each frame, the processor 701 is used to perform the following operations:
[0200] Performing time-series smoothing processing on the camera extrinsic parameter information of the N frames through a preset filter to obtain smoothed camera extrinsic parameter information of the N frames;
[0201] Based on the smoothed human body parameter information of the target object in the N frames and the smoothed camera extrinsic parameter information of the N frames, the three-dimensional human body reconstruction information of the at least one object in each of the frames is updated to obtain the updated three-dimensional human body reconstruction information of the at least one object in each of the frames.
[0202] In the embodiment of the present application, the processor 701 performs timing adjustment on the human body parameter information of the target object in N frames through the three-dimensional human body timing model, and obtains the adjusted human body parameter information of the target object in N frames, which can achieve de-jittering of consecutive frames, and ensure that the adjusted human body parameter information of the target object in N frames is stable and accurate in timing. Based on this, the processor 701 updates the three-dimensional human body reconstruction information of at least one object in each frame according to the adjusted human body parameter information of the target object in N frames, obtains the updated three-dimensional human body reconstruction information of at least one object in each frame, and performs three-dimensional human body reconstruction based on the updated three-dimensional human body reconstruction information of at least one object in each frame to obtain a reconstructed video, which can ensure the stability and accuracy of the three-dimensional human body reconstruction video in timing.
[0203] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the computer-readable storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM). The computer-readable storage medium can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function, etc.; the data storage area can store data created according to the use of the blockchain node, etc.
[0204] The above disclosure is only part of the embodiments of the present application, which certainly cannot be used to limit the scope of rights of the present application. Ordinary technicians in this field can understand that all or part of the processes of implementing the above embodiments and making equivalent changes according to the claims of this application are still within the scope of the present invention.
Claims
1. A three-dimensional human body reconstruction method, characterized in that: include: Extracting 3D human body reconstruction information of at least one object contained in each frame of the video using a 3D human body reconstruction model to obtain 3D human body reconstruction information of the at least one object in each frame; wherein the 3D human body reconstruction information includes human body parameter information; Determine N consecutive frames in which the target object appears in the video, where N is a positive integer; Inputting the human body parameter information of the target object in the N frames into a three-dimensional human body timing model, and performing timing adjustment on the human body parameter information of the target object in the N frames by using the three-dimensional human body timing model to obtain the adjusted human body parameter information of the target object in the N frames; Based on the adjusted human body parameter information of the target object in the N frames, updating the 3D human body reconstruction information of the at least one object in each of the frames to obtain updated 3D human body reconstruction information of the at least one object in each of the frames; Based on the updated 3D human body reconstruction information of the at least one object in each of the frames, perform 3D human body reconstruction to obtain a reconstructed video; The training method of the three-dimensional human body temporal model includes: Acquire a training sample, wherein the training sample includes a training video and first annotation information of a target training object, wherein the first annotation information is used to annotate human body parameter information of the target training object in K frames of the training video, wherein the K frames refer to consecutive frames in which the target training object appears in the training video, and K is a positive integer; Extracting three-dimensional human body reconstruction information of a target training object contained in the K frame of the training video to obtain human body parameter information of the target training object in the K frame of the training video; Calling the initial three-dimensional human body time series model, performing time series adjustment on the human body parameter information of the target training object in the K frame of the training video, and obtaining the adjusted human body parameter information of the target training object in the K frame of the training video; The initial 3D human body temporal model is trained according to a training direction of reducing the difference between the adjusted human body parameter information of the target training object in the K frame of the training video and the first annotation information of the target training object to obtain the 3D human body temporal model; The training method of the three-dimensional human body reconstruction model comprises: Acquire a training sample, wherein the training sample includes a training video and second annotation information of at least one training object contained in each frame of the training video, wherein the second annotation information is used to annotate human body parameter information of the corresponding training object in each frame; Calling an initial three-dimensional human body reconstruction model, extracting three-dimensional human body reconstruction information of at least one object contained in each frame of the training video, and obtaining human body parameter information of the at least one training object in each frame of the training video; The initial three-dimensional human body reconstruction model is trained according to a training direction of reducing the difference between the human body parameter information of the at least one training object in each frame of the training video and the second annotation information of the at least one training object to obtain the three-dimensional human body reconstruction model.
2. The method according to claim 1, characterized in that The training sample further includes third annotation information of the at least one training object, and the third annotation information is used to annotate the coordinates of the three-dimensional human key points of the corresponding training object in each frame; the training method of the three-dimensional human reconstruction model further includes: Based on the human body parameter information of the at least one training object in each frame of the training video, identifying the three-dimensional human body key points of the at least one training object in each frame of the training video, and obtaining the three-dimensional human body key point coordinates of the at least one training object in each frame of the training video; The step of training the initial 3D human body reconstruction model according to a training direction of reducing the difference between the human body parameter information of the at least one training object in each frame of the training video and the second annotation information of the at least one training object to obtain the 3D human body reconstruction model comprises: The initial three-dimensional human body reconstruction model is trained according to a training direction of reducing the difference between the human body parameter information of the at least one training object in each frame of the training video and the second annotation information of the at least one training object, and the difference between the three-dimensional human body key point coordinates of the at least one training object in each frame of the training video and the third annotation information of the at least one training object to obtain the three-dimensional human body reconstruction model.
3. The method according to claim 1, characterized in that: The training sample further includes fourth annotation information of the at least one training object, and the fourth annotation information is used to annotate the coordinates of two-dimensional human body key points of the corresponding training object in each frame; the training method of the three-dimensional human body reconstruction model further includes: Based on the human body parameter information of the at least one training object in each frame of the training video, identifying the three-dimensional human body key points of the at least one training object in each frame of the training video, and obtaining the three-dimensional human body key point coordinates of the at least one training object in each frame of the training video; According to the three-dimensional human body key point coordinates of the at least one training object in each frame of the training video and the camera extrinsic parameter information of each frame of the training video, the two-dimensional human body key points of the at least one training object in each frame of the training video are identified to obtain the two-dimensional human body key point coordinates of the at least one training object in each frame of the training video; The step of training the initial 3D human body reconstruction model according to a training direction of reducing the difference between the human body parameter information of the at least one training object in each frame of the training video and the second annotation information of the at least one training object to obtain the 3D human body reconstruction model comprises: The initial three-dimensional human body reconstruction model is trained according to a training direction of reducing the difference between the human body parameter information of the at least one training object in each frame of the training video and the second annotation information of the at least one training object, and the difference between the two-dimensional human body key point coordinates of the at least one training object in each frame of the training video and the fourth annotation information of the at least one training object to obtain the three-dimensional human body reconstruction model.
4. The method according to claim 1, characterized in that: The updating of the 3D human body reconstruction information of the at least one object in each frame based on the adjusted human body parameter information of the target object in the N frames to obtain the updated 3D human body reconstruction information of the at least one object in each frame includes: Performing temporal smoothing processing on the adjusted human body parameter information of the target object in the N frames through a preset filter to obtain smoothed human body parameter information of the target object in the N frames; Based on the smoothed human body parameter information of the target object in the N frames, the three-dimensional human body reconstruction information of the at least one object in each of the frames is updated to obtain updated three-dimensional human body reconstruction information of the at least one object in each of the frames.
5. The method according to claim 4, characterized in that The three-dimensional human body reconstruction information also includes camera extrinsic parameter information; the three-dimensional human body reconstruction information of the at least one object in each frame is updated based on the smoothed human body parameter information of the target object in the N frames to obtain the updated three-dimensional human body reconstruction information of the at least one object in each frame, including: Performing time-series smoothing processing on the camera extrinsic parameter information of the N frames through a preset filter to obtain smoothed camera extrinsic parameter information of the N frames; Based on the smoothed human body parameter information of the target object in the N frames and the smoothed camera extrinsic parameter information of the N frames, the three-dimensional human body reconstruction information of the at least one object in each of the frames is updated to obtain the updated three-dimensional human body reconstruction information of the at least one object in each of the frames.
6. A three-dimensional human body reconstruction device, characterized in that: The device comprises: an information extraction unit, configured to extract 3D human body reconstruction information of at least one object contained in each frame of the video by using a 3D human body reconstruction model, and obtain 3D human body reconstruction information of the at least one object in each frame; wherein the 3D human body reconstruction information includes human body parameter information; A continuous frame determination unit, used to determine N consecutive frames in which the target object appears in the video, where N is a positive integer; A timing adjustment unit, used for inputting the human body parameter information of the target object in the N frames into a three-dimensional human body timing model, and performing timing adjustment on the human body parameter information of the target object in the N frames through the three-dimensional human body timing model to obtain the adjusted human body parameter information of the target object in the N frames; an information updating unit, configured to update the 3D human body reconstruction information of the at least one object in each of the frames based on the adjusted human body parameter information of the target object in the N frames, so as to obtain the updated 3D human body reconstruction information of the at least one object in each of the frames; a 3D human body reconstruction unit, configured to perform 3D human body reconstruction based on the updated 3D human body reconstruction information of the at least one object in each of the frames to obtain a reconstructed video; The training method of the three-dimensional human body temporal model includes: Acquire a training sample, wherein the training sample includes a training video and first annotation information of a target training object, wherein the first annotation information is used to annotate human body parameter information of the target training object in K frames of the training video, wherein the K frames refer to consecutive frames in which the target training object appears in the training video, and K is a positive integer; Extracting three-dimensional human body reconstruction information of a target training object contained in the K frame of the training video to obtain human body parameter information of the target training object in the K frame of the training video; Calling the initial three-dimensional human body time series model, performing time series adjustment on the human body parameter information of the target training object in the K frame of the training video, and obtaining the adjusted human body parameter information of the target training object in the K frame of the training video; The initial 3D human body temporal model is trained according to a training direction of reducing the difference between the adjusted human body parameter information of the target training object in the K frame of the training video and the first annotation information of the target training object to obtain the 3D human body temporal model; The training method of the three-dimensional human body reconstruction model comprises: Acquire a training sample, wherein the training sample includes a training video and second annotation information of at least one training object contained in each frame of the training video, wherein the second annotation information is used to annotate human body parameter information of the corresponding training object in each frame; Calling an initial 3D human body reconstruction model, extracting 3D human body reconstruction information of at least one object contained in each frame of the training video, and obtaining human body parameter information of the at least one training object in each frame of the training video; The initial three-dimensional human body reconstruction model is trained according to a training direction of reducing the difference between the human body parameter information of the at least one training object in each frame of the training video and the second annotation information of the at least one training object to obtain the three-dimensional human body reconstruction model.
7. A computer device, characterized in that: The computer device comprises a processor, a storage device and a communication interface, wherein the processor, the storage device and the communication interface are connected to each other, wherein: The storage device is used to store a computer program, wherein the computer program includes program instructions; The processor is used to call the program instructions to execute the three-dimensional human body reconstruction method as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions. When the program instructions are executed by a processor, they are used to execute the three-dimensional human body reconstruction method according to any one of claims 1 to 5.
9. A computer program product, characterized in that The computer program product comprises a computer program, which is suitable for being loaded by a processor and executing the three-dimensional human body reconstruction method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Video image processing method and device, electronic equipment and storage medium
CN112767534A
Model construction method and device based on human motion video and storage medium
CN115222882A
