MCPcopy Create free account

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

Functions743 in github.com/apple/ml-pointersect

↓ 1 callersMethodapply_gamma
apply the scaling and gamma curve. rgb: (h, w, 3)
pointersect/data/hypersim_dataset.py:353
↓ 1 callersFunctionbatch_render_mesh
batch render multiple meshes
pointersect/inference/main.py:1673
↓ 1 callersMethodcheck_dict_valid
(d: T.MutableMapping[str, T.Any])
cdslib/core/nn/nn_utils.py:369
↓ 1 callersMethodcheck_valid
(self)
cdslib/core/nn/nn_utils.py:348
↓ 1 callersFunctionclean_mesh_uv
Ensure mesh uv is wrapped between 0 and 1, and triangles with identical uv in vertices are properly handled. Args: triangle_uvs: inp
plib/mesh_utils.py:13
↓ 1 callersFunctionclean_texture
Make sure the texture is a rgb image (not gray one and no alpha channel). Args: img: input texture image Returns: img:
plib/mesh_utils.py:39
↓ 1 callersMethodclone
(self)
pointersect/inference/structures.py:2202
↓ 1 callersMethodclose_fig
close matplotlib figure in case tb_logger is None.
cdslib/core/utils/print_and_save.py:414
↓ 1 callersMethodcompute_attn_contexts
Compute the attended context given attention weights with matrix multiplication. Args: attn_weights: (seq_len, b
cdslib/core/nn/modules/attention.py:223
↓ 1 callersMethodcompute_attn_weights
Args: inputs: (seq_len, batch_size, dim_input) input used to compute attention total_char:
cdslib/core/nn/modules/attention.py:257
↓ 1 callersMethodcompute_confidence
Compute the binary confidence of the ray based on hit and the angle between the ray direction and the surface normal is small
pointersect/inference/structures.py:1563
↓ 1 callersMethodcompute_layer_lengths
Compute the sequence length of the output of each layers. Args: seq_len_in (int): input sequence length
cdslib/core/nn/modules/conv.py:580
↓ 1 callersMethodcompute_min_seq_len
Compute the minimum input sequence length. Returns: mim input sequence length.
cdslib/core/nn/modules/conv.py:672
↓ 1 callersMethodcompute_output_seq_len
Compute the output sequence length. Args: pad_type: ``None``: use the original padding config ``'
cdslib/core/nn/modules/filtered_conv.py:354
↓ 1 callersMethodcompute_output_seq_len
Compute the output sequence length.
cdslib/core/nn/modules/filtered_conv.py:726
↓ 1 callersFunctioncompute_point_ray_distance_c
Compute the distance between a point and its projection on a ray. Args: p_p: (3, ) float pointer to xyz p_ro: (3, ) float pointer to xyz of ray origi
pointersect/pr/cpp/pr.cpp:741
↓ 1 callersMethodcompute_ray_normal_dot_product
Compute the dot product between the normal_w and the camera ray Returns: (b, q, h, w) the dot product (cos(theta)) betwe
pointersect/inference/structures.py:2145
↓ 1 callersMethodcompute_statistics
Compute the statistics. Returns: a dictionary containing the current statistics `"mean"` `"std"`
cdslib/core/utils/print_and_save.py:601
↓ 1 callersFunctioncompute_xyz_w_from_uv
Compute the xyz_w in the world coordinate using the image coordinate and its z_c. Important note: The function assumes an image coor
plib/utils.py:1130
↓ 1 callersMethodcompute_zs
Compute the prior and the posterior through the following operations: 1. mix attn_hs and attn_cs to get query 2. dot-
cdslib/core/nn/modules/vrnn.py:371
↓ 1 callersFunctionconstruct_last_vectors
construct time-shifted version of the ground-truth to be used as teacher-forcing input where out[t] = gt_vector[t-1] :param gt_vectors: (
cdslib/core/nn/nn_utils.py:274
↓ 1 callersMethodconstruct_models
(self)
tests/cdslib/script/test_base_train.py:130
↓ 1 callersMethodconstruct_models
Construct the nn.Modules. No need to return the models --- they will be used through `self.xxxx`.
cdslib/core/script/base_train.py:1058
↓ 1 callersMethodconstruct_optimizers
(self)
cdslib/core/script/base_train.py:1067
↓ 1 callersFunctioncopy_obj_files
Copy the obj and all related files into a new directory. Args: input_dir: input folder of the mesh (obj) output_dir: output
plib/preprocess_obj.py:62
↓ 1 callersFunctioncreate_pcd
Create o3d point cloud from points Args: points: (*, 3) colors: (*, 3) optional remove_nan_in
plib/utils.py:190
↓ 1 callersFunctiondestroy_vis
(vis: T.Union[o3d.visualization.Visualizer, None])
plib/utils.py:2612
↓ 1 callersMethoddetermine_exp_tag
Make sure the exp_tag does not exist. If existed, modify it so that it is unique by appending the current date and time to it.
cdslib/core/script/base_train.py:983
↓ 1 callersMethoddetermine_tonemap_scale
rgb: (h, w, 3)
pointersect/data/hypersim_dataset.py:327
↓ 1 callersMethoddownload_assets
Download the assets like dataset, pretrained models, etc.
cdslib/core/script/base_train.py:1026
↓ 1 callersMethodepoch_setup
Set up at the beginning of an epoch, before dataloder iterator is constructed. It can be used to setup the batch sampler, etc.
cdslib/core/script/base_train.py:1079
↓ 1 callersMethodextract_valid_point_cloud
Return a new PointCloud `(1, n)` that contains only the valid points. Args: bidx: Returns: new_point
pointersect/inference/structures.py:298
↓ 1 callersMethodfinish_procedure
(self)
cdslib/core/script/base_train.py:1201
↓ 1 callersMethodforward
Called during training.
cdslib/core/models/base_model.py:353
↓ 1 callersFunctiongather_and_clean_dataset
This function is called first in the training process. Returns: train_mesh_filenames: list of mesh filenames for trainin
pointersect/data/dataset_helper.py:150
↓ 1 callersFunctiongather_points
gather the points belonging to each grid cell. Args: grid_idxs: grid index of each point total_cells:
pointersect/pr/naive.py:159
↓ 1 callersFunctiongather_points
Gather the points belonging to each grid cell. Args: grid_idxs: (b, n), grid index of each point total_cells: (b,) total grid cells valid_mask: (b, n
pointersect/pr/cpp/pr.cpp:160
↓ 1 callersFunctiongenerate_camera_rays
Generate camera rays (origin and direction) in the world coordinate. The function reproduces `o3d.t.geometry.RaycastingScene.create_rays_pinh
plib/utils.py:1537
↓ 1 callersFunctiongenerate_camera_rays_from_uv
Generate camera rays (origin and direction) in the world coordinate given uv coordinate on the image. The uv coordinate on image is origin at
plib/utils.py:1614
↓ 1 callersMethodgenerate_random_patch_rays
Generate rays to form patches on the corresponding images. Args: num_patches_per_q: number of patches fr
pointersect/inference/structures.py:1797
↓ 1 callersFunctionget_ShapeNet_model_list
Given setting (train/test), generate a list of obj file names in the shapenet dataset. Args: rootpath: the root directory of the Sha
pointersect/data/genlist.py:52
↓ 1 callersFunctionget_constant_rnn_hidden_states
r""" Construct a hidden state filled with the given constant number. It is a convenient function to get a initial hidden state for pytorch's R
cdslib/core/nn/nn_utils.py:132
↓ 1 callersMethodget_current_lrs
Get a dictionary containing the current learning rate of each optimizer
pointersect/script/train_v2.py:1158
↓ 1 callersMethodget_dataloaders
Returns the training dataloader and validation dataloader. The dataloaders iterate through batches. Returns: dataloader:
cdslib/core/script/base_train.py:1043
↓ 1 callersFunctionget_dataset_mesh_filename_config
()
pointersect/data/dataset_helper.py:34
↓ 1 callersFunctionget_defualt_config
()
pointersect/meta_script/submit_pbnr_v2.py:15
↓ 1 callersFunctionget_defualt_mesh_filename_config
()
pointersect/meta_script/submit_pbnr_v2.py:24
↓ 1 callersFunctionget_hypersim_camera_names
Returns the camera name in a scene, eg, cam_00, cam_01, etc.
pointersect/data/hypersim_dataset.py:71
↓ 1 callersFunctionget_hypersim_scene_info
Returns the scene dir and name (eg, "ai_VVV_NNN", "ai_001_001") . Args: volume_id: scene_id: dataset_root_dir: R
pointersect/data/hypersim_dataset.py:24
↓ 1 callersFunctionget_k_neighbor_points
Given n points (xyz) and m rays, return the neighboring points to each ray. Args: points: (*, n, 3) ray_origins:
plib/utils.py:788
↓ 1 callersFunctionget_k_neighbor_within_ray
Args: points: ray_origins: ray_directions: k: ray_radius: grid_size: grid_center:
plib/utils.py:630
↓ 1 callersFunctionget_lpips_model
Return lpips model
plib/metrics.py:33
↓ 1 callersMethodget_mesh
Reconstruct a mesh from the point cloud. Args: bidx: the batch index. method:
pointersect/inference/structures.py:360
↓ 1 callersFunctionget_mesh_filenames
Returns: two list of mesh filenames (for training and test)
pointersect/meta_script/submit_pbnr_v2.py:34
↓ 1 callersFunctionget_min_R
Return the rotation matrix that rotates v1 to v2 in a geodestic manner. Args: v1: (*, 3) direction vector (unit norm), v2: (
plib/rigid_motion.py:268
↓ 1 callersFunctionget_random_direction
Return a random unit direction vector. If shape = (n1, n2), the function returns (n1, n2, 3).
plib/rigid_motion.py:346
↓ 1 callersFunctionget_random_direction_within_cone
Get uniformly sampled random directions within a cone centered at (0,0,1). Args: n: number of samples theta:
plib/rigid_motion.py:365
↓ 1 callersMethodget_seq_lens
(self)
tests/cdslib/data/dataloader/test_batch_preparer.py:30
↓ 1 callersMethodget_tonemap_info
(self)
pointersect/data/hypersim_dataset.py:301
↓ 1 callersFunctionget_valid_mask
Returns a BoolTensor B, where B[i,j] = True if j < valid_lens[i]. Args: valid_lens: (batch,) max_len: int, max length of the
cdslib/core/nn/nn_utils.py:187
↓ 1 callersMethodget_zero_hidden_states
Generate all-zero hidden states that can be used to initialize the model or as a template. Args: batch_size:
cdslib/core/nn/modules/vrnn.py:355
↓ 1 callersMethodget_zero_hidden_states
Get a all-zero hidden state that can be used by the module. Args: batch_size: Batch size of the hidden s
cdslib/core/nn/modules/lstm.py:83
↓ 1 callersFunctiongrid_ray_intersection
Compute the intersection between grid cells and the ray. Args: ray_origins: (b, m, 3) ray_directions:
pointersect/pr/naive.py:192
↓ 1 callersFunctiongrid_ray_intersection
Compute the intersection between grid cells and the ray. Args: ray_origins: (b, m, 3) ray_directions: (b, m, 3) ray_radius: (b,) grid_size: (b, 3) lo
pointersect/pr/cpp/pr.cpp:313
↓ 1 callersFunctiongrid_ray_intersection_v2
Compute the intersection between grid cells and the ray. Args: ray_origins: (b, m, 3) ray_directions: (b, m, 3) ray_radius: (b,) grid_size: (b, 3) lo
pointersect/pr/cpp/pr.cpp:550
↓ 1 callersFunctionimagesc
Mimic matlab's imagesc using matplotlib. Args: arr: 2D matrix xs: coordinate of columns (None: use 0
cdslib/core/utils/print_and_save.py:640
↓ 1 callersMethodinterp
Geodestic interpolation between RigidMotion H0 and RigidMotion H1. t=0 -> H0, t=1 -> H1.
plib/rigid_motion.py:174
↓ 1 callersFunctioninterp_texture_map_from_ray_tracing_results
Interpolate a uv_map given ray_tracing results and a mesh Args: mesh: o3d mesh raycast_results: (*,
plib/render.py:95
↓ 1 callersFunctionintersect_pcd_and_ray
Given point cloud (scene representation) and camera rays, compute intersection points, surface normal, rgb, etc. Procedure: - find n
pointersect/inference/infer.py:35
↓ 1 callersFunctioninv_homogeneous_tensors
Compute the inverse of the homogeneous matrices. Args: Hs: (*, 4, 4) Returns: inv_Hs: (*, 4, 4)
plib/rigid_motion.py:686
↓ 1 callersMethodload_json
Load camera from a json file. Json file format: H_c2w: (b, q, 4, 4), a nested list containing the camera
pointersect/inference/structures.py:1710
↓ 1 callersMethodload_state_dict
Load the state dictionary.
pointersect/inference/structures.py:1129
↓ 1 callersMethodload_state_dict
Load the state dictionary.
pointersect/inference/structures.py:1702
↓ 1 callersFunctionmap_kd_value_to_textures
For materials without texture map, this function will create texture map based on Kd. For materials with texture map, this function will mult
plib/preprocess_obj.py:153
↓ 1 callersMethodmultiply
returns H0 * H1 in RigidMotion
plib/rigid_motion.py:168
↓ 1 callersFunctionpositional_encoding
r"""Apply positional encoding to the input. Args: tensor: (*, dim_in) Input tensor to be positionally encoded. num_en
pointersect/models/model_utils.py:199
↓ 1 callersFunctionprint_options
Print the options parsed by ArgumentParser. Args: options: parsed options parser: the parser used to
cdslib/core/utils/argparse_utils.py:103
↓ 1 callersMethodrandom_perturb_direction
Perturb the rays by randomly shifting the ray origin by [-shift, shift], and randomly rotating the ray direction with [-angle, angle]
pointersect/inference/structures.py:1059
↓ 1 callersMethodrate
Compute the learning rate at a given step. Args: step (int or None): the step to compute the learning ra
cdslib/core/optim/tf_optim.py:141
↓ 1 callersFunctionread_config_file
Read a config file and return a dict (arg_name -> val). Args: filename: json or yaml filename Returns: a di
cdslib/core/utils/argparse_utils.py:28
↓ 1 callersMethodreconfigure_optimizer
Set the optimizer's state (e.g., init_step) after pre-trained models has been loaded.
cdslib/core/script/base_train.py:1071
↓ 1 callersMethodrecord
Record the values in val_dict Args: val_dict: a dictionary containing the floats to compute statistics.
cdslib/core/utils/print_and_save.py:564
↓ 1 callersFunctionrecursive_dict_update
Recursively update the content in `src_dict` into `tgt_dict`. For example, tgt_dict = { 'a': 1, 'b': {'c': 2}, '
cdslib/core/utils/argparse_utils.py:195
↓ 1 callersFunctionreduce_tensor
Gather and sum the tensor from all gpus.
cdslib/core/utils/multigpu_utils.py:150
↓ 1 callersFunctionremesh
Uvmap a mesh (provided as vertices and triangles) using xatlas. Args: vertices: (n, 3) float triangle_ids:
plib/render.py:877
↓ 1 callersMethodremove_outlier
Remove the outlier points in the point cloud. Currently, it removes points that have few neighbors in a given sphere around them.
pointersect/inference/structures.py:590
↓ 1 callersMethodremove_point_at_inf
remove the point representing inf at n=0
pointersect/inference/structures.py:233
↓ 1 callersFunctionremove_redundant_face
Remove repetitive face in a mesh and replace the original mesh. Args: filepath: path of the mesh (obj)
plib/preprocess_obj.py:133
↓ 1 callersFunctionrender_arkitscenes
Render the lidar scans in ARKitScenes dataset. Args: ply_filenames: list of ply filenames containing the point cloud
pointersect/inference/main.py:1848
↓ 1 callersFunctionrender_hypersim
Render rgbd images from ARKitScenes dataset.
pointersect/inference/main.py:1541
↓ 1 callersFunctionrender_point_cloud_camera_using_pointersect
Given point cloud and cameras, use pointersect to render the point cloud. Args: model_filename: filename of the pretrain
pointersect/inference/infer.py:506
↓ 1 callersFunctionrender_point_cloud_ray_using_pointersect
Given point cloud and rays, use pointersect to render the point cloud. Args: k: number of neighbor points used by the mo
pointersect/inference/infer.py:645
↓ 1 callersFunctionrender_point_clouds
( input_point_clouds: T.Union[T.List[T.Union[PointCloud, str]], T.Tuple[T.Union[PointCloud, str]]],
pointersect/inference/main.py:2059
↓ 1 callersMethodreplace_texture
Replace the texture maps in the o3d mesh. Args: texture_imgs: a list of texture maps (may be in a differ
pointersect/inference/structures.py:3272
↓ 1 callersMethodsample_point_cloud
Sample the mesh to create a point cloud Args: num_points: number of point to sample method:
pointersect/inference/structures.py:3548
↓ 1 callersMethodsave
Save the nn.module, optimizer, and customized save dict. Args: filename: the filename of the pth file to save
cdslib/core/script/base_train.py:733
↓ 1 callersMethodsave
( self, output_dir: str, overwrite: bool = False, save_png: bo
pointersect/inference/structures.py:2466
↓ 1 callersMethodsave_as_npbgpp
Save the ib-th point cloud as a ply file.
pointersect/inference/structures.py:680
↓ 1 callersFunctionset_dataset
( config_dict: T.Dict[str, T.Any], dataset_name: str, total: int = 10000, max_
pointersect/meta_script/submit_pbnr_v2.py:76
↓ 1 callersMethodset_dataset_lengths
Args: dataset_lengths: a list containing the length of each data global_idxs: global
cdslib/core/data/dataloader/sort_sampler.py:28
← previousnext →201–300 of 743, ranked by callers