Open xiongyiheng opened 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?
` 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.
It seems I have the same question.
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?
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.
Would be very appreciated if you could enlight me a bit about the issue. Thanks in advance.