Skip to content

How do you access ground truth skeleton data? #2

Description

@harrydobbs

Hi there,

Could you please advise how I can access your ground truth skeletons?
Here is what I got so far:

def main():

    f = h5py.File('../data/treepartnet/tree_labeled_train.hdf5','r')


    point_set, normal, labels, pr = f['points'][0], f['normals'][0], f['primitive_id'][0], f['codebook'][0]

    skeleton = point_set - np.expand_dims(labels,-1) * normal 


    skeleton_pcd = o3d.geometry.PointCloud()
    skeleton_pcd.points = o3d.utility.Vector3dVector(skeleton)
    skeleton_pcd.paint_uniform_color((1, 0, 0))

    pcd = o3d.geometry.PointCloud()
    pcd.points = o3d.utility.Vector3dVector(point_set)
    pcd.paint_uniform_color((0, 1, 0))
    
    o3d.visualization.draw_geometries([pcd, skeleton_pcd])

Kind regards,
Harry

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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