MCPcopy Create free account

hub / github.com/Tsinghua-MARS-Lab/SLAM-Former / functions

Functions601 in github.com/Tsinghua-MARS-Lab/SLAM-Former

Methodforward
(self, x, xpos)
src/croco/models/blocks.py:111
Methodforward
(self, x, xpos)
src/croco/models/blocks.py:187
Methodforward
(self, query, key, value, qpos, kpos)
src/croco/models/blocks.py:212
Methodforward
(self, x, y, xpos, ypos)
src/croco/models/blocks.py:314
Methodforward
(self, x)
src/croco/models/blocks.py:366
Methodforward
(self, x, img_info)
src/croco/models/head_downstream.py:79
Methodforward
img if of size batch_size x 3 x h x w
src/croco/models/croco_downstream.py:61
Methodforward
(self, img1, img2)
src/croco/models/croco_downstream.py:123
Methodforward
(self, pred, mask, target)
src/croco/models/criterion.py:25
Methodforward
input: * tokens: batch_size x nheads x ntokens x dim * positions: batch_size x ntokens x 2 (y and x posit
src/croco/models/pos_embed.py:158
Methodforward
Forward pass. Args: x (tensor): input Returns: tensor: output
src/croco/models/dpt_block.py:126
Methodforward
Forward pass. Returns: tensor: output
src/croco/models/dpt_block.py:195
Methodforward
Forward pass. Args: x (tensor): input Returns: tensor: interpolated data
src/croco/models/dpt_block.py:263
Methodforward
(self, encoder_tokens: List[torch.Tensor], image_size)
src/croco/models/dpt_block.py:478
Methodforward
(ctx, tokens, positions, base, F0=1)
src/croco/models/curope/curope2d.py:15
Methodforward
(self, tokens, positions)
src/croco/models/curope/curope2d.py:38
Methodforward
Backprojects spatial points in 2D image space to world space using invK_b44 at the depths defined in depth_b1hw.
slam/rerun_helper/geometry_utils.py:50
Methodforward
Projects spatial points in 3D world space to camera image space using the extrinsics matrix cam_T_world_b44 and intrinsics K_b44.
slam/rerun_helper/geometry_utils.py:71
Methodforward
First smoothes incoming depth maps with a gaussian blur, backprojects those depth points into world space (see BackprojectDepth), e
slam/rerun_helper/geometry_utils.py:106
Functionfuse_params_groups
(all_params_groups, keys=("lr_multiplier", "wd_multiplier", "is_last_layer"))
src/slamformer/models/dinov2/utils/param_groups.py:92
Methodgenerate_random_spiral_trajectory
Return a list of images corresponding to a spiral trajectory from a random starting point. Useful to generate nice visualisations.
src/croco/datasets/habitat_sim/multiview_habitat_sim_generator.py:441
Functiongeotrf
Apply a geometric transformation to a list of 3-D points. H: 3x3 or 4x4 projection matrix (typically a Homography) p: numpy/torch/tuple of c
src/slamformer/utils/geometry.py:257
Functionget_2d_sincos_pos_embed
grid_size: int of the grid height and width return: pos_embed: [grid_size*grid_size, embed_dim] or [n_cls_token+grid_size*grid_size, embe
src/slamformer/models/layers/pos_embed.py:23
Functionget_attn_score
(blk_class, x, frame_num, token_length, xpos=None)
src/slamformer/models/layers/attention.py:469
Functionget_camera_rays
Computes camera rays for given camera data and points, optionally shifts rays to camera frame.
slam/rerun_helper/geometry_utils.py:134
Functionget_gt_warp
(depth1, depth2, T_1to2, K1, K2, depth_interpolation_mode = 'bilinear', relative_depth_error_threshold = 0.05,
src/slamformer/utils/geometry.py:123
Methodget_intermediate_layers
( self, x: torch.Tensor, n: Union[int, Sequence] = 1, # Layers or n last layers to ta
src/slamformer/models/dinov2/models/vision_transformer.py:306
Functionget_parameter_groups
( model, weight_decay, layer_decay=1.0, skip_list=(), no_lr_scale_list=[] )
src/croco/utils/misc.py:535
Functionget_params_groups_with_decay
(model, lr_decay_rate=1.0, patch_embed_lr_mult=1.0)
src/slamformer/models/dinov2/utils/param_groups.py:51
Functionget_rank
()
src/croco/utils/misc.py:234
Methodget_results
(self)
src/croco/stereoflow/criterion.py:231
Functionget_sha
()
src/slamformer/models/dinov2/utils/utils.py:46
Functionget_slurm_executor_parameters
( nodes: int, num_gpus_per_node: int, cluster_type: Optional[ClusterType] = None, **kwargs )
src/slamformer/models/dinov2/utils/cluster.py:74
Functionget_test_datasets_flow
(dataset_str)
src/croco/stereoflow/datasets_flow.py:934
Functionget_test_datasets_stereo
(dataset_str)
src/croco/stereoflow/datasets_stereo.py:989
Functionget_train_dataset_flow
(dataset_str, augmentor=True, crop_size=None)
src/croco/stereoflow/datasets_flow.py:923
Functionget_train_dataset_stereo
(dataset_str, augmentor=True, crop_size=None)
src/croco/stereoflow/datasets_stereo.py:978
Functionget_user_checkpoint_path
(cluster_type: Optional[ClusterType] = None)
src/slamformer/models/dinov2/utils/cluster.py:51
Methodglobal_avg
(self)
src/croco/utils/misc.py:70
Functionhas_batchnorms
(model)
src/slamformer/models/dinov2/utils/utils.py:90
Functionimagenet_normalize
Normalizes an image with ImageNet statistics.
slam/rerun_helper/generic_utils.py:139
Functioninit_distributed_mode
(args)
src/croco/utils/misc.py:252
Functioninit_weights_vit_timm
ViT weight initialization, original timm impl (for reproducibility)
src/slamformer/models/dinov2/models/vision_transformer.py:337
Functioninterpolate_pos_embed
(model, checkpoint_model)
src/slamformer/models/layers/pos_embed.py:79
Functioninv
Invert a torch or numpy matrix
src/slamformer/utils/geometry.py:321
Functionlist_replicacad_scenes
(base_output_dir, base_path=SCENES_DATASET["replica_cad"])
src/croco/datasets/habitat_sim/paths.py:30
Functionload_image
(im, mode='crop', target_size=518)
slam/utils.py:57
Functionload_images_as_tensor
Loads images from a directory or video, resizes them to a uniform size, then converts and stacks them into a single [N, 3, H, W] PyTorch tens
src/slamformer/utils/basic.py:11
Functionload_model
(args, model_without_ddp, optimizer, loss_scaler)
src/croco/utils/misc.py:430
Functionload_pretrained_weights
(model, pretrained_weights, checkpoint_key)
src/slamformer/models/dinov2/utils/utils.py:20
Functionlog_rerun
Logs camera intri/extri, depth, rgb, and mesh to rerun.
slam/rerun_helper/__init__.py:122
Methodnf
(self)
slam/demo.py:379
Methodnkf
(self)
slam/demo.py:375
Functionnormalize_depth
(depth_b1hw: torch.Tensor, mask_b1hw: torch.Tensor = None, robust: bool = Fa
slam/rerun_helper/generic_utils.py:73
Functionopencv_camera_to_plucker
(poses, K, H, W)
src/slamformer/utils/geometry.py:330
Functionparse
(x)
src/croco/models/blocks.py:26
Methodpatchify
imgs: (B, 3, H, W) x: (B, L, patch_size**2 *3)
src/croco/models/croco.py:284
Functionpose_distance
DVMVS frame pose distance.
slam/rerun_helper/geometry_utils.py:169
Methodprepare_data
to be defined for each dataset
src/croco/stereoflow/datasets_flow.py:57
Methodprepare_data
to be defined for each dataset
src/croco/stereoflow/datasets_stereo.py:72
Functionquick_viz_export
Helper function for quickly exporting depth maps during inference.
slam/rerun_helper/visualization_utils.py:84
Functionqvec2rotmat
Quaternion to 3x3 rotation matrix.
slam/rerun_helper/geometry_utils.py:184
FunctionreadFlowFile
readFlowFile(<FILENAME>) reads a flow file <FILENAME> into a 2-band np.array. if <FILENAME> does not exist, an IOError is raised. if <FIL
src/croco/stereoflow/datasets_flow.py:659
Functionread_image_file
Reads an image file using PIL, then optionally resizes the image, with selective resampling, scales values, and returns the image as a tenso
slam/rerun_helper/generic_utils.py:154
Functionreadlines
Reads in a text file and returns lines in a list.
slam/rerun_helper/generic_utils.py:36
Methodreset
(self)
src/croco/stereoflow/criterion.py:183
Functionrope_2d
src/croco/models/curope/curope.cpp:49
Functionrotx
3D Rotation about the x-axis.
slam/rerun_helper/geometry_utils.py:204
Functionroty
3D Rotation about the y-axis.
slam/rerun_helper/geometry_utils.py:214
Functionrotz
3D Rotation about the z-axis.
slam/rerun_helper/geometry_utils.py:224
Functionsave_image_crops
(args, data)
src/croco/datasets/crops/extract_crops_from_images.py:126
Functionsave_model
( accelerator, args, epoch, model_without_ddp, optimizer, loss_scaler, step, f
src/croco/utils/misc.py:394
Functionsave_viz_video_frames
Saves a video file of numpy RGB frames in frame_list.
slam/rerun_helper/visualization_utils.py:74
Functionse3_inverse
Computes the inverse of a batch of SE(3) matrices. T: Tensor of shape (B, 4, 4)
src/slamformer/utils/geometry.py:5
Functionsetup_debug
(is_main_process=True, max_retries=10, port_range=(10000, 20000))
src/slamformer/utils/debug.py:40
Functionslice_with_overlap
(lst, n, k)
slam/utils.py:22
Functionsort_images_by_number
(image_paths)
slam/utils.py:33
Functionstrip_module
Removes the 'module.' prefix from the keys of a state_dict. Args: state_dict (dict): The original state_dict with possible 'module.'
slam/utils.py:8
Functionstrip_module
Removes the 'module.' prefix from the keys of a state_dict. Args: state_dict (dict): The original state_dict with possible 'module.'
slam/demo.py:29
Methodsubmission_save_pairname
(self, pairname, prediction, outdir, _time)
src/croco/stereoflow/datasets_flow.py:375
Methodsubmission_save_pairname
(self, pairname, prediction, outdir, time)
src/croco/stereoflow/datasets_flow.py:567
Methodsubmission_save_pairname
(self, pairname, prediction, outdir, time)
src/croco/stereoflow/datasets_flow.py:623
Methodsubmission_save_pairname
(self, pairname, prediction, outdir, time)
src/croco/stereoflow/datasets_stereo.py:491
Methodsubmission_save_pairname
(self, pairname, prediction, outdir, time)
src/croco/stereoflow/datasets_stereo.py:568
Methodsubmission_save_pairname
(self, pairname, prediction, outdir, time)
src/croco/stereoflow/datasets_stereo.py:695
Methodsubmission_save_pairname
(self, pairname, prediction, outdir, time)
src/croco/stereoflow/datasets_stereo.py:750
Methodsubmission_save_pairname
(self, pairname, prediction, outdir, time)
src/croco/stereoflow/datasets_stereo.py:807
Methodsynchronize_between_processes
Synchronize the count and total across all processes.
src/croco/utils/misc.py:48
Functiontensor_B_to_bM
Unpacks a flattened tensor of tupled elements (BS) into bMS. Tuple size is M.
slam/rerun_helper/generic_utils.py:102
Functiontensor_bM_to_B
Packs an inflated tensor of tupled elements (bMS) into BS. Tuple size is M.
slam/rerun_helper/generic_utils.py:113
Functiontensor_to_pil
Converts a PyTorch tensor to a PIL image. Automatically moves the channel dimension (if it has size 3) to the last axis before converting.
src/slamformer/utils/basic.py:86
Functionto_device
" Moves tensors in the input dict to the gpu and ignores tensors/elements as with keys in key_ignores.
slam/rerun_helper/__init__.py:28
Functionto_gpu
Moves tensors in the input dict to the gpu and ignores tensors/elements as with keys in key_ignores.
slam/rerun_helper/generic_utils.py:130
Methodunpatchify
x: (N, L, patch_size**2 *channels) imgs: (N, 3, H, W)
src/croco/models/croco.py:299
Functionupsample
Upsample input tensor by a factor of 2
slam/rerun_helper/generic_utils.py:88
Methodvalue
(self)
src/croco/utils/misc.py:78
Functionvit_base
(patch_size=16, num_register_tokens=0, **kwargs)
src/slamformer/models/dinov2/models/vision_transformer.py:359
Functionvit_giant2
Close to ViT-giant, with embed-dim 1536 and 24 heads => embed-dim per head 64
src/slamformer/models/dinov2/models/vision_transformer.py:387
Functionvit_large
(patch_size=16, num_register_tokens=0, **kwargs)
src/slamformer/models/dinov2/models/vision_transformer.py:373
Functionvit_small
(patch_size=16, num_register_tokens=0, **kwargs)
src/slamformer/models/dinov2/models/vision_transformer.py:345
← previousnext →501–600 of 601, ranked by callers