Update visualization/plot_3d_global.py
Browse files
visualization/plot_3d_global.py
CHANGED
@@ -94,7 +94,6 @@ def plot_3d_motion(args, figsize=(10, 10), fps=120, radius=4):
|
|
94 |
ax.set_yticklabels([])
|
95 |
ax.set_zticklabels([])
|
96 |
|
97 |
-
# Adjusting frame output for GIF compatibility
|
98 |
io_buf = io.BytesIO()
|
99 |
plt.savefig(io_buf, format='png', dpi=96)
|
100 |
io_buf.seek(0)
|
@@ -104,7 +103,7 @@ def plot_3d_motion(args, figsize=(10, 10), fps=120, radius=4):
|
|
104 |
|
105 |
plt.close(fig)
|
106 |
return frame
|
107 |
-
|
108 |
out = []
|
109 |
for i in range(frame_number):
|
110 |
frame = update(i)
|
@@ -118,8 +117,7 @@ def draw_to_batch(smpl_joints_batch, title_batch=None, outname=None):
|
|
118 |
batch_size = len(smpl_joints_batch)
|
119 |
frames = []
|
120 |
for i in range(batch_size):
|
121 |
-
|
122 |
-
frames.append(frame)
|
123 |
|
124 |
if frames:
|
125 |
gif_bytes = io.BytesIO()
|
|
|
94 |
ax.set_yticklabels([])
|
95 |
ax.set_zticklabels([])
|
96 |
|
|
|
97 |
io_buf = io.BytesIO()
|
98 |
plt.savefig(io_buf, format='png', dpi=96)
|
99 |
io_buf.seek(0)
|
|
|
103 |
|
104 |
plt.close(fig)
|
105 |
return frame
|
106 |
+
|
107 |
out = []
|
108 |
for i in range(frame_number):
|
109 |
frame = update(i)
|
|
|
117 |
batch_size = len(smpl_joints_batch)
|
118 |
frames = []
|
119 |
for i in range(batch_size):
|
120 |
+
frames.extend(plot_3d_motion([smpl_joints_batch[i], None, title_batch[i] if title_batch is not None else None]))
|
|
|
121 |
|
122 |
if frames:
|
123 |
gif_bytes = io.BytesIO()
|