NVlabs / neuralangelo

Official implementation of "Neuralangelo: High-Fidelity Neural Surface Reconstruction" (CVPR 2023)

Home Page:https://research.nvidia.com/labs/dir/neuralangelo/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Transforms.json file missing

Mainamathenge opened this issue · comments

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

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

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.

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.