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 can i get transforms.json #8

Open
yang1hu opened this issue Apr 12, 2024 · 9 comments
Open

how can i get transforms.json #8

yang1hu opened this issue Apr 12, 2024 · 9 comments

Comments

@yang1hu
Copy link

yang1hu commented Apr 12, 2024

hello,this is a great project. however! I wanna use my custom dataset, the dataset is from a video and convert with colmap, i can not get the transfroms,json,how can i get it ,thank you very much

@XuqianRen
Copy link
Collaborator

@yang1hu Hi, thank you. You can get the colmap pose with transfrom.json through nerfstudio data process script:
https://docs.nerf.studio/quickstart/custom_dataset.html#processing-data
If you already get colmap pose and want to transfer it to transform.json, you can skip colmap by adding --skip-colmap

@StevenssW
Copy link

I also encountered this problem, when I do data conversion through nerfstudio in ubuntu, camera.txt and image.txt are generated instead of camera.bin and image.bin, which causes transform.json generation to fail

@yang1hu
Copy link
Author

yang1hu commented Apr 15, 2024

@yang1hu Hi, thank you. You can get the colmap pose with transfrom.json through nerfstudio data process script: https://docs.nerf.studio/quickstart/custom_dataset.html#processing-data If you already get colmap pose and want to transfer it to transform.json, you can skip colmap by adding --skip-colmap

thanks for your tips. I have handle the problem.

@yang1hu
Copy link
Author

yang1hu commented Apr 15, 2024

@yang1hu Hi, thank you. You can get the colmap pose with transfrom.json through nerfstudio data process script: https://docs.nerf.studio/quickstart/custom_dataset.html#processing-data If you already get colmap pose and want to transfer it to transform.json, you can skip colmap by adding --skip-colmap

I did get the transforms.json, however , i use the dataset to train ,when i execute the train command i get the problem in the picture ,the command is: ns-train dn-splatter --data /root/autodl-tmp/dn-splatter/poster --pipeline.model.use-depth-smooth-loss True --pipeline.model.use-sparse-loss True --pipeline.model.use-binary-opacities True
question

@maturk
Copy link
Owner

maturk commented Apr 15, 2024

@yang1hu , this issue is caused by changes in the main branch of nerfstudio within the last week. Thanks for pointing this out.

So the problem is that dn-splatter inherits from the base splatfacto model upstream in nerfstudio. However, the nerfstudio repo changes quite often, so I set the nerfstudio requirement in the pyproject.toml as >=1.0.2. But looks like some breaking changes have occurred in a recent verison so I need to update this project to account for this. Mainy @oseiskar added pose optimization and currently this project does not support it. Give me a few moments and I can fix this issue.

@maturk
Copy link
Owner

maturk commented Apr 15, 2024

@yang1hu this should be fixed by #12. Let me know if you find any more bugs.

@pablovela5620
Copy link
Contributor

@yang1hu this should be fixed by #12. Let me know if you find any more bugs.

This latest addition has broken things for me

File "/home/pablo/0Dev/personal/forked-repos/dn-splatter/dn_splatter/dn_model.py", line 245, in populate_modules
    self.camera_optimizer: CameraOptimizer = self.config.camera_optimizer.setup(
AttributeError: 'DNSplatterModelConfig' object has no attribute 'camera_optimizer'

is there a specific version of nerfstudio I should be installing to ensure camera_optimizer is in splatfacto? or should I also be adding the camera_optimizer to DNSplatterModelConfig

@maturk
Copy link
Owner

maturk commented Apr 15, 2024

@yang1hu this should be fixed by #12. Let me know if you find any more bugs.

This latest addition has broken things for me

File "/home/pablo/0Dev/personal/forked-repos/dn-splatter/dn_splatter/dn_model.py", line 245, in populate_modules
    self.camera_optimizer: CameraOptimizer = self.config.camera_optimizer.setup(
AttributeError: 'DNSplatterModelConfig' object has no attribute 'camera_optimizer'

is there a specific version of nerfstudio I should be installing to ensure camera_optimizer is in splatfacto? or should I also be adding the camera_optimizer to DNSplatterModelConfig

I see, so the unfortunate thing is that nerfstudio version 1.0.3 from before last week worked fine, but a recent merge to enable camera optimization with the splatfacto model has been merged which is essentially a "breaking" change for any model subclassing splatfacto, also the version has not been updated. My suggestion is to simply git pull the latest main from nerfstudio. I will see if I can hack something that allows both previous and the most latest nerfstudio version to work simultaneously. Sorry about this, this is a good learning experience for me trying to ship any code xD Another solution would be to put a stricter version of nerfstudio as a project dependency for dn-splatter.

EDIT: should be addressed here: #14

@pablovela5620
Copy link
Contributor

pablovela5620 commented Apr 15, 2024

@maturk so basically I would want to replace in pyproject.toml nerfstudio>=1.0.3 with nerfstudio@https://github.com/nerfstudio-project/nerfstudio so that I have the latest main branch, I do think this means that anyone that hasn't read this issue and tries to run the project will come up on this issue. It may be worthwhile making a PR just for that for now (since the current version of 1.0.3 doesn't include the optimization code)

edit: I realized that the build system for this isn't with poetry so the only way is to either do it manually in the conda environment or with the pixi.toml for now by adding

[pypi-dependencies]
nerfstudio = { git = "https://github.com/nerfstudio-project/nerfstudio.git", rev = "a64026f8db23a4233327a1d0303e6082bf5b9805" }
dn-splatter = { path = ".", editable = true}

and removing

nerfstudio>=1.0.3

from the pyproject.toml

ichsan2895 added a commit to ichsan2895/dn-splatter that referenced this issue Apr 20, 2024
Addressed this issue:
[how can i get transforms.json](maturk#8)
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

5 participants