NVlabs / neuralangelo

Official implementation of "Neuralangelo: High-Fidelity Neural Surface Reconstruction" (CVPR 2023)
https://research.nvidia.com/labs/dir/neuralangelo/
Other
4.27k stars 383 forks source link

Transforms.json file missing #162

Open Mainamathenge opened 7 months ago

Mainamathenge commented 7 months ago

I am getting this error when runnong the files on colab

Screenshot from 2023-11-29 16-51-27 the json file is not present in its path Screenshot from 2023-11-29 16-53-13

davidceka commented 7 months ago

you need to check the data preparation part, there's a precise script that creates the transforms.json for you

weich16 commented 7 months ago

Colab seems have some issues with relative path, which leads to the corruption during executing preprocess.sh. This line doesn't actually work: python3 projects/neuralangelo/scripts/convert_data_to_json.py --data_dir ${data_path} --scene_type ${4} You can redo this line manually, substitute the relative path to absolute path maybe.

codefri commented 7 months ago

As was mentioned the relative import of parent submodules does not work in colab. For dummys like me here's a full workaround: Change the import line in projects/neuralangelo/scripts/convert_data_to_json.py: from from third_party.colmap.scripts.python.read_write_model import read_model, qvec2rotmat # NOQA to

from importlib.machinery import SourceFileLoader

module = SourceFileLoader("colmap_scripts", "/content/neuralangelo/third_party/colmap/scripts/python/read_write_model.py").load_module()

from colmap_scripts import read_model, qvec2rotmat

You can accomplish this by first downloading the git repository, changing the file locally and re-uploading it into the colab. Then run the preprocess.sh again and it should work.