Addressed TODO in full_images_datamanager.py to return image resolution as train rays (#3312)

* addressed a todo in full_images_datamanager.py that should return the resolution of the image being rendered

* fixed docstring get_train_rays_per_batch
This commit is contained in:
Alex Jean authored and GitHub committed 2024-08-21 21:59:44 +00:00
1 parent a281d99eac
commit 36d5e35801
1 file changed
+7 -2
@@ -332,8 +332,13 @@ class FullImageDatamanager(DataManager, Generic[TDataset]):
return {} return {}
def get_train_rays_per_batch(self): def get_train_rays_per_batch(self):
# TODO: fix this to be the resolution of the last image rendered """Returns resolution of the image returned from datamanager."""
return 800 * 800 if len(self.cached_train) != 0:
h = self.cached_train[0]["image"].shape[0]
w = self.cached_train[0]["image"].shape[1]
return h * w
else:
return 800 * 800
def next_train(self, step: int) -> Tuple[Cameras, Dict]: def next_train(self, step: int) -> Tuple[Cameras, Dict]:
"""Returns the next training batch """Returns the next training batch