<jupyter_start><jupyter_text>CAD-120http://pr.cs.cornell.edu/humanactivities/data.php<jupyter_code># A = np.array([[1, 1, 1],
#            [2, 2, 2],
#            [5, 5, 5]])

# B = np.array([[0, 1, 0],
#            [1, 1, 0],
#            [1, 1, 1]])

# C = np.einsum('ij,jk->ik', A, B)
# c = C[2]
# _c = c[0]

# P @ _c
# C.shape

# D = np.einsum('ijk,kk->ijk', C, P)

# D
# P = np.eye(4) * 2
# A = np.ones((100, 15, 3))
# A[:, :, 0] = A[:, :, 0] * 0.1
# A[:, :, 1] = A[:, :, 1] * 0.2
# A[:, :, 2] = A[:, :, 2] * 0.3
# for i in range(100):
#     A[i, :, :] = A[i, :, :] + i

# B = np.ones((100, 15, 1))

# C = np.concatenate([A, B], axis=2)

# C
A = np.array([
    [
        [1, 2, 3],
        [4, 5, 6]
    ],
    [
        [10, 20, 30],
        [40, 50, 60]
    ],
    [
        [100, 200, 300],
        [400, 500, 600]
    ],
    [
        [1000, 2000, 3000],
        [4000, 5000, 6000]
    ]
    
], np.float64)

B = np.array([
    [1, 0, 0],
    [0, 0, -1],
    [0, 1, 0]
], np.float64)

C = np.einsum('ijk,lk', A, B)

print('A', A.shape)
print('C', C.shape)

C.astype('object')
vec = A[0,0]

B @ vec
%matplotlib inline
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import json; from pprint import pprint
Settings = json.load(open('settings.txt'))
import matplotlib.pyplot as plt
import numpy as np
import sys
sys.path.insert(0,'../')
from os.path import isdir

root = Settings['data_root']

from pak.datasets.CAD_120 import CAD_120

data = CAD_120(root)

suj1 = data.get_subject(1)
vid = suj1['arranging_objects']['0510175431']

pts3d = data.get_3d_points_from_skel(vid['skeleton'])

person = pts3d[0]

# =========

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

data.plot(ax, person, plot_jids=True)

plt.axis('equal')
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.2263013698630137, 'fraction_numerical': 0.09041095890410959, 'mean_word_length': 2.6447105788423153, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '654922', 'license': 'MIT', 'n_tokens_mistral': 954, 'n_tokens_neox': 844, 'n_words': 187, 'path': 'samples/CAD_120.ipynb', 'repo_name': 'jutanke/pak', 'size': '1825'}