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 export the mesh file, such as .obj or .ply file #3

Open
muximuxi opened this issue Aug 9, 2023 · 5 comments
Open

How to export the mesh file, such as .obj or .ply file #3

muximuxi opened this issue Aug 9, 2023 · 5 comments

Comments

@muximuxi
Copy link

muximuxi commented Aug 9, 2023

No description provided.

@muximuxi
Copy link
Author

muximuxi commented Aug 9, 2023

I see the code.

@muximuxi muximuxi closed this as completed Aug 9, 2023
@muximuxi
Copy link
Author

Can the nerf export the mesh ply file? when I run python train_per_scene.py and set the nerf.yaml config file export_mesh=1, and I can't find the ply file.Expect your reply! thank you.

@muximuxi muximuxi reopened this Aug 11, 2023
@apchenstu
Copy link
Collaborator

Okay, could you show me your script?

@muximuxi
Copy link
Author

muximuxi commented Aug 15, 2023

Okay, could you show me your script?
I set the exportation in configs/nerf.yaml like this :
exportation:
render_only: 0
render_test: 0
render_train: 0
render_path: 0
export_mesh: 1
export_mesh_only: 0
then python train_per_scene.py configs/nerf.yaml defaults.expname=lego dataset.datadir=./data/nerf_synthetic/lego
Traceback (most recent call last):
File "/root/zst_workspace/jupyter/factor-fields/train_per_scene.py", line 259, in
export_mesh("./logs/lego/lego.th")
File "FactorFields/lib/python3.9/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/root/zst_workspace/jupyter/factor-fields/train_per_scene.py", line 35, in export_mesh
cfg.defaults.device = device
File "FactorFields/lib/python3.9/site-packages/omegaconf/dictconfig.py", line 338, in setattr
self._format_and_raise(key=key, value=value, cause=e)
File "FactorFields/lib/python3.9/site-packages/omegaconf/base.py", line 190, in _format_and_raise
format_and_raise(
File "FactorFields/lib/python3.9/site-packages/omegaconf/_utils.py", line 821, in format_and_raise
_raise(ex, cause)
File "FactorFields/lib/python3.9/site-packages/omegaconf/_utils.py", line 719, in _raise
raise ex.with_traceback(sys.exc_info()[2]) # set end OC_CAUSE=1 for full backtrace
File "FactorFields/lib/python3.9/site-packages/omegaconf/dictconfig.py", line 334, in setattr
self.__set_impl(key, value)
File "FactorFields/lib/python3.9/site-packages/omegaconf/dictconfig.py", line 318, in __set_impl
self._set_item_impl(key, value)
File "FactorFields/lib/python3.9/site-packages/omegaconf/basecontainer.py", line 577, in _set_item_impl
self.dict["_content"][key] = wrap(key, value)
File "FactorFields/lib/python3.9/site-packages/omegaconf/basecontainer.py", line 542, in wrap
return _maybe_wrap(
File "FactorFields/lib/python3.9/site-packages/omegaconf/omegaconf.py", line 1035, in _maybe_wrap
return _node_wrap(
File "FactorFields/lib/python3.9/site-packages/omegaconf/omegaconf.py", line 996, in _node_wrap
node = AnyNode(value=value, key=key, parent=parent)
File "FactorFields/lib/python3.9/site-packages/omegaconf/nodes.py", line 116, in init
super().init(
File "FactorFields/lib/python3.9/site-packages/omegaconf/nodes.py", line 27, in init
self._set_value(value) # lgtm [py/init-calls-subclass]
File "FactorFields/lib/python3.9/site-packages/omegaconf/nodes.py", line 44, in _set_value
self._val = self.validate_and_convert(value)
File "FactorFields/lib/python3.9/site-packages/omegaconf/nodes.py", line 57, in validate_and_convert
return self._validate_and_convert_impl(value)
File "FactorFields/lib/python3.9/site-packages/omegaconf/nodes.py", line 133, in _validate_and_convert_impl
raise UnsupportedValueType(
omegaconf.errors.UnsupportedValueType: Value 'device' is not a supported primitive type
full_key: defaults.device
object_type=dict

@apchenstu
Copy link
Collaborator

please refer to here you can set export_mesh_only to be true

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