<jupyter_start><jupyter_text>Evaluate a model   H3m<jupyter_code>path = "/home/gianscarpe/dev/event-based-monocular-hpe/h3m_constantcount/exps_MargiposeEstimator/cross-view/03-18-08-22_exp_resnet50_pretrained_True/checkpoints"
model = utilities.load_model(path, "MargiposeEstimator", core=h3mcore).double()
factory = Joints3DConstructor()
factory.set_dataset_core(h3mcore)
train, val, test = factory.get_datasets({'apply':{}}, {'apply':{}})
loader = iter(torch.utils.data.DataLoader(test, batch_size=1, shuffle=True))
viz.plot_skeleton_2d(b_x[0].squeeze(),b_y['2d_joints'][0], pred_sk.get_2d_points(260, 346, extrinsic_matrix=b_y['M'][0], intrinsic_matrix=b_y['camera'][0]))<jupyter_output>No handles with labels found to put in legend.<jupyter_text>DHP19<jupyter_code>path = "/home/gianscarpe/dev/event-based-monocular-hpe/timecount_dhp19/exps_MargiposeEstimator/cross-subject/03-20-08-54_exp_resnet50_pretrained_True_stages_3/checkpoints/"
model = utilities.load_model(path, "MargiposeEstimator", core=dhpcore).eval().double()
factory = Joints3DConstructor()
factory.set_dataset_core(dhpcore)
train, val, test = factory.get_datasets({'apply':{}}, {'apply':{}})
loader = iter(torch.utils.data.DataLoader(test, batch_size=1, shuffle=True))
b_x, b_y = next(loader)
b_x, b_y = next(loader)
preds, outs = model(b_x.permute(0, -1, 1, 2))
pred_sk = Skeleton(preds[0].detach().numpy()).denormalize(260, 346, camera=b_y['camera'][0], z_ref=b_y['z_ref'][0]).reproject_onto_world(b_y['M'][0])
plot_skeleton_3d(Skeleton(b_y['xyz'][0]), pred_sk)
gt_joints = torch.stack([b_y['2d_joints'][0][:, 0], b_y['2d_joints'][0][:, 1]], 1)
pred_joints = pred_sk.get_2d_points(260, 346, extrinsic_matrix=b_y['M'][0], intrinsic_matrix=b_y['camera'][0])

pred_joints = np.stack([pred_joints[:, 0], pred_joints[:, 1]], 1)
plot_skeleton_2d(b_x[0].squeeze(), gt_joints, pred_joints)<jupyter_output>No handles with labels found to put in legend.
{'fraction_non_alphanumeric': 0.17745302713987474, 'fraction_numerical': 0.043319415448851775, 'mean_word_length': 9.591160220994475, 'pattern_counts': {'":': 0, '<': 7, '<?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': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '565075', 'license': 'Apache-2.0', 'n_tokens_mistral': 836, 'n_tokens_neox': 790, 'n_words': 98, 'path': 'notebooks/Tutorial_train_test_visualize_dhp19_h3m.ipynb', 'repo_name': 'preshmalinetpereira/lifting_events_to_3d_hpe', 'size': '1916'}