From cf9608f9275edf9c76afc94a4584bbdb195e1548 Mon Sep 17 00:00:00 2001 From: Asxcvbn <63904802+Asxcvbn@users.noreply.github.com> Date: Wed, 12 Apr 2023 18:51:13 +0800 Subject: [PATCH] fixed crush when img and pose cannot match in ngp.py by placing self.poses += [c2w] in the try block --- datasets/ngp.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/datasets/ngp.py b/datasets/ngp.py index 36f7861..ab46574 100644 --- a/datasets/ngp.py +++ b/datasets/ngp.py @@ -52,13 +52,14 @@ def read_meta(self, split): for frame in tqdm(frames): c2w = np.array(frame['transform_matrix'])[:3, :4] - self.poses += [c2w] + try: img_path = os.path.join(self.root_dir, f"{frame['file_path']}") img = read_image(img_path, self.img_wh) self.rays += [img] + self.poses += [c2w] except: print("can not read image")