rsax commited on
Commit
affb9a8
·
verified ·
1 Parent(s): 0d780bd

Update visualization/plot_3d_global.py

Browse files
Files changed (1) hide show
  1. visualization/plot_3d_global.py +1 -13
visualization/plot_3d_global.py CHANGED
@@ -12,10 +12,6 @@ import imageio
12
  def plot_3d_motion(args, figsize=(10, 10), fps=120, radius=4):
13
  matplotlib.use('Agg')
14
 
15
- dir_path = "animation"
16
- if not os.path.exists(dir_path):
17
- os.makedirs(dir_path)
18
-
19
  joints, out_name, title = args
20
 
21
  data = joints.copy().reshape(len(joints), -1, 3)
@@ -118,15 +114,7 @@ def plot_3d_motion(args, figsize=(10, 10), fps=120, radius=4):
118
  arr = np.reshape(np.frombuffer(io_buf.getvalue(), dtype=np.uint8), newshape=(int(fig.bbox.bounds[3]), int(fig.bbox.bounds[2]), -1))
119
  io_buf.close()
120
  plt.close()
121
-
122
- # Save individual frames for verification
123
- frame_path = os.path.join(dir_path, f"frame_{index}.png")
124
- plt.imsave(frame_path, arr)
125
- if not os.path.exists(frame_path):
126
- print(f"Error: Frame {index} not saved to {frame_path}")
127
- else:
128
- print(f"Saved frame {index} to {frame_path}")
129
-
130
  return arr
131
 
132
  out = []
 
12
  def plot_3d_motion(args, figsize=(10, 10), fps=120, radius=4):
13
  matplotlib.use('Agg')
14
 
 
 
 
 
15
  joints, out_name, title = args
16
 
17
  data = joints.copy().reshape(len(joints), -1, 3)
 
114
  arr = np.reshape(np.frombuffer(io_buf.getvalue(), dtype=np.uint8), newshape=(int(fig.bbox.bounds[3]), int(fig.bbox.bounds[2]), -1))
115
  io_buf.close()
116
  plt.close()
117
+
 
 
 
 
 
 
 
 
118
  return arr
119
 
120
  out = []