mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-26 10:59:53 +08:00
Train and eval data splits (Nerfbusters) (#2207)
* nerfbusters dataparser * nerfbuster dataparser and visualization of eval views * resolved some errors from pyright * enable ns-process-data to take two videos as input and use one for eval and the other for train * resolve some pyright issues * instead of data being a tuple, I added eval_data as another argument * implemented train eval split for all cases * implemented train eval split for all cases * reverting equi changes * reverting reality capture changes * raise valueerror * revert comment * added split override code back to dataparser * reverted one change * using image border now * adding docs --------- Co-authored-by: Ethan Weber <eweb0124@gmail.com>
This commit is contained in:
1 parent
388fcb09e1
commit
9b03299d40
14 files changed
+288
-83
No files matched your search
@@ -169,7 +169,12 @@ class Viewer:
|
||||
# draw indices, roughly evenly spaced
|
||||
return np.linspace(0, total_num - 1, num_display_images, dtype=np.int32).tolist()
|
||||
|
||||
def init_scene(self, dataset: InputDataset, train_state: Literal["training", "paused", "completed"]) -> None:
|
||||
def init_scene(
|
||||
self,
|
||||
train_dataset: InputDataset,
|
||||
train_state: Literal["training", "paused", "completed"],
|
||||
eval_dataset: Optional[InputDataset] = None,
|
||||
) -> None:
|
||||
"""Draw some images and the scene aabb in the viewer.
|
||||
|
||||
Args:
|
||||
@@ -178,10 +183,10 @@ class Viewer:
|
||||
"""
|
||||
|
||||
# draw the training cameras and images
|
||||
image_indices = self._pick_drawn_image_idxs(len(dataset))
|
||||
image_indices = self._pick_drawn_image_idxs(len(train_dataset))
|
||||
for idx in image_indices:
|
||||
image = dataset[idx]["image"]
|
||||
camera = dataset.cameras[idx]
|
||||
image = train_dataset[idx]["image"]
|
||||
camera = train_dataset.cameras[idx]
|
||||
image_uint8 = (image * 255).detach().type(torch.uint8)
|
||||
image_uint8 = image_uint8.permute(2, 0, 1)
|
||||
image_uint8 = torchvision.transforms.functional.resize(image_uint8, 100) # type: ignore
|
||||
|
||||
Reference in new issue
Block a user