Open Isabel-jin opened 1 month ago
Hi @Isabel-jin I've encountered the same issue. I just quickly tried to comment out lines 122-124 and that did the trick for me. trimesh.bounds.oriented_bounds
seems to change the coordinate system with respect to the previously extracted mesh and gt mesh.
But let's wait for the official response.
def calc_3d_metric(rec_meshfile, gt_meshfile, align=False):
"""
3D reconstruction metric.
"""
mesh_rec = trimesh.load(rec_meshfile, process=False)
mesh_gt = trimesh.load(gt_meshfile, process=False)
if align:
transformation = get_align_transformation(rec_meshfile, gt_meshfile)
mesh_rec = mesh_rec.apply_transform(transformation)
# found the aligned bbox for the mesh
# to_align, _ = trimesh.bounds.oriented_bounds(mesh_gt)
# mesh_gt.vertices = (to_align[:3, :3] @ mesh_gt.vertices.T + to_align[:3, 3:]).T
# mesh_rec.vertices = (to_align[:3, :3] @ mesh_rec.vertices.T + to_align[:3, 3:]).T
min_points = mesh_gt.vertices.min(axis=0) * 1.05
max_points = mesh_gt.vertices.max(axis=0) * 1.05
Hi,thanks for your great work! I'm trying to doing evaluation on replica using your scripts in
replica_eval/eval_recon.py
. I did the virualization and found I had problem in aligning the reconstruction mesh with the groundtruth mesh in rotation. I tried using the ICP algorithm offered in your code and tested several different threshlods. But due to the fact that the shape of the replica mesh is like a symethical cuboid, the two meshes always differ in rotation by 180 degrees on one axis. Did you encounter similar problems? Is there any solution in additon to adjust the parameters?