From 1e1ac411317e72410694fdbdf945f9da9a85b1e7 Mon Sep 17 00:00:00 2001 From: Muhammad Abdullah Hayat Date: Mon, 25 Apr 2022 03:23:59 +0500 Subject: [PATCH] limiting axis values to solve issue #2918 Solving issue number #2918 (https://github.com/google/mediapipe/issues/2918) Pose or holistic solution leans the body forward in straight facing the camera pictures. just added the limit to the axis values, as the values can be minimum -1 and maximum 1. Earlier there were no limits to axises values. It causes unevent points on each axis. --- mediapipe/python/solutions/drawing_utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mediapipe/python/solutions/drawing_utils.py b/mediapipe/python/solutions/drawing_utils.py index ea5d881cb..e7cbf201d 100644 --- a/mediapipe/python/solutions/drawing_utils.py +++ b/mediapipe/python/solutions/drawing_utils.py @@ -282,6 +282,9 @@ def plot_landmarks(landmark_list: landmark_pb2.NormalizedLandmarkList, plt.figure(figsize=(10, 10)) ax = plt.axes(projection='3d') ax.view_init(elev=elevation, azim=azimuth) + ax.set_xlim((-1,1)) + ax.set_ylim((-1,1)) + ax.set_zlim((-1,1)) plotted_landmarks = {} for idx, landmark in enumerate(landmark_list.landmark): if ((landmark.HasField('visibility') and