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.
This commit is contained in:
Muhammad Abdullah Hayat 2022-04-25 03:23:59 +05:00 committed by GitHub
parent c6c80c3745
commit 1e1ac41131
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -282,6 +282,9 @@ def plot_landmarks(landmark_list: landmark_pb2.NormalizedLandmarkList,
plt.figure(figsize=(10, 10)) plt.figure(figsize=(10, 10))
ax = plt.axes(projection='3d') ax = plt.axes(projection='3d')
ax.view_init(elev=elevation, azim=azimuth) ax.view_init(elev=elevation, azim=azimuth)
ax.set_xlim((-1,1))
ax.set_ylim((-1,1))
ax.set_zlim((-1,1))
plotted_landmarks = {} plotted_landmarks = {}
for idx, landmark in enumerate(landmark_list.landmark): for idx, landmark in enumerate(landmark_list.landmark):
if ((landmark.HasField('visibility') and if ((landmark.HasField('visibility') and