Skip to content

Commit 2fe162c

Browse files
authored
Uses all images for training process
1 parent 906e209 commit 2fe162c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

nerfstudio/data/dataparsers/nerfstudio_dataparser.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,16 @@ def _generate_dataparser_outputs(self, split="train"):
208208
# find train and eval indices based on the eval_mode specified
209209
if self.config.eval_mode == "fraction":
210210
i_train, i_eval = get_train_eval_split_fraction(image_filenames, self.config.train_split_fraction)
211+
i_train = [i for i, path in enumerate(image_filenames)]
212+
i_train = np.array(i_train, dtype=np.int32)
211213
elif self.config.eval_mode == "filename":
212214
i_train, i_eval = get_train_eval_split_filename(image_filenames)
215+
i_train = [i for i, path in enumerate(image_filenames)]
216+
i_train = np.array(i_train, dtype=np.int32)
213217
elif self.config.eval_mode == "interval":
214218
i_train, i_eval = get_train_eval_split_interval(image_filenames, self.config.eval_interval)
219+
i_train = [i for i, path in enumerate(image_filenames)]
220+
i_train = np.array(i_train, dtype=np.int32)
215221
elif self.config.eval_mode == "all":
216222
CONSOLE.log(
217223
"[yellow] Be careful with '--eval-mode=all'. If using camera optimization, the cameras may diverge in the current implementation, giving unpredictable results."
@@ -222,6 +228,7 @@ def _generate_dataparser_outputs(self, split="train"):
222228

223229
if split == "train":
224230
indices = i_train
231+
225232
elif split in ["val", "test"]:
226233
indices = i_eval
227234
else:

0 commit comments

Comments
 (0)