daerduoCarey / partnet_dataset

PartNet Dataset Official Release Repo
https://cs.stanford.edu/~kaichun/partnet/
Other
351 stars 44 forks source link

ShapeNetV1 with PartNet misalignment #40

Open xiongyiheng opened 1 year ago

xiongyiheng commented 1 year ago

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.

xizaoqu commented 1 year ago

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

xiongyiheng commented 1 year ago

` 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.

xizaoqu commented 1 year ago

image It seems I have the same question.

kasteric commented 3 months ago

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?