MCPcopy Create free account

hub / github.com/Robbyant/lingbot-depth / functions

Functions198 in github.com/Robbyant/lingbot-depth

Functioncatch_exception
(fn)
mdm/utils/tools.py:14
Functioncolorize_depth
(depth: np.ndarray, mask: np.ndarray = None, normalize: bool = True, cmap: str = 'Spectral')
mdm/utils/vis.py:11
Functioncolorize_depth_affine
(depth: np.ndarray, mask: np.ndarray = None, cmap: str = 'Spectral')
mdm/utils/vis.py:27
Functioncolorize_disparity
(disparity: np.ndarray, mask: np.ndarray = None, normalize: bool = True, cmap: str = 'Spectral')
mdm/utils/vis.py:38
Functioncolorize_error_map
(error_map: np.ndarray, mask: np.ndarray = None, cmap: str = 'plasma', value_range: Tuple[float, float] = None
mdm/utils/vis.py:58
Functioncolorize_normal
(normal: np.ndarray, mask: np.ndarray = None)
mdm/utils/vis.py:50
Functiondecorator
(fn: Callable)
mdm/utils/tools.py:234
Functiondinov2_vitb14
DINOv2 ViT-B/14 model (optionally) pretrained on the LVD-142M dataset.
mdm/model/dinov2_rgbd/hub/backbones.py:71
Functiondinov2_vitb14_reg
DINOv2 ViT-B/14 model with registers (optionally) pretrained on the LVD-142M dataset.
mdm/model/dinov2_rgbd/hub/backbones.py:119
Functiondinov2_vitg14
DINOv2 ViT-g/14 model (optionally) pretrained on the LVD-142M dataset.
mdm/model/dinov2_rgbd/hub/backbones.py:91
Functiondinov2_vitg14_reg
DINOv2 ViT-g/14 model with registers (optionally) pretrained on the LVD-142M dataset.
mdm/model/dinov2_rgbd/hub/backbones.py:149
Functiondinov2_vitl14
DINOv2 ViT-L/14 model (optionally) pretrained on the LVD-142M dataset.
mdm/model/dinov2_rgbd/hub/backbones.py:78
Functiondinov2_vitl14_reg
DINOv2 ViT-L/14 model with registers (optionally) pretrained on the LVD-142M dataset.
mdm/model/dinov2_rgbd/hub/backbones.py:134
Functiondinov2_vitl16
DINOv2 ViT-L/14 model (optionally) pretrained on the LVD-142M dataset.
mdm/model/dinov2_rgbd/hub/backbones.py:84
Functiondinov2_vits14
DINOv2 ViT-S/14 model (optionally) pretrained on the LVD-142M dataset.
mdm/model/dinov2_rgbd/hub/backbones.py:64
Functiondinov2_vits14_reg
DINOv2 ViT-S/14 model with registers (optionally) pretrained on the LVD-142M dataset.
mdm/model/dinov2_rgbd/hub/backbones.py:104
Methodenable_gradient_checkpointing
(self)
mdm/model/modules_decoder.py:166
Methodenable_gradient_checkpointing
(self)
mdm/model/modules_rgbd_encoder.py:86
Methodenable_pytorch_native_sdpa
(self)
mdm/model/v2.py:95
Methodenable_pytorch_native_sdpa
(self)
mdm/model/modules_rgbd_encoder.py:90
Methodf
(*args, **kwargs)
mdm/model/dinov2_rgbd/models/vision_transformer.py:151
Methodffn_residual_func
(x: Tensor)
mdm/model/dinov2_rgbd/layers/block.py:92
Methodffn_residual_func
(x: Tensor, attn_bias=None)
mdm/model/dinov2_rgbd/layers/block.py:222
Functionfix_random_seeds
Fix random seeds.
mdm/model/dinov2_rgbd/utils/utils.py:36
Methodflops
(self)
mdm/model/dinov2_rgbd/layers/patch_embed_mlp.py:148
Methodflops
(self)
mdm/model/dinov2_rgbd/layers/patch_embed.py:83
Methodforward
(self, *args, **kwargs)
mdm/model/utils.py:11
Methodforward
(self, x: torch.Tensor, attn_bias=None)
mdm/model/utils.py:25
Methodforward
(self, x)
mdm/model/modules_decoder.py:62
Methodforward
(self, in_features: List[torch.Tensor])
mdm/model/modules_decoder.py:173
Methodforward
(self, image: torch.Tensor, depth: torch.Tensor, token_rows
mdm/model/modules_rgbd_encoder.py:94
Methodforward
(self, x)
mdm/model/dinov2_rgbd/hub/utils.py:36
Methodforward
(self, input)
mdm/model/dinov2_rgbd/layers/patch_embed_mlp.py:30
Methodforward
(self, input: torch.Tensor)
mdm/model/dinov2_rgbd/layers/patch_embed_mlp.py:48
Methodforward
(self, x)
mdm/model/dinov2_rgbd/layers/patch_embed_mlp.py:76
Methodforward
(self, x: Tensor)
mdm/model/dinov2_rgbd/layers/patch_embed_mlp.py:133
Methodforward
(self, x)
mdm/model/dinov2_rgbd/layers/drop_path.py:33
Methodforward
(self, x_or_x_list)
mdm/model/dinov2_rgbd/layers/block.py:251
Methodforward
(self, x)
mdm/model/dinov2_rgbd/layers/dino_head.py:36
Methodforward
(self, x: Tensor)
mdm/model/dinov2_rgbd/layers/layer_scale.py:26
Methodforward
(self, x: Tensor, attn_bias=None)
mdm/model/dinov2_rgbd/layers/attention.py:84
Methodforward
(self, x: Tensor)
mdm/model/dinov2_rgbd/layers/mlp.py:34
Methodforward
(self, x: Tensor)
mdm/model/dinov2_rgbd/layers/swiglu_ffn.py:30
Methodforward
(self, x: Tensor)
mdm/model/dinov2_rgbd/layers/patch_embed.py:68
Methodforward
(self, x)
mdm/model/dinov2_rgbd/models/vision_transformer.py:39
Functionfuse_params_groups
(all_params_groups, keys=("lr_multiplier", "wd_multiplier", "is_last_layer"))
mdm/model/dinov2_rgbd/utils/param_groups.py:92
Functionget_params_groups_with_decay
(model, lr_decay_rate=1.0, patch_embed_lr_mult=1.0)
mdm/model/dinov2_rgbd/utils/param_groups.py:51
Functionget_sha
()
mdm/model/dinov2_rgbd/utils/utils.py:46
Functionget_slurm_executor_parameters
( nodes: int, num_gpus_per_node: int, cluster_type: Optional[ClusterType] = None, **kwargs )
mdm/model/dinov2_rgbd/utils/cluster.py:74
Functionget_user_checkpoint_path
(cluster_type: Optional[ClusterType] = None)
mdm/model/dinov2_rgbd/utils/cluster.py:51
Functionhas_batchnorms
(model)
mdm/model/dinov2_rgbd/utils/utils.py:90
Methodhistory
(self)
mdm/utils/tools.py:195
Functionimport_file_as_module
(file_path: Union[str, os.PathLike], module_name: str)
mdm/utils/tools.py:285
Functionimport_model_class_by_version
(version: str)
mdm/model/__init__.py:7
Methodinfer_feat
( self, image: torch.Tensor, depth_in: torch.Tensor = None, num_tokens: int
mdm/model/v2.py:263
Methodinit_weights
(self)
mdm/model/v2.py:92
Methodinit_weights
(self)
mdm/model/modules_rgbd_encoder.py:64
Functioninit_weights_vit_timm
ViT weight initialization, original timm impl (for reproducibility)
mdm/model/dinov2_rgbd/models/vision_transformer.py:416
Methodinterpolate_pos_encoding
(self, x, h, w)
mdm/model/dinov2_rgbd/models/vision_transformer.py:208
Functionkey_average
Returns a dictionary with the average value of each key in the input list of dictionaries.
mdm/utils/tools.py:65
Functionload_pretrained_weights
(model, pretrained_weights, checkpoint_key)
mdm/model/dinov2_rgbd/utils/utils.py:20
Functionmultithead_execute
(inputs: List[Any], num_workers: int, pbar = None)
mdm/utils/tools.py:224
Methodonnx_compatible_mode
(self)
mdm/model/modules_rgbd_encoder.py:56
Methodonnx_compatible_mode
(self)
mdm/model/dinov2_rgbd/models/vision_transformer.py:194
Functionparse
(x)
mdm/model/dinov2_rgbd/layers/patch_embed_mlp.py:54
Methodprocess_output
(out)
mdm/model/dinov2_rgbd/models/vision_transformer.py:374
Functionread_depth
Read a depth image, return float32 depth array of shape (H, W).
mdm/utils/io.py:89
Functionread_image
Read a image, return uint8 RGB array of shape (H, W, 3).
mdm/utils/io.py:66
Functionread_json
(path: Union[str, os.PathLike, IO[str]])
mdm/utils/io.py:257
Functionread_jsonl
(file)
mdm/utils/tools.py:116
Functionread_mask
Read a binary mask, return bool array of shape (H, W).
mdm/utils/io.py:227
Functionread_normal
Read a normal image, return float32 normal array of shape (H, W, 3).
mdm/utils/io.py:197
Functionread_segmentation
Read a segmentation mask ### Parameters: - `path: Union[str, os.PathLike, IO]` The file path or file object to read from. ###
mdm/utils/io.py:152
Functionrecursive_replace
(d: Union[List, Dict, str], mapping: Dict[str, str])
mdm/utils/tools.py:139
Functionsave_glb
( save_path: Union[str, os.PathLike], vertices: np.ndarray, faces: np.ndarray, vertex_uvs:
mdm/utils/io.py:18
Functionsave_ply
( save_path: Union[str, os.PathLike], vertices: np.ndarray, faces: np.ndarray, vertex_color
mdm/utils/io.py:46
Functionsetup
Create configs and perform basic setups.
mdm/model/dinov2_rgbd/utils/config.py:63
Functionstrip_common_prefix_suffix
(strings: List[str])
mdm/utils/tools.py:210
Functionsuppress_traceback
(fn)
mdm/utils/tools.py:252
Functionsync_ddp_hook
(state, bucket: torch.distributed.GradBucket)
mdm/model/utils.py:58
Functionto_hierachical_dataframe
(data: List[Dict[Tuple[str, ...], Any]])
mdm/utils/tools.py:130
Functionunflatten_nested_dict
Unflattens a single-level dictionary into a nested dictionary, with keys as tuples.
mdm/utils/tools.py:101
Functionunwrap_module_with_gradient_checkpointing
(module: nn.Module)
mdm/model/utils.py:18
Functionvit_base
(patch_size=16, num_register_tokens=0, **kwargs)
mdm/model/dinov2_rgbd/models/vision_transformer.py:437
Functionvit_giant2
Close to ViT-giant, with embed-dim 1536 and 24 heads => embed-dim per head 64
mdm/model/dinov2_rgbd/models/vision_transformer.py:465
Functionvit_large
(patch_size=16, num_register_tokens=0, **kwargs)
mdm/model/dinov2_rgbd/models/vision_transformer.py:451
Functionvit_small
(patch_size=16, num_register_tokens=0, **kwargs)
mdm/model/dinov2_rgbd/models/vision_transformer.py:423
Functionwrap_dinov3_attention_with_sdpa
(module: nn.Module)
mdm/model/utils.py:40
Functionwrapper
(*args, **kwargs)
mdm/utils/tools.py:16
Methodwrapper
(*args, **kwargs)
mdm/utils/tools.py:167
Methodwrapper
(*args, **kwargs)
mdm/utils/tools.py:270
Functionwrite_depth
Encode and write a depth image as 16-bit PNG format. ## Parameters: - `path: Union[str, os.PathLike, IO]` The file path or file o
mdm/utils/io.py:111
Functionwrite_image
Write a image, input uint8 RGB array of shape (H, W, 3).
mdm/utils/io.py:78
Functionwrite_json
(path: Union[str, os.PathLike, IO[str]], content: JSON_TYPE)
mdm/utils/io.py:265
Functionwrite_jsonl
(data: List[dict], file)
mdm/utils/tools.py:123
Functionwrite_mask
Write a binary mask, input bool array of shape (H, W).
mdm/utils/io.py:241
Functionwrite_normal
Write a normal image, input float32 normal array of shape (H, W, 3).
mdm/utils/io.py:213
Functionwrite_segmentation
Write a segmentation mask and label mapping, as PNG format. ### Parameters: - `path: Union[str, os.PathLike, IO]` The file path o
mdm/utils/io.py:174
← previous101–198 of 198, ranked by callers