Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I have a question because I think there is a problem with the result. #2

Open
JunukCha opened this issue Apr 17, 2023 · 0 comments
Open

Comments

@JunukCha
Copy link

JunukCha commented Apr 17, 2023

I use 57 for class_label, "shaking hands".

I'm seeing odd results. Could you explain why that might be?

I attempted to use ipyvolume, but encountered an error, so I use matplotlib for visualizing.

action57_sample0.mp4

Here is code for visualizing.

import numpy as np
import matplotlib.pyplot as plt
import mpl_toolkits.mplot3d.axes3d as p3
import matplotlib.animation as animation

fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')

idx = 0
j1_data = p1[idx,:pred_len[idx],:,:]
j2_data = p2[idx,:pred_len[idx],:,:]

ax.view_init(elev=45, azim=90)

def update(frame):
    ax.clear()
    ax.set_xlim([-1, 1])
    ax.set_ylim([-2, 2])
    ax.set_zlim([-3, 3])
    
    color_1 = (0, 0, 1)
    color_2 = (1, 0, 0)
    
    j1_t = j1_data[frame]
    j2_t = j2_data[frame]
    for pair in pairs:
        ax.plot((j1_t[pair[0]][0], j1_t[pair[1]][0]), 
                (j1_t[pair[0]][1], j1_t[pair[1]][1]), 
                (j1_t[pair[0]][2], j1_t[pair[1]][2]), 
                c=color_1)
        
        ax.plot((j2_t[pair[0]][0], j2_t[pair[1]][0]), 
                (j2_t[pair[0]][1], j2_t[pair[1]][1]), 
                (j2_t[pair[0]][2], j2_t[pair[1]][2]), 
                c=color_2)

ani = animation.FuncAnimation(fig, update, frames=pred_len[idx], interval=50)

Writer = animation.writers['ffmpeg']
writer = Writer(fps=15, metadata=dict(artist='Me'), bitrate=1800)
ani.save(f'action{class_label}_sample{idx}.mp4', writer=writer)
@JunukCha JunukCha changed the title I have a question because there seems to be a problem with the result. I have a question because I think there is a problem with the result. Apr 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant