Virtual digital human driving method, device, computer equipment and storage medium
By fixing the auxiliary positioning sphere at the joints of the real human body and using the spherical instance segmentation model and spherical fitting technology, the problem of high cost and insufficient accuracy of virtual digital human driving is solved, and high-precision virtual digital human driving is achieved.
Patent Information
- Application Number
- CN202311177870.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-12
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2043-09-12
AI Technical Summary
The existing virtual digital human driving method has high cost and insufficient accuracy, the motion capture equipment is expensive, and the deep network detection and recognition accuracy is insufficient.
By fixing auxiliary positioning spheres at the joints of the real human body, and using spherical instance segmentation models and spherical surface fitting technology, joint position data is obtained to drive the virtual digital human, reducing costs and improving accuracy.
No motion capture equipment is required, the cost is reduced, and spherical surface fitting improves the accuracy of joint position determination and improves the accuracy of virtual digital human driving.
Smart Images

Figure CN117132645B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, computer equipment and storage medium for driving a virtual digital human. Background Art
[0002] Virtual digital human refers to a digital image that is driven by computer technologies such as programs and algorithms and has similar appearance and behavioral characteristics to humans. Virtual digital humans are widely used in many fields, such as virtual reality, education, health management, intelligent customer service, etc. The driving of virtual digital humans mainly relies on imitating real people and driving virtual digital humans by obtaining real people's posture data. In the existing virtual digital human driving methods, motion capture devices are usually used to collect real people's posture data or deep networks are used to detect and identify real people's postures. However, since motion capture devices are often expensive, the method of collecting real people's posture data based on motion capture devices is costly; and the detection and identification of real people's postures using deep networks has the problem of insufficient accuracy. Summary of the invention
[0003] The embodiments of the present application provide a driving method, apparatus, computer equipment and storage medium for a virtual digital human, which can reduce the cost of the virtual digital human driving process and improve the driving accuracy of the virtual digital human.
[0004] In a first aspect, an embodiment of the present application provides a method for driving a virtual digital human, including:
[0005] Acquire a posture image of a real human body in a target posture, wherein multiple target joints of the real human body are all fixed with auxiliary positioning spheres of the same size;
[0006] Segmenting the auxiliary positioning sphere in the posture image using a preset spherical instance segmentation model to obtain auxiliary positioning sphere point clouds corresponding to each target joint;
[0007] For each of the auxiliary positioning sphere point clouds, a preset spherical fitting strategy is used to perform spherical fitting on the auxiliary positioning sphere point cloud to obtain sphere center data corresponding to each of the auxiliary positioning sphere point clouds;
[0008] The sphere center data corresponding to each of the target joints is determined as the position data of each of the target joints of the real human body in the target posture, and the virtual digital human model is driven based on the position data of each of the target joints.
[0009] In a second aspect, an embodiment of the present application provides a driving device for a virtual digital human, comprising:
[0010] An acquisition unit, used for acquiring a posture image of a real human body in a target posture, wherein multiple target joints of the real human body are all fixed with auxiliary positioning spheres of the same size;
[0011] a segmentation unit, configured to segment the auxiliary positioning sphere in the posture image using a preset spherical instance segmentation model to obtain auxiliary positioning sphere point clouds corresponding to each of the target joints;
[0012] A spherical fitting unit, used for performing spherical fitting on each of the auxiliary positioning spherical point clouds using a preset spherical fitting strategy to obtain spherical center data corresponding to each of the auxiliary positioning spherical point clouds;
[0013] A determination unit is used to determine the sphere center data corresponding to each target joint as the position data of each target joint of the real human body in the target posture, and drive the virtual digital human model based on the position data of each target joint.
[0014] In a third aspect, an embodiment of the present application further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the method for driving a virtual digital human according to the first aspect described above is implemented.
[0015] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor executes the virtual digital human driving method of the first aspect mentioned above.
[0016] The present application obtains the posture image of the real human body in the target posture by fixing an auxiliary positioning sphere of the same size at the target joint of the real human body, and then uses a preset spherical instance segmentation model to segment the auxiliary positioning sphere point cloud at each target joint in the posture image, and obtains the sphere center data corresponding to the auxiliary positioning sphere point cloud by performing spherical fitting on the auxiliary positioning sphere point cloud, and then determines the sphere center data corresponding to each target joint as the position data of each target joint of the real human body in the target posture, and drives the virtual digital human model based on the position data of each target joint. The present application sets an auxiliary positioning sphere at the joint of the real human body, so that the recognition of the human body joint position is converted into the recognition of the sphere center of the auxiliary positioning sphere, thereby realizing the recognition of the sphere center of the auxiliary positioning sphere by adopting spherical instance segmentation and point cloud spherical fitting steps, and uses the recognition result as the position of the joint, and then drives the virtual digital human. Compared with the prior art, on the one hand, the present application does not require the real human body to wear expensive motion capture equipment, but only needs to set an auxiliary positioning sphere at the target joint, thereby reducing the driving cost of the virtual digital human. On the other hand, the present application uses spherical fitting technology to perform spherical fitting on the auxiliary positioning sphere point cloud, thereby improving the accuracy of spherical center fitting and the accuracy of target joint position determination, thereby improving the accuracy of the virtual digital human driving process that depends on the position of the target joint. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0018] Figure 1 A schematic diagram of a process flow of a method for driving a virtual digital human provided in an embodiment of the present application;
[0019] Figure 2 A schematic diagram of a first sub-process of a method for driving a virtual digital human provided in an embodiment of the present application;
[0020] Figure 3 A schematic diagram of another sub-process of the method for driving a virtual digital human provided in an embodiment of the present application;
[0021] Figure 4 A schematic diagram of another sub-process of the method for driving a virtual digital human provided in an embodiment of the present application;
[0022] Figure 5 A schematic block diagram of a driving device for a virtual digital human provided in an embodiment of the present application;
[0023] Figure 6 A schematic block diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0024] 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 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.
[0025] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0026] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0027] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0028] The present application provides a method, device, computer equipment and storage medium for driving a virtual digital human, which can reduce the cost of the virtual digital human driving process and improve the driving accuracy of the virtual digital human. The execution subject of the virtual digital human driving method can be the driving device of the virtual digital human provided in the embodiment of the present application, or can be a computer device integrated with the driving device of the virtual digital human provided in the embodiment of the present application, wherein the driving device of the virtual digital human can be implemented in hardware or software, the computer device can be a terminal or a server, and the terminal can be a smart phone, a tablet computer, a PDA, or a laptop computer, etc.
[0029] See also Figure 1 , Figure 1 This is a flow chart of a method for driving a virtual digital human provided in one embodiment of the present application. The method specifically includes the following steps S101 to S104.
[0030] Step S101: acquiring a posture image of a real human body in a target posture, wherein auxiliary positioning spheres of the same size are fixed at multiple target joints of the real human body.
[0031] The target posture may be a posture to be recognized; and the target joint may be a joint related to the posture to be recognized.
[0032] In this embodiment, an auxiliary positioning sphere of the same size is fixed at the target joint of the real human body, and the real human body is in the target posture. On this basis, the real human body can be photographed by a camera device to obtain a posture image of the real human body in the target posture. The camera device can be a depth camera, a binocular camera, etc., for collecting posture images with depth information.
[0033] Step S102: segment the auxiliary positioning sphere in the posture image using a preset spherical instance segmentation model to obtain auxiliary positioning sphere point clouds corresponding to each target joint.
[0034] Among them, the auxiliary positioning sphere point cloud is the point cloud data of the auxiliary positioning sphere; the above-mentioned preset spherical instance segmentation model is used to segment the auxiliary positioning sphere in the posture image, and obtain the auxiliary positioning sphere point cloud at each target joint. In the specific implementation, the spherical instance segmentation model may include a spherical target detection submodel and a spherical instance segmentation submodel; the spherical target detection submodel is used to detect spherical targets in the image, and can be specifically constructed based on R-CNN, Fast R-CNN, FasterR-CNN, SSD, YOLOv3, M2Det and other models, and the spherical instance segmentation submodel further points out the specific position of the spherical target in the image. For example, in some embodiments, the basic model of the spherical instance segmentation model can be a Mask R-CNN model that includes a Faster R-CNN network for target detection and a fully connected segmentation network.
[0035] In a specific implementation, the spherical instance segmentation model can be directly used to perform three-dimensional instance segmentation on the posture image including depth information, and obtain auxiliary positioning spherical point clouds corresponding to each target joint.
[0036] Since the accuracy of three-dimensional instance segmentation is low, in order to improve the accuracy of the auxiliary positioning sphere point cloud corresponding to the obtained auxiliary positioning sphere, in one embodiment, the posture image includes a two-dimensional texture image and a three-dimensional depth image, and the above step S102 may further specifically include the following steps:
[0037] The two-dimensional texture image is spherically segmented using a preset spherical instance segmentation model to obtain the spherical region position information corresponding to each target joint;
[0038] According to the position information of each spherical area, the auxiliary positioning spherical point cloud corresponding to each target joint is determined in the three-dimensional depth image.
[0039] Among them, the above-mentioned two-dimensional texture image and three-dimensional depth image both represent the same imaging content, but the two-dimensional texture image represents a two-dimensional scene and does not have depth information, while the three-dimensional depth image further includes depth information.
[0040] The above-mentioned spherical region position information can indicate the specific position of the auxiliary positioning sphere in a two-dimensional angle. For example, the spherical region position information can indicate the auxiliary positioning sphere in the form of a mask. Specifically, the spherical instance segmentation model performs spherical segmentation on the two-dimensional texture image and outputs a mask map with the same size as the two-dimensional texture image. In the mask map, the value of the area where the auxiliary positioning sphere is located is 1, and the value of the area where the non-auxiliary positioning sphere is located is 0.
[0041] In this embodiment, after determining the spherical area position information corresponding to each target joint in the two-dimensional texture image, the corresponding position of the three-dimensional depth image (for example, the area with a mask of 1) can be segmented according to the spherical area position information to obtain the auxiliary positioning spherical point cloud corresponding to each target joint.
[0042] In this embodiment, a spherical instance segmentation model is used to perform spherical segmentation on the two-dimensional texture image to determine the specific position information of the auxiliary positioning sphere in two dimensions, and then the auxiliary positioning sphere point cloud is determined in the three-dimensional depth image based on the specific position information of the auxiliary positioning sphere in this dimension, rather than directly identifying and segmenting the auxiliary positioning sphere on the three-dimensional depth image. This reduces the amount of calculation in the process of acquiring the auxiliary positioning sphere point cloud (compared with achieving three-dimensional segmentation) and improves the acquisition speed of the auxiliary positioning sphere point cloud and the accuracy of the acquired auxiliary positioning sphere point cloud.
[0043] In order to obtain sufficient training data to improve the generalization ability and segmentation performance of the spherical instance segmentation model, in one embodiment, Figure 2 As shown, the sphere instance segmentation model can be determined through the following steps S201 to S204.
[0044] Step S201: randomly generate a simulation scene and a virtual character in the simulation scene.
[0045] During specific implementation, simulation scenes and virtual characters may be randomly generated in a simulation platform, and the simulation platform may be a Unity3d or UE platform.
[0046] Step S202: adding spherical objects of the same size to the joints of the virtual character to obtain a posture diagram of the virtual character with the spherical objects.
[0047] Specifically, in the simulation platform, spherical objects of the same size are added to the joints of the virtual character in the generated simulation scene, and after rendering, a posture diagram of the virtual character with the spherical objects in the simulation scene can be obtained.
[0048] In this embodiment, by repeatedly executing the above steps S201 and S202, a plurality of different virtual character posture images can be obtained.
[0049] Step S203: Obtain a preset instance segmentation basic model.
[0050] In this embodiment, the instance segmentation basic model is an instance segmentation model to be trained, and the instance segmentation model to be trained may be composed of a target detection model and a segmentation network, and the target detection model may be a model such as R-CNN, Fast R-CNN, Faster R-CNN, SSD, YOLOv3, M2Det, etc. For example, in one embodiment, the instance segmentation basic model may be a Mask R-CNN model including Faster R-CNN and a fully connected segmentation network.
[0051] Step S204: Use a plurality of different virtual character posture images to perform spherical region segmentation training on the instance segmentation basic model to obtain a spherical instance segmentation model.
[0052] In this embodiment, a plurality of different virtual character posture images are used as training data sets to perform segmentation training on the instance segmentation basic model. When the effect and performance of the instance segmentation basic model meet the preset requirements, a spherical instance segmentation model can be obtained.
[0053] Specifically, the virtual character posture graph is segmented using the instance segmentation basic model to obtain the segmentation result, and the correct label data corresponding to the virtual character posture graph is used to guide the parameter optimization of the instance segmentation basic model, thereby gradually improving the segmentation accuracy of the instance segmentation basic model, and then obtaining a spherical instance segmentation model that meets the requirements.
[0054] Since simulation data has the advantages of being easy to obtain and of various types, in this embodiment, a virtual character in a simulation scene is generated, and spherical objects are added to the joints of the virtual character. The obtained virtual character posture graph is used as a training data set to train the instance segmentation basic model, so that there is no need to obtain the training data set through real scenes, thereby ensuring the instance segmentation effect while saving manpower and time costs.
[0055] Step S103: for each auxiliary positioning sphere point cloud, a preset spherical fitting strategy is used to perform spherical fitting on the auxiliary positioning sphere point cloud to obtain sphere center data corresponding to each auxiliary positioning sphere point cloud.
[0056] The preset spherical fitting strategy is used to perform spherical fitting on the point cloud data of the auxiliary positioning sphere (auxiliary positioning sphere point cloud).
[0057] In this embodiment, for each auxiliary positioning sphere point cloud obtained by segmenting the posture image, a preset sphere fitting strategy is used to perform sphere fitting, and the center of the sphere obtained by fitting is used as the center data corresponding to the auxiliary positioning sphere point cloud.
[0058] Optionally, in some implementations, in order to improve the accuracy of spherical fitting, the auxiliary positioning sphere point cloud may be preprocessed including removing noise points before performing spherical fitting.
[0059] In some embodiments, the preset spherical fitting strategy can be to randomly select 4 points from the auxiliary positioning sphere point cloud, substitute the 4 points into the sphere equation, solve the values of the radius parameters and the sphere center coordinate parameters, and then obtain a preliminary fitted target sphere. On this basis, use the preset fitting result evaluation strategy to evaluate whether the target sphere conforms to the auxiliary positioning sphere point cloud. When the target sphere does not conform to the auxiliary positioning sphere point cloud, continue to select 4 points for iterative fitting until a conforming fitting result is determined.
[0060] In order to speed up the fitting speed of the sphere and reduce the time of determining the sphere that meets the auxiliary positioning sphere point cloud, in one embodiment, Figure 3 As shown, the above step S103 uses a preset spherical fitting strategy to perform spherical fitting on the auxiliary positioning sphere point cloud to obtain the sphere center data corresponding to each auxiliary positioning sphere point cloud, which can specifically include the following steps S301 to S305.
[0061] Step S301, obtaining normal vectors corresponding to each point in the auxiliary positioning sphere point cloud.
[0062] In this embodiment, the auxiliary positioning sphere point cloud includes multiple points, and a corresponding normal vector is obtained for each point. Specifically, in the process of obtaining a normal vector corresponding to a point, the normal vector corresponding to the plane where the point and the adjacent points are located can be obtained. In a specific implementation, the adjacent points of the point can be the nearest neighbor points, and can further be the adjacent points centered on the point.
[0063] Step S302: randomly select two target points from the auxiliary positioning sphere point cloud, and for each target point, construct a straight line passing through the target point and with a direction corresponding to the normal vector of the target point, to obtain a first target straight line and a second target straight line.
[0064] In this embodiment, the two selected target points are the first target point and the second target point, on this basis, a first target straight line corresponding to the first target point and a second target straight line corresponding to the second target point are respectively constructed; wherein the first target straight line passes through the first target point, and the direction vector of the first target straight line is the normal vector corresponding to the first target point; the second target straight line passes through the second target point, and the direction vector of the second target straight line is the normal vector corresponding to the second target point.
[0065] Ideally, the auxiliary positioning sphere point cloud is an ideal spherical point cloud data, and the normal vector direction of the point on the sphere will pass through the center of the sphere. Therefore, the straight line passing through the point on the sphere and with the normal vector of the point in the direction will pass through the center of the sphere. Based on this, the present application constructs two straight lines passing through the point on the sphere and with the normal vector of the point in the direction, namely the first target straight line and the second target straight line.
[0066] Step S303: Acquire a target intersection point between the first target straight line and the second target straight line, and an average distance between the target intersection point and the two target points.
[0067] The target intersection point is the intersection point of the first target straight line and the second target straight line; the average distance may be the average of the distances between the target intersection point and the first target point and the second target point, respectively.
[0068] In this embodiment, since ideally the first target straight line and the second target straight line both pass through the center of the same sphere, the intersection of the first target straight line and the second target straight line is obtained. Since the distance between the center of the sphere and a point on the sphere is the radius of the sphere, the average of the distances between the intersection and the first target point and the second target point is obtained.
[0069] The present application ingeniously constructs a theoretical straight line equation passing through the center of the sphere based on two points in the auxiliary positioning sphere point cloud and the corresponding normal vectors, and then uses the intersection of the straight lines to solve the center of the target sphere, and uses the distance between the intersection and the two target points to determine the radius of the target sphere. Compared with the existing spherical fitting method, which randomly selects 4 points and uses a general formula to solve the target sphere, the present application improves the scientific nature of spherical fitting, and is conducive to accelerating the convergence speed in the spherical fitting solution process, thereby improving the speed of spherical fitting.
[0070] Step S304: Based on a preset fitting result evaluation strategy, determine whether the target spherical surface with the target intersection point as the sphere center and the average distance as the radius conforms to the auxiliary positioning sphere point cloud.
[0071] In this embodiment, the sphere determined by taking the target intersection point as the sphere center and the average distance as the radius is the target sphere, and the above preset fitting result evaluation strategy is used to determine whether the target sphere conforms to the auxiliary positioning sphere point cloud. In this embodiment, since the auxiliary positioning sphere point cloud actually obtained is not an ideal spherical point cloud data, the points in the auxiliary positioning sphere point cloud are likely not points on the standard sphere, and therefore it is necessary to determine whether the target sphere conforms to the auxiliary positioning sphere point cloud based on the preset fitting result evaluation strategy.
[0072] Specifically, in one embodiment, Figure 4 As shown, the above step S304 may include the following steps S401 to S405.
[0073] Step S401: Obtain a first distance between each non-target point except the target point in the auxiliary positioning sphere point cloud and the target sphere.
[0074] Among them, the non-target point is a point in the auxiliary positioning sphere point cloud that is not a target point, and can be all the remaining points in the auxiliary positioning sphere point cloud except the target point. In this embodiment, the distance between each non-target point and the target sphere is called the first distance. In specific implementation, the first distance can be determined by calculating the distance between the non-target point and the center of the target sphere.
[0075] Step S402: determining qualified non-target points from among the non-target points based on the first distance and a preset distance threshold.
[0076] Specifically, for each non-target point, if the first distance corresponding to the non-target point is less than a preset distance threshold, the non-target point can be determined as a qualified non-target point. The preset distance threshold can be determined according to actual conditions.
[0077] Step S403, determine whether the ratio of the total number of qualified non-target points to the total number of non-target points is greater than a preset ratio threshold, if so, execute the following step S404, if not, execute the following step S405.
[0078] Among them, the above-mentioned preset ratio threshold may refer to the proportion of qualified non-target points in the auxiliary positioning sphere point cloud when the target sphere conforms to the auxiliary positioning sphere point cloud. The specific value of the preset ratio threshold may be determined according to actual conditions. It can be understood that the higher the preset ratio threshold, the higher the degree of fit between the target sphere and the auxiliary positioning sphere point cloud required to be fitted.
[0079] Step S404: Determine whether the target sphere conforms to the auxiliary positioning sphere point cloud.
[0080] In this embodiment, if the ratio of the total number of qualified non-target points to the total number of non-target points is greater than a preset ratio threshold, it can be determined that the target sphere meets the auxiliary positioning sphere point cloud.
[0081] Step S405: Determine whether the target sphere does not conform to the auxiliary positioning sphere point cloud.
[0082] In this embodiment, if the ratio of the total number of qualified non-target points to the total number of non-target points is not greater than a preset ratio threshold, it can be determined that the target sphere does not conform to the auxiliary positioning sphere point cloud.
[0083] In this embodiment, after the target sphere is determined using two target points and corresponding normal vectors, whether the target sphere is in compliance is judged based on non-target points in the auxiliary positioning sphere point cloud to ensure the accuracy of spherical fitting.
[0084] Step S305: If it is determined that the target spherical surface conforms to the auxiliary positioning sphere point cloud, the center of the target spherical surface is used as the center data corresponding to the auxiliary positioning sphere point cloud.
[0085] In this embodiment, based on the preset fitting result evaluation strategy, it is determined that the target sphere conforms to the auxiliary positioning sphere point cloud, and the center of the target sphere, that is, the target intersection point determined in the above step S303, can be used as the center data corresponding to the auxiliary positioning sphere point cloud.
[0086] In one embodiment, after the above step S304, if it is determined that the target sphere does not conform to the auxiliary positioning sphere point cloud, two points can be randomly selected from the auxiliary positioning sphere point cloud to update the target point, and return to execute the above step S302 to construct a straight line passing through the target point and with the direction of the normal vector corresponding to the target point for each target point, to obtain the first target straight line and the second target straight line, as well as the steps subsequent to step S302, until the target sphere conforms to the auxiliary positioning sphere point cloud.
[0087] In this embodiment, if the target sphere determined based on the two target points and the corresponding normal vectors does not conform to the auxiliary positioning sphere point cloud, two points are reselected in the auxiliary positioning sphere point cloud as new target points, and the above steps of determining the target sphere based on the two target points and the corresponding normal vectors and determining whether the target sphere conforms are performed again until the target sphere conforms to the auxiliary positioning sphere point cloud.
[0088] Since the qualified non-target points conform to the target sphere, in one embodiment, after the above step S304, if it is determined that the target sphere does not conform to the auxiliary positioning sphere point cloud, the qualified non-target points and the target points can also be added to the target set, and two points in the target set are randomly selected to update the target points, and the above step S302 is returned to execute, for each target point, a straight line passing through the target point and with a direction corresponding to the normal vector of the target point is constructed to obtain the first target straight line and the second target straight line, as well as the steps subsequent to step S302, until the target sphere conforms to the auxiliary positioning sphere point cloud.
[0089] Among them, the target set includes all qualified non-target points and target points in the previous iteration process. In this embodiment, when the target sphere determined based on the two target points and the corresponding normal vectors does not conform to the auxiliary positioning sphere point cloud, the qualified non-target points and the target point are added to the target set, and then two points are randomly selected from the target set as new target points, and the above steps of determining the target sphere based on the two target points and the corresponding normal vectors and determining whether the target sphere conforms are performed again until the target sphere conforms to the auxiliary positioning sphere point cloud.
[0090] Step S104: determine the sphere center data corresponding to each target joint as the position data of each target joint of the real human body in the target posture, and drive the virtual digital human model based on the position data of each target joint.
[0091] Specifically, the center point data corresponding to a target joint is the center point of the target sphere fitted by the auxiliary positioning sphere point cloud corresponding to the target joint, and the auxiliary positioning sphere point cloud corresponding to the target joint is the point cloud data of the auxiliary positioning sphere set at the target joint. Therefore, the center point data corresponding to each target joint can be determined as the position data of each target joint of the real human body in the target posture.
[0092] The position data of each target joint can indicate the relative position of the target joint, but is not limited to the actual position data of the target joint. It is understandable that after the position data of each target joint is offset as a whole, the actual position data of each target joint of the real human body in the target posture can be obtained.
[0093] In this embodiment, after obtaining the position data of each target joint of the real human body in the target posture, the relative rotation amount between the target joints can be determined based on the position data of each target joint, and then the virtual digital human model is driven based on the relative rotation amount between the target joints.
[0094] In summary, the present application sets auxiliary positioning spheres of the same size at the target joints of the real human body to obtain the posture image of the real human body in the target posture, and then uses the preset spherical instance segmentation model to segment the auxiliary positioning sphere point cloud at each target joint in the posture image, and obtains the sphere center data corresponding to the auxiliary positioning sphere point cloud by spherical fitting of the auxiliary positioning sphere point cloud, and then determines the sphere center data corresponding to each target joint as the position data of each target joint of the real human body in the target posture, and drives the virtual digital human model based on the position data of each target joint. The present application sets auxiliary positioning spheres at the joints of the real human body, so that the recognition of the position of the human body joint is converted into the recognition of the sphere center of the auxiliary positioning sphere, thereby realizing the recognition of the sphere center of the auxiliary positioning sphere by adopting spherical instance segmentation and point cloud spherical fitting steps, and uses the recognition result as the position of the joint, and then drives the virtual digital human. Compared with the prior art, on the one hand, the present application does not require the real human body to wear expensive motion capture equipment, but only needs to set an auxiliary positioning sphere at the target joint, thereby reducing the driving cost of the virtual digital human. On the other hand, the present application uses spherical fitting technology to perform spherical fitting on the auxiliary positioning sphere point cloud, thereby improving the accuracy of spherical center fitting and the accuracy of target joint position determination, thereby improving the accuracy of the virtual digital human driving process that depends on the position of the target joint.
[0095] The present application also provides a driving device for a virtual digital human, which is used to execute the steps in any of the embodiments of the aforementioned driving method for a virtual digital human. Figure 5 , Figure 5 The schematic diagram of the structure of a driving device 500 of a virtual digital human provided in an embodiment of the present application is shown. The driving device 500 of the virtual digital human specifically includes an acquisition unit 501, a segmentation unit 502, a spherical fitting unit 503 and a determination unit 504, wherein:
[0096] An acquisition unit 501 is used to acquire a posture image of a real human body in a target posture, wherein multiple target joints of the real human body are all fixed with auxiliary positioning spheres of the same size;
[0097] A segmentation unit 502 is used to segment the auxiliary positioning sphere in the posture image using a preset spherical instance segmentation model to obtain auxiliary positioning sphere point clouds corresponding to each target joint;
[0098] The spherical fitting unit 503 is used to perform spherical fitting on each of the auxiliary positioning spherical point clouds using a preset spherical fitting strategy to obtain spherical center data corresponding to each of the auxiliary positioning spherical point clouds;
[0099] The determination unit 504 is used to determine the sphere center data corresponding to each target joint as the position data of each target joint of the real human body in the target posture, and drive the virtual digital human model based on the position data of each target joint.
[0100] In some embodiments of the present application, the spherical fitting unit 503 can be specifically used to obtain the normal vectors corresponding to each point in the auxiliary positioning sphere point cloud; randomly select two target points from the auxiliary positioning sphere point cloud, and for each target point, construct a straight line passing through the target point and with the direction of the normal vector corresponding to the target point to obtain a first target straight line and a second target straight line; obtain the target intersection point between the first target straight line and the second target straight line, and the average distance between the target intersection point and the two target points; based on a preset fitting result evaluation strategy, determine whether the target spherical surface with the target intersection point as the center and the average distance as the radius conforms to the auxiliary positioning sphere point cloud; if it is determined that the target spherical surface conforms to the auxiliary positioning sphere point cloud, the center of the target spherical surface is used as the center data corresponding to the auxiliary positioning sphere point cloud.
[0101] In some embodiments of the present application, the spherical fitting unit 503 can also be used to, if the target sphere does not conform to the auxiliary positioning sphere point cloud, randomly select two points from the auxiliary positioning sphere point cloud to update the target point, and return to execute the step of constructing a straight line passing through the target point and with a direction corresponding to the normal vector of the target point for each target point, to obtain a first target straight line and a second target straight line, until the target sphere conforms to the auxiliary positioning sphere point cloud.
[0102] In some embodiments of the present application, the spherical fitting unit 503 can be specifically used to obtain a first distance between each non-target point other than the target point in the auxiliary positioning spherical point cloud and the target spherical surface; determine a qualified non-target point among the non-target points based on the first distance and a preset distance threshold; determine whether the ratio of the total number of the qualified non-target points to the total number of the non-target points is greater than a preset ratio threshold; if the ratio is greater than the preset ratio threshold, determine that the target spherical surface conforms to the auxiliary positioning spherical point cloud; if the ratio is not greater than the preset ratio threshold, determine that the target spherical surface does not conform to the auxiliary positioning spherical point cloud.
[0103] In some embodiments of the present application, the spherical fitting unit 503 can also be used to, if the target sphere does not conform to the auxiliary positioning sphere point cloud, add the qualified non-target point and the target point to the target set; randomly select two points in the target set to update the target point, and return to execute the steps of constructing a straight line passing through the target point and with the direction of the normal vector corresponding to the target point for each target point, to obtain the first target straight line and the second target straight line, until the target sphere conforms to the auxiliary positioning sphere point cloud.
[0104] In some embodiments of the present application, the posture image includes a two-dimensional texture image and a three-dimensional depth image; the segmentation unit 502 can be specifically used to perform spherical segmentation on the two-dimensional texture image using a preset spherical instance segmentation model to obtain spherical area position information corresponding to each of the target joints; and determine the auxiliary positioning spherical point cloud corresponding to each of the target joints in the three-dimensional depth image based on the spherical area position information.
[0105] In some embodiments of the present application, the driving device 500 of the virtual digital human may further include a model building unit, which is used to randomly generate a simulation scene and a virtual character in the simulation scene; add spherical objects of the same size to the joints of the virtual character to obtain a virtual character posture diagram with the spherical objects; obtain a preset instance segmentation basic model; and use multiple different virtual character posture diagrams to perform spherical area segmentation training on the instance segmentation basic model to obtain the spherical instance segmentation model.
[0106] It should be noted that those skilled in the art can clearly understand that the specific implementation process of the driving device and each unit of the above-mentioned virtual digital human can refer to the corresponding description in the aforementioned method embodiment, and for the convenience and brevity of description, it will not be repeated here.
[0107] The driving device of the virtual digital human can be implemented in the form of a computer program. The computer program can be used in Figure 6 Run on the computer device shown.
[0108] See also Figure 6 , Figure 6 600 is a schematic block diagram of a computer device provided in an embodiment of the present application. The computer device 600 may be a smart phone, tablet computer, personal computer, server or other device used to control the robot arm. Figure 6 The computer device 600 includes a processor 602 , a memory and a network interface 605 connected via a device bus 601 , wherein the memory may include a storage medium 603 and an internal memory 604 .
[0109] The storage medium 603 can store an operating system 6031 and a computer program 6032. When the computer program 6032 is executed, the processor 602 can execute a method for driving a virtual digital human.
[0110] The processor 602 is used to provide computing and control capabilities and support the operation of the entire computer device 600.
[0111] The internal memory 604 provides an environment for the operation of the computer program 6032 in the storage medium 603. When the computer program 6032 is executed by the processor 602, the processor 602 can execute the driving method of the virtual digital human.
[0112] The network interface 605 is used for network communication, such as providing data information transmission, etc. Those skilled in the art will understand that Figure 6 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present application, and does not constitute a limitation on the computer device 600 to which the solution of the present application is applied. The specific computer device 600 may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0113] The processor 602 is used to run the computer program 6032 stored in the memory to implement the driving method of the virtual digital human disclosed in the embodiment of the present application.
[0114] Those skilled in the art will understand that Figure 6The embodiments of the computer device shown in the figure do not constitute a limitation on the specific composition of the computer device. In other embodiments, the computer device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. For example, in some embodiments, the computer device may only include a memory and a processor. In such embodiments, the structure and function of the memory and the processor are the same as those of the embodiment of the present invention. Figure 6 The embodiments shown are consistent and will not be described again here.
[0115] It should be understood that in the embodiment of the present application, the processor 602 may be a central processing unit (CPU), and the processor 602 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0116] In another embodiment of the present application, a computer-readable storage medium is provided. The computer-readable storage medium may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the driving method of the virtual digital human disclosed in the embodiment of the present application is implemented.
[0117] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the above-described equipment, devices and units can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. Those of ordinary skill in the art can appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to the function. Whether these functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
[0118] In the several embodiments provided in the present application, it should be understood that the disclosed equipment, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. Units with the same function may also be combined into one unit. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices or units, or may be electrical, mechanical or other forms of connection.
[0119] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present application.
[0120] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0121] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a background server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), disk or CD-ROM and other media that can store program codes.
[0122] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A method for driving a virtual digital human, characterized in that: include: Acquire a posture image of a real human body in a target posture, wherein multiple target joints of the real human body are all fixed with auxiliary positioning spheres of the same size; Segmenting the auxiliary positioning sphere in the posture image using a preset spherical instance segmentation model to obtain auxiliary positioning sphere point clouds corresponding to each target joint; For each of the auxiliary positioning sphere point clouds, a preset spherical fitting strategy is used to perform spherical fitting on the auxiliary positioning sphere point cloud to obtain sphere center data corresponding to each of the auxiliary positioning sphere point clouds; Determine the sphere center data corresponding to each target joint as the position data of each target joint of the real human body in the target posture, and drive the virtual digital human model based on the position data of each target joint; Wherein, the driving of the virtual digital human model based on the position data of each target joint includes: Determine the relative rotation amount between each of the target joints based on the position data of each of the target joints; The virtual digital human model is driven according to the relative rotation amount between the target joints.
2. The method according to claim 1, characterized in that The method of performing spherical fitting on the auxiliary positioning spherical point cloud using a preset spherical fitting strategy to obtain spherical center data corresponding to each of the auxiliary positioning spherical point clouds includes: Obtaining normal vectors corresponding to each point in the auxiliary positioning sphere point cloud; Randomly select two target points from the auxiliary positioning sphere point cloud, and for each of the target points, construct a straight line passing through the target point and having a direction that is a normal vector corresponding to the target point, to obtain a first target straight line and a second target straight line; Acquire a target intersection point between the first target straight line and the second target straight line, and an average distance between the target intersection point and the two target points; Based on a preset fitting result evaluation strategy, determine whether a target spherical surface with the target intersection point as the sphere center and the average distance as the radius conforms to the auxiliary positioning sphere point cloud; If it is determined that the target spherical surface conforms to the auxiliary positioning sphere point cloud, the center of the target spherical surface is used as the center data corresponding to the auxiliary positioning sphere point cloud.
3. The method according to claim 2, characterized in that After judging whether the target spherical surface with the target intersection point as the sphere center and the average distance as the radius conforms to the auxiliary positioning sphere point cloud based on the preset fitting result evaluation strategy, the method further includes: If the target sphere does not conform to the auxiliary positioning sphere point cloud, two points are randomly selected from the auxiliary positioning sphere point cloud to update the target point, and the step of returning to execute, for each target point, constructing a straight line passing through the target point and with a direction corresponding to the normal vector of the target point to obtain the first target straight line and the second target straight line, until the target sphere conforms to the auxiliary positioning sphere point cloud.
4. The method according to claim 2, characterized in that: The method of judging whether the target spherical surface with the target intersection point as the sphere center and the average distance as the radius conforms to the auxiliary positioning spherical point cloud based on a preset fitting result evaluation strategy includes: Acquire a first distance between each non-target point other than the target point in the auxiliary positioning sphere point cloud and the target spherical surface; Determining a qualified non-target point among the non-target points based on the first distance and a preset distance threshold; Determine whether the ratio of the total number of the qualified non-target points to the total number of the non-target points is greater than a preset ratio threshold; If the ratio is greater than a preset ratio threshold, it is determined that the target spherical surface conforms to the auxiliary positioning spherical point cloud; If the ratio is not greater than a preset ratio threshold, it is determined that the target spherical surface does not conform to the auxiliary positioning spherical point cloud.
5. The method according to claim 4, characterized in that After judging whether the target spherical surface with the target intersection point as the sphere center and the average distance as the radius conforms to the auxiliary positioning sphere point cloud based on the preset fitting result evaluation strategy, the method further includes: If the target sphere does not conform to the auxiliary positioning sphere point cloud, adding the qualified non-target point and the target point to the target set; Randomly select two points in the target set to update the target point, and return to execute the step of constructing a straight line passing through the target point and with a direction corresponding to the normal vector of the target point for each target point to obtain a first target straight line and a second target straight line until the target sphere conforms to the auxiliary positioning sphere point cloud.
6. The method according to any one of claims 1 to 5, characterized in that: The posture image includes a two-dimensional texture image and a three-dimensional depth image; the method of segmenting the auxiliary positioning sphere in the posture image using a preset spherical instance segmentation model to obtain auxiliary positioning sphere point clouds corresponding to each target joint includes: Using a preset spherical instance segmentation model to perform spherical segmentation on the two-dimensional texture image to obtain spherical region position information corresponding to each target joint; The auxiliary positioning spherical point cloud corresponding to each of the target joints is determined in the three-dimensional depth image according to the position information of each of the spherical regions.
7. The method according to any one of claims 1 to 5, characterized in that: The method for determining the spherical instance segmentation model is: Randomly generate simulation scenes and virtual characters in the simulation scenes; Adding spherical objects of the same size to the joints of the virtual character to obtain a posture diagram of the virtual character with the spherical objects; Get the preset instance segmentation base model; The instance segmentation basic model is trained for spherical region segmentation using a plurality of different virtual character posture images to obtain the spherical instance segmentation model.
8. A driving device for a virtual digital human, characterized in that: include: An acquisition unit, used for acquiring a posture image of a real human body in a target posture, wherein multiple target joints of the real human body are all fixed with auxiliary positioning spheres of the same size; a segmentation unit, configured to segment the auxiliary positioning sphere in the posture image using a preset spherical instance segmentation model to obtain auxiliary positioning sphere point clouds corresponding to each target joint; A spherical fitting unit, used for performing spherical fitting on each of the auxiliary positioning spherical point clouds using a preset spherical fitting strategy to obtain spherical center data corresponding to each of the auxiliary positioning spherical point clouds; A determination unit, configured to determine the sphere center data corresponding to each of the target joints as the position data of each of the target joints of the real human body in the target posture, and drive the virtual digital human model based on the position data of each of the target joints; Wherein, when executing the step of driving the virtual digital human model based on the position data of each target joint, the determining unit is specifically used to: Determine the relative rotation amount between each of the target joints based on the position data of each of the target joints; The virtual digital human model is driven according to the relative rotation amount between the target joints.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
