Skip to content

Data preprocessing: Unsigned Distance #18

@stalhabukhari

Description

@stalhabukhari

The paper mentions the use of signed distance for each object. However, the preprocessing code makes use of unsigned distance. Is this correct? (absolute=True is used)

def generate_mesh_sdf(mesh, absolute=True, normalize=False, n_points=200000):
print (mesh)
q_sdf, pcl = sample_sdf_near_surface(mesh, number_of_points=n_points, return_gradients=False)
query_points, sdf = q_sdf[0], q_sdf[1]
if absolute:
neg_sdf_idxs = np.argwhere(sdf<0)[:,0]
sdf[neg_sdf_idxs] = -sdf[neg_sdf_idxs]
if normalize:
sdf_max = sdf.max()
sdf_min = sdf.min()
sdf = (sdf - sdf_min) / (sdf_max - sdf_min)
return query_points, sdf

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions