partnet_dataset icon indicating copy to clipboard operation
partnet_dataset copied to clipboard

ShapeNetV1 with PartNet misalignment

Open xiongyiheng opened this issue 1 year ago • 4 comments

Hi, I used the matrices provided HERE to align between shapenet v1 and partnet. First I added addition columns in points of partnet (Nx3 -> Nx4); then I did matrices multiplication like ''pts_homo = pts_homo @ (np.linalg.inv(trans_matrix)).transpose()'' to try to align it with shapenet. But after I visulized transformed point cloud and corresponding mesh from shapenet (by python library open3d), they are not aligned actually. Screenshot from 2023-05-30 09-23-16 Would be very appreciated if you could enlight me a bit about the issue. Thanks in advance.

xiongyiheng avatar May 30 '23 17:05 xiongyiheng

Hi, have you addressed the problem? By the way, how do you visualize the mesh and point clouds? Can you provide the scrips?

xizaoqu avatar Jun 01 '23 06:06 xizaoqu

` def func1():

with h5py.File('train-00.h5', 'r') as fin:
    cos = fin['pts'][1]

cos_homo = np.ones((cos.shape[0], 4))

cos_homo[:, 0:3] = cos

trans_matrix = np.array(([-0.0, -0.0, -1.7924607992172241, 0.010459988377988338],
                         [0.0, 1.7924607992172241, 0.0, -0.08108999580144882],
                         [1.7924607992172241, 0.0, 0.0, 0.16052597761154175],
                         [0.0, 0.0, 0.0, 1.0]))

pcd1 = o3d.geometry.PointCloud()

cos_homo = cos_homo @ (np.linalg.inv(trans_matrix)).transpose()

pcd1.points = o3d.utility.Vector3dVector(cos_homo[:, 0:3])

mesh2 = o3d.io.read_triangle_mesh('model2.obj')

o3d.visualization.draw_geometries([pcd1, mesh2])`

the scripts are sth. like this.

xiongyiheng avatar Jun 01 '23 07:06 xiongyiheng

image It seems I have the same question.

xizaoqu avatar Jun 01 '23 07:06 xizaoqu

What does it mean by aligning ShapeNet V1 with PartNet? does it mean that for the same model id, you need to make some adjustment so that the location ShapeNet mesh in 3d space exactly match the location of PartNet in 3d space?

kasteric avatar May 17 '24 08:05 kasteric