Configs#

Base Configs

class nerfstudio.configs.base_config.InstantiateConfig(_target: Type)[source]#

Bases: PrintableConfig

Config class for instantiating an the class specified in the _target attribute.

setup(**kwargs) Any[source]#

Returns the instantiated object using the config.

class nerfstudio.configs.base_config.LocalWriterConfig(_target: ~typing.Type = <class 'nerfstudio.utils.writer.LocalWriter'>, enable: bool = False, stats_to_track: ~typing.Tuple[~nerfstudio.utils.writer.EventName, ...] = (<EventName.ITER_TRAIN_TIME: 'Train Iter (time)'>, <EventName.TRAIN_RAYS_PER_SEC: 'Train Rays / Sec'>, <EventName.CURR_TEST_PSNR: 'Test PSNR'>, <EventName.VIS_RAYS_PER_SEC: 'Vis Rays / Sec'>, <EventName.TEST_RAYS_PER_SEC: 'Test Rays / Sec'>, <EventName.ETA: 'ETA (time)'>), max_log_size: int = 10)[source]#

Bases: InstantiateConfig

Local Writer config

enable: bool = False#

if True enables local logging, else disables

max_log_size: int = 10#

maximum number of rows to print before wrapping. if 0, will print everything.

setup(banner_messages: Optional[List[str]] = None, **kwargs) Any[source]#

Instantiate local writer

Parameters

banner_messages – List of strings that always print at the bottom of screen.

stats_to_track: Tuple[EventName, ...] = (<EventName.ITER_TRAIN_TIME: 'Train Iter (time)'>, <EventName.TRAIN_RAYS_PER_SEC: 'Train Rays / Sec'>, <EventName.CURR_TEST_PSNR: 'Test PSNR'>, <EventName.VIS_RAYS_PER_SEC: 'Vis Rays / Sec'>, <EventName.TEST_RAYS_PER_SEC: 'Test Rays / Sec'>, <EventName.ETA: 'ETA (time)'>)#

specifies which stats will be logged/printed to terminal

class nerfstudio.configs.base_config.LoggingConfig(relative_log_dir: ~pathlib.Path = PosixPath('.'), steps_per_log: int = 10, max_buffer_size: int = 20, local_writer: ~nerfstudio.configs.base_config.LocalWriterConfig = <factory>, profiler: ~typing.Literal['none', 'basic', 'pytorch'] = 'basic')[source]#

Bases: PrintableConfig

Configuration of loggers and profilers

local_writer: LocalWriterConfig#

if provided, will print stats locally. if None, will disable printing

max_buffer_size: int = 20#

maximum history size to keep for computing running averages of stats. e.g. if 20, averages will be computed over past 20 occurrences.

profiler: Literal['none', 'basic', 'pytorch'] = 'basic'#

how to profile the code; “basic” - prints speed of all decorated functions at the end of a program. “pytorch” - same as basic, but it also traces few training steps.

relative_log_dir: Path = PosixPath('.')#

relative path to save all logged events

steps_per_log: int = 10#

number of steps between logging stats

class nerfstudio.configs.base_config.MachineConfig(seed: int = 42, num_devices: int = 1, num_machines: int = 1, machine_rank: int = 0, dist_url: str = 'auto', device_type: Literal['cpu', 'cuda', 'mps'] = 'cuda')[source]#

Bases: PrintableConfig

Configuration of machine setup

device_type: Literal['cpu', 'cuda', 'mps'] = 'cuda'#

device type to use for training

dist_url: str = 'auto'#

distributed connection point (for DDP)

machine_rank: int = 0#

current machine’s rank (for DDP)

num_devices: int = 1#

total number of devices (e.g., gpus) available for train/eval

num_machines: int = 1#

total number of distributed machines available (for DDP)

seed: int = 42#

random seed initialization

class nerfstudio.configs.base_config.PrintableConfig[source]#

Bases: object

Printable Config defining str function

class nerfstudio.configs.base_config.ViewerConfig(relative_log_filename: str = 'viewer_log_filename.txt', websocket_port: Optional[int] = None, websocket_port_default: int = 7007, websocket_host: str = '0.0.0.0', num_rays_per_chunk: int = 32768, max_num_display_images: int = 512, quit_on_train_completion: bool = False, image_format: Literal['jpeg', 'png'] = 'jpeg', jpeg_quality: int = 75, make_share_url: bool = False, camera_frustum_scale: float = 0.1, default_composite_depth: bool = True)[source]#

Bases: PrintableConfig

Configuration for viewer instantiation

camera_frustum_scale: float = 0.1#

Scale for the camera frustums in the viewer.

default_composite_depth: bool = True#

The default value for compositing depth. Turn off if you want to see the camera frustums without occlusions.

image_format: Literal['jpeg', 'png'] = 'jpeg'#

Image format viewer should use; jpeg is lossy compression, while png is lossless.

jpeg_quality: int = 75#

Quality tradeoff to use for jpeg compression.

make_share_url: bool = False#

print a shareable URL. This flag is ignored in the legacy version of the viewer.

Type

Viewer beta feature

max_num_display_images: int = 512#

Maximum number of training images to display in the viewer, to avoid lag. This does not change which images are actually used in training/evaluation. If -1, display all.

num_rays_per_chunk: int = 32768#

number of rays per chunk to render with viewer

quit_on_train_completion: bool = False#

Whether to kill the training job when it has completed. Note this will stop rendering in the viewer.

relative_log_filename: str = 'viewer_log_filename.txt'#

Filename to use for the log file.

websocket_host: str = '0.0.0.0'#

The host address to bind the websocket server to.

websocket_port: Optional[int] = None#

The websocket port to connect to. If None, find an available port.

websocket_port_default: int = 7007#

The default websocket port to connect to if websocket_port is not specified