facebookresearch / DeepSDF

Learning Continuous Signed Distance Functions for Shape Representation
MIT License
1.41k stars 259 forks source link

Account for details #8

Closed nicolasugrinovic closed 5 years ago

nicolasugrinovic commented 5 years ago

Hi , Thank you for sharing your great work. I did some quick experiments with ShapeNetCoreV1 but I cannot get to reconstruct "high frequency details" from the learned latent vector. As shown in the image GT vs. reconstruction. Are there any parameters I can change to get a more detailed reconstruction?

image

jjparkcv commented 5 years ago

Hi, is this model part of training or testing data?

Either ways, your best bet would be to sample more aggressively near the surface, (i.e. lower variance in sampling in PreprocessMesh.cpp) and decrease the L2 regularization of the latent vector Z (code_reg_lambda).

Let me know how that works, thanks.

nicolasugrinovic commented 5 years ago

Hi, thank you for your response. I have trained with parameters mentioned in the paper:

L2 reg = 1e-4
Truncation distance (ClampingDistance) = 0.01
Learning rate for decoder= 1e-5*B
Learning rate - latent = 1e-3
Variance in PreprocessMesh.cpp = 0.05
training epochs = 1160

However, I get the following results, were the left is GT and the right is reconstructed from latent code. The model is part of training. Selection_374

This next figure is from the paper and you get better details. Could you give me lights on what could I be doing wrong? Selection_375

jjparkcv commented 5 years ago

Hi Nicola, for high frequency details you need aggressive sampling near the surface. I notice that you used high variance, which means less aggressive surface sampling. I recommend using lower variance for SDF sample generation.

nicolasugrinovic commented 5 years ago

Hi Jeong, I have retrained with a much lower variance and the following parameters, but get the result shown in the picture, which is very similar to the one above. (All these trying to overfit with a dataset with 24 examples, inference done over training data).

L2 reg = None
Truncation distance (ClampingDistance) = 0.01
Learning rate for decoder= 1e-5*B
Learning rate - latent = 1e-3
Variance in PreprocessMesh.cpp = 0.0002
training epochs = 120000
"SamplesPerScene" = 16384
"ScenesPerBatch" = 12

I have the network specs with defaults provided by your code: "NetworkSpecs" : { "dims" : [ 512, 512, 512, 512, 512, 512, 512, 512 ], "dropout" : [0, 1, 2, 3, 4, 5, 6, 7], "dropout_prob" : 0.2, "norm_layers" : [0, 1, 2, 3, 4, 5, 6, 7], "latent_in" : [4], "xyz_in_all" : false, "use_tanh" : false, "latent_dropout" : false, "weight_norm" : true },

image

jjparkcv commented 5 years ago

Hi Kadabra, we found out some issue.

When publishing the code we turned off the test that tells you if your mesh is valid (watertight) and instead provided a list of valid meshes in some of the ShapeNet classes, and the car class is not included.

So, it's very likely that there are many non-valid meshes being used during training for your case. We are in the process of re-introducing the valid-mesh testing code in the repo.

So you might first want to try running the code in the classes that we provide the list of valid meshes (e.g. chair), and you might want to wait until we publish a fix to revive the testing.

moshanATucsd commented 5 years ago

Hi, I also want to try out the car class. @nicolasugrinovic could you kindly provide your splits files for training and testing?

moshanATucsd commented 5 years ago

Hi @jjparkcv, I am wondering what if we directly use the non-valid meshes for training, are we still able to learn some reasonable shape or not?

StephenNG59 commented 4 years ago

Hi Kadabra, we found out some issue.

When publishing the code we turned off the test that tells you if your mesh is valid (watertight) and instead provided a list of valid meshes in some of the ShapeNet classes, and the car class is not included.

So, it's very likely that there are many non-valid meshes being used during training for your case. We are in the process of re-introducing the valid-mesh testing code in the repo.

So you might first want to try running the code in the classes that we provide the list of valid meshes (e.g. chair), and you might want to wait until we publish a fix to revive the testing.

Hi, @jjparkcv. Is there a list of valid meshes somewhere but i couldn't find?

gattia commented 1 year ago

@nicolasugrinovic - did the improved code to test if the mesh was valid improve things for you?