Depth determination method and device, electronic equipment and storage medium

By obtaining the joint size, texture clarity and movement speed information in the target image, combined with the depth determination model, the problem of camera calibration accuracy affecting the accuracy of depth information is solved, the accuracy of depth estimation is improved, and it is suitable for complex movements of virtual humans. Wait for the scene.

CN118537385APending Publication Date: 2024-08-23MIGU CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410676258.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-29
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

When using the parallax information of two cameras to estimate the depth of an image in the prior art, it is easy to cause inaccurate depth information due to calibration accuracy issues, and inaccurate parallax measurement affects the accuracy of depth estimation.

Method used

By obtaining the joint size information, texture clarity information and joint movement speed information in the target image, combined with the pre-trained depth determination model, the corresponding depth information is determined, and the joint size, texture clarity and movement speed are used to jointly calculate the depth and improve the depth. The accuracy of the estimate.

Benefits of technology

It improves the accuracy of depth information, reduces the impact of camera calibration errors on depth estimation, enhances the reliability of image depth information, and is suitable for scenes such as virtual human action reenactment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118537385A
    Figure CN118537385A
Patent Text Reader

Abstract

The invention provides a depth determination method and device, electronic equipment and a storage medium, and relates to the technical field of computers. The depth determination method comprises the following steps: acquiring a target image shot by a camera; and determining corresponding depth information according to the joint size information, the joint texture definition information and the joint movement speed information in the target image. By implementing the technical scheme of the invention, the accuracy of depth information determination can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a depth determination method, device, electronic device and storage medium. Background Art

[0002] In the prior art, two cameras are used to simultaneously shoot the same scene at different angles, and the parallax information of the two cameras is used to estimate the depth information of the human body in the image. The disadvantage is that the depth information estimation is easily inaccurate due to the precise calibration of the images shot by the two cameras. Summary of the invention

[0003] In order to solve at least one technical problem in the prior art, the present disclosure provides a depth determination method, device, electronic device and storage medium.

[0004] According to a first aspect of the present disclosure, a depth determination method includes:

[0005] Get the target image captured by the camera;

[0006] Corresponding depth information is determined according to the joint size information, joint texture clarity information and joint movement speed information in the target image.

[0007] Optionally, before determining the corresponding depth information according to the joint size information, the joint texture clarity information and the joint movement speed information in the target image, the method further includes:

[0008] Detecting human body joints in the target image;

[0009] Calculating the size of the human body joint in the target image to obtain joint size information in the target image;

[0010] and / or,

[0011] Extracting texture features of the region where the joint is located in the target image;

[0012] Calculating the mean value, variance or covariance of the texture feature to obtain joint texture clarity information in the target image;

[0013] and / or,

[0014] Detecting joint movement positions of the target image in adjacent frames;

[0015] The joint movement speed is calculated according to the joint movement position to obtain the joint movement speed information in the target image.

[0016] Optionally, determining corresponding depth information according to joint size information, joint texture clarity information, and joint movement speed information in the target image includes:

[0017] Determine the depth information according to the joint size information, joint texture clarity information and joint movement speed information in the target image using a pre-trained first depth determination model; wherein the first depth determination model is obtained by training a first training sample, and the first training sample includes the joint size information, joint texture clarity information, joint movement speed information and corresponding depth labels in the first sample image;

[0018] or,

[0019] Determining corresponding depth information according to joint size information, joint texture clarity information and joint movement speed information in the target image includes:

[0020] Using a pre-trained second depth determination model, the depth information is determined according to the joint size information, joint texture clarity information, joint movement speed information and character attribute information in the target image; wherein the second depth determination model is obtained by training with a second training sample, and the second training sample includes the joint size information, joint texture clarity information, joint movement speed information, character attribute information and corresponding depth labels in the second sample image, and the character attribute information includes age and / or gender.

[0021] Optionally, the first depth determination model is obtained by training a regression module using a first training sample, or the second depth determination model is obtained by training a regression model using a second training sample.

[0022] Optionally, determining corresponding depth information according to joint size information, joint texture clarity information, and joint movement speed information in the target image includes:

[0023] Determining a first depth according to the joint size information in the target image;

[0024] Determining a second depth according to the joint texture clarity information in the target image;

[0025] determining a third depth according to the joint movement speed information in the target image;

[0026] The depth information is determined according to the first depth, the second depth, and the third depth.

[0027] Optionally, determining the first depth according to the joint size information in the target image includes:

[0028] Determining the first depth according to the joint size information in the target image, the preset size information of the joint, and the focal length information of the camera;

[0029] and / or,

[0030] The determining the second depth according to the joint texture clarity information in the target image includes:

[0031] Determining the second depth based on joint texture clarity information in the target image using a pre-trained depth estimation model, wherein the depth estimation model is trained using joint texture clarity information and corresponding depth labels of a sample image;

[0032] and / or,

[0033] The determining the third depth according to the joint movement speed information in the target image includes:

[0034] Detecting human facial attributes in the target image;

[0035] Determine character attribute information according to the human facial attributes, the character attribute information including age and / or gender;

[0036] Determining the movement smoothness according to the movement speed information;

[0037] The third depth is determined according to the character attribute information and the action smoothness.

[0038] Optionally, determining the depth information according to the first depth, the second depth, and the third depth includes:

[0039] determining depth information according to a weighted sum of the first depth, the second depth, and the third depth;

[0040] or,

[0041] The depth information is determined according to the first depth, the second depth and the third depth using a pre-trained third depth determination model, wherein the third depth determination model is obtained by training a regression model based on a third sample, and the third sample includes a depth determined according to joint size information in a third sample image, a depth determined according to joint texture clarity information in the third sample image, a depth determined according to joint movement speed information in the third sample image, and a corresponding depth label.

[0042] According to a second aspect of the present disclosure, a depth determination device includes:

[0043] An image acquisition module acquires a target image captured by a camera;

[0044] The depth determination module determines corresponding depth information according to the joint size information, joint texture clarity information and joint movement speed information in the target image.

[0045] According to a third aspect of the present disclosure, an electronic device includes:

[0046] Processor; and

[0047] Memory for storing programs,

[0048] The program includes instructions, which, when executed by the processor, cause the processor to perform any of the methods described above.

[0049] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to execute any one of the methods described above.

[0050] According to a fifth aspect of the present disclosure, a computer program product includes a computer program, wherein when the computer program is executed by a processor of a computer, the computer is used to enable the computer to perform any one of the methods described above.

[0051] One or more technical solutions provided in the embodiments of the present application utilize three pieces of information, namely, joint size, joint texture clarity, and joint movement speed, to determine the depth information of the joint, thereby making the determined depth information more accurate. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] The accompanying drawings illustrate exemplary embodiments of the present disclosure and together with the description serve to explain the principles of the present disclosure. These drawings are included to provide a further understanding of the present disclosure and are incorporated in and constitute a part of this specification.

[0053] Figure 1 A schematic diagram showing an example system in which the methods described herein may be implemented according to an exemplary embodiment of the present disclosure;

[0054] Figure 2 A flow chart of a depth determination method according to an exemplary embodiment of the present disclosure is shown;

[0055] Figure 3 A sub-flow chart of a depth determination method according to an exemplary embodiment of the present disclosure is shown;

[0056] Figure 4 A schematic block diagram of a depth determination device according to an exemplary embodiment of the present disclosure is shown;

[0057] Figure 5A structural block diagram of an exemplary electronic device that can be used to implement the embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0058] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0059] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0060] The term "including" and its variations used in this document are open inclusions, that is, "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one other embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions of other terms will be given in the description below. It should be noted that the concepts of "first", "second", etc. mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0061] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0062] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0063] The prior art uses the parallax information of two cameras to estimate the depth of an object. The images captured by the two cameras need to be calibrated to ensure that they have the same focal length and viewing angle, which can easily lead to large errors. A smaller baseline distance may lead to inaccuracy in parallax measurement, thereby affecting the accuracy of depth estimation. When two cameras are used for depth estimation, the resolution of each camera must divide the image space equally, resulting in a relatively lower spatial resolution of each camera. The above reasons can easily lead to inaccurate depth estimation. In order to improve the accuracy of depth estimation, an embodiment of the present disclosure provides a depth determination method to improve the accuracy of depth estimation.

[0064] Figure 1 A schematic diagram of an example system in which the method described herein can be implemented according to an exemplary embodiment of the present disclosure is shown, the exemplary system includes a camera 101 and a processing device 102, the camera 101 captures an image and transmits the image to the processing device, and the processing device 102 executes the method described in this embodiment to recognize depth information based on the image captured by the camera 101, that is, the distance between the camera 101 and the joints of the human body 103.

[0065] Aspects of the present disclosure are described below with reference to the accompanying drawings.

[0066] See also Figure 2 , a depth determination method, comprising:

[0067] S201, obtaining a target image captured by a camera.

[0068] S202, determining corresponding depth information according to the joint size information, joint texture clarity information and joint movement speed information in the target image.

[0069] In this embodiment, the joint size information is the size information of the human joints. The human joint size value can be used as the joint size information, or other information that can characterize the size of the human joints can be used. The joint texture clarity information is the clarity information of the human joint texture. The joint texture refers to the texture pattern and characteristics of the joint surface in the scene, such as color, shape, and texture. It should be understood that in actual application scenarios, the human joints may be in clothing, so the joint texture clarity information can be the texture clarity of the clothing in the corresponding area. The joint movement speed information is the movement speed information of the human joints. The determined depth information is the depth information of the corresponding joints, and the depth information of multiple groups of joints can be used as human depth information.

[0070] In this embodiment, the depth information is determined by using the three aspects of information, namely, the size of the joint, the clarity of the joint texture, and the speed of the joint movement, as the basis for calculation, so that the determined depth information is more accurate. The principle is: when other conditions are the same, the closer the joint is to the camera, the larger the joint in the image, the closer the joint is to the camera, the clearer the joint texture in the image, and the closer the joint is to the camera, the faster the joint moves. Therefore, the size of the joint, the clarity of the joint texture, and the speed of the joint movement can all reflect the distance between the joint and the camera. Therefore, using the three aspects of information together as the basis for calculating the depth information of the human body can improve the accuracy of the depth information. At the same time, since the size of the joint, the clarity of the joint texture, and the speed of the joint movement are all information in the image, the target image can be used to quickly obtain the depth information, which has good application value in various scenarios such as virtual human action reproduction.

[0071] In some embodiments, a pre-trained depth determination model can be used to determine depth information based on joint size information, joint texture clarity information, and joint movement speed information. The depth determination model is trained based on the joint size information, joint texture clarity information, and joint movement speed information in the sample image and the corresponding depth labels. It should be understood that the joint size information, joint texture clarity information, and / or joint movement speed information can also be processed and then the depth information is determined based on the corresponding pre-trained depth determination model. For example, a preliminary first depth is calculated based on the joint size information, and the depth determination model is used to determine the depth information based on the first depth, joint texture clarity information, and joint movement speed information. It should be understood that when this solution is adopted, the depth determination model training method is also adaptively adjusted. The basic model of the depth determination model can be a regression model, a deep neural network model, etc.

[0072] In some embodiments, before executing step 202, human joints in the target image are detected; the sizes of the human joints in the target image are calculated to obtain joint size information in the target image. Specifically, a deep learning model for detecting joints can be used to detect human joints in the image and calculate the sizes of human joints in the target image. It should be understood that the present embodiment may also use other methods to obtain human joint size information in the target image. A deep learning model for detecting joints in a related field may be used to detect human joints in the target image, or a convolutional neural network model may be used to train using sample images and corresponding human joint area labels.

[0073] In some embodiments, before executing step 202, the texture features of the area where the joint is located in the target image are extracted; the mean value, variance or covariance of the texture features are calculated to obtain the joint texture clarity information in the target image. Specifically, the target image captured by the camera can be preprocessed, for example, the target image can be denoised and the contrast can be enhanced using image processing technology to improve the accuracy of subsequent texture analysis; the environmental texture features are extracted from the preprocessed target image using a gray level co-occurrence matrix (GLCM) texture feature extraction algorithm, and the mean value, variance or covariance of the environmental texture features are calculated as the joint texture clarity information in the target image. It should be understood that the present embodiment can also obtain the joint texture clarity information in the target image in other ways.

[0074] In some embodiments, before executing step 202, the joint movement position of the target image of the adjacent frame is detected; the joint movement speed is calculated according to the joint movement position to obtain the joint movement speed information in the target image. Specifically, the joint movement position of the target image of the adjacent frame can be determined according to the joint movement area of ​​the target image of the adjacent frame, the joint movement trajectory can be calculated according to the joint movement position, and the joint movement speed can be calculated according to the joint movement trajectory to obtain the joint movement speed information. It should be understood that the present embodiment can also adopt other methods to obtain the joint movement speed information in the target image.

[0075] In some embodiments, step S202 includes: using a pre-trained first depth determination model to determine depth information according to joint size information, joint texture clarity information, and joint movement speed information in the target image; wherein the first depth determination model is obtained by training a first training sample, and the first training sample includes joint size information, joint texture clarity information, joint movement speed information, and corresponding depth labels in the first sample image. Exemplarily, the first depth determination model is obtained by training a regression module with the first training sample; the first depth determination model can also be obtained by training a neural network model such as a convolutional neural network with the first training sample.

[0076] In some embodiments, step S202 includes: using a pre-trained second depth determination model to determine the human body depth information according to the human body joint size information, environmental texture clarity information, human body movement speed information and character attribute information in the target image; wherein the second depth estimation model is obtained by training the regression model with the second training sample, and the second training sample includes the human body joint size information, environmental texture clarity information, human body movement speed information, character attribute information and corresponding depth labels of the second sample image, and the character attribute information includes age and / or gender. Introducing character attribute information such as age and gender can help the model better understand the characteristics of the human body in the image, such as body shape and posture, which may affect the accuracy of depth estimation. In this embodiment, the introduction of character attribute information such as age and gender can help the model better understand the relationship between the human body movement speed and the human body depth in the image, and further improve the accuracy of the human body depth information. Exemplarily, the second depth determination model is obtained by training the regression module with the second training sample; the second depth determination model can also be obtained by training the neural network model with the second training sample.

[0077] Exemplarily, a linear and nonlinear combination regression model is used to establish a depth determination model, taking factors such as joint size information, joint texture clarity information, joint movement speed information and character attribute information as input, and outputting depth information. The depth information is the distance between the human body joints and the camera, and can also be used as the distance between the human body and the camera.

[0078] Here are the specific real-time steps:

[0079] Data preparation: Collect training data sets containing factors such as joint size information, joint texture clarity information, joint movement speed information, and character attribute information. Each sample should include input features (joint size information, joint texture clarity information, joint movement speed information, and character attribute information) and corresponding output (depth information).

[0080] Feature selection and extraction: According to task requirements and data analysis, select appropriate feature information, preprocess and extract the feature information, and use methods such as PCA (principle component analysis) and LBP (Local binary pattern) to extract feature vectors.

[0081] Data preprocessing: Normalize the input features using methods such as mean normalization and standardization to ensure that the features have the same scale and range.

[0082] Model training: Use a linear regression model to train the dataset and minimize the mean square error between the predicted output and the actual output. Use the gradient descent optimization algorithm to update the model parameters.

[0083] Model evaluation: Use the test data set to evaluate the performance of the model. Calculate the error between the predicted output and the actual output, using mean square error (MSE) and mean absolute error (MAE) to measure the accuracy of the model.

[0084] Model usage: Use the trained linear and nonlinear combination regression model to predict new input features. Take human joint size information, joint texture clarity information, joint movement speed information, and character attribute information as input, and calculate the depth distance between the human body and the camera through the depth determination model.

[0085] The formula of the model can be expressed as:

[0086] d=w1*f1+w2*f2+w3*(f3*f4)+b

[0087] Among them, d represents depth information, f1 and f2 represent the feature vectors of joint size information and joint texture clarity information, and w1 and w2 are the weights of the corresponding feature vectors. f3 and f4 represent the feature vectors of joint movement speed information and character attribute information respectively, and the correlation between them is captured by nonlinear combination (product). w3 represents the weight of this correlation, and b is the bias term of the model. A larger weight indicates that the feature has greater importance in predicting depth distance. The distribution of weights can be determined by optimizing parameters when training the model. During the training process, the model automatically adjusts the weights according to the training data to minimize the error between the predicted output and the actual output. The selection of the bias term is determined by optimizing the parameters during the training process. By adjusting the bias term, the prediction results of the model can be made closer to the actual output as a whole.

[0088] In some embodiments, see Figure 3 , step S202 includes:

[0089] S301, determining a first depth according to joint size information in a target image.

[0090] The principle of determining the depth (the distance between the human body joints and the camera) in step S301 is: in a picture, the closer the human body joints are to the camera, the larger the measurement result of the human body joints will be. Conversely, the farther away from the camera, the smaller the measurement result of the human body joints will be. By establishing a mapping relationship between the size of the human body joints and the distance from the camera, the first depth can be estimated in the actual scene by the size of the joints, that is, the distance between the joints in the current target image and the camera.

[0091] Specifically, step S301 can determine the first depth according to the joint size information in the target image, the preset size information of the joint, and the focal length information of the camera. Using the calculation principle of similar triangles, the first depth is determined according to the product of the target ratio and the focal length. Among them, the target ratio is the ratio of the preset size of the human joint to the joint size in the target image. For example, assuming that the distance from the camera to the human joint is D, the focal length of the camera is F, the size of the human joint in the image is S', and the preset size of the human joint in the model is S. The relationship between similar triangles can be used to determine the distance between the human body and the camera. The formula is calculated as follows:

[0092] D / F=S / S'

[0093] Through the above formula, the distance D from the camera to the human joint, ie, the first depth, can be calculated by using the known human joint size S' in the drawing, the preset size S of the human joint and the focal length F of the camera.

[0094] In a more specific embodiment, the first depth is determined according to the following steps:

[0095] Preset model: A predefined human body model that can be generated using statistical data and machine learning methods. The human body model can contain information such as human body proportions, joint positions, and joint sizes.

[0096] Joint detection: Use computer vision technology deep learning models to detect human joints in the target image. Joints can be detected based on joint features and posture determination methods. Joints may include: head, shoulders, elbows, wrists, hips, knees, ankles, etc.

[0097] Size measurement: Use image processing techniques to estimate the actual size of the joints in the target image. The actual size of the joints in the target image can be used to infer the actual size of the human body. For example, the size of other joints can be inferred using known height and proportion information.

[0098] Distance determination: After obtaining the actual size of the human joint, the relative distance between the joint and the camera, i.e., the first depth, can be determined based on the relative positional relationship between the human body model and the joint. This is calculated by comparing the actual size of the joint with the preset ratio in the model and combining the parameters of the camera (such as focal length, field of view, etc.).

[0099] S302: Determine a second depth according to joint texture clarity information in the target image.

[0100] The principle of determining the depth (the distance between the human body joints and the camera) in step S302 is as follows: in the real world, the texture of distant objects is usually fuzzy and fine, while the texture of nearby objects is clearer and more obvious. The model can infer the depth position of the object relative to the camera based on this texture change. For example, in a scene, the clothes worn by a person have obvious texture. When the person moves, the texture of the clothes farther away from the camera will become blurred, while the texture of the clothes closer to the camera will become clearer. By analyzing the changes in the texture of the clothes in the image, the depth position of the joints relative to the camera can be calculated.

[0101] Specifically, step S302 can use a pre-trained depth estimation model to determine the second depth based on the joint texture clarity information in the target image, wherein the depth estimation model is trained using the joint texture clarity information of the sample image and the corresponding depth label.

[0102] Exemplarily, an image data set with known distance information is used to train a depth estimation model. Specifically, supervised learning algorithms such as support vector machine (SVM) and random forest can be used to associate environmental texture clarity information with the actual distance to establish a depth estimation model. Among them, the environmental texture clarity information can be represented by a texture descriptor, which includes statistical features of human body texture features, such as average, equation, and defense difference. Use the trained depth estimation model to predict the second depth by inputting the texture descriptor.

[0103] S303: Determine a third depth according to the joint movement speed information in the target image.

[0104] The principle of determining the depth (the distance between the human body joint and the camera) in step S302 is: when the human body joint is far away from the camera, its movement speed in the image will slow down, and when it is close to the camera, its movement speed in the image will be relatively fast. The essential principle is that the movement of distant objects is smaller than that of the camera, while the movement of nearby objects is relatively large. In this way, the movement speed and direction can be calculated. Slower movement usually means moving away from the camera, while faster movement usually means moving closer to the camera. In addition to speed, acceleration can also provide information about the depth position, and the principle is the same as speed.

[0105] In step S302 , a correlation model between joint movement speed and depth may be used to determine the third depth according to the joint movement speed information.

[0106] In a more specific embodiment, the third depth is determined according to the following steps:

[0107] (1) Video acquisition: Use a monocular camera to capture videos and obtain a continuous sequence of image frames.

[0108] (2) Motion detection: The frame difference motion detection algorithm is used to perform motion detection on consecutive image frames to determine which areas contain moving human joints.

[0109] (3) Object segmentation: Use image segmentation algorithms such as threshold-based, edge-based, and region growing-based algorithms to perform object segmentation on the detected moving areas and separate each moving object from the image.

[0110] (4) Object trajectory extraction: The particle filter algorithm is used to extract the object trajectory of each moving object and track the movement trajectory of the object in the image sequence.

[0111] (5) Momentum calculation: Calculate the momentum of each moving object, such as the object’s speed, displacement, acceleration, etc., based on the object’s motion trajectory.

[0112] (6) Distance determination: By analyzing the amount of motion of a moving object, the relative distance between the human body and the camera can be inferred. Generally, objects far away have a smaller displacement relative to the camera, while objects close to the camera have a larger relative displacement. Based on a pre-established model, the amount of motion of the object is converted into a distance estimate, i.e., the third depth.

[0113] The following is a simplified calculation method:

[0114] (1) Calculation of pixel displacement: For a key point of the human body (such as a joint point), its position is detected in two adjacent target images as (x1, y1) and (x2, y2). The pixel displacement in the image coordinate system can be calculated by the following formula:

[0115] Δx=x2-x1

[0116] Δy=y2-y1

[0117] (2) Determine the distance: Based on the actual size of the human body and the camera parameters, the pixel displacement can be converted into the actual physical distance. Assuming that the actual size of the human body is D (unit: meter), the focal length of the camera is f (unit: pixel), and assuming that the object moves in the horizontal direction, the distance (third depth) can be determined using the following formula:

[0118] Distance = (D*f) / Δx

[0119] In some embodiments, step S202 can detect the facial attributes of the human body in the target image; determine the character attribute information according to the facial attributes of the human body, and the character attribute information includes age and / or gender; determine the action fluency according to the moving speed information; and determine the third depth according to the character attribute information and the action fluency. By analyzing the facial attributes of the character, the age and gender information is obtained. Usually, for the same standard action, the action of people within a certain age range is smoother, and the action is slower when it exceeds a certain range or is lower than a certain range. Secondly, there are certain differences between men and women in the execution of certain actions. For example, women's movements in ballet are smoother, while men's movements in street dance are smoother. These information parameters are used as reference information and combined with the association model for analysis, so that the depth information can be estimated more accurately.

[0120] Here are the simplified calculation steps:

[0121] (1) Facial attribute detection: Using computer vision technology, deep learning models for facial recognition and attribute classification, the faces in the image are detected and analyzed to obtain facial attribute information such as age and gender.

[0122] (2) Age and gender correlation analysis: By statistically analyzing the motor performance of people of different ages and genders in a known data set, a correlation model between age, gender, and movement fluency is established to determine the expected fluency level of people of different ages and genders when performing specific movements.

[0123] (3) Movement smoothness assessment: For the person being analyzed, the action is performed and image processing techniques, involving key point detection, posture estimation, motion trajectory analysis, etc., are used to evaluate and analyze the action and determine the movement smoothness using posture estimation and movement recognition algorithms.

[0124] (4) Association between fluency and distance estimation: Based on the established correlation model between age, gender, and motion fluency, the motion fluency is associated with the relative distance between the human body and the camera. Through statistical analysis and calibration, a mapping relationship between motion fluency and distance is established to achieve distance estimation.

[0125] The above steps are expressed as the following formula: d = f(a, g, m), where d represents the estimated distance, a represents the age in the facial attributes, g represents the gender in the facial attributes, and m represents the smoothness of the movement.

[0126] S304: Determine depth information according to the first depth, the second depth, and the third depth.

[0127] After determining the first depth, the second depth, and the third depth, the three human body depths are used to determine the final depth information to make the depth information more accurate. This step can be implemented using weighted summation, a pre-trained third depth determination model, and the like. For example, a third depth determination model can be constructed, and the pre-trained third depth determination model can be used to determine the depth information based on the first depth, the second depth, and the third depth. The third depth determination model is obtained based on a third sample training regression model, and the third sample includes a depth determined based on the joint size information in the third sample image, a depth determined based on the joint texture clarity information in the third sample image, a depth determined based on the joint movement speed information in the third sample image, and a corresponding depth label. For example, the human body depth information can be determined based on the weighted sum of the first depth, the second depth, and the third depth.

[0128] In the scene where a real person drives a virtual person, the above-mentioned depth determination method can be used to determine the depth information of multiple joints (which joints are used according to the requirements), and the depth information of multiple joints is used as the human body depth information. According to the human body depth and human body posture information, the virtual person is driven. Specifically, various Z-axis data can be calculated based on the human body depth information and human body posture information. The Z-axis data may include the distance of the body relative to the camera, the tilt angle of the head on the Z axis, the tilt angle of the body on the Z axis, the bending angle of the body on the Z axis, the angle information of the arm relative to the body, the angle information of the forearm relative to the arm, the angle information of the wrist relative to the forearm, the angle information of the finger relative to the palm, etc.; the three-dimensional posture of the human body is determined by using the Z-axis data, and the virtual person is driven according to the three-dimensional posture to ensure the degree of replication of the virtual person and the real person. Among them, a human body posture deep learning model that detects human body posture information can be used to detect the target image to obtain human body posture information. In order to obtain more specific posture information, the human posture deep learning model can also identify the position of each joint point and determine more specific human posture information based on the position of the joint points. For example, if the person in the image raises his arm, determine the direction of the raise, whether it is bent inward, the degree of bend, the direction of rotation of the arm, the direction of the wrist, and even the shape of the fingers. By detecting the position of the elbow, shoulder, wrist joint, and finger joints, the specific posture of the arm can be determined according to the position of the corresponding joint points.

[0129] In a more specific embodiment, the human body posture information in the target image is detected according to the following steps:

[0130] (1) Dataset and Model: First, we prepare a large-scale dataset containing human posture annotations and use this data to train a human posture deep learning model based on a convolutional neural network.

[0131] (2) Image preprocessing: The input person image is preprocessed, including operations such as image cropping, resizing, and normalization, so as to meet the input requirements of the pose estimation model.

[0132] (2) Posture estimation: The preprocessed image is input into the posture estimation model, and the joint position and posture information of the character are inferred by the model. The joints usually include the head, shoulders, elbows, wrists, hips, knees, ankles, etc.

[0133] (3) Posture analysis: Based on the position information of the joints, the specific posture information of the character can be further analyzed. For example, the direction of the arm can be determined by the position relationship between the shoulder and the elbow, the degree of arm bending can be determined by the position relationship between the elbow and the wrist, and the shape of the fingers can be determined by the position relationship between the wrist and the fingertips.

[0134] The following formula expresses the method of calculating the arm curvature in the above steps:

[0135] Assuming we have an arm length of L and the distance between the elbow and wrist is d, the degree of arm bending can be expressed by calculating the ratio of the distance between the elbow and wrist to the length of the arm. The following formula can be used to calculate the degree of arm bending:

[0136] Degree of curvature = d / L

[0137] The bending degree is a value between 0 and 1, indicating the relative bending degree of the arm. When the arm is fully extended, the bending degree is 0, and when the arm is fully bent, the bending degree is 1.

[0138] The exemplary embodiment of the present disclosure also provides an electronic device, comprising: at least one processor; and a memory connected to the at least one processor in communication. The memory stores a computer program that can be executed by the at least one processor, and the computer program is used to cause the electronic device to perform the method according to the embodiment of the present disclosure when executed by the at least one processor.

[0139] See also Figure 4 , a depth determination device, comprising:

[0140] An image acquisition module 401 acquires a target image captured by a camera;

[0141] The depth determination module 402 determines corresponding depth information according to the joint size information, joint texture clarity information and joint movement speed information in the target image.

[0142] In some embodiments, the device further comprises a first information acquisition module for detecting human joints in the target image; calculating the size of the human joints in the target image to obtain joint size information in the target image;

[0143] In some embodiments, the second information acquisition module is used to extract texture features of the area where the joint is located in the target image; calculate the average value, variance or covariance of the texture features to obtain joint texture clarity information in the target image.

[0144] In some embodiments, the third information acquisition module is used to detect the joint movement position of the target image of adjacent frames; calculate the joint movement speed according to the joint movement position to obtain the joint movement speed information in the target image.

[0145] In some embodiments, the depth determination module 402 is used to determine the corresponding depth information based on the joint size information, joint texture clarity information and joint movement speed information in the target image, and is specifically used to: use a pre-trained first depth determination model to determine the depth information based on the joint size information, joint texture clarity information and joint movement speed information in the target image; wherein the first depth determination model is obtained by training with a first training sample, and the first training sample includes the joint size information, joint texture clarity information, joint movement speed information and corresponding depth labels in the first sample image; the first depth determination model can be obtained by training the regression module with the first training sample.

[0146] In some embodiments, the depth determination module 402 is used to determine the corresponding depth information according to the joint size information, joint texture clarity information and joint movement speed information in the target image, and is specifically used to: determine the depth information according to the joint size information, joint texture clarity information, joint movement speed information and character attribute information in the target image using a pre-trained second depth determination model; wherein the second depth determination model is obtained by training a second training sample, and the second training sample includes the joint size information, joint texture clarity information, joint movement speed information, character attribute information and corresponding depth labels in the second sample image, and the character attribute information includes age and / or gender. The second depth determination model is obtained by training a regression model with the second training sample.

[0147] In some embodiments, the depth determination module 402 is used to determine the corresponding depth information based on the joint size information, joint texture clarity information and joint movement speed information in the target image, and is specifically used to: determine the first depth based on the joint size information in the target image; determine the second depth based on the joint texture clarity information in the target image; determine the third depth based on the joint movement speed information in the target image; determine the depth information based on the first depth, the second depth and the third depth.

[0148] In some embodiments, the depth determination module 402 is used to determine the first depth based on the joint size information in the target image, specifically to determine the first depth based on the joint size information in the target image, the preset size information of the joint and the focal length information of the camera.

[0149] In some embodiments, the depth determination module 402 is used to determine the second depth based on the joint texture clarity information in the target image, specifically for: using a pre-trained depth estimation model to determine the second depth based on the joint texture clarity information in the target image, wherein the depth estimation model is trained using the joint texture clarity information of the sample image and the corresponding depth labels.

[0150] In some embodiments, the depth determination module 402 is used to determine the third depth based on the joint movement speed information in the target image, and is specifically used to: detect human facial attributes in the target image; determine character attribute information based on the human facial attributes, the character attribute information including age and / or gender; determine the motion smoothness based on the movement speed information; determine the third depth based on the character attribute information and the motion smoothness.

[0151] In some embodiments, the depth determination module 402, when used to determine the depth information according to the first depth, the second depth and the third depth, is specifically used to: determine the depth information according to a weighted sum of the first depth, the second depth and the third depth.

[0152] In some embodiments, the depth determination module 402 is used to determine the depth information based on the first depth, the second depth and the third depth, and is specifically used to: use a pre-trained third depth determination model to determine the depth information based on the first depth, the second depth and the third depth, the third depth determination model is obtained based on a third sample training regression model, the third sample includes a depth determined based on the joint size information in the third sample image, a depth determined based on the joint texture clarity information in the third sample image, a depth determined based on the joint movement speed information in the third sample image, and a corresponding depth label.

[0153] Exemplary embodiments of the present disclosure also provide a non-transitory computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor of a computer, is used to cause the computer to execute the method according to an embodiment of the present disclosure.

[0154] The exemplary embodiments of the present disclosure also provide a computer program product, including a computer program, wherein the computer program is used to cause the computer to perform the method according to the embodiments of the present disclosure when executed by a processor of the computer.

[0155] refer to Figure 5, a block diagram of an electronic device 500 that can be used as a server or client of the present disclosure will now be described, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are only examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0156] The electronic device 500 includes a computing unit 501, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 502 or a computer program loaded from a storage unit 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the device can also be stored. The computing unit 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0157] A plurality of components in the electronic device 500 are connected to the I / O interface 505, including: an input unit 506, an output unit 507, a storage unit 508, and a communication unit 509. The input unit 506 may be any type of device capable of inputting information to the electronic device 500, and the input unit 506 may receive input digital or character information, and generate key signal inputs related to user settings and / or function control of the electronic device. The output unit 507 may be any type of device capable of presenting information, and may include, but is not limited to, a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 508 may include, but is not limited to, a disk, an optical disk. The communication unit 509 allows the electronic device 500 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and may include, but is not limited to, a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth™ device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.

[0158] The computing unit 501 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 501 performs the various methods and processes described above. For example, in some embodiments, the method of the embodiment of the present disclosure may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 508. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 500 via the ROM 502 and / or the communication unit 509. In some embodiments, the computing unit 501 may be configured to perform the method of the embodiment of the present disclosure in any other appropriate manner (e.g., by means of firmware).

[0159] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0160] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0161] As used in this disclosure, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and / or device (e.g., disk, optical disk, memory, programmable logic device) for providing machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.

[0162] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0163] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0164] A computer system may include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other.

Claims

1. A depth determination method, characterized in that: include: Get the target image captured by the camera; Corresponding depth information is determined according to the joint size information, joint texture clarity information and joint movement speed information in the target image.

2. The method according to claim 1, characterized in that Before determining the corresponding depth information according to the joint size information, the joint texture clarity information and the joint movement speed information in the target image, the method further comprises: Detecting human body joints in the target image; Calculating the size of the human body joint in the target image to obtain joint size information in the target image; and / or, Extracting texture features of the region where the joint is located in the target image; Calculating the mean value, variance or covariance of the texture feature to obtain joint texture clarity information in the target image; and / or, Detecting joint movement positions of the target image in adjacent frames; The joint movement speed is calculated according to the joint movement position to obtain the joint movement speed information in the target image.

3. The method according to claim 1, characterized in that Determining corresponding depth information according to joint size information, joint texture clarity information and joint movement speed information in the target image includes: Determine the depth information according to the joint size information, joint texture clarity information and joint movement speed information in the target image using a pre-trained first depth determination model; wherein the first depth determination model is obtained by training a first training sample, and the first training sample includes the joint size information, joint texture clarity information, joint movement speed information and corresponding depth labels in the first sample image; or, Determining corresponding depth information according to joint size information, joint texture clarity information and joint movement speed information in the target image includes: Using a pre-trained second depth determination model, the depth information is determined according to the joint size information, joint texture clarity information, joint movement speed information and character attribute information in the target image; wherein the second depth determination model is obtained by training with a second training sample, and the second training sample includes the joint size information, joint texture clarity information, joint movement speed information, character attribute information and corresponding depth labels in the second sample image, and the character attribute information includes age and / or gender.

4. The method according to claim 1, characterized in that: Determining corresponding depth information according to joint size information, joint texture clarity information and joint movement speed information in the target image includes: Determining a first depth according to the joint size information in the target image; Determining a second depth according to the joint texture clarity information in the target image; determining a third depth according to the joint movement speed information in the target image; The depth information is determined according to the first depth, the second depth, and the third depth.

5. The method according to claim 4, characterized in that The step of determining the first depth according to the joint size information in the target image includes: Determining the first depth according to the joint size information in the target image, the preset size information of the joint, and the focal length information of the camera; and / or, The determining the second depth according to the joint texture clarity information in the target image includes: Determining the second depth based on joint texture clarity information in the target image using a pre-trained depth estimation model, wherein the depth estimation model is trained using joint texture clarity information and corresponding depth labels of a sample image; and / or, The determining the third depth according to the joint movement speed information in the target image includes: Detecting human facial attributes in the target image; Determine character attribute information according to the human facial attributes, the character attribute information including age and / or gender; Determining the movement smoothness according to the movement speed information; The third depth is determined according to the character attribute information and the action smoothness.

6. The method according to claim 4, characterized in that The determining the depth information according to the first depth, the second depth, and the third depth includes: determining depth information according to a weighted sum of the first depth, the second depth, and the third depth; or, The depth information is determined according to the first depth, the second depth and the third depth using a pre-trained third depth determination model, wherein the third depth determination model is obtained by training a regression model based on a third sample, and the third sample includes a depth determined according to joint size information in a third sample image, a depth determined according to joint texture clarity information in the third sample image, a depth determined according to joint movement speed information in the third sample image, and a corresponding depth label.

7. A depth determination device, characterized in that: include: An image acquisition module acquires a target image captured by a camera; The depth determination module determines corresponding depth information according to the joint size information, joint texture clarity information and joint movement speed information in the target image.

8. An electronic device, characterized in that: include: processor; as well as Memory for storing programs, The program includes instructions, which, when executed by the processor, cause the processor to perform the method according to any one of claims 1 to 6.

9. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to make a computer execute the method according to any one of claims 1-6.

10. A computer program product, characterized in that The method comprises a computer program, wherein when the computer program is executed by a processor of a computer, the computer is used to cause the computer to perform the method according to any one of claims 1 to 6.