Open Mainamathenge opened 12 months ago
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.
I am getting this error when runnong the files on colab
the json file is not present in its path