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

Change image_path to images and creates transforms.json & sparse_pc.ply #23

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ This script generates sfm_depths/ and mono_depth/ directories in the data root:

```
<data>
|---image_path
|---images
| |---<image 0>
| |---<image 1>
| |---...
Expand Down Expand Up @@ -264,7 +264,7 @@ For arbitrary COLMAP processed datasets, we expect the following directory struc

```
<base_dir>
|---image_path
|---images
| |---<image 0>
| |---<image 1>
| |---...
Expand Down
9 changes: 8 additions & 1 deletion dn_splatter/scripts/convert_colmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
from dataclasses import dataclass
from pathlib import Path
from typing import Literal
from nerfstudio.process_data import colmap_utils, hloc_utils

import tyro

"""
<base_dir>
|---image_path
|---images
| |---<image 0>
| |---<image 1>
| |---...
Expand Down Expand Up @@ -144,6 +145,12 @@ def main(self):
if self.resize:
raise NotImplementedError

print("creating transforms.json and sparse_pc.ply")
recon_dir = Path(base_dir, "colmap/sparse/0")
output_dir = Path(base_dir)
colmap_utils.colmap_to_json(recon_dir, output_dir)
print("DONE, Congratulation")


if __name__ == "__main__":
tyro.cli(ConvertColmap).main()