From a6214921f8a78db60f6c3e8107d44fb384cd95b1 Mon Sep 17 00:00:00 2001 From: jiaruiyu99 <114936217+jiaruiyu99@users.noreply.github.com> Date: Tue, 3 Sep 2024 03:35:54 +0200 Subject: [PATCH] Add eval data to image_rename_map (#3396) * Add eval data to image_rename_map * Follow name convention --------- Co-authored-by: Brent Yi Co-authored-by: J.Y. <132313008+jb-ye@users.noreply.github.com> --- .../process_data/images_to_nerfstudio_dataset.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/nerfstudio/process_data/images_to_nerfstudio_dataset.py b/nerfstudio/process_data/images_to_nerfstudio_dataset.py index fa2d8b2bc..b4d22357c 100644 --- a/nerfstudio/process_data/images_to_nerfstudio_dataset.py +++ b/nerfstudio/process_data/images_to_nerfstudio_dataset.py @@ -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")