ns-process-data: fix image renaming for the --skip-colmap case (#1459)

* Fix ns-process-data with skip colmap

* Fix docstring

* Fix pylint problem

* Change OrderedDict to dict
This commit is contained in:
Jonáš Kulhánek authored and GitHub committed 2023-02-24 20:40:52 -08:00
1 parent a28442a82c
commit 7e9af33c03
3 files changed
+24 -9

No files matched your search

+5 -1
View File
@@ -587,6 +587,7 @@ def colmap_to_json(
output_dir: Path,
camera_model: CameraModel,
camera_mask_path: Optional[Path] = None,
image_rename_map: Optional[Dict[str, str]] = None,
) -> int:
"""Converts COLMAP's cameras.bin and images.bin to a JSON file.
@@ -619,7 +620,10 @@ def colmap_to_json(
c2w = c2w[np.array([1, 0, 2, 3]), :]
c2w[2, :] *= -1
name = Path(f"./images/{im_data.name}")
name = im_data.name
if image_rename_map is not None:
name = image_rename_map[name]
name = Path(f"./images/{name}")
frame = {
"file_path": name.as_posix(),