paulguerrero / pcpnet

Pytorch implementation of PCPNet
Other
169 stars 41 forks source link

I encountered some problems while training by myself #16

Open ptxaxx opened 5 months ago

ptxaxx commented 5 months ago

Hello I'm using my own data that only contains curvature, what should I do when training? I execute the following code: python train_pcpnet.py --indir ./mydata --trainset trainingset_no_noise.txt --testset validationset_no_noise.txt

 How do I choose a training mode
ptxaxx commented 5 months ago

![Uploading 1705398261776.png…]()

paulguerrero commented 5 months ago

Hi @ptxaxx , you should be able to use the --outputs argument to set which outputs you want the PCPNet to give you.

For example --outputs max_curvature min_curvature.

The data loader will then expect files containing the curvature values to be present in the dataset, having the same name as the files containing the point cloud, but ending in .curv.npy instead of .xyz.npy. These parts of the code define what filenames are expected: https://github.com/paulguerrero/pcpnet/blob/2101d43c4370674fb0a774addc5881edbbae5d48/dataset.py#L408 https://github.com/paulguerrero/pcpnet/blob/2101d43c4370674fb0a774addc5881edbbae5d48/dataset.py#L13

Hope that helps!

ptxaxx commented 5 months ago

Hello! Thank you very much for your reply!But I have some questions to ask you now. I want to use pcpnet to estimate the point cloud importance value, I use a numerical value to represent the importance of the point and put this value into the .curv file. As shown in the figure below,there is only one column of values in the .curv file. How should I modify the code to enable pcpnet to estimate point importance values? image

Very much looking forward to your reply!

paulguerrero commented 5 months ago

Hi @ptxaxx ,

If you want to use load the importance values directly without modification, loading them as curvatures won't work, as curvatures are processed in the dataloader (they are multiplied with the patch radius in line 326). You could comment out that line in the dataloader. The dataloader also expects two curvature values, so you could just write two copies of each value into the file and use only one of them as input or in the loss.

Generally using importance values likely requires some modifications of the code, so its best if you go over the dataloader, input to the network, and loss yourself to understand these parts of the code, to make sure they work as expected with your importance values.

ptxaxx commented 4 months ago

Hello! Thank you very much for your reply! May I share the code for calculating maximum and minimum curvature?Also, may I ask if I need the same number of point clouds for each model when creating a dataset? Very much looking forward to your reply!

paulguerrero commented 4 months ago

The curvature computation code is quite hacky and written in Matlab. If you are still interested, the code is in this repo: https://github.com/hexygen/sample_mesh (you have been warned :) ) The point clouds do not need to have the same number of points.