mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-11 18:44:21 +08:00
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:
parent
a281d99eac
commit
36d5e35801
@ -332,8 +332,13 @@ class FullImageDatamanager(DataManager, Generic[TDataset]):
|
||||
return {}
|
||||
|
||||
def get_train_rays_per_batch(self):
|
||||
# TODO: fix this to be the resolution of the last image rendered
|
||||
return 800 * 800
|
||||
"""Returns resolution of the image returned from datamanager."""
|
||||
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]:
|
||||
"""Returns the next training batch
|
||||
|
||||
Loading…
Reference in New Issue
Block a user