MCPcopy Create free account

hub / github.com/Atrovast/THGS / functions

Functions879 in github.com/Atrovast/THGS

↓ 108 callersMethodview
(self)
gui/cam_utils.py:190
↓ 101 callersMethodto
Move the NAG with all Data in it to device.
ext/spt/data/nag.py:125
↓ 87 callersMethodcpu
Move the NAG with all Data in it to CPU.
ext/spt/data/nag.py:130
↓ 72 callersMethodcuda
Move the NAG with all Data in it to CUDA.
ext/spt/data/nag.py:134
↓ 31 callersMethoddetach
Detach all tensors in the NAG.
ext/spt/data/nag.py:120
↓ 24 callersMethodclone
Return a new NAG instance containing the Data clones.
ext/spt/data/nag.py:116
↓ 21 callersFunctionload_tensor
Load torch.Tensor from an HDF5 file. See `save_tensor` for writing such file. Options allow reading only part of the rows. :param f: h5 file
ext/spt/utils/io.py:85
↓ 21 callersMethodselect
Indexing mechanism on the NAG. Returns a new copy of the indexed NAG, with updated clusters. Supports int, torch and numpy indexing.
ext/spt/data/nag.py:164
↓ 18 callersFunctionsanitize_keys
Sanitize an iterable of string key into a sorted list of unique keys. This is necessary for consistently hashing key list arguments of some tr
ext/spt/utils/keys.py:69
↓ 16 callersMethodload
Load NAG from an HDF5 file. See `NAG.save` for writing such file. Options allow reading only part of the data. NB: if relevant, a NAG
ext/spt/data/nag.py:287
↓ 14 callersMethodget_super_index
Compute the super_index linking the points at level 'low' with superpoints at level 'high'. Note: 'low=-1' is accepted when level-0 h
ext/spt/data/nag.py:66
↓ 13 callersFunctionread_next_bytes
Read and unpack the next bytes from a binary file. :param fid: :param num_bytes: Sum of combination of {2, 4, 8}, e.g. 2, 6, 16, 30, etc.
scene/colmap_loader.py:72
↓ 13 callersFunctionsave_tensor
Save torch.Tensor to HDF5 file. :param x: 2D torch.Tensor :param f: h5 file path of h5py.File or h5py.Group :param key: str h5py.
ext/spt/utils/io.py:62
↓ 13 callersFunctiontensor_idx
Convert an int, slice, list or numpy index to a torch.LongTensor.
ext/spt/utils/tensor.py:13
↓ 13 callersMethodto
Move the CSRData to the specified device.
ext/spt/data/csr.py:130
↓ 13 callersMethodwrite
(self, x)
utils/general_utils.py:118
↓ 12 callersFunctionint_to_plotly_rgb
Convert 1D torch.Tensor of int into plotly-friendly RGB format. This operation is deterministic on the int values.
ext/spt/utils/color.py:60
↓ 12 callersFunctionto_trimmed
Convert to 'trimmed' graph: same as coalescing with the additional constraint that (i, j) and (j, i) edges are duplicates. If edge attributes
ext/spt/utils/graph.py:388
↓ 11 callersMethodsave
(self, iteration)
scene/__init__.py:86
↓ 10 callersMethoddevice
Return device of first Data in NAG.
ext/spt/data/nag.py:139
↓ 10 callersMethodgetTrainCameras
(self, scale=1.0)
scene/__init__.py:90
↓ 10 callersFunctionto_float_rgb
(rgb)
ext/spt/utils/color.py:12
↓ 10 callersMethodto_super_index
Return a 1D tensor of indices converting the CSR-formatted clustering structure in 'self' into the 'super_index' format.
ext/spt/data/cluster.py:66
↓ 9 callersMethodextract
(self, args)
arguments/__init__.py:40
↓ 9 callersFunctionsafe_normalize
(x, eps=1e-20)
gui/cam_utils.py:101
↓ 8 callersMethodmajor
Return the obj, count, and y of the majority instance in each cluster (i.e. the object with which it has the highest overlap). :param
ext/spt/data/instance.py:159
↓ 8 callersMethodmerge
Merge clusters based on `idx` and return the result in a new InstanceData object. :param idx: 1D torch.LongTensor or numpy.NDArray
ext/spt/data/instance.py:224
↓ 8 callersFunctionnumpyfy
Convert torch.Tensor to numpy while respecting some constraints on output dtype.
ext/spt/utils/tensor.py:194
↓ 7 callersMethodcompute_similarity
(self, embedding_feature, out_bg_mask=None)
gui/main.py:312
↓ 7 callersMethodencode_text
(self, text)
gui/main.py:307
↓ 7 callersFunctionis_xyz_tensor
(xyz)
ext/spt/utils/point.py:7
↓ 7 callersMethodload
(path)
scene/semantic_model.py:53
↓ 7 callersMethodpan
(self, dx, dy, dz=0)
gui/cam_utils.py:240
↓ 7 callersMethodraise_if_edge_keys
This is a TEMPORARY, HACKY method to be called wherever edge_keys may cause an issue.
ext/spt/data/data.py:144
↓ 7 callersFunctionsizes_to_pointers
Convert a tensor of sizes into the corresponding pointers. This is a trivial but often-required operation.
ext/spt/utils/sparse.py:34
↓ 7 callersFunctiontorchify
Convert np.ndarray to torch.Tensor.
ext/spt/utils/tensor.py:204
↓ 6 callersMethodget_sub_size
Compute the number of points of level 'low' contained in each superpoint of level 'high'. Note: 'low=-1' is accepted when level-0 has
ext/spt/data/nag.py:34
↓ 6 callersMethodrender
(self)
gui/main.py:1245
↓ 6 callersMethodshow
See `src.visualization.show`.
ext/spt/data/nag.py:515
↓ 5 callersMethod__init__
(self, p=0.2, x_idx=None)
ext/spt/transforms/point.py:523
↓ 5 callersFunctioneval_sh
Evaluate spherical harmonics at unit directions using hardcoded SH polynomials. Works with torch/np/jnp. ... Can be 0 or more batch d
utils/sh_utils.py:57
↓ 5 callersFunctionfocal2fov
(focal, pixels)
utils/graphics_utils.py:76
↓ 5 callersMethodget_batch_class
Helps `self.from_list()` and `self.to_list()` identify which classes to use for batch collation and un-collation.
ext/spt/data/csr.py:182
↓ 5 callersFunctionhas_duplicates
Checks whether a 1D tensor of indices contains duplicates.
ext/spt/utils/tensor.py:60
↓ 5 callersFunctionknn_2
Search k-NN of x_query inside x_search, within radius `r_max`. Optionally, passing `batch_search` and `batch_query` will ensure the neighbor s
ext/spt/utils/neighbors.py:150
↓ 5 callersMethodto
Extend `torch_geometric.Data.to` to handle Cluster and InstanceData attributes.
ext/spt/data/data.py:190
↓ 4 callersMethod__init__
(self)
lpipsPyTorch/modules/networks.py:89
↓ 4 callersFunction_set_partitioner_parameters
Modifies the `model.partitioner` parameters with parameters passed in the `partition_kwargs` dictionary.
ext/spt/utils/instance.py:1099
↓ 4 callersFunctionarange_interleave
Vectorized equivalent of: >>> torch.cat([torch.arange(s, s + w) for w, s in zip(width, start)])
ext/spt/utils/tensor.py:85
↓ 4 callersFunctiondropout
(a, p=0.5, dim=1, inplace=False, to_mean=False)
ext/spt/utils/dropout.py:7
↓ 4 callersFunctionfeats_to_plotly_rgb
Convert features of the format M x N with N>=1 to an M x 3 tensor with values in [0, 1 for RGB visualization].
ext/spt/utils/color.py:78
↓ 4 callersMethodget_base_class
Helps `self.from_list()` and `self.to_list()` identify which classes to use for batch collation and un-collation.
ext/spt/data/csr.py:175
↓ 4 callersMethodget_covariance
(self, scaling_modifier = 1)
scene/gaussian_model.py:125
↓ 4 callersFunctionget_stuff_mask
Helper function producing a boolean mask of size `y.shape[0]` indicating which of the `y` (labels if 1D or logits/probabilities if 2D) are amo
ext/spt/utils/instance.py:841
↓ 4 callersMethodinitialize
(self, input=None, num_pts=5000, radius=0.5)
gui/gs_renderer.py:189
↓ 4 callersFunctionis_dense
Checks whether a 1D tensor of indices contains dense indices. That is to say all values in [0, a.max] appear at least once in a.
ext/spt/utils/tensor.py:67
↓ 4 callersMethodload
Load Cluster from an HDF5 file. See `Cluster.save` for writing such file. Options allow reading only part of the clusters. Th
ext/spt/data/cluster.py:146
↓ 4 callersMethodload
Load CSRData from an HDF5 file. See `CSRData.save` for writing such file. Options allow reading only part of the clusters. :p
ext/spt/data/csr.py:441
↓ 4 callersFunctionmask2segmap
(masks, image)
scripts/image_encoding.py:307
↓ 4 callersFunctionnormalize
Normalization helper function.
utils/render_utils.py:28
↓ 4 callersFunctionpad_poses
Pad [..., 3, 4] pose matrices with a homogeneous bottom row [0,0,0,1].
utils/render_utils.py:32
↓ 4 callersFunctionprint_tensor_info
Print some info about a tensor. Used for debugging.
ext/spt/utils/tensor.py:106
↓ 4 callersMethodreconstruction
reconstruct radiance field given cameras
utils/mesh_utils.py:100
↓ 4 callersFunctionset_debug_enabled
(mode)
ext/spt/debug.py:11
↓ 4 callersMethodset_mask_rendering
(self, mask=None)
gui/main.py:282
↓ 4 callersFunctionsimilar_func
(x)
utils/sai3d_utils.py:461
↓ 3 callersFunctionPILtoTorch
(pil_image, resolution)
utils/general_utils.py:21
↓ 3 callersFunctionSH2RGB
(sh)
utils/sh_utils.py:117
↓ 3 callersMethod__init__
(self, parser: ArgumentParser, name : str, fill_none = False)
arguments/__init__.py:20
↓ 3 callersMethod_apply_func
(self, rgb)
ext/spt/transforms/point.py:416
↓ 3 callersFunction_linear_init
(m, method='xavier_uniform', activation='leaky_relu')
ext/spt/utils/nn.py:47
↓ 3 callersFunction_set_attribute_preserving_transforms
For the sake of visualization, we require that `NAGAddKeysTo` does not remove input `Data` attributes after moving them to `Data.x`, so we may
ext/spt/utils/semantic.py:165
↓ 3 callersFunctionbuild_rotation
(r)
utils/general_utils.py:78
↓ 3 callersFunctioncameraList_from_camInfos
(cam_infos, resolution_scale, args)
utils/camera_utils.py:74
↓ 3 callersMethodconnect_isolated
Search for nodes with no edges in the graph and connect them to their k nearest neighbors. Update self.edge_index and self.edge_attr a
ext/spt/data/data.py:445
↓ 3 callersMethodcreate_from_pcd
(self, pcd : BasicPointCloud, spatial_lr_scale : float)
scene/gaussian_model.py:132
↓ 3 callersMethoddebug
(self)
ext/spt/data/csr.py:82
↓ 3 callersFunctiondepth_to_normal
view: view camera depth: depthmap
utils/point_utils.py:26
↓ 3 callersMethodexport_image
(self, path)
utils/mesh_utils.py:282
↓ 3 callersFunctionfast_randperm
Same as torch.randperm, but relies on numba for CPU tensors. This may bring a x2 speedup on CPU for n >= 1e5. ``` from time import time
ext/spt/utils/tensor.py:248
↓ 3 callersFunctionfov2focal
(fov, pixels)
utils/graphics_utils.py:73
↓ 3 callersMethodfrom_nag_list
(cls, nag_list: List['NAG'])
ext/spt/data/nag.py:531
↓ 3 callersFunctionget_combined_args
(parser : ArgumentParser)
arguments/__init__.py:109
↓ 3 callersMethodget_sampling
Compute indices to sample elements at `low`-level, based on which segment they belong to at `high`-level. The sampling operation is r
ext/spt/data/nag.py:445
↓ 3 callersFunctionidx_preserving_mask
Helper to pass a boolean mask and an index, to make sure indexing using the mask will not entirely discard all elements of index.
ext/spt/utils/scatter.py:206
↓ 3 callersFunctionindices_to_pointers
Convert pre-sorted dense indices to CSR format.
ext/spt/utils/sparse.py:13
↓ 3 callersFunctioninit_config
(config_name='train.yaml', overrides=[])
ext/spt/utils/hydra.py:9
↓ 3 callersMethodiou_and_size
Compute the Intersection over Union (IoU) and the individual size for each cluster-object pair in the data. This is typically needed f
ext/spt/data/instance.py:252
↓ 3 callersFunctionis_sorted
Checks whether a 1D tensor of indices is sorted.
ext/spt/utils/tensor.py:45
↓ 3 callersFunctionisolated_nodes
Return a boolean mask of size num_nodes indicating which node has no edge in edge_index.
ext/spt/utils/graph.py:28
↓ 3 callersFunctionknn_1
Search k-NN for a 3D point cloud xyz. This search differs from `knn_2` in that it operates on a single cloud input (search and query are the s
ext/spt/utils/neighbors.py:14
↓ 3 callersMethodpanoptic_pred
Panoptic predictions on the level-1 superpoints. Return the predicted semantic score and label for each predicted instance, along wit
ext/spt/utils/output_panoptic.py:260
↓ 3 callersMethodprepare_train
(self)
gui/main.py:1123
↓ 3 callersMethodprune_points
(self, mask)
scene/gaussian_model.py:363
↓ 3 callersFunctionrgb_to_plotly_rgb
Convert torch.Tensor of float RGB values in [0, 1] to plotly-friendly RGB format. If alpha is provided, the output will be expressed in RGBA f
ext/spt/utils/color.py:27
↓ 3 callersMethodset_requires_grad
(self, state: bool)
lpipsPyTorch/modules/networks.py:46
↓ 3 callersFunctionsparse_sort
Lexicographic sort 1D src points based on index first and src values second. Credit: https://github.com/rusty1s/pytorch_scatter/issues/48
ext/spt/utils/sparse.py:81
↓ 3 callersMethodto_trimmed
Convert to 'trimmed' graph: same as coalescing with the additional constraint that (i, j) and (j, i) edges are duplicates. If edge at
ext/spt/data/data.py:527
↓ 3 callersMethodweighted_instance_semantic_pred
Compute the predicted semantic label, score and logits for each predicted instance. This involves computing, for each predicted instan
ext/spt/utils/output_panoptic.py:240
↓ 2 callersMethod__inc__
Extend the PyG.Data.__inc__ behavior on '*index*' and 'face' attributes to our 'super_index'. This is needed for maintaining clusters
ext/spt/data/data.py:244
next →1–100 of 879, ranked by callers