mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-06 07:48:50 +08:00
Subclassed abstract cached dataloader, for things like generic NeRFs where data fits in memory
This commit is contained in:
1 parent
f5a354fdb0
commit
667de0b758
1 file changed
+8
@@ -20,6 +20,7 @@ from abc import abstractmethod
|
|||||||
import random
|
import random
|
||||||
from typing import Dict, List, Tuple, Union
|
from typing import Dict, List, Tuple, Union
|
||||||
from omegaconf import ListConfig
|
from omegaconf import ListConfig
|
||||||
|
import torch
|
||||||
|
|
||||||
from torchtyping import TensorType
|
from torchtyping import TensorType
|
||||||
|
|
||||||
@@ -191,6 +192,13 @@ class AbstractDataloaderV2(nn.Module):
|
|||||||
"""Returns the next batch of data from the eval dataloader"""
|
"""Returns the next batch of data from the eval dataloader"""
|
||||||
|
|
||||||
|
|
||||||
|
class AbstractCachedDataloaderV2(AbstractDataloaderV2):
|
||||||
|
"""Subclass of the new V2 dataloader that is used for when things fit in memory"""
|
||||||
|
|
||||||
|
camera_to_world: torch.Tensor
|
||||||
|
intrinsics: torch.Tensor
|
||||||
|
|
||||||
|
|
||||||
class TrainDataloader:
|
class TrainDataloader:
|
||||||
"""Training dataloader base class."""
|
"""Training dataloader base class."""
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user