MCPcopy Create free account

hub / github.com/apple/ml-pointersect / functions

Functions743 in github.com/apple/ml-pointersect

↓ 255 callersMethodsize
(self)
pointersect/inference/structures.py:1115
↓ 194 callersMethodreshape
(self, *shape: T.List[int])
pointersect/inference/structures.py:1041
↓ 145 callersMethodto
(self, device: torch.device)
pointersect/inference/structures.py:1034
↓ 133 callersMethoddetach
(self)
pointersect/inference/structures.py:1648
↓ 127 callersMethodget
(self, key, default=None)
cdslib/core/utils/argparse_utils.py:176
↓ 59 callersMethodcat
(rays: T.List['Ray'], dim: int)
pointersect/inference/structures.py:1092
↓ 59 callersMethoddevice
(self)
pointersect/inference/structures.py:1119
↓ 52 callersMethodclone
(self)
pointersect/inference/structures.py:1653
↓ 44 callersMethodinfo
Print an info to the shell and the log file.
cdslib/core/utils/print_and_save.py:434
↓ 36 callersMethodchunk
Return a
pointersect/inference/structures.py:1046
↓ 33 callersMethodmasked_fill
(self, mask: torch.Tensor, ray_src: 'Ray')
pointersect/inference/structures.py:1102
↓ 33 callersMethodsave
( self, output_dir: str, overwrite: bool = False, save_ply: bo
pointersect/inference/structures.py:1137
↓ 19 callersMethodload
Load the model saved at the filenames. It automatically gathers all the nn.modules and optimizers and load them. Everything w
cdslib/core/script/base_train.py:647
↓ 19 callersMethodsplit
Split camera (b, q) into a list of cameras (b', q'), such that b' * q' * h * w < chunk_size. Note that we only chunk q or ch
pointersect/inference/structures.py:1865
↓ 18 callersMethoddtype
(self)
pointersect/inference/structures.py:1107
↓ 16 callersMethod_test_modulated_conv1d
(self, in_channels, out_channels, kernel_size, style_dim, demodulate, dilation,
tests/cdslib/nn/modules/test_filtered_conv.py:12
↓ 11 callersMethodto
Send the model to device.
cdslib/core/models/base_model.py:115
↓ 10 callersMethodget_camera
Returns cameras in the trajactory
pointersect/inference/structures.py:4193
↓ 9 callersMethodgenerate_camera_rays
Generate camera rays: ray_origin is at pinhole and ray directions outward from a pixel location (somewhere withing a pixel pi
pointersect/inference/structures.py:1758
↓ 9 callersMethodget_pcd
Reproject RGBD pixels to world coordinate. Args: subsample: use 1 out of every `subsample` pixels
pointersect/inference/structures.py:2228
↓ 9 callersMethodparameters
Get all parameters from individual torch.nn.Module
cdslib/core/models/base_model.py:96
↓ 8 callersMethodget_rgbd_image
Given camera poses, return the captured RGBD images. Args: camera: (b, q) already on device
pointersect/inference/structures.py:3295
↓ 8 callersMethodinsert
associate pidx with gidx
pointersect/pr/cpp/pr.cpp:35
↓ 7 callersMethod_create_dataset
Return a pytorch dataset instance, which contains (total_samples, dim). :param val: constant fill in value. None: random array
tests/cdslib/data/dataloader/test_batch_preparer.py:48
↓ 7 callersMethodadd_figure
Register a figure to the tensorboard. See tensorboard's documentation https://pytorch.org/docs/stable/tensorboard.html for usage.
cdslib/core/utils/print_and_save.py:404
↓ 7 callersMethodset_epoch
Set the epoch number. Should be called at the beginning of every epoch, before iterator is constructed.
cdslib/core/data/dataloader/distributed_bucket_sampler.py:150
↓ 6 callersMethodextract_valid_attr
Args: arr: (b, n, *) bidx: batch index Returns: (n, dim)
pointersect/inference/structures.py:269
↓ 6 callersMethodget_o3d_pcds
Return a list of b o3d pcds containing xyz and rgb.
pointersect/inference/structures.py:319
↓ 6 callersMethodhomogeneous_matrix
returns the 4*4 homogeneous matrix.
plib/rigid_motion.py:27
↓ 6 callersMethodload_state_dict
Load a pretrained model given a state dictionary.
cdslib/core/models/base_model.py:169
↓ 6 callersMethodstate_dict
Returns a dictionary that can be saved or load.
cdslib/core/models/base_model.py:231
↓ 5 callersMethod_get_weight
(self)
cdslib/core/nn/modules/subspace.py:112
↓ 5 callersMethodadd_all_samples
Create memmaps that store chunked of the samples. It will overwrite the working_dir. Args: samples: a sequence of
cdslib/core/data/chunked_memmap.py:189
↓ 5 callersMethodeval
Set all the nn.modules to evaluation mode.
cdslib/core/models/base_model.py:159
↓ 5 callersFunctionupfirdn2d
r"""Pad, upsample, FIR filter, and downsample a batch of 2D images. Accepts a batch of 2D images of the shape `[batch, inC, inH, inW]` and pe
cdslib/core/nn/functional/upfirdn.py:11
↓ 4 callersMethod_build_model
(self, num_layers, dim_input, dim_hidden, bias, append_inputs, lstm_cell_fn)
tests/cdslib/nn/modules/test_lstm.py:14
↓ 4 callersMethod_build_model
(self, num_layer, dim_input, dim_output, dim_features, nonlinearity='leaky_relu', add_norm
tests/cdslib/nn/modules/test_linear.py:35
↓ 4 callersMethod_get_geometry_hdf5_filename
Args: type: "depth_meters": Euclidean distances (in meters) to the optical center of the camera (ray_t)
pointersect/data/hypersim_dataset.py:364
↓ 4 callersMethod_register_var_to_save
Make sure the var will be saved in the checkpoint. Note that it is just for recording purpose. They will NOT be loaded during
cdslib/core/script/base_train.py:259
↓ 4 callersMethod_test
test plan: - given created random datasets of different sizes - create batch_preparer of different dataset ratios - c
tests/cdslib/data/dataloader/test_batch_preparer.py:61
↓ 4 callersMethod_test
( self, batch_size: int, num_replicas: int, drop_last: bool,
tests/cdslib/data/dataloader/test_distributed_bucket_sampler.py:11
↓ 4 callersMethodadd_scalar
Register a scalar. Args: tag: Name of the scalar. Can be grouped by adding '/' in it. scalar_value:
cdslib/core/utils/print_and_save.py:326
↓ 4 callersMethodbuild_model
(self, num_layer, dim_input, dim_output, dim_features, kernel_sizes, strides, paddings, di
tests/cdslib/nn/modules/test_conv.py:38
↓ 4 callersMethodcheck_dim
Check all attributes have the same number of points.
pointersect/inference/structures.py:160
↓ 4 callersMethodflush
Flush the buffer to console and tensorboard. Note: It uses the latest epoch, global_step, and batch_idx, so it should be called e
cdslib/core/utils/print_and_save.py:440
↓ 4 callersMethodget_H_w2c
Returns extrinsic matrices (inverse of H_c2w), shape: (b, q, 4, 4).
pointersect/inference/structures.py:1752
↓ 4 callersMethodget_all_num_pixels
Return the number of pixels in each image.
pointersect/data/mesh_dataset_v2.py:171
↓ 4 callersMethodget_ray_intersection
Intersect the mesh with rays to get ground truth Args: ray: (b, *m_shape) Returns:
pointersect/inference/structures.py:3460
↓ 4 callersMethodindex_select
(self, dim: int, index: torch.Tensor)
pointersect/inference/structures.py:1614
↓ 4 callersFunctionrender_point_cloud
( input_point_cloud: T.Union[PointCloud, str], output_dir: str, model_filename: str,
pointersect/inference/main.py:1901
↓ 4 callersMethodrun
The main process.
cdslib/core/script/base_train.py:289
↓ 4 callersMethodstep
Update parameters and learning rate.
cdslib/core/optim/tf_optim.py:119
↓ 4 callersMethodvoxel_downsampling
Voxel downsampling uses a voxel grid to uniformly downsample the input point cloud. Procedure: - Points are discretized into
pointersect/inference/structures.py:468
↓ 3 callersMethod_build_model
( self, batch_size=10, seq_len = 20, num_chars = 7,
tests/cdslib/nn/modules/test_graves.py:58
↓ 3 callersMethod_ff_block
(self, x: Tensor)
pointersect/models/network_transformer.py:172
↓ 3 callersMethod_get_imagary_hdf5_filename
Args: type: "color": color image before any tone mapping has been applied "diffuse_illumination
pointersect/data/hypersim_dataset.py:398
↓ 3 callersMethod_loop_dataloader
( self, epoch: int, dataloader: T.Sequence[T.Any], mode: str,
cdslib/core/script/base_train.py:861
↓ 3 callersMethod_register_var_to_load
Register variable to be loaded during retraining.
cdslib/core/script/base_train.py:276
↓ 3 callersMethod_sa_block
( self, x: Tensor, attn_mask: Optional[Tensor], key_padding_ma
pointersect/models/network_transformer.py:145
↓ 3 callersMethod_step
One training step. Return a dictionary that will be passed to logging.
tests/cdslib/script/test_base_train.py:164
↓ 3 callersMethod_step
Args: epoch: bidx: batch: input_rgbd_images: RGBDImage, (b, q, h, w),
pointersect/script/train_v2.py:554
↓ 3 callersMethod_test
(self, batch, c, h, w, wh, ww, up_x, up_y, down_x, down_y, pad_x0, pad_x1, pad_y0,
tests/cdslib/nn/modules/test_upfirdn.py:97
↓ 3 callersMethod_test
(self, batch, c, h, wh, up, down, pad_0, pad_1)
tests/cdslib/nn/modules/test_upfirdn.py:169
↓ 3 callersMethod_test
(self, in_channels, layer_configs, blur_kernel, batch_size, seq_len_in)
tests/cdslib/nn/modules/test_filtered_conv.py:191
↓ 3 callersMethod_test
(self, in_features, out_features, normalize, orthogonalize, init_norm)
tests/cdslib/nn/modules/test_subspace.py:11
↓ 3 callersMethod_visualize_gt_est
Visualize the results computed in _step.
pointersect/script/train_v2.py:963
↓ 3 callersMethodclose
Close the logger and terminates the tensorboard.
cdslib/core/utils/print_and_save.py:464
↓ 3 callersMethodcompute_output_seq_len
(self, seq_len_in: int, pad_type=None)
cdslib/core/nn/modules/filtered_conv.py:443
↓ 3 callersFunctioncompute_point_ray_distance
Compute the distance between each point to each ray. Args: points: (*, n, 3) ray_origins: (*, m, 3)
plib/utils.py:409
↓ 3 callersMethodforward
(self, x: torch.Tensor)
cdslib/core/nn/modules/conv.py:132
↓ 3 callersFunctionget_grid_idx
Compute the grid index given xyz_w. Args: points: (*, n, 3) grid_size: (*, 3) long. number of grid cells in x y z. center: (*, 3) center of the grid
pointersect/pr/cpp/pr.cpp:239
↓ 3 callersFunctionget_settings
( mesh_scale: float = 1., input_camera_trajectory_params: T.Dict[str, T.Any] = None, o
pointersect/inference/main.py:30
↓ 3 callersMethodget_table
get the underlying table
pointersect/pr/cpp/pr.cpp:57
↓ 3 callersMethodget_total_samples
Return the total number of samples (multiplied with their ratios).
cdslib/core/data/dataloader/batch_preparer.py:204
↓ 3 callersMethodinvert_homogeneous_matrix
returns the inverse of a homegeneous matrix.
plib/rigid_motion.py:36
↓ 3 callersMethodload_options
Load the config file, which is a dictionary of: var_name -> Dict[key, val]. Each of the key in var_name will replace the current valu
cdslib/core/script/base_train.py:539
↓ 3 callersFunctionmain_render
Main rendering function that calls different methods.
pointersect/inference/main.py:702
↓ 3 callersFunctionprint1D
Print a 1D array. The function automatically breaks lines when printing a long 1D array. Args: arr: The 1D array to prin
cdslib/core/utils/print_and_save.py:73
↓ 3 callersMethodregister_buffer
(self, name: str, tensor: torch.Tensor, persistent=True)
cdslib/core/models/base_model.py:50
↓ 3 callersMethodregister_parameter
(self, name: str, param: torch.Tensor)
cdslib/core/models/base_model.py:59
↓ 3 callersMethodregister_var_to_save
Make sure the var will be saved in the state_dict. Note that it is just for recording purpose. They will NOT be loaded during
cdslib/core/models/base_model.py:64
↓ 3 callersMethodreset_losses
Set the losses to None.
pointersect/script/train_v2.py:1279
↓ 3 callersMethodreset_outputs
Set the outputs of the model to None.
pointersect/script/train_v2.py:1272
↓ 3 callersMethodtest1
( self, b=1, m=1, n=10000, max_grid_width=20.,
tests/pointersect/pr/cuda/test_cuda.py:593
↓ 3 callersFunctionupfirdn1d
r"""One-dimensional upsample, fir filtering, downsample. Args: input (batch, cin, seq_len): input tensor kernel (kern
cdslib/core/nn/functional/upfirdn.py:101
↓ 3 callersMethodzero_grad
Zero the gradient buffer.
cdslib/core/optim/tf_optim.py:115
↓ 2 callersMethod__init__
Create a linear layer whose weights are initialized with a chosen method. The usage of the layer is the same as torch.nn.Linear.
cdslib/core/nn/modules/linear.py:25
↓ 2 callersMethod__init__
r""" Args: kernel (list of float): 1D blur_kernel. pad (tuple of int): (pad_left, pad_
cdslib/core/nn/modules/filtered_conv.py:402
↓ 2 callersMethod__init__
Args: in_features (int): input feature dimension (number of columns) out_features (int):
cdslib/core/nn/modules/subspace.py:24
↓ 2 callersMethod__init__
Create a one-dimensional convolution layer whose weights are initialized with a chosen method. The usage of the layer is the same as
cdslib/core/nn/modules/conv.py:24
↓ 2 callersMethod_construct_batches
Construct the batches.
cdslib/core/data/dataloader/distributed_bucket_sampler.py:156
↓ 2 callersMethod_determine_memmap_filenames
Determine the filenames of the memmaps.
cdslib/core/data/chunked_memmap.py:334
↓ 2 callersMethod_register
Register the var_name to the target (set of var names) Args: var_name: name (str) or list of names of th
pointersect/script/train_v2.py:1192
↓ 2 callersMethod_set_eval_mode
Set all the nn.modules to evaluation mode.
cdslib/core/script/base_train.py:637
↓ 2 callersMethod_test
( rank=0, dim_w=30, num_samples=1000, batch_size=32,
tests/cdslib/script/test_base_train.py:259
↓ 2 callersMethod_test
(self, use_amp)
tests/cdslib/optim/test_tf_optim.py:12
↓ 2 callersMethod_test
( self, in_features, out_features, layer_configs,
tests/cdslib/nn/modules/test_subspace.py:78
↓ 2 callersMethod_test
(self, subsample: int)
tests/plib/test_render.py:35
↓ 2 callersMethod_test
( self, b: int, n: int, grid_size, center,
tests/pointersect/pr/test_naive.py:10
↓ 2 callersMethod_test
( self, type: str, # 'cpp' or 'cuda' points: torch.Tensor, # (b, n, 3)
tests/pointersect/pr/test_pr_utils.py:15
next →1–100 of 743, ranked by callers