XCube
XCube copied to clipboard
Evaluation script
Hi! Thanks for your great work.
I'm trying to reproduce your results, and I would like to know if you could make your evaluation script available. I have tried to use LION repo evaluation script, but I guess you had to do some adaptations on how they compute their metrics to be able to compute it.
Hi, thanks for your interest of our work. We obtain the sampling point using the following function.
import point_cloud_utils as pcu
def standardize_bbox_torch(pcl):
mins = torch.min(pcl, dim=0)[0]
maxs = torch.max(pcl, dim=0)[0]
center = (mins + maxs) / 2.
scale = torch.max(maxs - mins)
result = ((pcl - center) / scale).float()
result = result * 2.0 # [-1.0, 1.0]
return result
fid, bc = pcu.sample_mesh_random(mesh.v.cpu().numpy(), mesh.f.cpu().numpy(), sample_pcs_len)
pd_xyz_sample = pcu.interpolate_barycentric_coords(mesh.f.cpu().numpy(), fid, bc, mesh.v.cpu().numpy())
pd_xyz_sample = torch.from_numpy(pd_xyz_sample).float()
pd_xyz_sample = standardize_bbox_torch(pd_xyz_sample)