Add eval data to image_rename_map (#3396)

* Add eval data to image_rename_map

* Follow name convention

---------

Co-authored-by: Brent Yi <yibrenth@gmail.com>
Co-authored-by: J.Y. <132313008+jb-ye@users.noreply.github.com>
This commit is contained in:
authored and GitHub committed 2024-09-03 01:35:54 +00:00
1 parent d395aa2e53
commit a6214921f8
1 file changed
+7 -4
@@ -74,6 +74,9 @@ class ImagesToNerfstudioDataset(ColmapConverterToNerfstudioDataset):
same_dimensions=self.same_dimensions,
keep_image_dir=False,
)
image_rename_map = dict(
(a.relative_to(self.data).as_posix(), b.name) for a, b in image_rename_map_paths.items()
)
if self.eval_data is not None:
eval_image_rename_map_paths = process_data_utils.copy_images(
self.eval_data,
@@ -85,11 +88,11 @@ class ImagesToNerfstudioDataset(ColmapConverterToNerfstudioDataset):
same_dimensions=self.same_dimensions,
keep_image_dir=True,
)
image_rename_map_paths.update(eval_image_rename_map_paths)
eval_image_rename_map = dict(
(a.relative_to(self.eval_data).as_posix(), b.name) for a, b in eval_image_rename_map_paths.items()
)
image_rename_map.update(eval_image_rename_map)
image_rename_map = dict(
(a.relative_to(self.data).as_posix(), b.name) for a, b in image_rename_map_paths.items()
)
num_frames = len(image_rename_map)
summary_log.append(f"Starting with {num_frames} images")