Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Atrovast/THGS
/ functions
Functions
879 in github.com/Atrovast/THGS
⨍
Functions
879
◇
Types & classes
117
↓ 108 callers
Method
view
(self)
gui/cam_utils.py:190
↓ 101 callers
Method
to
Move the NAG with all Data in it to device.
ext/spt/data/nag.py:125
↓ 87 callers
Method
cpu
Move the NAG with all Data in it to CPU.
ext/spt/data/nag.py:130
↓ 72 callers
Method
cuda
Move the NAG with all Data in it to CUDA.
ext/spt/data/nag.py:134
↓ 31 callers
Method
detach
Detach all tensors in the NAG.
ext/spt/data/nag.py:120
↓ 24 callers
Method
clone
Return a new NAG instance containing the Data clones.
ext/spt/data/nag.py:116
↓ 21 callers
Function
load_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 callers
Method
select
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 callers
Function
sanitize_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 callers
Method
load
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 callers
Method
get_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 callers
Function
read_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 callers
Function
save_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 callers
Function
tensor_idx
Convert an int, slice, list or numpy index to a torch.LongTensor.
ext/spt/utils/tensor.py:13
↓ 13 callers
Method
to
Move the CSRData to the specified device.
ext/spt/data/csr.py:130
↓ 13 callers
Method
write
(self, x)
utils/general_utils.py:118
↓ 12 callers
Function
int_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 callers
Function
to_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 callers
Method
save
(self, iteration)
scene/__init__.py:86
↓ 10 callers
Method
device
Return device of first Data in NAG.
ext/spt/data/nag.py:139
↓ 10 callers
Method
getTrainCameras
(self, scale=1.0)
scene/__init__.py:90
↓ 10 callers
Function
to_float_rgb
(rgb)
ext/spt/utils/color.py:12
↓ 10 callers
Method
to_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 callers
Method
extract
(self, args)
arguments/__init__.py:40
↓ 9 callers
Function
safe_normalize
(x, eps=1e-20)
gui/cam_utils.py:101
↓ 8 callers
Method
major
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 callers
Method
merge
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 callers
Function
numpyfy
Convert torch.Tensor to numpy while respecting some constraints on output dtype.
ext/spt/utils/tensor.py:194
↓ 7 callers
Method
compute_similarity
(self, embedding_feature, out_bg_mask=None)
gui/main.py:312
↓ 7 callers
Method
encode_text
(self, text)
gui/main.py:307
↓ 7 callers
Function
is_xyz_tensor
(xyz)
ext/spt/utils/point.py:7
↓ 7 callers
Method
load
(path)
scene/semantic_model.py:53
↓ 7 callers
Method
pan
(self, dx, dy, dz=0)
gui/cam_utils.py:240
↓ 7 callers
Method
raise_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 callers
Function
sizes_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 callers
Function
torchify
Convert np.ndarray to torch.Tensor.
ext/spt/utils/tensor.py:204
↓ 6 callers
Method
get_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 callers
Method
render
(self)
gui/main.py:1245
↓ 6 callers
Method
show
See `src.visualization.show`.
ext/spt/data/nag.py:515
↓ 5 callers
Method
__init__
(self, p=0.2, x_idx=None)
ext/spt/transforms/point.py:523
↓ 5 callers
Function
eval_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 callers
Function
focal2fov
(focal, pixels)
utils/graphics_utils.py:76
↓ 5 callers
Method
get_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 callers
Function
has_duplicates
Checks whether a 1D tensor of indices contains duplicates.
ext/spt/utils/tensor.py:60
↓ 5 callers
Function
knn_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 callers
Method
to
Extend `torch_geometric.Data.to` to handle Cluster and InstanceData attributes.
ext/spt/data/data.py:190
↓ 4 callers
Method
__init__
(self)
lpipsPyTorch/modules/networks.py:89
↓ 4 callers
Function
_set_partitioner_parameters
Modifies the `model.partitioner` parameters with parameters passed in the `partition_kwargs` dictionary.
ext/spt/utils/instance.py:1099
↓ 4 callers
Function
arange_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 callers
Function
dropout
(a, p=0.5, dim=1, inplace=False, to_mean=False)
ext/spt/utils/dropout.py:7
↓ 4 callers
Function
feats_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 callers
Method
get_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 callers
Method
get_covariance
(self, scaling_modifier = 1)
scene/gaussian_model.py:125
↓ 4 callers
Function
get_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 callers
Method
initialize
(self, input=None, num_pts=5000, radius=0.5)
gui/gs_renderer.py:189
↓ 4 callers
Function
is_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 callers
Method
load
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 callers
Method
load
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 callers
Function
mask2segmap
(masks, image)
scripts/image_encoding.py:307
↓ 4 callers
Function
normalize
Normalization helper function.
utils/render_utils.py:28
↓ 4 callers
Function
pad_poses
Pad [..., 3, 4] pose matrices with a homogeneous bottom row [0,0,0,1].
utils/render_utils.py:32
↓ 4 callers
Function
print_tensor_info
Print some info about a tensor. Used for debugging.
ext/spt/utils/tensor.py:106
↓ 4 callers
Method
reconstruction
reconstruct radiance field given cameras
utils/mesh_utils.py:100
↓ 4 callers
Function
set_debug_enabled
(mode)
ext/spt/debug.py:11
↓ 4 callers
Method
set_mask_rendering
(self, mask=None)
gui/main.py:282
↓ 4 callers
Function
similar_func
(x)
utils/sai3d_utils.py:461
↓ 3 callers
Function
PILtoTorch
(pil_image, resolution)
utils/general_utils.py:21
↓ 3 callers
Function
SH2RGB
(sh)
utils/sh_utils.py:117
↓ 3 callers
Method
__init__
(self, parser: ArgumentParser, name : str, fill_none = False)
arguments/__init__.py:20
↓ 3 callers
Method
_apply_func
(self, rgb)
ext/spt/transforms/point.py:416
↓ 3 callers
Function
_linear_init
(m, method='xavier_uniform', activation='leaky_relu')
ext/spt/utils/nn.py:47
↓ 3 callers
Function
_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 callers
Function
build_rotation
(r)
utils/general_utils.py:78
↓ 3 callers
Function
cameraList_from_camInfos
(cam_infos, resolution_scale, args)
utils/camera_utils.py:74
↓ 3 callers
Method
connect_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 callers
Method
create_from_pcd
(self, pcd : BasicPointCloud, spatial_lr_scale : float)
scene/gaussian_model.py:132
↓ 3 callers
Method
debug
(self)
ext/spt/data/csr.py:82
↓ 3 callers
Function
depth_to_normal
view: view camera depth: depthmap
utils/point_utils.py:26
↓ 3 callers
Method
export_image
(self, path)
utils/mesh_utils.py:282
↓ 3 callers
Function
fast_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 callers
Function
fov2focal
(fov, pixels)
utils/graphics_utils.py:73
↓ 3 callers
Method
from_nag_list
(cls, nag_list: List['NAG'])
ext/spt/data/nag.py:531
↓ 3 callers
Function
get_combined_args
(parser : ArgumentParser)
arguments/__init__.py:109
↓ 3 callers
Method
get_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 callers
Function
idx_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 callers
Function
indices_to_pointers
Convert pre-sorted dense indices to CSR format.
ext/spt/utils/sparse.py:13
↓ 3 callers
Function
init_config
(config_name='train.yaml', overrides=[])
ext/spt/utils/hydra.py:9
↓ 3 callers
Method
iou_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 callers
Function
is_sorted
Checks whether a 1D tensor of indices is sorted.
ext/spt/utils/tensor.py:45
↓ 3 callers
Function
isolated_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 callers
Function
knn_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 callers
Method
panoptic_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 callers
Method
prepare_train
(self)
gui/main.py:1123
↓ 3 callers
Method
prune_points
(self, mask)
scene/gaussian_model.py:363
↓ 3 callers
Function
rgb_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 callers
Method
set_requires_grad
(self, state: bool)
lpipsPyTorch/modules/networks.py:46
↓ 3 callers
Function
sparse_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 callers
Method
to_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 callers
Method
weighted_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 callers
Method
__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