Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I encountered some problems while training by myself #16

Open
ptxaxx opened this issue Jan 16, 2024 · 6 comments
Open

I encountered some problems while training by myself #16

ptxaxx opened this issue Jan 16, 2024 · 6 comments

Comments

@ptxaxx
Copy link

ptxaxx commented Jan 16, 2024

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
Copy link
Author

ptxaxx commented Jan 16, 2024

Uploading 1705398261776.png…

@paulguerrero
Copy link
Owner

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:

def load_shape_by_index(self, shape_ind):

def load_shape(point_filename, normals_filename, curv_filename, pidx_filename):

Hope that helps!

@ptxaxx
Copy link
Author

ptxaxx commented Jan 31, 2024

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
Copy link
Owner

paulguerrero commented Feb 2, 2024

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
Copy link
Author

ptxaxx commented Mar 4, 2024

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
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants