Upload motion_agent.py with huggingface_hub
Browse files- motion_agent.py +1 -1
motion_agent.py
CHANGED
@@ -87,7 +87,7 @@ class MotionAgent:
|
|
87 |
motion = self.model.net.forward_decoder(motion_tokens)
|
88 |
motion = self.model.denormalize(motion.detach().cpu().numpy())
|
89 |
motion = recover_from_ric(torch.from_numpy(motion).float().to(self.device), 22)
|
90 |
-
filename = f"{self.save_dir}/motion_{int(time.time())}.
|
91 |
print('Plotting motion...')
|
92 |
plot_3d_motion(filename, t2m_kinematic_chain, motion.squeeze().detach().cpu().numpy(), title=message, fps=20, radius=4)
|
93 |
np.save(f"{self.save_dir}/motion_{int(time.time())}.npy", motion.squeeze().detach().cpu().numpy())
|
|
|
87 |
motion = self.model.net.forward_decoder(motion_tokens)
|
88 |
motion = self.model.denormalize(motion.detach().cpu().numpy())
|
89 |
motion = recover_from_ric(torch.from_numpy(motion).float().to(self.device), 22)
|
90 |
+
filename = f"{self.save_dir}/motion_{int(time.time())}.gif"
|
91 |
print('Plotting motion...')
|
92 |
plot_3d_motion(filename, t2m_kinematic_chain, motion.squeeze().detach().cpu().numpy(), title=message, fps=20, radius=4)
|
93 |
np.save(f"{self.save_dir}/motion_{int(time.time())}.npy", motion.squeeze().detach().cpu().numpy())
|