XuyangBai / PPF-FoldNet

PyTorch reimplementation for "PPF-FoldNet: Unsupervised Learning of Rotation Invariant 3D Local Descriptors" https://arxiv.org/abs/1808.10322
99 stars 19 forks source link

How to feed my own ply file into the pretrained model? #4

Closed Arthurfangm closed 4 years ago

Arthurfangm commented 4 years ago

Hello! thanks for sharing your codes. I have a question that I don't know which api or function in your codes to use to feed my own .ply file into the pretrained model in the pretrained directory. I want to test the model to have a more clear understanding about the Encode and Decode process. Hope you can get me some tips, thanks a lot.

XuyangBai commented 4 years ago

Hi @Arthurfangm If you want to try the pre-trained model on your own .ply file, for training you need

  1. Modify the code in the dataset.py here to let the dataset class load your own data. If you don't have the pose of ply file(actually it is not necessary as the PPF-FoldNet is rotational invariant), you need to modify the aligned to false.
  2. Modify the path of the pre-trained model in train.py here to let the network load the pre-trained weight.
  3. Start training by python train.py
  4. You can set the breakpoints in models/model_conv1d.py to get familiar with the Auto-Encoder.

Or if you just want to evaluate the model on your data, you need to modify the script in geometric_registration, the preparation.py file is for generating the point pair feature for each point in the input point cloud, and the evaluate_ppf.py file is for using the ppf and extract the feature descriptors using the pre-trained model.

Arthurfangm commented 4 years ago

Thanks a lot! I have had a comprehension for how to use the preparation.py and the evaluate.py file, however I realized I did't have the cloud_bin_0.keypts.bin file. So before I run the preparation.py, I have to generate the .keypts.bin file of my own .ply file.

XuyangBai commented 4 years ago

Yes, the authors of 3DMatch have provided the keypts location file, you can also randomly select several points as keypoints, the performance will not change much.

Arthurfangm commented 4 years ago

Yes, I see, thanks again!