in contactopt/run_eval.py [0:0]
def vis_sample(gt_ho, in_ho, out_ho, mje_in=None, mje_out=None):
hand_gt, obj_gt = gt_ho.get_o3d_meshes(hand_contact=True, normalize_pos=True)
hand_in, obj_in = in_ho.get_o3d_meshes(hand_contact=True, normalize_pos=True)
hand_in.translate((0.0, 0.2, 0.0))
obj_in.translate((0.0, 0.2, 0.0))
if not args.split == 'honn':
out_ho.hand_contact = in_ho.hand_contact
out_ho.obj_contact = in_ho.obj_contact
hand_out, obj_out = out_ho.get_o3d_meshes(hand_contact=True, normalize_pos=True)
hand_out.translate((0.0, 0.4, 0.0))
obj_out.translate((0.0, 0.4, 0.0))
geom_list = [hand_gt, obj_gt, hand_out, obj_out, hand_in, obj_in]
geom_list.append(util.text_3d('In', pos=[-0.4, 0.2, 0], font_size=40, density=2))
geom_list.append(util.text_3d('Refined', pos=[-0.4, 0.4, 0], font_size=40, density=2))
geom_list.append(util.text_3d('GT', pos=[-0.4, 0.0, 0], font_size=40, density=2))
if mje_in is not None:
geom_list.append(util.text_3d('MJE in {:.2f}cm out {:.2f}cm'.format(mje_in * 100, mje_out * 100), pos=[-0.4, -0.2, 0], font_size=40, density=2))
o3dv.draw_geometries(geom_list)