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

How to generate dmtit file, .obj #135

Open
Williamarvin opened this issue Jun 16, 2023 · 1 comment
Open

How to generate dmtit file, .obj #135

Williamarvin opened this issue Jun 16, 2023 · 1 comment

Comments

@Williamarvin
Copy link

After running train.py, I cannot seem to generate the dmtit file but instead, only output png files, do you know how i can do that? Also, it stops after all the training is done e.g 1000/1000, and showed psnr 7.89.. So my main concern is how to generate these dmtit file, not just png

Thanks in advance

These are the parameters
{
"ref_mesh": "data/fox/needed",
"random_textures": true,
"iter": 1000,
"save_interval": 100,
"texture_res": [ 1024, 1024 ],
"train_res": [700, 700],
"batch": 1,
"learning_rate": [0.03, 0.03],
"kd_min" : [0.03, 0.03, 0.03],
"kd_max" : [0.8, 0.8, 0.8],
"ks_min" : [0, 0.08, 0],
"ks_max" : [0, 1.0, 1.0],
"dmtet_grid" : 64,
"mesh_scale" : 7,
"camera_space_light" : true,
"background" : "white",
"display" : [{"bsdf":"kd"}, {"bsdf":"ks"}, {"bsdf" : "normal"}],
"out_dir": "nerd_ehead"
}

@jmunkberg
Copy link
Collaborator

Hello @Williamarvin ,

With the dmtet file, are you referring to the surface mesh? That should be saved automatically after the first pass. Here is the relevant code: https://github.com/NVlabs/nvdiffrec/blob/main/train.py#L613

The dmtet tetrahedral mesh used in the optimization is read from disk as shown here: https://github.com/NVlabs/nvdiffrec/blob/main/geometry/dmtet.py#L171

There are instructions here if you want to generate tet meshes of different resolutions: https://github.com/NVlabs/nvdiffrec/tree/main/data/tets

From your parameters, "mesh_scale" : 7, looks fairly high. The tet grid should tightly cover the bounding box of your model for best results, otherwise triangles density is wasted. Easiest to look at the pngs from early optimization steps.

I would also recommend a batch size of 4-8 if you have enough memory.

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