mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-21 23:25:39 +08:00
Pipeline v2 (#258)
* Model class done, pipeline class still needs more visualization stuffs * Renaming the BaseDataContainer to DataloaderOutputs and adding documentation * Pushing more documentation, removing some trivial functions * Updating dict typing * Removing config dicts for collider * Passing tests * Pushing shell new dataloader * Saving work, need to fix NGP model's get_loss_dict and Pipeline * V1 of the ngp pipeline should be done. Need train script and debugging * Updating with latest instant-ngp code * Syntax updates from latest ngp graph code * Linter, removing unneeded code in new NGP graph code * Style * Should be good now. Linter is happy and the code is verbatum current instant-ngp * Everything done except novel view testing code * Fixing some nitpicks * Debugging dataloader * merged master * WOP. integrating pipeline with configs and notebook demo * removing model folder * a lot of name changing from Graph to Model * in progress... changing trainer to use pipeline... broken right now * pipeline code runs * switched to val dataset * makes run_eval.py work * updated configs for pipeline change * fixing test_run_train script * fixing black and linting * fix docs * small updates to trainer Co-authored-by: Jake Austin <jake-austin@berkeley.edu>
This commit is contained in:
1 parent
670c2a01db
commit
0b042be956
55 files changed
+8595
-8263
No files matched your search
@@ -4,14 +4,14 @@ Test samplers
|
||||
import torch
|
||||
|
||||
from nerfactory.cameras.rays import RayBundle
|
||||
from nerfactory.graphs.modules.ray_sampler import (
|
||||
from nerfactory.models.modules.ray_sampler import (
|
||||
LinearDisparitySampler,
|
||||
LogSampler,
|
||||
PDFSampler,
|
||||
SqrtSampler,
|
||||
UniformSampler,
|
||||
)
|
||||
from nerfactory.graphs.modules.scene_colliders import NearFarCollider
|
||||
from nerfactory.models.modules.scene_colliders import NearFarCollider
|
||||
|
||||
|
||||
def test_uniform_sampler():
|
||||
|
||||
+12
-13
@@ -20,33 +20,32 @@ def set_reduced_config(config: DictConfig):
|
||||
config.trainer.max_num_iterations = 2
|
||||
# reduce dataset factors; set dataset to test
|
||||
# switch to using the vanilla ImageDataset class
|
||||
config.data.image_dataset_train._target_ = "nerfactory.data.image_dataset.ImageDataset"
|
||||
config.pipeline.dataloader.image_dataset_type = "rgb"
|
||||
|
||||
config.data.dataset_inputs_train = {
|
||||
"_target_": "nerfactory.data.datasets.Blender",
|
||||
config.pipeline.dataloader.train_dataset = {
|
||||
"_target_": "nerfactory.dataloaders.datasets.Blender",
|
||||
"data_directory": "tests/data/lego_test",
|
||||
"downscale_factor": 16,
|
||||
}
|
||||
config.data.dataloader_train.image_sampler.num_images_to_sample_from = 1
|
||||
config.data.dataloader_train.pixel_sampler.num_rays_per_batch = 4
|
||||
config.data.image_dataset_eval._target_ = "nerfactory.data.image_dataset.ImageDataset"
|
||||
config.data.dataset_inputs_eval = {
|
||||
"_target_": "nerfactory.data.datasets.Blender",
|
||||
config.pipeline.dataloader.train_num_images_to_sample_from = 1
|
||||
config.pipeline.dataloader.train_num_rays_per_batch = 4
|
||||
config.pipeline.dataloader.eval_dataset = {
|
||||
"_target_": "nerfactory.dataloaders.datasets.Blender",
|
||||
"data_directory": "tests/data/lego_test",
|
||||
"downscale_factor": 16,
|
||||
}
|
||||
|
||||
# reduce graph factors
|
||||
config.graph.num_coarse_samples = 4
|
||||
config.graph.num_importance_samples = 4
|
||||
# reduce model factors
|
||||
config.pipeline.model.num_coarse_samples = 4
|
||||
config.pipeline.model.num_importance_samples = 4
|
||||
# set logging to tmp
|
||||
config.logging.writer.TensorboardWriter.log_dir = "/tmp/"
|
||||
# remove viewer
|
||||
config.viewer.enable = False
|
||||
|
||||
# graph specific config settings
|
||||
# model specific config settings
|
||||
if config.method_name == "instant_ngp":
|
||||
config.graph.field_implementation = "torch"
|
||||
config.pipeline.model.field_implementation = "torch"
|
||||
|
||||
return config
|
||||
|
||||
|
||||
Reference in new issue
Block a user