MCPcopy Create free account

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

Functions198 in github.com/apple/ml-aspanformer

↓ 1 callersFunctionmask_border
Mask borders with value Args: m (torch.Tensor): [N, H0, W0, H1, W1] b (int) v (m.dtype)
src/ASpanFormer/utils/coarse_matching.py:10
↓ 1 callersFunctionmask_border_with_padding
(m, bd, v, p_m0, p_m1)
src/ASpanFormer/utils/coarse_matching.py:30
↓ 1 callersFunctionparse_args
()
train.py:23
↓ 1 callersFunctionparse_args
()
test.py:13
↓ 1 callersMethodpartition_token
(self,q,k,v,offset,span_scale,maskv)
src/ASpanFormer/aspan_module/attention.py:91
↓ 1 callersFunctionread_scannet_pose
Read ScanNet's Camera2World pose and transform it to World2Camera. Returns: pose_w2c (np.ndarray): (4, 4)
src/utils/dataset.py:170
↓ 1 callersFunctionrelative_pose_error
(T_0to1, R, t, ignore_gt_t_thr=0.0)
src/utils/metrics.py:12
↓ 1 callersMethodresize_input
(self,data,train_res,df=32)
src/ASpanFormer/aspanformer.py:113
↓ 1 callersFunctionsetup_gpus
A temporary fix for pytorch-lighting 1.3.x
src/utils/misc.py:44
↓ 1 callersFunctionspvs_coarse
Update: data (dict): { "conf_matrix_gt": [N, hw0, hw1], 'spv_b_ids': [M] 'spv_i_ids': [M]
src/ASpanFormer/utils/supervision.py:22
↓ 1 callersFunctionspvs_fine
Update: data (dict):{ "expec_f_gt": [M, 2]}
src/ASpanFormer/utils/supervision.py:124
↓ 1 callersFunctiontqdm_joblib
Context manager to patch joblib to report into tqdm progress bar given as argument Usage: with tqdm_joblib(tqdm(desc="My calculation"
src/utils/misc.py:72
Method__call__
(self, *args, **kwargs)
src/utils/misc.py:91
Method__call__
(self, x)
src/utils/augment.py:18
Method__call__
(self, x)
src/utils/augment.py:37
Method__getitem__
(self, idx)
src/datasets/scannet.py:68
Method__getitem__
(self, idx)
src/datasets/megadepth.py:67
Method__init__
(self, filename)
tools/SensorData.py:48
Method__init__
(self, *args, **kwargs)
src/utils/misc.py:88
Method__init__
(self)
src/utils/profiler.py:13
Method__init__
(self)
src/utils/augment.py:9
Method__init__
(self)
src/utils/augment.py:27
Method__init__
(self, config)
src/ASpanFormer/aspanformer.py:14
Method__init__
(self, config)
src/ASpanFormer/backbone/resnet_fpn.py:49
Method__init__
(self, config)
src/ASpanFormer/backbone/resnet_fpn.py:127
Method__init__
(self)
src/ASpanFormer/utils/fine_matching.py:12
Method__init__
Args: max_shape (tuple): for 1/8 featmap, the max length of 256 corresponds to 2048 pixels temp_bug_fix (bool): As no
src/ASpanFormer/utils/position_encoding.py:11
Method__init__
(self, config)
src/ASpanFormer/utils/coarse_matching.py:62
Method__init__
(self, config)
src/ASpanFormer/aspan_module/loftr.py:68
Method__init__
(self,d_model,nhead,nsample,radius_scale,nlevel=3)
src/ASpanFormer/aspan_module/attention.py:22
Method__init__
(self,d_model,nhead)
src/ASpanFormer/aspan_module/attention.py:135
Method__init__
(self, eps=1e-6)
src/ASpanFormer/aspan_module/attention.py:166
Method__init__
(self, config)
src/ASpanFormer/aspan_module/fine_preprocess.py:8
Method__init__
(self,d_model,d_flow,d_value, nhead,radius_scale,nsample,update_flow=True)
src/ASpanFormer/aspan_module/transformer.py:68
Method__init__
(self, dim, dim_flow, nhead, layer_num)
src/ASpanFormer/aspan_module/transformer.py:138
Method__init__
(self, config)
src/ASpanFormer/aspan_module/transformer.py:191
Method__init__
Manage one scene of ScanNet Dataset. Args: root_dir (str): ScanNet root directory that contains scene folders. npz_pat
src/datasets/scannet.py:18
Method__init__
Manage one scene(npz_path) of MegaDepth dataset. Args: root_dir (str): megadepth root directory that has `phoeni
src/datasets/megadepth.py:12
Method__init__
(self, data_source: ConcatDataset, n_samples_per_subset: int,
src/datasets/sampler.py:21
Method__init__
(self, args, config)
src/lightning/data.py:36
Method__init__
TODO: - use the new version of PL logging API.
src/lightning/lightning_aspanformer.py:28
Method__init__
(self, config)
src/losses/aspan_loss.py:7
Method__iter__
(self)
src/datasets/sampler.py:44
Method__len__
(self)
src/datasets/scannet.py:53
Method__len__
(self)
src/datasets/megadepth.py:64
Method__len__
(self)
src/datasets/sampler.py:41
Method_build_concat_dataset
( self, data_root, npz_names, npz_dir, intrinsic_path, mode,
src/lightning/data.py:192
Method_build_concat_dataset_parallel
( self, data_root, npz_names, npz_dir, intrinsic_path, mode,
src/lightning/data.py:242
Functioncompute_symmetrical_epipolar_errors_offset
Update: data (dict):{"epi_errs": [M]}
src/utils/metrics.py:71
Methodconfigure_optimizers
(self)
src/lightning/lightning_aspanformer.py:57
Functiondraw_match
(img1, img2, corr1, corr2,inlier=[True],color=None,radius1=1,radius2=1,resize=None)
src/utils/misc.py:111
Functiondraw_match
(img1, img2, corr1, corr2,inlier=[True],color=None,radius1=1,radius2=1,resize=None)
demo/demo_utils.py:16
Functiondraw_points
(img,points,color=(0,255,0),radius=3)
src/utils/misc.py:104
Functiondraw_points
(img,points,color=(0,255,0),radius=3)
demo/demo_utils.py:9
Functionelu_feature_map
(x)
src/ASpanFormer/aspan_module/attention.py:162
Functionextract
(seq,scannet_dir,split,dump_dir)
tools/extract.py:12
Methodforward
(self, x)
src/ASpanFormer/backbone/resnet_fpn.py:32
Methodforward
(self, x)
src/ASpanFormer/backbone/resnet_fpn.py:100
Methodforward
(self, x)
src/ASpanFormer/backbone/resnet_fpn.py:180
Methodforward
Args: feat0 (torch.Tensor): [M, WW, C] feat1 (torch.Tensor): [M, WW, C] data (dict) Update:
src/ASpanFormer/utils/fine_matching.py:15
Methodforward
Args: x: [N, C, H, W]
src/ASpanFormer/utils/position_encoding.py:42
Methodforward
Args: feat0 (torch.Tensor): [N, L, C] feat1 (torch.Tensor): [N, S, C] offset: [layer, B, H, W, 4] (*2)
src/ASpanFormer/utils/coarse_matching.py:89
Methodforward
Args: x (torch.Tensor): [N, L, C] source (torch.Tensor): [N, S, C] x_mask (torch.Tensor): [N, L] (optiona
src/ASpanFormer/aspan_module/loftr.py:34
Methodforward
Args: feat0 (torch.Tensor): [N, L, C] feat1 (torch.Tensor): [N, S, C] mask0 (torch.Tensor): [N, L] (optio
src/ASpanFormer/aspan_module/loftr.py:86
Methodforward
(self,x)
src/ASpanFormer/aspan_module/attention.py:15
Methodforward
Args: q,k,v (torch.Tensor): [B, C, L] mask (torch.Tensor): [B, L] flow (torch.Tensor): [B, H, W, 4]
src/ASpanFormer/aspan_module/attention.py:39
Methodforward
Multi-head scaled dot-product attention, a.k.a full attention. Args: q,k,v: [N, D, L] mask: [N, L] Returns:
src/ASpanFormer/aspan_module/attention.py:140
Methodforward
Multi-Head linear attention proposed in "Transformers are RNNs" Args: queries: [N, L, H, D] keys: [N, S, H, D]
src/ASpanFormer/aspan_module/attention.py:171
Methodforward
(self, feat_f0, feat_f1, feat_c0, feat_c1, data)
src/ASpanFormer/aspan_module/fine_preprocess.py:29
Methodforward
(self, x0, x1,pos0,pos1,mask0=None,mask1=None)
src/ASpanFormer/aspan_module/transformer.py:35
Methodforward
Args: x0 (torch.Tensor): [B, C, H, W] x1 (torch.Tensor): [B, C, H, W] flow_feature0 (torch.Tensor): [B, C
src/ASpanFormer/aspan_module/transformer.py:96
Methodforward
(self, feat0, feat1,pos0,pos1,mask0=None,mask1=None,ds0=[4,4],ds1=[4,4])
src/ASpanFormer/aspan_module/transformer.py:152
Methodforward
Args: feat0 (torch.Tensor): [N, C, H, W] feat1 (torch.Tensor): [N, C, H, W] pos1,pos2: [N, C, H, W]
src/ASpanFormer/aspan_module/transformer.py:215
Methodforward
Update: data (dict): update{ 'loss': [1] the reduced loss across a batch, 'loss_scalars' (dict):
src/losses/aspan_loss.py:185
Functionget_local_rank
Returns: The rank of the current process within the local (per-machine) process group.
src/utils/comm.py:38
Functionget_local_size
Returns: The size of the per-machine process group, i.e. the number of processes per machine.
src/utils/comm.py:51
Functionis_main_process
()
src/utils/comm.py:64
Functionlog_on
(condition, message, level)
src/utils/misc.py:26
Methodoptimizer_step
( self, epoch, batch_idx, optimizer, optimizer_idx, optimizer_closure, on_tpu, using_n
src/lightning/lightning_aspanformer.py:63
Functionread_gl3d_depth
(file_path)
src/utils/dataset.py:193
Functionread_gl3d_gray
(path,resize)
src/utils/dataset.py:188
Functionread_scannet_intrinsic
Read ScanNet's intrinsic matrix and return the 3x3 matrix.
src/utils/dataset.py:181
Functionreduce_dict
Reduce the values in the dictionary from all processes so that process with rank 0 has the reduced results. Args: input_dict (di
src/utils/comm.py:236
Functionresize
(image,long_dim)
demo/demo_utils.py:4
Methodsetup
Setup train / val / test dataset. This method will be called by PL automatically. Args: stage (str): 'fit' in training ph
src/lightning/data.py:106
Functionshared_random_seed
Returns: int: a random number that is the same across all workers. If workers need a shared RNG, they can use this shared see
src/utils/comm.py:222
Functionstr2bool
(v)
train.py:24
Functionsynchronize
Helper function to synchronize (barrier) among all processes when using distributed training
src/utils/comm.py:68
Methodtest_dataloader
(self, *args, **kwargs)
src/lightning/data.py:319
Methodtest_epoch_end
(self, outputs)
src/lightning/lightning_aspanformer.py:259
Methodtest_step
(self, batch, batch_idx)
src/lightning/lightning_aspanformer.py:232
Methodtrain_dataloader
Build training dataloader for ScanNet / MegaDepth.
src/lightning/data.py:292
Methodtraining_epoch_end
(self, outputs)
src/lightning/lightning_aspanformer.py:160
Methodtraining_step
(self, batch, batch_idx)
src/lightning/lightning_aspanformer.py:118
Functionupper_config
(dict_cfg)
src/utils/misc.py:20
Methodval_dataloader
Build validation dataloader for ScanNet / MegaDepth.
src/lightning/data.py:306
Methodvalidation_epoch_end
(self, outputs)
src/lightning/lightning_aspanformer.py:185
Methodvalidation_step
(self, batch, batch_idx)
src/lightning/lightning_aspanformer.py:167
← previous101–198 of 198, ranked by callers