Skip to content

Commit fb59e9c

Browse files
committed
Add root position to the .pkl file dump
1 parent afe29d4 commit fb59e9c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

fit_seq.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
num_seqs = data.shape[0]
8181

8282
for idx in range(num_seqs):
83-
#print(idx)
83+
print(f"idx={idx}")
8484

8585
joints3d = data[idx] #*1.2 #scale problem [check first]
8686
keypoints_3d[0, :, :] = torch.Tensor(joints3d).to(device).float()
@@ -128,4 +128,11 @@
128128
param['beta'] = new_opt_betas.detach().cpu().numpy()
129129
param['pose'] = new_opt_pose.detach().cpu().numpy()
130130
param['cam'] = new_opt_cam_t.detach().cpu().numpy()
131+
132+
# save the root position
133+
# shape of keypoints_3d is torch.Size([1, 22, 3]) and root is the first one
134+
root_position = keypoints_3d[0, 0, :].detach().cpu().numpy()
135+
print(f"root at {root_position}, shape of keypoints_3d is {keypoints_3d.shape}")
136+
param['root'] = root_position
137+
131138
joblib.dump(param, dir_save + "/" + "%04d"%idx + ".pkl", compress=3)

0 commit comments

Comments
 (0)