From 408ab709ec62c2d4981aa218e7a53ed534761919 Mon Sep 17 00:00:00 2001 From: matsuren Date: Tue, 17 Jan 2023 05:12:55 +0900 Subject: [PATCH] Fix typo (#1231) * Fix typo COLAMP->COLMAP * Fix more typo Co-authored-by: Matthew Tancik --- docs/developer_guides/pipelines/datamanagers.md | 2 +- docs/developer_guides/pipelines/dataparsers.md | 2 +- docs/developer_guides/pipelines/fields.md | 2 +- docs/nerfology/model_components/index.md | 2 +- docs/quickstart/custom_dataset.md | 2 +- docs/quickstart/export_geometry.md | 2 +- docs/reference/contributing.md | 2 +- nerfstudio/cameras/camera_optimizers.py | 2 +- nerfstudio/cameras/camera_paths.py | 2 +- nerfstudio/cameras/camera_utils.py | 2 +- nerfstudio/cameras/cameras.py | 2 +- nerfstudio/cameras/lie_groups.py | 4 ++-- nerfstudio/cameras/rays.py | 2 +- nerfstudio/configs/base_config.py | 4 ++-- nerfstudio/data/datamanagers/base_datamanager.py | 6 +++--- .../data/dataparsers/nerfstudio_dataparser.py | 4 ++-- nerfstudio/data/dataparsers/nuscenes_dataparser.py | 4 ++-- nerfstudio/engine/callbacks.py | 2 +- nerfstudio/engine/trainer.py | 2 +- .../field_components/base_field_component.py | 2 +- nerfstudio/field_components/encodings.py | 10 +++++----- nerfstudio/field_components/field_heads.py | 2 +- nerfstudio/fields/base_field.py | 2 +- nerfstudio/fields/nerfw_field.py | 2 +- nerfstudio/fields/semantic_nerf_field.py | 2 +- nerfstudio/fields/vanilla_nerf_field.py | 2 +- nerfstudio/model_components/losses.py | 4 ++-- nerfstudio/model_components/ray_generators.py | 4 ++-- nerfstudio/model_components/ray_samplers.py | 14 +++++++------- nerfstudio/models/depth_nerfacto.py | 6 +++--- nerfstudio/models/nerfacto.py | 2 +- nerfstudio/pipelines/base_pipeline.py | 4 ++-- nerfstudio/process_data/colmap_utils.py | 4 ++-- nerfstudio/process_data/insta360_utils.py | 8 ++++---- nerfstudio/process_data/metashape_utils.py | 2 +- nerfstudio/process_data/process_data_utils.py | 2 +- nerfstudio/utils/eval_utils.py | 2 +- nerfstudio/utils/math.py | 2 +- nerfstudio/utils/plotly_utils.py | 4 ++-- nerfstudio/utils/poses.py | 2 +- nerfstudio/utils/writer.py | 2 +- nerfstudio/viewer/server/path.py | 2 +- nerfstudio/viewer/server/server.py | 2 +- nerfstudio/viewer/server/utils.py | 4 ++-- scripts/docs/add_nb_tags.py | 2 +- 45 files changed, 72 insertions(+), 72 deletions(-) diff --git a/docs/developer_guides/pipelines/datamanagers.md b/docs/developer_guides/pipelines/datamanagers.md index eb361c209..bbe3413d9 100644 --- a/docs/developer_guides/pipelines/datamanagers.md +++ b/docs/developer_guides/pipelines/datamanagers.md @@ -34,7 +34,7 @@ class DataManager(nn.Module): """Returns the next eval image. Returns: - The image index from the eval datset, the CameraRayBundle, and the RayGT dictionary. + The image index from the eval dataset, the CameraRayBundle, and the RayGT dictionary. """ ``` diff --git a/docs/developer_guides/pipelines/dataparsers.md b/docs/developer_guides/pipelines/dataparsers.md index 458abdeb5..40ef7f4fd 100644 --- a/docs/developer_guides/pipelines/dataparsers.md +++ b/docs/developer_guides/pipelines/dataparsers.md @@ -103,7 +103,7 @@ dataparser_outputs = dataparser.get_dataparser_outputs(split="train") input_dataset = InputDataset(dataparser_outputs) ``` -You can also pull out information from the DataParserOutputs for other DataMangager componenets, such as the RayGenerator. The RayGenerator generates RayBundle objects from camera and pixel indices. +You can also pull out information from the DataParserOutputs for other DataMangager components, such as the RayGenerator. The RayGenerator generates RayBundle objects from camera and pixel indices. ```python ray_generator = RayGenerator(dataparser_outputs.cameras) diff --git a/docs/developer_guides/pipelines/fields.md b/docs/developer_guides/pipelines/fields.md index f4c9c6d2e..5533db49b 100644 --- a/docs/developer_guides/pipelines/fields.md +++ b/docs/developer_guides/pipelines/fields.md @@ -56,7 +56,7 @@ class Field(nn.Module): The forward function is the main function you'll use, which takes in RaySamples returns quantities for each sample. You'll notice that the get_density function is called for every field, followed by the get_outputs function. -The get_outputs function is what you need to implement to return custom data. For example, check out of SemanticNerfField where we rely on different FieldHeads to produce correct dimensional outputs for typical quantiites. Our implemented FieldHeads have the following FieldHeadNames names. +The get_outputs function is what you need to implement to return custom data. For example, check out of SemanticNerfField where we rely on different FieldHeads to produce correct dimensional outputs for typical quantities. Our implemented FieldHeads have the following FieldHeadNames names. ```python class FieldHeadNames(Enum): diff --git a/docs/nerfology/model_components/index.md b/docs/nerfology/model_components/index.md index e3619d89e..513826edd 100644 --- a/docs/nerfology/model_components/index.md +++ b/docs/nerfology/model_components/index.md @@ -1,6 +1,6 @@ # Model components -It can be difficult getting started with NeRFs. The reserach field is still quite new and most of the key nuggets are burried in academic papers. For this reason, we have consoladated many of the key concepts into a series of guides. +It can be difficult getting started with NeRFs. The research field is still quite new and most of the key nuggets are buried in academic papers. For this reason, we have consolidated many of the key concepts into a series of guides. ```{toctree} :maxdepth: 1 diff --git a/docs/quickstart/custom_dataset.md b/docs/quickstart/custom_dataset.md index ea508a661..8192273e5 100644 --- a/docs/quickstart/custom_dataset.md +++ b/docs/quickstart/custom_dataset.md @@ -145,7 +145,7 @@ A LiDAR enabled iPhone or iPad is necessary. :alt: polycam settings ``` -Devoloper settings must be enabled in Polycam. To do this, navigate to the settings screen and select `Developer mode`. Note that this will only apply for future captures, you will not be able to process existing captures with nerfstudio. +Developer settings must be enabled in Polycam. To do this, navigate to the settings screen and select `Developer mode`. Note that this will only apply for future captures, you will not be able to process existing captures with nerfstudio. ### Process data diff --git a/docs/quickstart/export_geometry.md b/docs/quickstart/export_geometry.md index 0a50e8a0d..2b6323f35 100644 --- a/docs/quickstart/export_geometry.md +++ b/docs/quickstart/export_geometry.md @@ -42,7 +42,7 @@ ns-export pointcloud --help ## Other exporting methods -Run the folowing command to see other export methods that may exist. +Run the following command to see other export methods that may exist. ```python ns-export --help diff --git a/docs/reference/contributing.md b/docs/reference/contributing.md index 45111c373..74c1c584e 100644 --- a/docs/reference/contributing.md +++ b/docs/reference/contributing.md @@ -93,7 +93,7 @@ sphinx-autobuild docs docs/_build/html ### Adding notebooks -We support jupyter notbooks in our documentation. To improve the readability, the following custom tags can be added to the top of each code cell to hide or collapse the code. +We support jupyter notebooks in our documentation. To improve the readability, the following custom tags can be added to the top of each code cell to hide or collapse the code. | Tag | Effect | | ------------- | ---------------------------------------------------- | diff --git a/nerfstudio/cameras/camera_optimizers.py b/nerfstudio/cameras/camera_optimizers.py index b8d846f02..20aaef3bc 100644 --- a/nerfstudio/cameras/camera_optimizers.py +++ b/nerfstudio/cameras/camera_optimizers.py @@ -104,7 +104,7 @@ class CameraOptimizer(nn.Module): Args: indices: indices of Cameras to optimize. Returns: - Tranformation matrices from optimized camera coordinates coordinates + Transformation matrices from optimized camera coordinates to given camera coordinates. """ outputs = [] diff --git a/nerfstudio/cameras/camera_paths.py b/nerfstudio/cameras/camera_paths.py index 475814f5d..61c489edf 100644 --- a/nerfstudio/cameras/camera_paths.py +++ b/nerfstudio/cameras/camera_paths.py @@ -54,7 +54,7 @@ def get_spiral_path( zrate: float = 0.5, ) -> Cameras: """ - Returns a list of camera in a sprial trajectory. + Returns a list of camera in a spiral trajectory. Args: camera: The camera to start the spiral from. diff --git a/nerfstudio/cameras/camera_utils.py b/nerfstudio/cameras/camera_utils.py index ef7152dfb..bb6430717 100644 --- a/nerfstudio/cameras/camera_utils.py +++ b/nerfstudio/cameras/camera_utils.py @@ -361,7 +361,7 @@ def radial_and_tangential_undistort( max_iterations: int = 10, ) -> torch.Tensor: """Computes undistorted coords given opencv distortion parameters. - Addapted from MultiNeRF + Adapted from MultiNeRF https://github.com/google-research/multinerf/blob/b02228160d3179300c7d499dca28cb9ca3677f32/internal/camera_utils.py#L477-L509 Args: diff --git a/nerfstudio/cameras/cameras.py b/nerfstudio/cameras/cameras.py index d56ac9a6f..68da40c82 100644 --- a/nerfstudio/cameras/cameras.py +++ b/nerfstudio/cameras/cameras.py @@ -338,7 +338,7 @@ class Cameras(TensorDataclass): When coords == None (ie: when we render out the whole image associated with this camera), we run into problems since there's no way to stack each coordinate map as all coordinate maps are all different shapes. In this case, we will need to flatten each individual coordinate map and concatenate them, giving us only one batch dimension, - regaurdless of the number of prepended extra batch dimensions in the camera_indices tensor. + regardless of the number of prepended extra batch dimensions in the camera_indices tensor. Args: diff --git a/nerfstudio/cameras/lie_groups.py b/nerfstudio/cameras/lie_groups.py index 718eadad6..55f8d2b16 100644 --- a/nerfstudio/cameras/lie_groups.py +++ b/nerfstudio/cameras/lie_groups.py @@ -28,7 +28,7 @@ def exp_map_SO3xR3(tangent_vector: TensorType["b", 6]) -> TensorType["b", 3, 4]: Args: tangent_vector: Tangent vector; length-3 translations, followed by an `so(3)` tangent vector. Returns: - [R|t] tranformation matrices. + [R|t] transformation matrices. """ # code for SO3 map grabbed from pytorch3d and stripped down to bare-bones log_rot = tangent_vector[:, 3:] @@ -67,7 +67,7 @@ def exp_map_SE3(tangent_vector: TensorType["b", 6]) -> TensorType["b", 3, 4]: # tangent_vector: A tangent vector from `se(3)`. Returns: - [R|t] tranformation matrices. + [R|t] transformation matrices. """ tangent_vector_lin = tangent_vector[:, :3].view(-1, 3, 1) diff --git a/nerfstudio/cameras/rays.py b/nerfstudio/cameras/rays.py index d9dbaba0b..e81e52642 100644 --- a/nerfstudio/cameras/rays.py +++ b/nerfstudio/cameras/rays.py @@ -186,7 +186,7 @@ class RayBundle(TensorDataclass): return self[indices] def get_row_major_sliced_ray_bundle(self, start_idx: int, end_idx: int) -> "RayBundle": - """Flattens RayBundle and extracts chunk given start and end indicies. + """Flattens RayBundle and extracts chunk given start and end indices. Args: start_idx: Start index of RayBundle chunk. diff --git a/nerfstudio/configs/base_config.py b/nerfstudio/configs/base_config.py index 9131a50d5..548324069 100644 --- a/nerfstudio/configs/base_config.py +++ b/nerfstudio/configs/base_config.py @@ -63,7 +63,7 @@ class MachineConfig(PrintableConfig): """Configuration of machine setup""" seed: int = 42 - """random seed initilization""" + """random seed initialization""" num_gpus: int = 1 """total number of gpus available for train/eval""" num_machines: int = 1 @@ -113,7 +113,7 @@ class LoggingConfig(PrintableConfig): """number of steps between logging stats""" 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 occurances.""" + e.g. if 20, averages will be computed over past 20 occurrences.""" local_writer: LocalWriterConfig = LocalWriterConfig(enable=True) """if provided, will print stats locally. if None, will disable printing""" enable_profiler: bool = True diff --git a/nerfstudio/data/datamanagers/base_datamanager.py b/nerfstudio/data/datamanagers/base_datamanager.py index 26642a87c..4fc1822dd 100644 --- a/nerfstudio/data/datamanagers/base_datamanager.py +++ b/nerfstudio/data/datamanagers/base_datamanager.py @@ -94,7 +94,7 @@ class DataManager(nn.Module): This data manager's next_train and next_eval methods will return 2 things: 1. A Raybundle: This will contain the rays we are sampling, with latents and conditionals attached (everything needed at inference) - 2. A "batch" of auxilury information: This will contain the mask, the ground truth + 2. A "batch" of auxiliary information: This will contain the mask, the ground truth pixels, etc needed to actually train, score, etc the model Rationale: @@ -172,7 +172,7 @@ class DataManager(nn.Module): def get_train_iterable(self, length=-1) -> IterableWrapper: """Gets a trivial pythonic iterator that will use the iter_train and next_train functions - as __iter__ and __next__ methods respectivley. + as __iter__ and __next__ methods respectively. This basically is just a little utility if you want to do something like: | for ray_bundle, batch in datamanager.get_train_iterable(): @@ -184,7 +184,7 @@ class DataManager(nn.Module): def get_eval_iterable(self, length=-1) -> IterableWrapper: """Gets a trivial pythonic iterator that will use the iter_eval and next_eval functions - as __iter__ and __next__ methods respectivley. + as __iter__ and __next__ methods respectively. This basically is just a little utility if you want to do something like: | for ray_bundle, batch in datamanager.get_eval_iterable(): diff --git a/nerfstudio/data/dataparsers/nerfstudio_dataparser.py b/nerfstudio/data/dataparsers/nerfstudio_dataparser.py index 07adab431..e419bdf2d 100644 --- a/nerfstudio/data/dataparsers/nerfstudio_dataparser.py +++ b/nerfstudio/data/dataparsers/nerfstudio_dataparser.py @@ -63,7 +63,7 @@ class NerfstudioDataParserConfig(DataParserConfig): train_split_percentage: float = 0.9 """The percent of images to use for training. The remaining images are for eval.""" depth_unit_scale_factor: float = 1e-3 - """Scales the depth values to meters. Default value is 0.001 for a millimiter to meter conversion.""" + """Scales the depth values to meters. Default value is 0.001 for a millimeter to meter conversion.""" @dataclass @@ -290,7 +290,7 @@ class Nerfstudio(DataParser): def _get_fname(self, filepath: PurePath, data_dir: PurePath, downsample_folder_prefix="images_") -> Path: """Get the filename of the image file. - downsample_folder_prefix can be used to point to auxillary image data, e.g. masks + downsample_folder_prefix can be used to point to auxiliary image data, e.g. masks filepath: the base file name of the transformations. data_dir: the directory of the data that contains the transform file diff --git a/nerfstudio/data/dataparsers/nuscenes_dataparser.py b/nerfstudio/data/dataparsers/nuscenes_dataparser.py index 7a274530d..9269f555f 100644 --- a/nerfstudio/data/dataparsers/nuscenes_dataparser.py +++ b/nerfstudio/data/dataparsers/nuscenes_dataparser.py @@ -47,8 +47,8 @@ def rotation_translation_to_pose(r_vec, t_vec): class NuScenesDataParserConfig(DataParserConfig): """NuScenes dataset config. NuScenes (https://www.nuscenes.org/nuscenes) is an autonomous driving dataset containing 1000 20s clips. - Each clip was recorded with a suite of sensors including 6 souround cameras. - It also includes 3D cuboid annotations around obects. + Each clip was recorded with a suite of sensors including 6 surround cameras. + It also includes 3D cuboid annotations around objects. We optionally use these cuboids to mask dynamic objects by specifying the mask_dir flag. To create these masks use scripts/datasets/process_nuscenes_masks.py. """ diff --git a/nerfstudio/engine/callbacks.py b/nerfstudio/engine/callbacks.py index 25f73d8d2..3c7219d67 100644 --- a/nerfstudio/engine/callbacks.py +++ b/nerfstudio/engine/callbacks.py @@ -52,7 +52,7 @@ class TrainingCallback: including at iteration 0. The function is called after the training iteration. Args: - where_to_run: List of locations for when to run callbak (before/after iteration) + where_to_run: List of locations for when to run callback (before/after iteration) func: The function that will be called. update_every_num_iters: How often to call the function `func`. iters: Tuple of iteration steps to perform callback diff --git a/nerfstudio/engine/trainer.py b/nerfstudio/engine/trainer.py index 68c1182c8..30945a4c7 100644 --- a/nerfstudio/engine/trainer.py +++ b/nerfstudio/engine/trainer.py @@ -137,7 +137,7 @@ class Trainer: Args: test_mode: 'val': loads train/val datasets into memory - 'test': loads train/test datset into memory + 'test': loads train/test datasets into memory 'inference': does not load any dataset into memory """ self.pipeline = self.config.pipeline.setup( diff --git a/nerfstudio/field_components/base_field_component.py b/nerfstudio/field_components/base_field_component.py index bea2b3085..88a2a00ad 100644 --- a/nerfstudio/field_components/base_field_component.py +++ b/nerfstudio/field_components/base_field_component.py @@ -27,7 +27,7 @@ class FieldComponent(nn.Module): Args: in_dim: Input dimension to module. - out_dim: Ouput dimension to module. + out_dim: Output dimension to module. """ def __init__(self, in_dim: Optional[int] = None, out_dim: Optional[int] = None) -> None: diff --git a/nerfstudio/field_components/encodings.py b/nerfstudio/field_components/encodings.py index 942bfd89f..9cdd85e61 100644 --- a/nerfstudio/field_components/encodings.py +++ b/nerfstudio/field_components/encodings.py @@ -73,7 +73,7 @@ class Identity(Encoding): class ScalingAndOffset(Encoding): - """Simple scaling and offet to input + """Simple scaling and offset to input Args: in_dim: Input dimension of tensor @@ -97,7 +97,7 @@ class ScalingAndOffset(Encoding): class NeRFEncoding(Encoding): - """Multi-scale sinousoidal encodings. Support ``integrated positional encodings`` if covariances are provided. + """Multi-scale sinusoidal encodings. Support ``integrated positional encodings`` if covariances are provided. Each axis is encoded with frequencies ranging from 2^min_freq_exp to 2^max_freq_exp. Args: @@ -459,7 +459,7 @@ class TensorVMEncoding(Encoding): @torch.no_grad() def upsample_grid(self, resolution: int) -> None: - """Upsamples underyling feature grid + """Upsamples underlying feature grid Args: resolution: Target resolution. @@ -478,14 +478,14 @@ class SHEncoding(Encoding): """Spherical harmonic encoding Args: - levels: Number of spherical hamonic levels to encode. + levels: Number of spherical harmonic levels to encode. """ def __init__(self, levels: int = 4) -> None: super().__init__(in_dim=3) if levels <= 0 or levels > 4: - raise ValueError(f"Spherical harmonic encoding only suports 1 to 4 levels, requested {levels}") + raise ValueError(f"Spherical harmonic encoding only supports 1 to 4 levels, requested {levels}") self.levels = levels diff --git a/nerfstudio/field_components/field_heads.py b/nerfstudio/field_components/field_heads.py index 15b7822cb..cba0ee7ea 100644 --- a/nerfstudio/field_components/field_heads.py +++ b/nerfstudio/field_components/field_heads.py @@ -84,7 +84,7 @@ class FieldHead(FieldComponent): Render head output """ if not self.net: - raise SystemError("in_dim not set. Must be provided to construtor, or set_in_dim() should be called.") + raise SystemError("in_dim not set. Must be provided to constructor, or set_in_dim() should be called.") out_tensor = self.net(in_tensor) if self.activation: out_tensor = self.activation(out_tensor) diff --git a/nerfstudio/fields/base_field.py b/nerfstudio/fields/base_field.py index c24d9659c..5bf49bf5e 100644 --- a/nerfstudio/fields/base_field.py +++ b/nerfstudio/fields/base_field.py @@ -41,7 +41,7 @@ class Field(nn.Module): Args: positions: the origin of the samples/frustums """ - # Need to figure out a better way to descibe positions with a ray. + # Need to figure out a better way to describe positions with a ray. ray_samples = RaySamples( frustums=Frustums( origins=positions, diff --git a/nerfstudio/fields/nerfw_field.py b/nerfstudio/fields/nerfw_field.py index b2916fef4..483f5b502 100644 --- a/nerfstudio/fields/nerfw_field.py +++ b/nerfstudio/fields/nerfw_field.py @@ -44,7 +44,7 @@ class VanillaNerfWField(Field): direction_encoding: Direction encoder. base_mlp_num_layers: Number of layers for base MLP. base_mlp_layer_width: Width of base MLP layers. - head_mlp_num_layers: Number of layer for ourput head MLP. + head_mlp_num_layers: Number of layer for output head MLP. head_mlp_layer_width: Width of output head MLP layers. appearance_embedding_dim:: Dimension of appearance embedding. transient_embedding_dim:: Dimension of transient embedding. diff --git a/nerfstudio/fields/semantic_nerf_field.py b/nerfstudio/fields/semantic_nerf_field.py index fa53a9313..11fdb142a 100644 --- a/nerfstudio/fields/semantic_nerf_field.py +++ b/nerfstudio/fields/semantic_nerf_field.py @@ -42,7 +42,7 @@ class SemanticNerfField(Field): direction_encoding: Direction encoder. base_mlp_num_layers: Number of layers for base MLP. base_mlp_layer_width: Width of base MLP layers. - head_mlp_num_layers: Number of layer for ourput head MLP. + head_mlp_num_layers: Number of layer for output head MLP. head_mlp_layer_width: Width of output head MLP layers. skip_connections: Where to add skip connection in base MLP. """ diff --git a/nerfstudio/fields/vanilla_nerf_field.py b/nerfstudio/fields/vanilla_nerf_field.py index a30582d14..45511c1d1 100644 --- a/nerfstudio/fields/vanilla_nerf_field.py +++ b/nerfstudio/fields/vanilla_nerf_field.py @@ -42,7 +42,7 @@ class NeRFField(Field): direction_encoding: Direction encoder. base_mlp_num_layers: Number of layers for base MLP. base_mlp_layer_width: Width of base MLP layers. - head_mlp_num_layers: Number of layer for ourput head MLP. + head_mlp_num_layers: Number of layer for output head MLP. head_mlp_layer_width: Width of output head MLP layers. skip_connections: Where to add skip connection in base MLP. use_integrated_encoding: Used integrated samples as encoding input. diff --git a/nerfstudio/model_components/losses.py b/nerfstudio/model_components/losses.py index 983bee555..9624ad02d 100644 --- a/nerfstudio/model_components/losses.py +++ b/nerfstudio/model_components/losses.py @@ -86,7 +86,7 @@ def lossfun_outer( Args: t: interval edges w: weights - t_env: interval edges of the upper bound enveloping historgram + t_env: interval edges of the upper bound enveloping histogram w_env: weights that should upper bound the inner (t,w) histogram """ w_outer = outer(t[..., :-1], t[..., 1:], t_env[..., :-1], t_env[..., 1:], w_env) @@ -284,7 +284,7 @@ def depth_loss( predicted_depth: Depth prediction from the network. sigma: Uncertainty around depth value. directions_norm: Norms of ray direction vectors in the camera frame. - is_euclidean: Whether ground truth depths correponds to normalized direction vectors. + is_euclidean: Whether ground truth depths corresponds to normalized direction vectors. depth_loss_type: Type of depth loss to apply. Returns: diff --git a/nerfstudio/model_components/ray_generators.py b/nerfstudio/model_components/ray_generators.py index a740f8141..87a30cf67 100644 --- a/nerfstudio/model_components/ray_generators.py +++ b/nerfstudio/model_components/ray_generators.py @@ -29,7 +29,7 @@ class RayGenerator(nn.Module): Args: cameras: Camera objects containing camera info. - pose_optimizer: pose optimization module, for optimizing noisy camera intrisics/extrinsics. + pose_optimizer: pose optimization module, for optimizing noisy camera intrinsics/extrinsics. """ def __init__(self, cameras: Cameras, pose_optimizer: CameraOptimizer) -> None: @@ -42,7 +42,7 @@ class RayGenerator(nn.Module): """Index into the cameras to generate the rays. Args: - ray_indices: Contains camera, row, and col indicies for target rays. + ray_indices: Contains camera, row, and col indices for target rays. """ c = ray_indices[:, 0] # camera indices y = ray_indices[:, 1] # row indices diff --git a/nerfstudio/model_components/ray_samplers.py b/nerfstudio/model_components/ray_samplers.py index 89a238c72..eef905101 100644 --- a/nerfstudio/model_components/ray_samplers.py +++ b/nerfstudio/model_components/ray_samplers.py @@ -58,7 +58,7 @@ class SpacedSampler(Sampler): num_samples: Number of samples per ray spacing_fn: Function that dictates sample spacing (ie `lambda x : x` is uniform). spacing_fn_inv: The inverse of spacing_fn. - train_stratified: Use stratified sampling during training. Defults to True + train_stratified: Use stratified sampling during training. Defaults to True single_jitter: Use a same random jitter for all samples along a ray. Defaults to False """ @@ -81,7 +81,7 @@ class SpacedSampler(Sampler): ray_bundle: Optional[RayBundle] = None, num_samples: Optional[int] = None, ) -> RaySamples: - """Generates position samples accoring to spacing function. + """Generates position samples according to spacing function. Args: ray_bundle: Rays to generate samples for @@ -131,7 +131,7 @@ class UniformSampler(SpacedSampler): Args: num_samples: Number of samples per ray - train_stratified: Use stratified sampling during training. Defults to True + train_stratified: Use stratified sampling during training. Defaults to True single_jitter: Use a same random jitter for all samples along a ray. Defaults to False """ @@ -155,7 +155,7 @@ class LinearDisparitySampler(SpacedSampler): Args: num_samples: Number of samples per ray - train_stratified: Use stratified sampling during training. Defults to True + train_stratified: Use stratified sampling during training. Defaults to True single_jitter: Use a same random jitter for all samples along a ray. Defaults to False """ @@ -179,7 +179,7 @@ class SqrtSampler(SpacedSampler): Args: num_samples: Number of samples per ray - train_stratified: Use stratified sampling during training. Defults to True + train_stratified: Use stratified sampling during training. Defaults to True """ def __init__( @@ -202,7 +202,7 @@ class LogSampler(SpacedSampler): Args: num_samples: Number of samples per ray - train_stratified: Use stratified sampling during training. Defults to True + train_stratified: Use stratified sampling during training. Defaults to True """ def __init__( @@ -227,7 +227,7 @@ class UniformLinDispPiecewiseSampler(SpacedSampler): Args: num_samples: Number of samples per ray - train_stratified: Use stratified sampling during training. Defults to True + train_stratified: Use stratified sampling during training. Defaults to True single_jitter: Use a same random jitter for all samples along a ray. Defaults to False """ diff --git a/nerfstudio/models/depth_nerfacto.py b/nerfstudio/models/depth_nerfacto.py index 727173b7d..da4c59002 100644 --- a/nerfstudio/models/depth_nerfacto.py +++ b/nerfstudio/models/depth_nerfacto.py @@ -13,7 +13,7 @@ # limitations under the License. """ -Nerfacto augumented with depth supervision. +Nerfacto augmented with depth supervision. """ from __future__ import annotations @@ -45,13 +45,13 @@ class DepthNerfactoModelConfig(NerfactoModelConfig): starting_depth_sigma: float = 0.2 """Starting uncertainty around depth values in meters (defaults to 0.2m).""" sigma_decay_rate: float = 0.99985 - """Rate of exponetial decay.""" + """Rate of exponential decay.""" depth_loss_type: DephtLossType = DephtLossType.DS_NERF """Depth loss type.""" class DepthNerfactoModel(NerfactoModel): - """Depth loss augumented nerfacto model. + """Depth loss augmented nerfacto model. Args: config: Nerfacto configuration to instantiate model diff --git a/nerfstudio/models/nerfacto.py b/nerfstudio/models/nerfacto.py index 4e619ad21..42ea0f50a 100644 --- a/nerfstudio/models/nerfacto.py +++ b/nerfstudio/models/nerfacto.py @@ -99,7 +99,7 @@ class NerfactoModelConfig(ModelConfig): distortion_loss_mult: float = 0.002 """Distortion loss multiplier.""" orientation_loss_mult: float = 0.0001 - """Orientation loss multipier on computed noramls.""" + """Orientation loss multiplier on computed normals.""" pred_normal_loss_mult: float = 0.001 """Predicted normal loss multiplier.""" use_proposal_weight_anneal: bool = True diff --git a/nerfstudio/pipelines/base_pipeline.py b/nerfstudio/pipelines/base_pipeline.py index d45cda16c..9dc50fa27 100644 --- a/nerfstudio/pipelines/base_pipeline.py +++ b/nerfstudio/pipelines/base_pipeline.py @@ -80,7 +80,7 @@ class Pipeline(nn.Module): device: location to place model and data test_mode: 'train': loads train/eval datasets into memory - 'test': loads train/test datset into memory + 'test': loads train/test dataset into memory 'inference': does not load any dataset into memory world_size: total number of machines available local_rank: rank of current machine @@ -197,7 +197,7 @@ class VanillaPipeline(Pipeline): device: location to place model and data test_mode: 'val': loads train/val datasets into memory - 'test': loads train/test datset into memory + 'test': loads train/test dataset into memory 'inference': does not load any dataset into memory world_size: total number of machines available local_rank: rank of current machine diff --git a/nerfstudio/process_data/colmap_utils.py b/nerfstudio/process_data/colmap_utils.py index c36cc7d5f..b8e91bd29 100644 --- a/nerfstudio/process_data/colmap_utils.py +++ b/nerfstudio/process_data/colmap_utils.py @@ -364,7 +364,7 @@ def detect_model_format(path: Path, ext: str) -> bool: path: Path to the model file. ext: Extension to test. Returns: - True if the model file is the tested extenstion, False otherwise. + True if the model file is the tested extension, False otherwise. """ if ( @@ -663,7 +663,7 @@ def get_matching_summary(num_intial_frames: int, num_matched_frames: int) -> str """ match_ratio = num_matched_frames / num_intial_frames if match_ratio == 1: - return "[bold green]COLAMP found poses for all images, CONGRATS!" + return "[bold green]COLMAP found poses for all images, CONGRATS!" if match_ratio < 0.4: result = f"[bold red]COLMAP only found poses for {num_matched_frames / num_intial_frames * 100:.2f}%" result += " of the images. This is low.\nThis can be caused by a variety of reasons," diff --git a/nerfstudio/process_data/insta360_utils.py b/nerfstudio/process_data/insta360_utils.py index 4babc1504..febdc7308 100644 --- a/nerfstudio/process_data/insta360_utils.py +++ b/nerfstudio/process_data/insta360_utils.py @@ -66,7 +66,7 @@ def convert_insta360_to_images( video_back: Path to the back video. output_dir: Path to the output directory. num_frames_target: Number of frames to extract. - crop_percentage: Percentage used to calculate the cropped dimentions of extracted frames. Currently used to crop + crop_percentage: Percentage used to calculate the cropped dimensions of extracted frames. Currently used to crop out the curved portions of the fish-eye lens. verbose: If True, logs the output of the command. Returns: @@ -94,7 +94,7 @@ def convert_insta360_to_images( if spacing > 1: vf_cmds = [f"thumbnail={spacing}", "setpts=N/TB"] else: - CONSOLE.print("[bold red]Can't satify requested number of frames. Extracting all frames.") + CONSOLE.print("[bold red]Can't satisfy requested number of frames. Extracting all frames.") vf_cmds.append(f"crop=iw*{crop_percentage}:ih*{crop_percentage}") @@ -135,7 +135,7 @@ def convert_insta360_single_file_to_images( video: Path to the video. output_dir: Path to the output directory. num_frames_target: Number of frames to extract. - crop_percentage: Percentage used to calculate the cropped dimentions of extracted frames. Currently used to crop + crop_percentage: Percentage used to calculate the cropped dimensions of extracted frames. Currently used to crop out the curved portions of the fish-eye lens. verbose: If True, logs the output of the command. Returns: @@ -159,7 +159,7 @@ def convert_insta360_single_file_to_images( if spacing > 1: vf_cmds = [f"thumbnail={spacing}", "setpts=N/TB"] else: - CONSOLE.print("[bold red]Can't satify requested number of frames. Extracting all frames.") + CONSOLE.print("[bold red]Can't satisfy requested number of frames. Extracting all frames.") vf_cmds_back = vf_cmds.copy() vf_cmds_front = vf_cmds.copy() diff --git a/nerfstudio/process_data/metashape_utils.py b/nerfstudio/process_data/metashape_utils.py index 4b5e60ba5..491c06a2c 100644 --- a/nerfstudio/process_data/metashape_utils.py +++ b/nerfstudio/process_data/metashape_utils.py @@ -44,7 +44,7 @@ def metashape_to_json( # pylint: disable=too-many-statements Args: image_filename_map: Mapping of original image filenames to their saved locations. - xml_filename: Path to the metashap cameras xml file. + xml_filename: Path to the metashape cameras xml file. output_dir: Path to the output directory. verbose: Whether to print verbose output. diff --git a/nerfstudio/process_data/process_data_utils.py b/nerfstudio/process_data/process_data_utils.py index 907a0af98..b03dcd8cb 100644 --- a/nerfstudio/process_data/process_data_utils.py +++ b/nerfstudio/process_data/process_data_utils.py @@ -93,7 +93,7 @@ def convert_video_to_images( if spacing > 1: ffmpeg_cmd += f" -vf thumbnail={spacing},setpts=N/TB -r 1" else: - CONSOLE.print("[bold red]Can't satify requested number of frames. Extracting all frames.") + CONSOLE.print("[bold red]Can't satisfy requested number of frames. Extracting all frames.") ffmpeg_cmd += " -pix_fmt bgr8" ffmpeg_cmd += f" {out_filename}" diff --git a/nerfstudio/utils/eval_utils.py b/nerfstudio/utils/eval_utils.py index 40f9e212e..17b0d4b06 100644 --- a/nerfstudio/utils/eval_utils.py +++ b/nerfstudio/utils/eval_utils.py @@ -76,7 +76,7 @@ def eval_setup( eval_num_rays_per_chunk: Number of rays per forward pass test_mode: 'val': loads train/val datasets into memory - 'test': loads train/test datset into memory + 'test': loads train/test dataset into memory 'inference': does not load any dataset into memory diff --git a/nerfstudio/utils/math.py b/nerfstudio/utils/math.py index d5ed57f94..bca98ee83 100644 --- a/nerfstudio/utils/math.py +++ b/nerfstudio/utils/math.py @@ -26,7 +26,7 @@ def components_from_spherical_harmonics(levels: int, directions: TensorType[..., Args: levels: Number of spherical harmonic levels to compute. - directions: Spherical hamonic coefficients + directions: Spherical harmonic coefficients """ num_components = levels**2 components = torch.zeros((*directions.shape[:-1], num_components), device=directions.device) diff --git a/nerfstudio/utils/plotly_utils.py b/nerfstudio/utils/plotly_utils.py index a06476f88..03eb4bcf3 100644 --- a/nerfstudio/utils/plotly_utils.py +++ b/nerfstudio/utils/plotly_utils.py @@ -266,7 +266,7 @@ def get_gaussian_ellipsiod( Args: mean: mean of the Gaussian. cov: covariance of the Gaussian. - n_std: Standard devation to visualize. Defaults to 2 (95% confidence). + n_std: Standard deviation to visualize. Defaults to 2 (95% confidence). color: Color of the ellipsoid. Defaults to None. opacity: Opacity of the ellipsoid. Defaults to 0.5. resolution: Resolution of the ellipsoid. Defaults to 20. @@ -437,7 +437,7 @@ def get_frustum_points( Args: frustum: Frustums to visualize. opacity: Opacity of the points. Defaults to 0.3. - color: Color of the poinst. Defaults to "forestgreen". + color: Color of the points. Defaults to "forestgreen". size: Size of points. Defaults to 10. Returns: diff --git a/nerfstudio/utils/poses.py b/nerfstudio/utils/poses.py index b5944e8ae..2cf0925f9 100644 --- a/nerfstudio/utils/poses.py +++ b/nerfstudio/utils/poses.py @@ -55,7 +55,7 @@ def multiply(pose_a: TensorType[..., 3, 4], pose_b: TensorType[..., 3, 4]) -> Te Args: pose_a: Left pose matrix, usually a transformation applied to the right. - pose_b: Right pose matrix, usually a camera pose that will be tranformed by pose_a. + pose_b: Right pose matrix, usually a camera pose that will be transformed by pose_a. Returns: Camera pose matrix where pose_a was applied to pose_b. diff --git a/nerfstudio/utils/writer.py b/nerfstudio/utils/writer.py index d90e13b92..720d1d449 100644 --- a/nerfstudio/utils/writer.py +++ b/nerfstudio/utils/writer.py @@ -361,7 +361,7 @@ class LocalWriter: TODO: migrate to prettyprint Args: - config: configuration to instatiate class + config: configuration to instantiate class banner_messages: list of messages to always display at bottom of screen """ diff --git a/nerfstudio/viewer/server/path.py b/nerfstudio/viewer/server/path.py index 2054862c4..65fb26e1b 100644 --- a/nerfstudio/viewer/server/path.py +++ b/nerfstudio/viewer/server/path.py @@ -34,7 +34,7 @@ class Path: self.entries = entries def append(self, other: str) -> "Path": - """Methodthat appends a new component and returns new Path + """Method that appends a new component and returns new Path Args: other: _description_ diff --git a/nerfstudio/viewer/server/server.py b/nerfstudio/viewer/server/server.py index 5c67f87fb..6c2c45476 100644 --- a/nerfstudio/viewer/server/server.py +++ b/nerfstudio/viewer/server/server.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -"""Server bridge to faciliate interactions between python backend and javascript front end""" +"""Server bridge to facilitate interactions between python backend and javascript front end""" import sys from typing import List, Optional, Tuple diff --git a/nerfstudio/viewer/server/utils.py b/nerfstudio/viewer/server/utils.py index 9c3e003ec..b0763b6d1 100644 --- a/nerfstudio/viewer/server/utils.py +++ b/nerfstudio/viewer/server/utils.py @@ -28,7 +28,7 @@ from aiortc.rtcrtpsender import RTCRtpSender def get_chunks( lst: List[float], num_chunks: Optional[int] = None, size_of_chunk: Optional[int] = None ) -> List[List[float]]: - """Returns list of n elements, constaining a sublist. + """Returns list of n elements, containing a sublist. Args: lst: List to be chunked up @@ -129,7 +129,7 @@ def find_available_port(func: Callable, default_port: int, max_attempts: int = 1 def force_codec(pc: RTCPeerConnection, sender: RTCRtpSender, forced_codec: str) -> None: - """Sets the codec preferences on a connection between sender and reciever + """Sets the codec preferences on a connection between sender and receiver Args: pc: peer connection point diff --git a/scripts/docs/add_nb_tags.py b/scripts/docs/add_nb_tags.py index 37a5900f8..4a7d97fe0 100755 --- a/scripts/docs/add_nb_tags.py +++ b/scripts/docs/add_nb_tags.py @@ -13,7 +13,7 @@ CONSOLE = Console(width=120) def main(check: bool = False): """Add tags to notebooks based on cell comments. - In notebook cells, you can add the folling tags to the notebook by adding a comment: + In notebook cells, you can add the following tags to the notebook by adding a comment: "# HIDDEN" - This cell will be hidden from the notebook. "# OUTPUT_ONLY" - This cell will only show the output. "# COLLAPSED" - Hide the code and include a button to show the code.