A human three-dimensional position calculation method and related device
By employing a lightweight keypoint detection and fusion method, YOLOv8 and RTMPose3D are used to extract 3D keypoints of the human body. This solves the robustness and efficiency problems of 3D position calculation of the human body in computational robots, and achieves high-precision, low-complexity 3D position estimation, which is suitable for embedded devices.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SUZHOU SHENTINGJI INTELLIGENT TECHNOLOGY CO LTD
- Filing Date
- 2026-04-17
- Publication Date
- 2026-07-14
AI Technical Summary
Existing technologies for calculating the three-dimensional position of the human body in computational robots suffer from poor robustness, high deployment difficulty, and low computational efficiency. In particular, it is difficult to achieve efficient and stable environmental perception and human-computer interaction on embedded devices with limited computing resources.
A lightweight keypoint detection and fusion method is adopted. After preprocessing the acquired scene image, YOLOv8 is used for human body recognition and segmentation. RTMPose3D is combined to extract 3D human body keypoints, generate a probability distribution matrix, and select bone segments with high confidence for weighted filtering and back projection to obtain the 3D position of the human body.
It improves the accuracy and stability of human 3D position estimation, enhances robustness in occlusion and boundary crossing scenarios, reduces the demand for hardware complexity and computing resources, and is suitable for real-time tracking and motion analysis scenarios.
Smart Images

Figure CN122391557A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer vision technology, and in particular to a method and related apparatus for calculating the three-dimensional position of the human body. Background Technology
[0002] In the field of embodied intelligent robots, robots often need not only to perceive their surroundings and identify different targets, but also to understand human behavior and intentions in order to achieve safe and efficient writing and interaction. For mobile robots, especially autonomous navigation robots, obtaining the three-dimensional spatial position of pedestrians in the surrounding area is a key prerequisite for achieving environmental perception, path planning, obstacle avoidance, and human-computer interaction.
[0003] Currently known methods for robots to perceive and calculate the three-dimensional position of the human body include the following:
[0004] A 3D position calculation method based on target detection and assumed human height: In existing technologies, a widely used method for calculating the 3D position of the human body is a geometric back-projection approach based on 2D target detection and an assumed human height. This method typically uses a target detection algorithm to obtain a 2D bounding box of the human body in an image, and combines this with intrinsic and extrinsic parameters from the camera. Under the premise of a pre-assumed human height, the 2D image information is back-projected into 3D space to estimate the spatial position of the human body relative to the camera. The advantages of this method are its simple calculation process, low implementation difficulty, and relatively fast computation speed, making it easy to deploy in embedded devices or real-time systems with limited computing power. However, this method has the following significant drawbacks:
[0005] 1) It relies heavily on the assumption of human height. There are large differences in height between different individuals, and the human body may be in non-upright postures such as walking, bending over, or squatting. The fixed height assumption deviates from the actual situation, which can easily lead to errors in three-dimensional position calculation.
[0006] 2) It is highly sensitive to the integrity of the detection box. When the human body is occluded, only partially enters the field of view, or exceeds the image boundary, the two-dimensional detection box cannot accurately reflect the real spatial range of the human body, thus affecting the accuracy of back projection calculation.
[0007] 3) Lacking information on human body structure and posture, relying solely on the circumscribed rectangle for spatial reasoning makes it difficult to adapt to complex posture change scenarios, resulting in low stability and robustness of the localization results.
[0008] A 3D Human Position Calculation Method Based on a 3D Occupancy Grid: This method utilizes multi-view images or continuous time-series images, employing a deep learning network to construct the occupancy state of the environment in 3D space. Within the occupancy grid, corresponding spatial occupancy regions are formed for targets such as humans, thereby deriving the human's position in 3D space. This type of method, by directly modeling 3D space, can overcome, to some extent, the limitations of traditional 2D detection methods in scenarios involving occlusion and pose changes, and possesses a stronger expressive ability for human morphology and spatial structure. However, this method also has significant drawbacks:
[0009] 1) It is highly dependent on multi-view data or long time-series data, and usually requires a multi-camera system or continuous frame information as input, resulting in high system deployment complexity.
[0010] 2) The computation and storage overhead is large. The 3D occupying mesh requires dense modeling of spatial voxels, which has high requirements for computing power and memory resources, making it unsuitable for deployment on lightweight embodied intelligent robot platforms.
[0011] 3) It is difficult to directly adapt to monocular or low-cost sensor configurations. In scenarios where the number of sensors is limited, its positioning accuracy and stability are difficult to guarantee.
[0012] 4) The engineering implementation is highly complex. The network training and inference process has high requirements for data scale and system scheduling, resulting in high actual implementation costs.
[0013] In summary, existing methods suffer from poor robustness and high deployment difficulty, making it difficult to meet the environmental perception needs of embodied robots. Therefore, a robust, computationally efficient, and easily deployable human body 3D position calculation method is of great significance for ensuring efficient obstacle avoidance and human-computer interaction for robots. Summary of the Invention
[0014] To address the aforementioned technical problems, this invention proposes a method and related apparatus for calculating the three-dimensional position of the human body. It achieves efficient 3D position estimation through a lightweight keypoint detection and fusion method. This reduces the need for large amounts of training data and complex computing resources, lowers implementation costs, and ensures real-time performance, making it suitable for applications on embedded and mobile devices.
[0015] To achieve the above objectives, the technical solution of the present invention is as follows:
[0016] A method for calculating the three-dimensional position of the human body includes the following steps:
[0017] Acquire the current scene image and preprocess it; input the preprocessed image into the target detection model for human body recognition and segmentation to obtain a human body screenshot;
[0018] The human body screenshot is input into the human body key point detection model to extract three-dimensional human body key points and generate probability distribution matrices in the X, Y and Z directions; the position of the maximum value in each row of the probability distribution matrix in the X and Y directions is taken as the coordinate of the human body key point, and the maximum values in the two directions are compared and the larger one is taken as the confidence of the human body key point.
[0019] Human body key points are initially screened based on confidence thresholds, and key points with confidence scores below the set thresholds are removed. Based on the filtered human body key points, the skeletal segments of each human torso are extracted and weighted filtering is performed to obtain depth values. Based on the depth values and camera intrinsic parameters, back projection is performed to obtain the three-dimensional position of the human body.
[0020] According to claim 1, the method for calculating the three-dimensional position of a human body is characterized in that the preprocessing includes scaling, grayscale conversion, and size normalization.
[0021] Preferably, the preprocessed image is input into the target detection model for human body recognition and segmentation to obtain a human body screenshot, including the following steps:
[0022] The preprocessed image is input into the target detection model for human body recognition to obtain the human body detection box;
[0023] Based on the human body detection bounding box, a screenshot is taken from the current scene image to obtain a human body screenshot.
[0024] Preferably, the target detection model uses YOLOv8.
[0025] Preferably, the human body key point detection model adopts RTMPose3D.
[0026] Preferably, the depth value is obtained by extracting the skeletal segments of the human torso based on the filtered human key points and performing weighted filtering, including the following steps:
[0027] Extract the key points of the human body's main torso from the filtered human body key points, and determine each human skeletal segment and calculate the depth of each human skeletal segment based on the coordinates and confidence of the key points of the human body's main torso.
[0028] The depths of each human skeletal segment are weighted and fused to obtain the effective depth of the human body;
[0029] The effective depth of the human body obtained by weighted fusion is filtered by exponential moving average to obtain the filtered depth value.
[0030] Preferably, the key points of the human torso include the right shoulder, right elbow, right hip, right wrist, right knee, right ankle, left shoulder, left elbow, left hip, left wrist, left knee, and left ankle; each segment of the human torso includes the shoulder, hip, upper half of the left arm, lower half of the left arm, upper half of the right arm, lower half of the right arm, upper half of the left leg, lower half of the left leg, upper half of the right leg, and lower half of the right leg.
[0031] Based on the above, the present invention also discloses a three-dimensional human body position calculation device, comprising:
[0032] The human body recognition module is used to acquire the current scene image and perform preprocessing; the preprocessed image is then input into the target detection model for human body recognition and segmentation to obtain a human body screenshot;
[0033] The human body key point extraction module is used to input the human body screenshot into the human body key point detection model to extract three-dimensional human body key points and generate probability distribution matrices in the X, Y and Z directions; take the position of the maximum value of each row in the probability distribution matrix of the X and Y directions as the coordinates of the human body key point, and compare the maximum values of the two directions, taking the larger one as the confidence of the human body key point.
[0034] The human body 3D position acquisition module is used to initially screen human body key points based on a confidence threshold, and remove human body key points with a confidence level lower than the set threshold; extract each human body torso bone segment based on the filtered human body key points and perform weighted filtering to obtain a depth value; and perform back projection based on the depth value and camera intrinsic parameters to obtain the human body 3D position.
[0035] Based on the foregoing, the present invention also discloses a computer device, comprising: a memory for storing a computer program; and a processor for executing the computer program to implement any of the methods described above.
[0036] Based on the above, the present invention also discloses a readable storage medium storing a computer program, which, when executed by a processor, implements any of the methods described above.
[0037] Based on the above technical solution, the beneficial effects of the present invention are:
[0038] 1) This invention significantly improves the accuracy of human body 3D position estimation: by replacing the single human body height assumption with the geometric constraints of skeletal segments, it realizes the joint back-inference of spatial depth by multiple structural information, reduces the scale error caused by individual height differences and posture changes, and improves the stability and accuracy of three-dimensional position calculation;
[0039] 2) This invention can enhance robustness in occlusion and boundary crossing scenarios: When key points of the human body are occluded or exceed the image range, the system can automatically select high-confidence bone segments to participate in the solution due to the confidence of key points, avoiding the failure of overall estimation due to local missing points, and achieving stable operation in complex scenarios.
[0040] 3) This invention reduces the dependence on a single detection result: enhances the robustness and repeatability of the system, is applicable to different robot positions, postures and different camera installation conditions, and is robust and unaffected by slight mechanical deviations or micro-movements of the camera.
[0041] 4) This invention improves temporal continuity and dynamic stability: By combining a temporal filtering mechanism to smooth the results of consecutive frames, the position jitter phenomenon is reduced, making the 3D trajectory of the human body smoother and more continuous, which is suitable for real-time tracking and motion analysis scenarios.
[0042] 5) This invention does not require additional depth sensors or complex hardware devices: 3D position estimation can be achieved based on a monocular vision system, reducing reliance on lidar or binocular systems and lowering system deployment costs and hardware complexity. Attached Figure Description
[0043] Figure 1 This is a schematic diagram of a method for calculating the three-dimensional position of a human body in one embodiment;
[0044] Figure 2 This is a schematic diagram of the structure of RTMPose3D in one embodiment;
[0045] Figure 3 This is a schematic diagram showing the location of key points on the human torso in one embodiment of a method for calculating the three-dimensional position of the human body. Detailed Implementation
[0046] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
[0047] like Figure 1 As shown, this embodiment provides a method for calculating the three-dimensional position of a human body, including the following steps:
[0048] Step 1: Acquire the current scene image and perform preprocessing; input the preprocessed image into the target detection model for human body recognition and segmentation to obtain a human body screenshot.
[0049] In this embodiment, the current scene image captured by the monocular camera in the robot is read and preprocessed. Specifically, the image is scaled proportionally to a width of 640, then the scaled image is padded with grayscale both vertically to make its height also 640, and finally, each pixel value is divided by 255 for normalization. However, this is not the only method; the number of cameras in the robot depends on the number of cameras required for the robot's functions. For example, if it is necessary to add a rear-view human position calculation, an additional rear-view camera can be added.
[0050] Specifically, the preprocessed image is used for inference using an object detection model. A YOLOv8 network is used as the object detection model, and the inference yields an 8400x84 matrix representing 8400 anchor box pieces, where 84 represents the information of the box. The system also considers the confidence levels for 80 categories. For each of the 8400 anchor boxes, the category with the highest confidence level is selected as its class. The 8400 anchor boxes are then sorted from highest to lowest confidence level, and anchor boxes with a confidence level greater than a threshold (0.7) and a class of "human" are selected. Finally, non-maximum suppression is used to remove duplicate human detection boxes. Using the obtained human detection boxes and the original camera image, the image information of all people in the current scene is cropped to obtain human screenshots.
[0051] Step 2: Input the human body screenshot into the human body key point detection model to extract three-dimensional human body key points and generate probability distribution matrices in the X, Y and Z directions; take the position of the maximum value in each row of the probability distribution matrix in the X and Y directions as the coordinates of the human body key point, and compare the maximum values in the two directions, taking the larger one as the confidence level of the human body key point.
[0052] In this embodiment, all human body screenshots are scaled to a height of 384 and a width of 288. Finally, each pixel value is normalized by dividing by 255. The normalized human body image is then used to perform inference using a human keypoint detection model to obtain human keypoint heatmap information. The human keypoint detection model used in this embodiment is RTMPose3D, see [link to relevant documentation]. Figure 2 The model outputs three matrices for each human subject: x, y, and z, with dimensions of 133x576, 133x768, and 133x576 respectively. The 133 represents 133 human keypoints, including 17 body keypoints, 6 foot keypoints, 68 facial keypoints, and 42 hand keypoints. The three matrices 133x576, 133x768, and 133x576 represent the probability distribution of these 133 keypoints in the X, Y, and Z directions, respectively.
[0053] Post-processing of human keypoint information is performed. Since this technique only needs to consider the coordinates of human keypoints in the image, only matrices in the X and Y directions are required. The position of the maximum value in each row of the X and Y matrices is selected as the corresponding keypoint coordinates. Then, the maximum values of each keypoint in the X and Y matrices are compared, and the larger value is selected as the confidence score of that keypoint. Finally, for each human body in the image, a 133x2 matrix is obtained as the human body coordinates, and a 133x1 matrix is obtained as the confidence score of the coordinates. The keypoint coordinates here are only relative to the cropped human body image coordinates and need to be restored to the coordinates of the original image. The calculation process is as follows: assuming the coordinates of a human detection bounding box obtained by a detection are... The coordinates of a certain key point are Then its coordinates in the original image are ,in The width of the scaled-down human image is 288. The height of the scaled-down human image is 384.
[0054] Step 3: Perform preliminary screening of human body key points based on confidence threshold, and remove human body key points with confidence scores below the set threshold; extract each human torso bone segment based on the filtered human body key points and perform weighted filtering to obtain depth values; perform back projection based on the depth values and camera intrinsic parameters to obtain the three-dimensional position of the human body.
[0055] In this embodiment, key points of each human body in the current scene image are filtered. The input threshold can generally be set to 0.5. Key points below the threshold are filtered out, retaining only valid key point information. This allows the system to automatically select high-confidence bone segments to participate in the solution based on the key point confidence level when some key points of the human body are occluded or exceed the image range. This achieves dynamic part selection and avoids overall estimation failure due to local missing data.
[0056] Geometric scale constraints are based on "skeletal segments" rather than "single points." Instead of relying solely on human bounding boxes and fixed human height assumptions for 3D position calculation, it constructs a human skeletal topology, combining key points in pairs to form skeletal segments (such as lower leg, thigh, and torso segments). The length of each skeletal segment serves as a geometric constraint unit for spatial back-calculation, thus shifting the modeling approach from "single-scale assumptions" to "multi-structure constraints." This allows for the modeling of individual human key points... It only contains coordinates and confidence scores, but lacks scale information; instead, it consists of a "skeleton segment" formed by two keypoints. It provides both direction and depth, which can be used to calculate depth or 3D position. The specific steps are as follows:
[0057] The definition of a skeletal segment is determined by the origin keypoint. and the key point of the finish line constitute: ;
[0058] Calculate the pixel length of key points in a bone segment ;
[0059] Calculate the weight of bone segments ,in , This refers to the confidence level of key points. When a bone segment goes out of the frame or is occluded, the weight of the corresponding bone segment will naturally decrease.
[0060] In this embodiment, considering that the detection of key points on the human torso is often more stable than that on the face, hands, and feet, this application extracts key points on the human torso from the filtered key points. Based on the coordinates and confidence levels of the key points on the human torso, it determines each human skeletal segment and calculates the depth of each segment. The key points on the human torso include the right shoulder (7), right elbow (9), right hip (13), right wrist (11), right knee (15), right ankle (17), left shoulder (6), left elbow (8), left hip (12), left wrist (10), left knee (14), and left ankle (16). See [link to relevant documentation]. Figure 3 The skeletal segments of each human torso include the shoulders (6, 7), hips (12, 13), upper left arm (6, 8), lower left arm (8, 10), upper right arm (7, 9), lower right arm (9, 11), upper left leg (12, 14), lower left leg (14, 16), upper right leg (13, 15), and lower right leg (15, 17).
[0061] Based on single-frame spatial solution, a weighted fusion strategy at the skeleton segment level is introduced, and combined with a temporal series filtering mechanism (such as exponential moving average filtering) to smoothly update the results of consecutive frames, forming a 3D position estimation process with dual constraints of spatial and temporal consistency. Specifically:
[0062] 1) Perform depth calculations on human skeletal segments and perform weighted fusion of depths across multiple skeletal segments to obtain the effective depth of the human body. The specific steps are as follows:
[0063] The depth of a bone segment is calculated using the following formula:
[0064]
[0065] in For camera focal length, The actual length of the skeletal segment is derived from publicly available human proportion tables (such as the publicly available PDF published by the NC State Ergonomics Center, which contains the length and width dimensions of different parts of an adult, such as the shoulder-elbow length).
[0066] The effective depth of the human body is obtained by weighted fusion, and the calculation formula is as follows:
[0067]
[0068] in, It represents the set of valid bone segments, which can also be understood as the set of bone segment indices that meet the validity conditions and participate in depth calculation.
[0069] 2) The effective human depth is smoothed using an Exponential Moving Average (EMA). This is because there are three natural sources of jitter in this detection system: keypoint pixel jitter, slight changes in human scale / pose, and frame-by-frame variations in the available skeleton segment set. These three jitters are essentially high-frequency noise, while human position movement is essentially a low-frequency signal. Therefore, using EMA for low-pass filtering can effectively improve the stability of human depth detection. The formula for calculating EMA is as follows:
[0070]
[0071] in for Depth value after filtering at any time. This is the current estimate. As a smoothing factor, a value range of 0.2 to 0.4 is recommended.
[0072] 3) The obtained stable human body depth values By combining camera intrinsic parameters with back projection, the three-dimensional position of the human body can be obtained. The formula is as follows:
[0073]
[0074] in, The x-coordinate of the principal point (the position of the optical axis in the image). The y-coordinate of the principal point The focal length is in the y-direction. The focal length is in the x-direction. The focal length is in the y-direction. All of these are camera intrinsic parameters. For the pixel coordinates of the human body depth, this patent solution considers the center point of the hip in the human torso skeleton to be the most stable detection point in the whole body. Therefore, the pixel coordinates of the hip center point are selected as follows: That is, the center position of key points 12 and 13.
[0075] It should be understood that although the steps in the flowchart above are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowchart above may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0076] Based on the same inventive concept, this application also provides an apparatus for implementing the aforementioned method for calculating the three-dimensional position of a human body. The solution provided by this apparatus is similar to the solution described in the above method, and therefore will not be repeated here.
[0077] In one embodiment, a human body three-dimensional position calculation device is also provided, comprising:
[0078] The human body recognition module is used to acquire the current scene image and perform preprocessing; the preprocessed image is then input into the target detection model for human body recognition and segmentation to obtain a human body screenshot;
[0079] The human body key point extraction module is used to input the human body screenshot into the human body key point detection model to extract three-dimensional human body key points and generate probability distribution matrices in the X, Y and Z directions; take the position of the maximum value of each row in the probability distribution matrix of the X and Y directions as the coordinates of the human body key point, and compare the maximum values of the two directions, taking the larger one as the confidence of the human body key point.
[0080] The human body 3D position acquisition module is used to initially screen human body key points based on a confidence threshold, and remove human body key points with a confidence level lower than the set threshold; extract each human body torso bone segment based on the filtered human body key points and perform weighted filtering to obtain a depth value; and perform back projection based on the depth value and camera intrinsic parameters to obtain the human body 3D position.
[0081] In the above embodiments, each module of the human body three-dimensional position calculation device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0082] In one embodiment, a computer device is also provided, comprising: a memory for storing a computer program; and a processor for executing the computer program to implement the steps as described in all the above method embodiments.
[0083] In one embodiment, a readable storage medium is also provided, on which a computer program is stored, which, when executed by a processor, implements the steps as described in all the above method embodiments.
[0084] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0085] The embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on its differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.
[0086] The above are merely preferred embodiments of the present application and are not intended to limit the embodiments of the present application. For those skilled in the art, the embodiments of the present application can have various modifications and variations. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the embodiments of the present application should be included within the protection scope of the embodiments of the present application.
Claims
1. A method for calculating the three-dimensional position of the human body, characterized in that, Includes the following steps: Acquire the current scene image and preprocess it; input the preprocessed image into the target detection model for human body recognition and segmentation to obtain a human body screenshot; The human body screenshot is input into the human body key point detection model to extract three-dimensional human body key points and generate probability distribution matrices in the X, Y and Z directions; the position of the maximum value in each row of the probability distribution matrix in the X and Y directions is taken as the coordinate of the human body key point, and the maximum values in the two directions are compared and the larger one is taken as the confidence of the human body key point. Human body key points are initially screened based on confidence thresholds, and human body key points with confidence scores below the set thresholds are removed. Based on the filtered human body key points, extract the human torso skeletal segments and perform weighted filtering to obtain depth values; based on the depth values and camera intrinsic parameters, perform back projection to obtain the three-dimensional position of the human body.
2. The method for calculating the three-dimensional position of a human body according to claim 1, characterized in that, The preprocessing includes scaling, grayscale conversion, and size normalization.
3. The method for calculating the three-dimensional position of a human body according to claim 1, characterized in that, The preprocessed image is input into the object detection model for human body recognition and segmentation to obtain a human body screenshot, including the following steps: The preprocessed image is input into the target detection model for human body recognition to obtain the human body detection box; Based on the human body detection bounding box, a screenshot is taken from the current scene image to obtain a human body screenshot.
4. A method for calculating the three-dimensional position of a human body according to claim 1 or 3, characterized in that, The target detection model used is YOLOv8.
5. The method for calculating the three-dimensional position of a human body according to claim 1, characterized in that, The human body key point detection model uses RTMPose3D.
6. The method for calculating the three-dimensional position of a human body according to claim 1, characterized in that, Based on the filtered human key points, extract the skeletal segments of each human torso and perform weighted filtering to obtain depth values, including the following steps: Extract the key points of the human body's main torso from the filtered human body key points, and determine each human skeletal segment and calculate the depth of each human skeletal segment based on the coordinates and confidence of the key points of the human body's main torso. The depths of each human skeletal segment are weighted and fused to obtain the effective depth of the human body; The effective depth of the human body obtained by weighted fusion is filtered by exponential moving average to obtain the filtered depth value.
7. The method for calculating the three-dimensional position of a human body according to claim 6, characterized in that, The key points of the human torso include the right shoulder, right elbow, right hip, right wrist, right knee, right ankle, left shoulder, left elbow, left hip, left wrist, left knee, and left ankle; the skeletal segments of the human torso include the shoulder, hip, upper left arm, lower left arm, upper right arm, lower right arm, upper left leg, lower left leg, upper right leg, and lower right leg.
8. A three-dimensional human body position calculation device, characterized in that, include: The human body recognition module is used to acquire and preprocess images of the current scene. The preprocessed image is input into the target detection model for human body recognition and segmentation to obtain a human body screenshot. The human body key point extraction module is used to input the human body screenshot into the human body key point detection model to extract three-dimensional human body key points and generate probability distribution matrices in the X, Y and Z directions; take the position of the maximum value of each row in the probability distribution matrix of the X and Y directions as the coordinates of the human body key point, and compare the maximum values of the two directions, taking the larger one as the confidence of the human body key point. The human body 3D position acquisition module is used to initially screen human body key points based on a confidence threshold and remove human body key points with a confidence level lower than the set threshold. Based on the filtered human body key points, extract the human torso skeletal segments and perform weighted filtering to obtain depth values; based on the depth values and camera intrinsic parameters, perform back projection to obtain the three-dimensional position of the human body.
9. A computer device, characterized in that, Includes: memory, used to store computer programs; A processor for executing the computer program to implement the method as described in any one of claims 1 to 7.
10. A readable storage medium, characterized in that, The readable storage medium stores a computer program that, when executed by a processor, implements the method as described in any one of claims 1 to 7.