ZENGYIMING-EAMON / CorrNet3D

CorrNet3D: Unsupervised End-to-end Learning of Dense Correspondence for 3D Point Clouds
GNU General Public License v3.0
137 stars 21 forks source link

How to feed a pair of raw point clouds and get the learned correspondence matrix? #2

Closed sun6s closed 3 years ago

sun6s commented 3 years ago

Great work! By feeding a pair of raw point clouds, how can I get the learnable correspondence matrix. Thanks.

cainiaoshidai commented 3 years ago

你好, 不知道你是不是想问这个,

代码中通过 pairwise_distance, _ = self._KFNN(HIER_feat1, HIER_feat2)

来得到对应矩阵。

ZENGYIMING-EAMON commented 3 years ago

Hi, thank you for your interests! Please see the forward of this model (lit_corrnet3d_clean.py) :

def forward(self, xyz1, xyz2): 
    HIER_feat1, pooling_feat1 = self.encoder(transpose_xyz=xyz1.transpose(1, 2)) 
    HIER_feat2, pooling_feat2 = self.encoder(transpose_xyz=xyz2.transpose(1, 2))      
    pairwise_distance, _ = self._KFNN(HIER_feat1, HIER_feat2)
    similarity = 1/(pairwise_distance + 1e-6) 
    p = self.DeSmooth(similarity.transpose(1,2).contiguous()).transpose(1,2).contiguous() 
    return p 

the returned P matrix is the correspondence matrix.

sun6s commented 3 years ago

@ZENGYIMING-EAMON Thanks. I mean how to feed a pair of my own raw point clouds to get the learnable correspondence matrix. I want to use your method as initialization for non-rigid registration.

ZENGYIMING-EAMON commented 3 years ago

This code is organized based on the popular pytorch_lightning framework, you can load the ckpt and inference as following: model = LitCorrNet3D.load_from_checkpoint(CKPT_PATH) model.eval() p = model(xyz1, xyz2)

caijinana commented 3 years ago

hello Did you succeed?

eashratj commented 7 months ago

In the provided training data : Keys: ['xyz1', 'xyz2'] xzy1: (1024, 3) Dataset_xyz1: , Shape: (1024, 3), Dtype: float32 & xzy2: (230000, 1024, 3) Dataset_xyz2: , Shape: (230000, 1024, 3), Dtype: float32 I think i am not being able to understand the dataset structure! why xyz1 has only 1 point cloud and xyz2 has 230k ? i would be really grateful if anyone can explain me that !