From 92cadf5ce42a927dc06b485a9f4dce6910fc6a8d Mon Sep 17 00:00:00 2001 From: NCJ Date: Thu, 9 Feb 2023 02:33:23 +0800 Subject: [PATCH] Fix Multiple Typos (#1376) fix multiple typos --- nerfstudio/cameras/rays.py | 6 +++--- nerfstudio/engine/trainer.py | 2 +- nerfstudio/fields/instant_ngp_field.py | 2 +- nerfstudio/model_components/renderers.py | 4 ++-- nerfstudio/utils/math.py | 2 +- scripts/train.py | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/nerfstudio/cameras/rays.py b/nerfstudio/cameras/rays.py index 8718712fb..c65315c26 100644 --- a/nerfstudio/cameras/rays.py +++ b/nerfstudio/cameras/rays.py @@ -44,7 +44,7 @@ class Frustums(TensorDataclass): """Offsets for each sample position""" def get_positions(self) -> TensorType[..., 3]: - """Calulates "center" position of frustum. Not weighted by mass. + """Calculates "center" position of frustum. Not weighted by mass. Returns: xyz positions. @@ -61,7 +61,7 @@ class Frustums(TensorDataclass): def get_gaussian_blob(self) -> Gaussians: """Calculates guassian approximation of conical frustum. - Resturns: + Returns: Conical frustums approximated by gaussian distribution. """ # Cone radius is set such that the square pixel_area matches the cone area. @@ -109,7 +109,7 @@ class RaySamples(TensorDataclass): spacing_to_euclidean_fn: Optional[Callable] = None """Function to convert bins to euclidean distance.""" metadata: Optional[Dict[str, TensorType["bs":..., "latent_dims"]]] = None - """addtional information relevant to generating ray samples""" + """additional information relevant to generating ray samples""" times: Optional[TensorType[..., 1]] = None """Times at which rays are sampled""" diff --git a/nerfstudio/engine/trainer.py b/nerfstudio/engine/trainer.py index d0e750c64..ac524e7b3 100644 --- a/nerfstudio/engine/trainer.py +++ b/nerfstudio/engine/trainer.py @@ -292,7 +292,7 @@ class Trainer: @check_viewer_enabled def _update_viewer_rays_per_sec(self, train_t: TimeWriter, vis_t: TimeWriter, step: int): - """Performs update on rays/sec calclation for training + """Performs update on rays/sec calculation for training Args: train_t: timer object carrying time to execute total training iteration diff --git a/nerfstudio/fields/instant_ngp_field.py b/nerfstudio/fields/instant_ngp_field.py index 18a806b68..846ea121e 100644 --- a/nerfstudio/fields/instant_ngp_field.py +++ b/nerfstudio/fields/instant_ngp_field.py @@ -58,7 +58,7 @@ class TCNNInstantNGPField(Field): num_layers_color: number of hidden layers for color network hidden_dim_color: dimension of hidden layers for color network use_appearance_embedding: whether to use appearance embedding - num_images: number of images, requried if use_appearance_embedding is True + num_images: number of images, required if use_appearance_embedding is True appearance_embedding_dim: dimension of appearance embedding contraction_type: type of contraction num_levels: number of levels of the hashmap for the base mlp diff --git a/nerfstudio/model_components/renderers.py b/nerfstudio/model_components/renderers.py index d13c29233..cf5af2a7d 100644 --- a/nerfstudio/model_components/renderers.py +++ b/nerfstudio/model_components/renderers.py @@ -55,7 +55,7 @@ def background_color_override_context(mode: TensorType[3]) -> Generator[None, No class RGBRenderer(nn.Module): - """Standard volumetic rendering. + """Standard volumetric rendering. Args: background_color: Background color as RGB. Uses random colors if None. @@ -165,7 +165,7 @@ class SHRenderer(nn.Module): """Composite samples along ray and render color image Args: - sh: Spherical hamonics coefficients for each sample + sh: Spherical harmonics coefficients for each sample directions: Sample direction weights: Weights for each sample diff --git a/nerfstudio/utils/math.py b/nerfstudio/utils/math.py index 937866dcc..cee6108a9 100644 --- a/nerfstudio/utils/math.py +++ b/nerfstudio/utils/math.py @@ -106,7 +106,7 @@ def compute_3d_gaussian( dir_variance: TensorType[..., 1], radius_variance: TensorType[..., 1], ) -> Gaussians: - """Compute guassian along ray. + """Compute gaussian along ray. Args: directions: Axis of Gaussian. diff --git a/scripts/train.py b/scripts/train.py index 240fdeca0..f19b0ccc5 100755 --- a/scripts/train.py +++ b/scripts/train.py @@ -152,7 +152,7 @@ def launch( config: Optional[TrainerConfig] = None, timeout: timedelta = DEFAULT_TIMEOUT, ) -> None: - """Function that spawns muliple processes to call on main_func + """Function that spawns multiple processes to call on main_func Args: main_func (Callable): function that will be called by the distributed workers