Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Evaluation script #22

Open
nuneslu opened this issue Aug 6, 2024 · 1 comment
Open

Evaluation script #22

nuneslu opened this issue Aug 6, 2024 · 1 comment

Comments

@nuneslu
Copy link

nuneslu commented Aug 6, 2024

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.

@xrenaa
Copy link
Collaborator

xrenaa commented Aug 7, 2024

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants