MCPcopy Create free account

hub / github.com/CAIR-HKISI/SurgMotion / functions

Functions2,319 in github.com/CAIR-HKISI/SurgMotion

↓ 808 callersFunctionprint
(*args, **kwargs)
foundation_models/EndoMamba/videomamba/video_sm/utils.py:312
↓ 172 callersFunctionprint
(*args, **kwargs)
foundation_models/EndoMamba/videomamba/downstream/SurgicalPhase/Surgformer/utils.py:264
↓ 160 callersMethodget
(self, key, default=None)
evals/foundation_phase_probing/modelcustom/adapters/internvideo_adapter.py:67
↓ 84 callersFunctionprint
(*args, **kwargs)
foundation_models/EndoMamba/videomamba/downstream/PolypDiagClassification/utils/utils.py:440
↓ 48 callersMethodlog
(self, *argv)
src/utils/logging.py:59
↓ 48 callersMethodmax
(self)
foundation_models/EndoMamba/videomamba/video_sm/utils.py:68
↓ 48 callersMethodupdate
(self, head='scalar', step=None, **kwargs)
foundation_models/EndoMamba/videomamba/video_sm/utils.py:263
↓ 39 callersMethodupdate
(self, **kwargs)
foundation_models/EndoMamba/videomamba/video_sm/utils.py:89
↓ 34 callersMethodload_state_dict
(self, state_dict)
foundation_models/EndoMamba/videomamba/downstream/SurgicalPhase/Surgformer/utils.py:455
↓ 30 callersFunctiontrunc_normal_
(tensor, mean=0., std=1.)
foundation_models/EndoMamba/videomamba/video_sm/models/modeling_pretrain.py:20
↓ 27 callersMethodvalue
(self)
foundation_models/EndoMamba/videomamba/video_sm/utils.py:72
↓ 26 callersMethodupdate
(self, head="scalar", step=None, **kwargs)
foundation_models/EndoMamba/videomamba/downstream/SurgicalPhase/Surgformer/utils.py:200
↓ 25 callersMethodload_state_dict
(self, state_dict)
foundation_models/EndoMamba/videomamba/video_sm/utils.py:466
↓ 24 callersFunction_cfg
(url='', **kwargs)
foundation_models/EndoMamba/videomamba/video_sm/models/videomae_v2.py:27
↓ 24 callersMethodstate_dict
(self)
foundation_models/EndoMamba/videomamba/video_sm/utils.py:463
↓ 21 callersMethodcheckpoint
(self)
evals/main_distributed.py:89
↓ 20 callersMethodstate_dict
(self)
foundation_models/EndoMamba/videomamba/downstream/SurgicalPhase/Surgformer/utils.py:452
↓ 19 callersMethod__init__
( self, dim, mlp_ratio=4, out_features=None, act_layer=StarReLU,
foundation_models/SurgeNet/metaformer.py:380
↓ 19 callersMethodload_state_dict
(self, state_dict, strict=True)
src/models/attentive_pooler.py:232
↓ 17 callersMethodfrom_pretrained
(cls, pretrained_model_name, device=None, dtype=None, **kwargs)
foundation_models/EndoMamba/videomamba/_mamba/mamba_ssm/models/mixer_seq_simple.py:229
↓ 16 callersMethodbackward
(ctx, dy, *args)
foundation_models/EndoMamba/videomamba/_mamba/mamba_ssm/ops/triton/layernorm.py:425
↓ 15 callersMethodfrom_config
Create adapter from config, load GSViT model Args: resolution: Input resolution (typically 224) chec
evals/foundation_phase_probing/modelcustom/adapters/gsvit_adapter.py:36
↓ 15 callersMethodupdate
(self, val, n=1)
src/utils/logging.py:80
↓ 14 callersFunctionrotate_queries_or_keys
(x, pos)
src/models/utils/modules.py:26
↓ 13 callersMethod__init__
(self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU, drop=0., linear=False)
foundation_models/SurgeNet/pvtv2.py:60
↓ 13 callersMethodmax
(self)
foundation_models/EndoMamba/videomamba/downstream/SurgicalPhase/Surgformer/utils.py:71
↓ 12 callersFunctiontrunc_normal_
(tensor, mean=0.0, std=1.0, a=-2.0, b=2.0)
src/utils/tensors.py:45
↓ 11 callersMethod__init__
(self, dim)
foundation_models/SurgeNet/convnextv2.py:93
↓ 11 callersFunction_cfg
(url='', **kwargs)
foundation_models/EndoMamba/videomamba/downstream/PolypDiagClassification/models/videomae_v2.py:27
↓ 11 callersMethodnormalize
(frames)
foundation_models/EndoMamba/videomamba/downstream/PolypDiagClassification/datasets/transform.py:679
↓ 11 callersMethodtrain
Convert the model into training mode while keep layers freezed.
foundation_models/EndoMamba/videomamba/downstream/PolypDiagClassification/models/swin_transformer.py:684
↓ 11 callersFunctiontrunc_normal_
(tensor, mean=0., std=1., a=-2., b=2.)
foundation_models/EndoMamba/videomamba/downstream/PolypDiagClassification/utils/utils.py:529
↓ 11 callersMethodupdate
(self, **kwargs)
foundation_models/EndoMamba/videomamba/downstream/SurgicalPhase/Surgformer/utils.py:93
↓ 10 callersMethodadd_meter
(self, name, meter)
foundation_models/EndoMamba/videomamba/video_sm/utils.py:118
↓ 10 callersMethodforward_features
(self, x)
foundation_models/SurgeNet/metaformer.py:635
↓ 10 callersFunctiongenerate_dense_clips
Generate dense clips for train/val/test subsets. Args: base_data_path: Root directory containing {train,val,test}_metadata.csv
data_process/gen_clips.py:198
↓ 10 callersFunctionparse
(x)
foundation_models/EndoMamba/videomamba/downstream/PolypDiagClassification/models/vit_utils.py:85
↓ 9 callersMethod__init__
(self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU, drop=0.0)
src/models/utils/modules.py:68
↓ 9 callersMethoddtype
(self)
foundation_models/SurgVLP/surgvlp/codes/models/algorithms/HecVL.py:38
↓ 9 callersMethodlog_every
(self, iterable, print_freq, header=None)
foundation_models/EndoMamba/videomamba/video_sm/utils.py:121
↓ 9 callersMethodrun
(self)
src/utils/monitoring.py:67
↓ 9 callersMethodsynchronize_between_processes
(self)
foundation_models/EndoMamba/videomamba/video_sm/utils.py:114
↓ 9 callersFunctiontemporal_sampling
Given the start and end frame index, sample num_samples frames between the start and end with equal interval. Args: frames (tenso
foundation_models/EndoMamba/videomamba/downstream/PolypDiagClassification/datasets/decoder.py:10
↓ 9 callersFunctiontrunc_normal_
r"""Fills the input Tensor with values drawn from a truncated normal distribution. The values are effectively drawn from the normal distributi
foundation_models/EndoMamba/videomamba/downstream/PolypDiagClassification/models/vit_utils.py:62
↓ 8 callersMethod__init__
(self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU, drop=0.)
foundation_models/EndoMamba/videomamba/downstream/PolypDiagClassification/models/timesformer.py:38
↓ 8 callersFunctionapply_masks
:param x: tensor of shape [B (batch-size), N (num-patches), D (feature-dim)] :param masks: list of tensors of shape [B, K] containing indices
src/masks/utils.py:9
↓ 8 callersFunctiondrop_path
Drop paths (Stochastic Depth) per sample (when applied in main path of residual blocks). This is the same as the DropConnect impl I created for Ef
foundation_models/EndoMamba/videomamba/downstream/PolypDiagClassification/models/vit_utils.py:152
↓ 8 callersFunctionrandom_short_side_scale_jitter
Perform a spatial short scale jittering on the given images and corresponding boxes. Args: images (tensor): images to perform sca
foundation_models/EndoMamba/videomamba/video_sm/datasets/video_transforms.py:43
↓ 8 callersFunctionselective_scan_fn
if return_last_state is True, returns (out, last_state) last_state has shape (batch, dim, dstate). Note that the gradient of the last state and pr
foundation_models/EndoMamba/videomamba/_mamba/mamba_ssm/ops/selective_scan_interface.py:88
↓ 8 callersMethodstep
(self)
evals/foundation_phase_probing/eval.py:2055
↓ 7 callersFunction_cfg
(url='', **kwargs)
foundation_models/EndoMamba/videomamba/video_sm/models/modeling_finetune.py:11
↓ 7 callersFunction_check_args_tf
(kwargs)
foundation_models/EndoMamba/videomamba/downstream/SurgicalPhase/Surgformer/datasets/transforms/rand_augment.py:59
↓ 7 callersFunction_check_args_tf
(kwargs)
foundation_models/EndoMamba/videomamba/video_sm/datasets/rand_augment.py:58
↓ 7 callersFunction_check_args_tf
(kwargs)
src/datasets/utils/video/randaugment.py:71
↓ 7 callersFunctionget_inplanes
()
foundation_models/EndoMamba/videomamba/downstream/PolypDiagClassification/models/r3d.py:57
↓ 7 callersFunctionget_logger
(name=None, force=False)
src/utils/logging.py:38
↓ 7 callersMethodset_step
(self, step=None)
foundation_models/EndoMamba/videomamba/video_sm/utils.py:257
↓ 6 callersMethod__init__
( self, in_features, hidden_features=None, out_features=None, act_laye
foundation_models/EndoMamba/videomamba/downstream/SurgicalPhase/Surgformer/model/surgformer_base.py:45
↓ 6 callersMethod__init__
( self, in_features, hidden_features=None, out_features=None, act_laye
foundation_models/EndoMamba/videomamba/downstream/SurgicalPhase/Surgformer/model/surgformer_HTA_KCA.py:45
↓ 6 callersMethod__init__
( self, in_features, hidden_features=None, out_features=None, act_laye
foundation_models/EndoMamba/videomamba/downstream/SurgicalPhase/Surgformer/model/surgformer_HTA.py:45
↓ 6 callersMethod__init__
(self, in_features, hidden_features=None, out_features=None
foundation_models/EndoMamba/videomamba/downstream/PolypDiagClassification/models/videomae_v2.py:58
↓ 6 callersMethod__init__
(self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU, drop=0.)
foundation_models/EndoMamba/videomamba/downstream/PolypDiagClassification/models/swin_transformer.py:20
↓ 6 callersMethod__init__
(self, in_features, hidden_features=None, out_features=None
foundation_models/EndoMamba/videomamba/video_sm/models/videomae_v2.py:58
↓ 6 callersFunctionaccuracy
Computes the accuracy over the k top predictions for the specified values of k
foundation_models/EndoMamba/videomamba/downstream/PolypDiagClassification/utils/utils.py:483
↓ 6 callersFunctionblend
(image1, image2, alpha)
foundation_models/EndoMamba/videomamba/downstream/PolypDiagClassification/datasets/cv2_transform.py:631
↓ 6 callersFunctionbuild_dataset
(is_train, test_mode, args)
foundation_models/EndoMamba/videomamba/video_sm/datasets/build.py:201
↓ 6 callersFunctioncreate_optimizer
( args, model, get_num_layer=None, get_layer_scale=None, filter_bias_and_bn=True, skip_list=N
foundation_models/EndoMamba/videomamba/video_sm/optim_factory.py:104
↓ 6 callersFunctioncutmix_bbox_and_lam
Generate bbox and apply lambda correction.
foundation_models/EndoMamba/videomamba/downstream/SurgicalPhase/Surgformer/datasets/transforms/mixup.py:77
↓ 6 callersFunctioncutmix_bbox_and_lam
Generate bbox and apply lambda correction.
foundation_models/EndoMamba/videomamba/video_sm/datasets/mixup.py:77
↓ 6 callersMethodflush
(self)
foundation_models/EndoMamba/videomamba/downstream/SurgicalPhase/Surgformer/utils.py:236
↓ 6 callersFunctionget_1d_sincos_pos_embed_from_grid
embed_dim: output dimension for each position pos: a list of positions to be encoded: size (M,) returns: (M, D)
src/models/utils/pos_embs.py:75
↓ 6 callersFunctionget_vit_base_patch16_224
(cfg, no_head=False, **kwargs)
foundation_models/EndoMamba/videomamba/downstream/PolypDiagClassification/models/timesformer.py:597
↓ 6 callersFunctionload_config
Given the arguemnts, load and initialize the configs. Args: args (argument): arguments includes `shard_id`, `num_shards`,
foundation_models/EndoMamba/videomamba/downstream/PolypDiagClassification/utils/parser.py:65
↓ 6 callersMethodload_frame
Load video content using Decord
foundation_models/EndoMamba/videomamba/video_sm/datasets/ssv2.py:252
↓ 6 callersMethodloadvideo_decord
Load video content using Decord
foundation_models/EndoMamba/videomamba/video_sm/datasets/kinetics.py:239
↓ 6 callersMethodloadvideo_decord
Load video content using Decord
foundation_models/EndoMamba/videomamba/video_sm/datasets/ssv2.py:540
↓ 6 callersMethodloadvideo_decord
Load video content using Decord
foundation_models/EndoMamba/videomamba/video_sm/datasets/lvu.py:319
↓ 6 callersMethodloadvideo_decord
Load video content using Decord
foundation_models/EndoMamba/videomamba/video_sm/datasets/kinetics_sparse.py:260
↓ 6 callersMethodset_step
(self, step=None)
foundation_models/EndoMamba/videomamba/downstream/SurgicalPhase/Surgformer/utils.py:219
↓ 5 callersMethod__init__
(self, num_classes, modality='rgb', dropout_prob=0,
foundation_models/EndoMamba/videomamba/downstream/PolypDiagClassification/models/i3d.py:187
↓ 5 callersMethod__init__
(self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU, drop=0.)
foundation_models/EndoMamba/videomamba/video_sm/models/modeling_finetune.py:36
↓ 5 callersFunction_randomly_negate
With 50% prob, negate the value
foundation_models/EndoMamba/videomamba/downstream/SurgicalPhase/Surgformer/datasets/transforms/rand_augment.py:196
↓ 5 callersFunction_randomly_negate
With 50% prob, negate the value
foundation_models/EndoMamba/videomamba/video_sm/datasets/rand_augment.py:195
↓ 5 callersFunction_randomly_negate
With 50% prob, negate the value
src/datasets/utils/video/randaugment.py:196
↓ 5 callersFunctionbuild_dataset
Load video phase recognition dataset.
foundation_models/EndoMamba/videomamba/downstream/SurgicalPhase/Surgformer/downstream_phase/datasets_phase.py:10
↓ 5 callersFunctioncausal_conv1d_fn
x: (batch, dim, seqlen) weight: (dim, width) bias: (dim,) activation: either None or "silu" or "swish" out: (batch, dim, seqlen)
foundation_models/EndoMamba/videomamba/causal-conv1d/causal_conv1d/causal_conv1d_interface.py:37
↓ 5 callersFunctioncreate_random_augment
Get video randaug transform. Args: input_size: The size of the input video in tuple. auto_augment: Parameters for randaug. A
foundation_models/EndoMamba/videomamba/video_sm/datasets/video_transforms.py:620
↓ 5 callersFunctioneval
(model, val_loader, device, classes)
foundation_models/EndoMamba/videomamba/downstream/CVC-12kSegmentation/trainer.py:54
↓ 5 callersMethodlog_every
(self, iterable, print_freq, header=None)
foundation_models/EndoMamba/videomamba/downstream/SurgicalPhase/Surgformer/utils.py:124
↓ 5 callersFunctionparse_args
Parse the following arguments for a default parser for PySlowFast users. Args: shard_id (int): shard id for the current machine. Star
foundation_models/EndoMamba/videomamba/downstream/PolypDiagClassification/utils/parser.py:11
↓ 5 callersMethodstep
(self, hidden_states, conv_state, ssm_state)
foundation_models/EndoMamba/videomamba/_mamba/mamba_ssm/modules/mamba_simple.py:317
↓ 5 callersMethodstep
(self)
foundation_models/EndoMamba/videomamba/downstream/PolypDiagClassification/utils/utils.py:546
↓ 4 callersMethod__init__
(self, input_channel=3, gating=False, slow=False)
foundation_models/EndoMamba/videomamba/downstream/PolypDiagClassification/models/s3d.py:138
↓ 4 callersMethod__init__
( self, in_channels, out_channels, kernel_size, pa
foundation_models/EndoMamba/videomamba/downstream/CVC-12kSegmentation/networks/endomamba_seg_modeling.py:43
↓ 4 callersMethod__init__
Simple block wrapping a mixer class with LayerNorm/RMSNorm and residual connection. This Block has a slightly different structure co
foundation_models/EndoMamba/videomamba/video_sm/models/endomamba_two_heads.py:64
↓ 4 callersMethod__init__
(self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU, drop=0.)
foundation_models/EndoMamba/videomamba/video_sm/models/deit.py:22
↓ 4 callersFunction_cfg
(url="", **kwargs)
foundation_models/EndoMamba/videomamba/downstream/SurgicalPhase/Surgformer/model/surgformer_HTA.py:16
↓ 4 callersFunction_clean_backbone_key
(state_dict)
src/hub/backbones.py:22
↓ 4 callersFunction_get_param_spatial_crop
Given scale, ratio, height and width, return sampled coordinates of the videos.
foundation_models/EndoMamba/videomamba/downstream/SurgicalPhase/Surgformer/datasets/transforms/video_transforms.py:499
↓ 4 callersFunction_get_param_spatial_crop
Given scale, ratio, height and width, return sampled coordinates of the videos.
foundation_models/EndoMamba/videomamba/video_sm/datasets/video_transforms.py:498
next →1–100 of 2,319, ranked by callers