mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-06 15:59:16 +08:00
Fix typo (#1231)
* Fix typo COLAMP->COLMAP * Fix more typo Co-authored-by: Matthew Tancik <tancik@berkeley.edu>
This commit is contained in:
1 parent
53c23ba356
commit
408ab709ec
45 files changed
+72
-72
No files matched your search
@@ -34,7 +34,7 @@ class DataManager(nn.Module):
|
|||||||
"""Returns the next eval image.
|
"""Returns the next eval image.
|
||||||
|
|
||||||
Returns:
|
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.
|
||||||
"""
|
"""
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ dataparser_outputs = dataparser.get_dataparser_outputs(split="train")
|
|||||||
input_dataset = InputDataset(dataparser_outputs)
|
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
|
```python
|
||||||
ray_generator = RayGenerator(dataparser_outputs.cameras)
|
ray_generator = RayGenerator(dataparser_outputs.cameras)
|
||||||
|
|||||||
@@ -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 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
|
```python
|
||||||
class FieldHeadNames(Enum):
|
class FieldHeadNames(Enum):
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Model components
|
# 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}
|
```{toctree}
|
||||||
:maxdepth: 1
|
:maxdepth: 1
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ A LiDAR enabled iPhone or iPad is necessary.
|
|||||||
:alt: polycam settings
|
: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
|
### Process data
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ ns-export pointcloud --help
|
|||||||
|
|
||||||
## Other exporting methods
|
## 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
|
```python
|
||||||
ns-export --help
|
ns-export --help
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ sphinx-autobuild docs docs/_build/html
|
|||||||
|
|
||||||
### Adding notebooks
|
### 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 |
|
| Tag | Effect |
|
||||||
| ------------- | ---------------------------------------------------- |
|
| ------------- | ---------------------------------------------------- |
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ class CameraOptimizer(nn.Module):
|
|||||||
Args:
|
Args:
|
||||||
indices: indices of Cameras to optimize.
|
indices: indices of Cameras to optimize.
|
||||||
Returns:
|
Returns:
|
||||||
Tranformation matrices from optimized camera coordinates coordinates
|
Transformation matrices from optimized camera coordinates
|
||||||
to given camera coordinates.
|
to given camera coordinates.
|
||||||
"""
|
"""
|
||||||
outputs = []
|
outputs = []
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ def get_spiral_path(
|
|||||||
zrate: float = 0.5,
|
zrate: float = 0.5,
|
||||||
) -> Cameras:
|
) -> Cameras:
|
||||||
"""
|
"""
|
||||||
Returns a list of camera in a sprial trajectory.
|
Returns a list of camera in a spiral trajectory.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
camera: The camera to start the spiral from.
|
camera: The camera to start the spiral from.
|
||||||
|
|||||||
@@ -361,7 +361,7 @@ def radial_and_tangential_undistort(
|
|||||||
max_iterations: int = 10,
|
max_iterations: int = 10,
|
||||||
) -> torch.Tensor:
|
) -> torch.Tensor:
|
||||||
"""Computes undistorted coords given opencv distortion parameters.
|
"""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
|
https://github.com/google-research/multinerf/blob/b02228160d3179300c7d499dca28cb9ca3677f32/internal/camera_utils.py#L477-L509
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
|||||||
@@ -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
|
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,
|
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,
|
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:
|
Args:
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ def exp_map_SO3xR3(tangent_vector: TensorType["b", 6]) -> TensorType["b", 3, 4]:
|
|||||||
Args:
|
Args:
|
||||||
tangent_vector: Tangent vector; length-3 translations, followed by an `so(3)` tangent vector.
|
tangent_vector: Tangent vector; length-3 translations, followed by an `so(3)` tangent vector.
|
||||||
Returns:
|
Returns:
|
||||||
[R|t] tranformation matrices.
|
[R|t] transformation matrices.
|
||||||
"""
|
"""
|
||||||
# code for SO3 map grabbed from pytorch3d and stripped down to bare-bones
|
# code for SO3 map grabbed from pytorch3d and stripped down to bare-bones
|
||||||
log_rot = tangent_vector[:, 3:]
|
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)`.
|
tangent_vector: A tangent vector from `se(3)`.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
[R|t] tranformation matrices.
|
[R|t] transformation matrices.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
tangent_vector_lin = tangent_vector[:, :3].view(-1, 3, 1)
|
tangent_vector_lin = tangent_vector[:, :3].view(-1, 3, 1)
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ class RayBundle(TensorDataclass):
|
|||||||
return self[indices]
|
return self[indices]
|
||||||
|
|
||||||
def get_row_major_sliced_ray_bundle(self, start_idx: int, end_idx: int) -> "RayBundle":
|
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:
|
Args:
|
||||||
start_idx: Start index of RayBundle chunk.
|
start_idx: Start index of RayBundle chunk.
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ class MachineConfig(PrintableConfig):
|
|||||||
"""Configuration of machine setup"""
|
"""Configuration of machine setup"""
|
||||||
|
|
||||||
seed: int = 42
|
seed: int = 42
|
||||||
"""random seed initilization"""
|
"""random seed initialization"""
|
||||||
num_gpus: int = 1
|
num_gpus: int = 1
|
||||||
"""total number of gpus available for train/eval"""
|
"""total number of gpus available for train/eval"""
|
||||||
num_machines: int = 1
|
num_machines: int = 1
|
||||||
@@ -113,7 +113,7 @@ class LoggingConfig(PrintableConfig):
|
|||||||
"""number of steps between logging stats"""
|
"""number of steps between logging stats"""
|
||||||
max_buffer_size: int = 20
|
max_buffer_size: int = 20
|
||||||
"""maximum history size to keep for computing running averages of stats.
|
"""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)
|
local_writer: LocalWriterConfig = LocalWriterConfig(enable=True)
|
||||||
"""if provided, will print stats locally. if None, will disable printing"""
|
"""if provided, will print stats locally. if None, will disable printing"""
|
||||||
enable_profiler: bool = True
|
enable_profiler: bool = True
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ class DataManager(nn.Module):
|
|||||||
This data manager's next_train and next_eval methods will return 2 things:
|
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
|
1. A Raybundle: This will contain the rays we are sampling, with latents and
|
||||||
conditionals attached (everything needed at inference)
|
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
|
pixels, etc needed to actually train, score, etc the model
|
||||||
|
|
||||||
Rationale:
|
Rationale:
|
||||||
@@ -172,7 +172,7 @@ class DataManager(nn.Module):
|
|||||||
|
|
||||||
def get_train_iterable(self, length=-1) -> IterableWrapper:
|
def get_train_iterable(self, length=-1) -> IterableWrapper:
|
||||||
"""Gets a trivial pythonic iterator that will use the iter_train and next_train functions
|
"""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:
|
This basically is just a little utility if you want to do something like:
|
||||||
| for ray_bundle, batch in datamanager.get_train_iterable():
|
| 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:
|
def get_eval_iterable(self, length=-1) -> IterableWrapper:
|
||||||
"""Gets a trivial pythonic iterator that will use the iter_eval and next_eval functions
|
"""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:
|
This basically is just a little utility if you want to do something like:
|
||||||
| for ray_bundle, batch in datamanager.get_eval_iterable():
|
| for ray_bundle, batch in datamanager.get_eval_iterable():
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ class NerfstudioDataParserConfig(DataParserConfig):
|
|||||||
train_split_percentage: float = 0.9
|
train_split_percentage: float = 0.9
|
||||||
"""The percent of images to use for training. The remaining images are for eval."""
|
"""The percent of images to use for training. The remaining images are for eval."""
|
||||||
depth_unit_scale_factor: float = 1e-3
|
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
|
@dataclass
|
||||||
@@ -290,7 +290,7 @@ class Nerfstudio(DataParser):
|
|||||||
|
|
||||||
def _get_fname(self, filepath: PurePath, data_dir: PurePath, downsample_folder_prefix="images_") -> Path:
|
def _get_fname(self, filepath: PurePath, data_dir: PurePath, downsample_folder_prefix="images_") -> Path:
|
||||||
"""Get the filename of the image file.
|
"""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.
|
filepath: the base file name of the transformations.
|
||||||
data_dir: the directory of the data that contains the transform file
|
data_dir: the directory of the data that contains the transform file
|
||||||
|
|||||||
@@ -47,8 +47,8 @@ def rotation_translation_to_pose(r_vec, t_vec):
|
|||||||
class NuScenesDataParserConfig(DataParserConfig):
|
class NuScenesDataParserConfig(DataParserConfig):
|
||||||
"""NuScenes dataset config.
|
"""NuScenes dataset config.
|
||||||
NuScenes (https://www.nuscenes.org/nuscenes) is an autonomous driving dataset containing 1000 20s clips.
|
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.
|
Each clip was recorded with a suite of sensors including 6 surround cameras.
|
||||||
It also includes 3D cuboid annotations around obects.
|
It also includes 3D cuboid annotations around objects.
|
||||||
We optionally use these cuboids to mask dynamic objects by specifying the mask_dir flag.
|
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.
|
To create these masks use scripts/datasets/process_nuscenes_masks.py.
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ class TrainingCallback:
|
|||||||
including at iteration 0. The function is called after the training iteration.
|
including at iteration 0. The function is called after the training iteration.
|
||||||
|
|
||||||
Args:
|
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.
|
func: The function that will be called.
|
||||||
update_every_num_iters: How often to call the function `func`.
|
update_every_num_iters: How often to call the function `func`.
|
||||||
iters: Tuple of iteration steps to perform callback
|
iters: Tuple of iteration steps to perform callback
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ class Trainer:
|
|||||||
Args:
|
Args:
|
||||||
test_mode:
|
test_mode:
|
||||||
'val': loads train/val datasets into memory
|
'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
|
'inference': does not load any dataset into memory
|
||||||
"""
|
"""
|
||||||
self.pipeline = self.config.pipeline.setup(
|
self.pipeline = self.config.pipeline.setup(
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ class FieldComponent(nn.Module):
|
|||||||
|
|
||||||
Args:
|
Args:
|
||||||
in_dim: Input dimension to module.
|
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:
|
def __init__(self, in_dim: Optional[int] = None, out_dim: Optional[int] = None) -> None:
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ class Identity(Encoding):
|
|||||||
|
|
||||||
|
|
||||||
class ScalingAndOffset(Encoding):
|
class ScalingAndOffset(Encoding):
|
||||||
"""Simple scaling and offet to input
|
"""Simple scaling and offset to input
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
in_dim: Input dimension of tensor
|
in_dim: Input dimension of tensor
|
||||||
@@ -97,7 +97,7 @@ class ScalingAndOffset(Encoding):
|
|||||||
|
|
||||||
|
|
||||||
class NeRFEncoding(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.
|
Each axis is encoded with frequencies ranging from 2^min_freq_exp to 2^max_freq_exp.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
@@ -459,7 +459,7 @@ class TensorVMEncoding(Encoding):
|
|||||||
|
|
||||||
@torch.no_grad()
|
@torch.no_grad()
|
||||||
def upsample_grid(self, resolution: int) -> None:
|
def upsample_grid(self, resolution: int) -> None:
|
||||||
"""Upsamples underyling feature grid
|
"""Upsamples underlying feature grid
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
resolution: Target resolution.
|
resolution: Target resolution.
|
||||||
@@ -478,14 +478,14 @@ class SHEncoding(Encoding):
|
|||||||
"""Spherical harmonic encoding
|
"""Spherical harmonic encoding
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
levels: Number of spherical hamonic levels to encode.
|
levels: Number of spherical harmonic levels to encode.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, levels: int = 4) -> None:
|
def __init__(self, levels: int = 4) -> None:
|
||||||
super().__init__(in_dim=3)
|
super().__init__(in_dim=3)
|
||||||
|
|
||||||
if levels <= 0 or levels > 4:
|
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
|
self.levels = levels
|
||||||
|
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ class FieldHead(FieldComponent):
|
|||||||
Render head output
|
Render head output
|
||||||
"""
|
"""
|
||||||
if not self.net:
|
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)
|
out_tensor = self.net(in_tensor)
|
||||||
if self.activation:
|
if self.activation:
|
||||||
out_tensor = self.activation(out_tensor)
|
out_tensor = self.activation(out_tensor)
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ class Field(nn.Module):
|
|||||||
Args:
|
Args:
|
||||||
positions: the origin of the samples/frustums
|
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(
|
ray_samples = RaySamples(
|
||||||
frustums=Frustums(
|
frustums=Frustums(
|
||||||
origins=positions,
|
origins=positions,
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ class VanillaNerfWField(Field):
|
|||||||
direction_encoding: Direction encoder.
|
direction_encoding: Direction encoder.
|
||||||
base_mlp_num_layers: Number of layers for base MLP.
|
base_mlp_num_layers: Number of layers for base MLP.
|
||||||
base_mlp_layer_width: Width of base MLP layers.
|
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.
|
head_mlp_layer_width: Width of output head MLP layers.
|
||||||
appearance_embedding_dim:: Dimension of appearance embedding.
|
appearance_embedding_dim:: Dimension of appearance embedding.
|
||||||
transient_embedding_dim:: Dimension of transient embedding.
|
transient_embedding_dim:: Dimension of transient embedding.
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ class SemanticNerfField(Field):
|
|||||||
direction_encoding: Direction encoder.
|
direction_encoding: Direction encoder.
|
||||||
base_mlp_num_layers: Number of layers for base MLP.
|
base_mlp_num_layers: Number of layers for base MLP.
|
||||||
base_mlp_layer_width: Width of base MLP layers.
|
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.
|
head_mlp_layer_width: Width of output head MLP layers.
|
||||||
skip_connections: Where to add skip connection in base MLP.
|
skip_connections: Where to add skip connection in base MLP.
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ class NeRFField(Field):
|
|||||||
direction_encoding: Direction encoder.
|
direction_encoding: Direction encoder.
|
||||||
base_mlp_num_layers: Number of layers for base MLP.
|
base_mlp_num_layers: Number of layers for base MLP.
|
||||||
base_mlp_layer_width: Width of base MLP layers.
|
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.
|
head_mlp_layer_width: Width of output head MLP layers.
|
||||||
skip_connections: Where to add skip connection in base MLP.
|
skip_connections: Where to add skip connection in base MLP.
|
||||||
use_integrated_encoding: Used integrated samples as encoding input.
|
use_integrated_encoding: Used integrated samples as encoding input.
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ def lossfun_outer(
|
|||||||
Args:
|
Args:
|
||||||
t: interval edges
|
t: interval edges
|
||||||
w: weights
|
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_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)
|
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.
|
predicted_depth: Depth prediction from the network.
|
||||||
sigma: Uncertainty around depth value.
|
sigma: Uncertainty around depth value.
|
||||||
directions_norm: Norms of ray direction vectors in the camera frame.
|
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.
|
depth_loss_type: Type of depth loss to apply.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ class RayGenerator(nn.Module):
|
|||||||
|
|
||||||
Args:
|
Args:
|
||||||
cameras: Camera objects containing camera info.
|
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:
|
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.
|
"""Index into the cameras to generate the rays.
|
||||||
|
|
||||||
Args:
|
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
|
c = ray_indices[:, 0] # camera indices
|
||||||
y = ray_indices[:, 1] # row indices
|
y = ray_indices[:, 1] # row indices
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ class SpacedSampler(Sampler):
|
|||||||
num_samples: Number of samples per ray
|
num_samples: Number of samples per ray
|
||||||
spacing_fn: Function that dictates sample spacing (ie `lambda x : x` is uniform).
|
spacing_fn: Function that dictates sample spacing (ie `lambda x : x` is uniform).
|
||||||
spacing_fn_inv: The inverse of spacing_fn.
|
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
|
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,
|
ray_bundle: Optional[RayBundle] = None,
|
||||||
num_samples: Optional[int] = None,
|
num_samples: Optional[int] = None,
|
||||||
) -> RaySamples:
|
) -> RaySamples:
|
||||||
"""Generates position samples accoring to spacing function.
|
"""Generates position samples according to spacing function.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
ray_bundle: Rays to generate samples for
|
ray_bundle: Rays to generate samples for
|
||||||
@@ -131,7 +131,7 @@ class UniformSampler(SpacedSampler):
|
|||||||
|
|
||||||
Args:
|
Args:
|
||||||
num_samples: Number of samples per ray
|
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
|
single_jitter: Use a same random jitter for all samples along a ray. Defaults to False
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@@ -155,7 +155,7 @@ class LinearDisparitySampler(SpacedSampler):
|
|||||||
|
|
||||||
Args:
|
Args:
|
||||||
num_samples: Number of samples per ray
|
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
|
single_jitter: Use a same random jitter for all samples along a ray. Defaults to False
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@@ -179,7 +179,7 @@ class SqrtSampler(SpacedSampler):
|
|||||||
|
|
||||||
Args:
|
Args:
|
||||||
num_samples: Number of samples per ray
|
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__(
|
def __init__(
|
||||||
@@ -202,7 +202,7 @@ class LogSampler(SpacedSampler):
|
|||||||
|
|
||||||
Args:
|
Args:
|
||||||
num_samples: Number of samples per ray
|
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__(
|
def __init__(
|
||||||
@@ -227,7 +227,7 @@ class UniformLinDispPiecewiseSampler(SpacedSampler):
|
|||||||
|
|
||||||
Args:
|
Args:
|
||||||
num_samples: Number of samples per ray
|
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
|
single_jitter: Use a same random jitter for all samples along a ray. Defaults to False
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Nerfacto augumented with depth supervision.
|
Nerfacto augmented with depth supervision.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
@@ -45,13 +45,13 @@ class DepthNerfactoModelConfig(NerfactoModelConfig):
|
|||||||
starting_depth_sigma: float = 0.2
|
starting_depth_sigma: float = 0.2
|
||||||
"""Starting uncertainty around depth values in meters (defaults to 0.2m)."""
|
"""Starting uncertainty around depth values in meters (defaults to 0.2m)."""
|
||||||
sigma_decay_rate: float = 0.99985
|
sigma_decay_rate: float = 0.99985
|
||||||
"""Rate of exponetial decay."""
|
"""Rate of exponential decay."""
|
||||||
depth_loss_type: DephtLossType = DephtLossType.DS_NERF
|
depth_loss_type: DephtLossType = DephtLossType.DS_NERF
|
||||||
"""Depth loss type."""
|
"""Depth loss type."""
|
||||||
|
|
||||||
|
|
||||||
class DepthNerfactoModel(NerfactoModel):
|
class DepthNerfactoModel(NerfactoModel):
|
||||||
"""Depth loss augumented nerfacto model.
|
"""Depth loss augmented nerfacto model.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
config: Nerfacto configuration to instantiate model
|
config: Nerfacto configuration to instantiate model
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ class NerfactoModelConfig(ModelConfig):
|
|||||||
distortion_loss_mult: float = 0.002
|
distortion_loss_mult: float = 0.002
|
||||||
"""Distortion loss multiplier."""
|
"""Distortion loss multiplier."""
|
||||||
orientation_loss_mult: float = 0.0001
|
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
|
pred_normal_loss_mult: float = 0.001
|
||||||
"""Predicted normal loss multiplier."""
|
"""Predicted normal loss multiplier."""
|
||||||
use_proposal_weight_anneal: bool = True
|
use_proposal_weight_anneal: bool = True
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ class Pipeline(nn.Module):
|
|||||||
device: location to place model and data
|
device: location to place model and data
|
||||||
test_mode:
|
test_mode:
|
||||||
'train': loads train/eval datasets into memory
|
'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
|
'inference': does not load any dataset into memory
|
||||||
world_size: total number of machines available
|
world_size: total number of machines available
|
||||||
local_rank: rank of current machine
|
local_rank: rank of current machine
|
||||||
@@ -197,7 +197,7 @@ class VanillaPipeline(Pipeline):
|
|||||||
device: location to place model and data
|
device: location to place model and data
|
||||||
test_mode:
|
test_mode:
|
||||||
'val': loads train/val datasets into memory
|
'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
|
'inference': does not load any dataset into memory
|
||||||
world_size: total number of machines available
|
world_size: total number of machines available
|
||||||
local_rank: rank of current machine
|
local_rank: rank of current machine
|
||||||
|
|||||||
@@ -364,7 +364,7 @@ def detect_model_format(path: Path, ext: str) -> bool:
|
|||||||
path: Path to the model file.
|
path: Path to the model file.
|
||||||
ext: Extension to test.
|
ext: Extension to test.
|
||||||
Returns:
|
Returns:
|
||||||
True if the model file is the tested extenstion, False otherwise.
|
True if the model file is the tested extension, False otherwise.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if (
|
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
|
match_ratio = num_matched_frames / num_intial_frames
|
||||||
if match_ratio == 1:
|
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:
|
if match_ratio < 0.4:
|
||||||
result = f"[bold red]COLMAP only found poses for {num_matched_frames / num_intial_frames * 100:.2f}%"
|
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,"
|
result += " of the images. This is low.\nThis can be caused by a variety of reasons,"
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ def convert_insta360_to_images(
|
|||||||
video_back: Path to the back video.
|
video_back: Path to the back video.
|
||||||
output_dir: Path to the output directory.
|
output_dir: Path to the output directory.
|
||||||
num_frames_target: Number of frames to extract.
|
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.
|
out the curved portions of the fish-eye lens.
|
||||||
verbose: If True, logs the output of the command.
|
verbose: If True, logs the output of the command.
|
||||||
Returns:
|
Returns:
|
||||||
@@ -94,7 +94,7 @@ def convert_insta360_to_images(
|
|||||||
if spacing > 1:
|
if spacing > 1:
|
||||||
vf_cmds = [f"thumbnail={spacing}", "setpts=N/TB"]
|
vf_cmds = [f"thumbnail={spacing}", "setpts=N/TB"]
|
||||||
else:
|
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}")
|
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.
|
video: Path to the video.
|
||||||
output_dir: Path to the output directory.
|
output_dir: Path to the output directory.
|
||||||
num_frames_target: Number of frames to extract.
|
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.
|
out the curved portions of the fish-eye lens.
|
||||||
verbose: If True, logs the output of the command.
|
verbose: If True, logs the output of the command.
|
||||||
Returns:
|
Returns:
|
||||||
@@ -159,7 +159,7 @@ def convert_insta360_single_file_to_images(
|
|||||||
if spacing > 1:
|
if spacing > 1:
|
||||||
vf_cmds = [f"thumbnail={spacing}", "setpts=N/TB"]
|
vf_cmds = [f"thumbnail={spacing}", "setpts=N/TB"]
|
||||||
else:
|
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_back = vf_cmds.copy()
|
||||||
vf_cmds_front = vf_cmds.copy()
|
vf_cmds_front = vf_cmds.copy()
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ def metashape_to_json( # pylint: disable=too-many-statements
|
|||||||
|
|
||||||
Args:
|
Args:
|
||||||
image_filename_map: Mapping of original image filenames to their saved locations.
|
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.
|
output_dir: Path to the output directory.
|
||||||
verbose: Whether to print verbose output.
|
verbose: Whether to print verbose output.
|
||||||
|
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ def convert_video_to_images(
|
|||||||
if spacing > 1:
|
if spacing > 1:
|
||||||
ffmpeg_cmd += f" -vf thumbnail={spacing},setpts=N/TB -r 1"
|
ffmpeg_cmd += f" -vf thumbnail={spacing},setpts=N/TB -r 1"
|
||||||
else:
|
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 += " -pix_fmt bgr8"
|
||||||
|
|
||||||
ffmpeg_cmd += f" {out_filename}"
|
ffmpeg_cmd += f" {out_filename}"
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ def eval_setup(
|
|||||||
eval_num_rays_per_chunk: Number of rays per forward pass
|
eval_num_rays_per_chunk: Number of rays per forward pass
|
||||||
test_mode:
|
test_mode:
|
||||||
'val': loads train/val datasets into memory
|
'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
|
'inference': does not load any dataset into memory
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ def components_from_spherical_harmonics(levels: int, directions: TensorType[...,
|
|||||||
|
|
||||||
Args:
|
Args:
|
||||||
levels: Number of spherical harmonic levels to compute.
|
levels: Number of spherical harmonic levels to compute.
|
||||||
directions: Spherical hamonic coefficients
|
directions: Spherical harmonic coefficients
|
||||||
"""
|
"""
|
||||||
num_components = levels**2
|
num_components = levels**2
|
||||||
components = torch.zeros((*directions.shape[:-1], num_components), device=directions.device)
|
components = torch.zeros((*directions.shape[:-1], num_components), device=directions.device)
|
||||||
|
|||||||
@@ -266,7 +266,7 @@ def get_gaussian_ellipsiod(
|
|||||||
Args:
|
Args:
|
||||||
mean: mean of the Gaussian.
|
mean: mean of the Gaussian.
|
||||||
cov: covariance 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.
|
color: Color of the ellipsoid. Defaults to None.
|
||||||
opacity: Opacity of the ellipsoid. Defaults to 0.5.
|
opacity: Opacity of the ellipsoid. Defaults to 0.5.
|
||||||
resolution: Resolution of the ellipsoid. Defaults to 20.
|
resolution: Resolution of the ellipsoid. Defaults to 20.
|
||||||
@@ -437,7 +437,7 @@ def get_frustum_points(
|
|||||||
Args:
|
Args:
|
||||||
frustum: Frustums to visualize.
|
frustum: Frustums to visualize.
|
||||||
opacity: Opacity of the points. Defaults to 0.3.
|
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.
|
size: Size of points. Defaults to 10.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ def multiply(pose_a: TensorType[..., 3, 4], pose_b: TensorType[..., 3, 4]) -> Te
|
|||||||
|
|
||||||
Args:
|
Args:
|
||||||
pose_a: Left pose matrix, usually a transformation applied to the right.
|
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:
|
Returns:
|
||||||
Camera pose matrix where pose_a was applied to pose_b.
|
Camera pose matrix where pose_a was applied to pose_b.
|
||||||
|
|||||||
@@ -361,7 +361,7 @@ class LocalWriter:
|
|||||||
TODO: migrate to prettyprint
|
TODO: migrate to prettyprint
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
config: configuration to instatiate class
|
config: configuration to instantiate class
|
||||||
banner_messages: list of messages to always display at bottom of screen
|
banner_messages: list of messages to always display at bottom of screen
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ class Path:
|
|||||||
self.entries = entries
|
self.entries = entries
|
||||||
|
|
||||||
def append(self, other: str) -> "Path":
|
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:
|
Args:
|
||||||
other: _description_
|
other: _description_
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# 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
|
import sys
|
||||||
from typing import List, Optional, Tuple
|
from typing import List, Optional, Tuple
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ from aiortc.rtcrtpsender import RTCRtpSender
|
|||||||
def get_chunks(
|
def get_chunks(
|
||||||
lst: List[float], num_chunks: Optional[int] = None, size_of_chunk: Optional[int] = None
|
lst: List[float], num_chunks: Optional[int] = None, size_of_chunk: Optional[int] = None
|
||||||
) -> List[List[float]]:
|
) -> List[List[float]]:
|
||||||
"""Returns list of n elements, constaining a sublist.
|
"""Returns list of n elements, containing a sublist.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
lst: List to be chunked up
|
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:
|
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:
|
Args:
|
||||||
pc: peer connection point
|
pc: peer connection point
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ CONSOLE = Console(width=120)
|
|||||||
def main(check: bool = False):
|
def main(check: bool = False):
|
||||||
"""Add tags to notebooks based on cell comments.
|
"""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.
|
"# HIDDEN" - This cell will be hidden from the notebook.
|
||||||
"# OUTPUT_ONLY" - This cell will only show the output.
|
"# OUTPUT_ONLY" - This cell will only show the output.
|
||||||
"# COLLAPSED" - Hide the code and include a button to show the code.
|
"# COLLAPSED" - Hide the code and include a button to show the code.
|
||||||
|
|||||||
Reference in new issue
Block a user