Files
nerfstudio/mattport/nerf/dataset/build.py
T
Ethan Weber 0b7dfcdc5d Initial ray generation and dataset code (#12)
* ray generator and cameras structure progress

* test renames

* added pass

* conflicts

* fixing some black errors

* reformated files

* merged master and .gitignore

* fixing linting

* removing old folder

* removed return False

* pylint fixes

* update

* updates

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update
2022-04-12 15:08:16 -07:00

25 lines
651 B
Python

"""
Builds the dataset
"""
import importlib
import logging
from mattport.nerf.dataset.base import Dataset
def build_dataset(config: dict) -> Dataset:
"""Returns the dataset according to the specified config.
# TODO(ethan): change the type from dict to be a dataclass
Args:
config (dict): _description_
"""
# TODO(ethan): better handle this with configs
module = importlib.import_module("mattport.nerf.dataset.blender_dataset")
dataset = module.BlenderDataset(
data_directory=config.data_directory, dataset_type=config.dataset_type, scene=config.scene
)
logging.info(dataset)
return dataset