MCPcopy Create free account

hub / github.com/alipay/Ant-Multi-Modal-Framework / functions

Functions4,004 in github.com/alipay/Ant-Multi-Modal-Framework

↓ 4 callersFunctionceil_by_factor
Returns the smallest integer greater than or equal to 'number' that is divisible by 'factor'.
prj/M2_omni/models/m2omni_utils.py:50
↓ 4 callersMethodcheck
(self, func_name)
antmmf/common/meter.py:53
↓ 4 callersFunctioncheck_configuration
Check the whether the configuration is valid, if not, we will edit it/them. Args: config (Configuration): The configuration must inc
antmmf/trainers/base_trainer.py:47
↓ 4 callersFunctionconv1x1
(in_planes, out_planes, stride=1, padding=0)
antmmf/models/spkResNet.py:22
↓ 4 callersFunctionconvert_by_vocab
Converts a sequence of [tokens|ids] using the vocab.
antmmf/modules/vision/backbone/clip/cn_tokenizer.py:156
↓ 4 callersFunctionconvert_deepspeed_ckpt
(state_dict, num_visual_token=197)
prj/M2_Encoder/vlmo/modules/vlmo_module.py:59
↓ 4 callersFunctioncrop
(image, target, region)
antmmf/datasets/processors/transforms/detection.py:39
↓ 4 callersMethoddecode
(self, tokens)
antmmf/modules/vision/backbone/clip/simple_tokenizer.py:161
↓ 4 callersMethodend_profile
(self)
antmmf/common/metrics_reporter.py:171
↓ 4 callersFunctionenhance_level_to_args
(MAX_LEVEL)
prj/M2_Encoder/vlmo/transforms/randaugment.py:202
↓ 4 callersMethodextract_features
Args: video_sample(np.ndArray): b,c,h,w, segment-based sampled video concatenated along channel-dim Returns:
antmmf/datasets/features/vision/video_feature.py:347
↓ 4 callersFunctionfetch_image
(ele: dict[str, str | Image.Image], size_factor: int = IMAGE_FACTOR)
prj/M2_omni/models/m2omni_utils.py:131
↓ 4 callersMethodfields
Get current attributes/fields registered under the SampleList. Returns: List[str]: list of attributes of the SampleList.
antmmf/structures/sample.py:210
↓ 4 callersMethodforward_img_encoder
(self, img_input: Dict[str, Any])
prj/snps3_vtp/roi_univl/univl/model/univl_base.py:98
↓ 4 callersMethodforward_img_encoder
(self, img_input: Dict[str, Any])
prj/dmae_vtp/roi_univl/univl/model/univl_base.py:98
↓ 4 callersMethodforward_img_encoder
(self, img_input: Dict[str, Any])
prj/base_vtp/roi_univl/univl/model/univl_base.py:98
↓ 4 callersMethodfrom_dict_conf
Construct configuration from any mapping.
antmmf/common/configuration.py:524
↓ 4 callersMethodgetImgIds
Get image ids that satisfy given filter conditions. default skips that filter :param quesIds (int array) : get image ids for gi
prj/Pink/pink/eval/vqa_tools/vqa.py:114
↓ 4 callersMethodgetQuesIds
Get question ids that satisfy given filter conditions. default skips that filter :param imgIds (int array) : get question ids f
prj/Pink/pink/eval/vqa_tools/vqa_result.py:392
↓ 4 callersMethodget_l2_input
(self, img_input, caption_input)
prj/snps3_vtp/roi_univl/univl/model/univl_video_base.py:273
↓ 4 callersMethodget_l2_input
(self, img_input, caption_input)
prj/dmae_vtp/roi_univl/univl/model/univl_video_base.py:273
↓ 4 callersMethodget_l2_input
(self, img_input, caption_input)
prj/base_vtp/roi_univl/univl/model/univl_video_base.py:273
↓ 4 callersMethodget_l2_input
(self, img_input, caption_input)
prj/cnvid_vtp/roi_univl/univl/model/univl_video_base.py:273
↓ 4 callersMethodget_mil_nce_loss
:param sim_matrix: #text(bsz) x #video(bsz*n_pair) :return:
prj/snps3_vtp/roi_univl/univl/model/univl_video_ret.py:210
↓ 4 callersMethodget_node_from_label_str
get node from hier labels Note: Using this func to get tree node, especially when label exists more than once, the hierarchic
antmmf/modules/utils.py:316
↓ 4 callersMethodget_ranks
(self, sample_list, model_output, *args, **kwargs)
antmmf/modules/metrics/recall_at_k.py:65
↓ 4 callersMethodload
(file)
antmmf/utils/image_ops.py:632
↓ 4 callersFunctionmove
Rename the given file.
antmmf/utils/download.py:368
↓ 4 callersFunctionnested_dict_update
Updates a dictionary with other dictionary recursively. Parameters ---------- dictionary : dict Dictionary to be updated. upd
antmmf/common/configuration.py:63
↓ 4 callersMethodno_need_profile
(self)
antmmf/common/metrics_reporter.py:116
↓ 4 callersMethodpad_target
(self, target, num_box_max=None)
antmmf/datasets/processors/image_processors.py:664
↓ 4 callersMethodpost_process
Perform the computation Parameters: predictions: raw outputs of the model target_sizes: tensor of dimension [batch_siz
antmmf/modules/transformers/heads/detr.py:104
↓ 4 callersMethodprepare_cross_visual
(self, visual_embed, visual_mask=None)
prj/snps3_vtp/roi_univl/univl/model/univl_video_base.py:178
↓ 4 callersMethodprepare_cross_visual
(self, visual_embed, visual_mask=None)
prj/dmae_vtp/roi_univl/univl/model/univl_video_base.py:178
↓ 4 callersMethodprepare_cross_visual
(self, visual_embed, visual_mask=None)
prj/base_vtp/roi_univl/univl/model/univl_video_base.py:178
↓ 4 callersMethodregister_optimizer
(cls, name)
antmmf/common/registry.py:472
↓ 4 callersMethodsave
(self, image_paths, *feats_res)
antmmf/datasets/features/vision/feature_saver.py:207
↓ 4 callersFunctionscatter
r""" | .. image:: https://raw.githubusercontent.com/rusty1s/pytorch_scatter/ master/docs/source/_figures/add.svg?sanitize=true
antmmf/utils/scatter.py:77
↓ 4 callersFunctionscatter_sum
( src: torch.Tensor, index: torch.Tensor, dim: int = -1, out: Optional[torch.Tensor] = None,
antmmf/utils/scatter.py:17
↓ 4 callersMethodsearch_node
(self, attr, val)
antmmf/modules/utils.py:270
↓ 4 callersMethodseed_sampler
(self, task_type, seed)
antmmf/common/task_loader.py:213
↓ 4 callersFunctionsetup_compatibility
Python 3.8 changes the default mode of multiprocessing on MacOS to spawn instead of fork. This requires all parameters passed to Sanic worker
antmmf/utils/env.py:54
↓ 4 callersFunctionsmart_resize
Rescales the image so that the following conditions are met: 1. Both dimensions (height and width) are divisible by 'factor'. 2. The to
prj/M2_omni/models/m2omni_utils.py:103
↓ 4 callersFunctionvisualize
Args: image(torch.Tensor or np.ndArray): image with shape [h,w,c] coords(torch.Tensor or np.ndArray): Nx4, [xc,yc,w,h] or [x1,y1,
antmmf/utils/visual_utils/vis_utils.py:39
↓ 3 callersMethod__call__
Call requires item to have either "tokens" attribute or either "text" attribute. If "text" is present, it will be tokenized using the
antmmf/datasets/processors/text_processors.py:166
↓ 3 callersMethod__init__
( self, vision_config=None, audio_config=None, llm_config=None, use_vi
prj/M2_omni/models/configuration_m2omni.py:196
↓ 3 callersMethod__init__
(self, model_dir, *args, **kwargs)
prj/M2_Encoder/ms_wrapper.py:22
↓ 3 callersMethod__init__
(self, in_hsz, out_hsz)
prj/snps3_vtp/roi_univl/univl/model/univl_video_pretrain.py:121
↓ 3 callersMethod__init__
( self, in_features, hidden_dim=8, scale=1, dropout=0.1, non
prj/Pink/pink/model/adapter.py:25
↓ 3 callersMethod__init__
(self, in_hsz, out_hsz)
prj/dmae_vtp/roi_univl/univl/model/univl_video_pretrain.py:121
↓ 3 callersMethod__init__
(self, in_hsz, out_hsz)
prj/base_vtp/roi_univl/univl/model/univl_video_pretrain.py:121
↓ 3 callersMethod__init__
(self, in_hsz, out_hsz)
prj/cnvid_vtp/roi_univl/univl/model/univl_video_pretrain.py:121
↓ 3 callersMethod__init__
( self, type: str = None, emb_type: str = None, embedding_dim: int = None,
antmmf/modules/embeddings/text_embedding.py:15
↓ 3 callersMethod__init__
( self, in_channels, out_channels, kernel_size, stride=1, imag
antmmf/modules/layers/padding.py:73
↓ 3 callersMethod__init__
(self, data_source, *args, **kwargs)
antmmf/datasets/samplers.py:29
↓ 3 callersMethod__init__
(self, model_arch, *args, **kwargs)
antmmf/datasets/features/vision/imagenet_feature.py:125
↓ 3 callersMethod__init__
(self, config)
antmmf/models/visual_bert.py:385
↓ 3 callersMethod_backward
(self, loss)
antmmf/trainers/base_trainer.py:643
↓ 3 callersMethod_calculate
Calculate accuracy and return it back. Args: sample_list (SampleList): SampleList provided by DataLoader for
antmmf/modules/metrics/accuracy.py:26
↓ 3 callersMethod_extract_loss
(self, report)
antmmf/trainers/base_trainer.py:677
↓ 3 callersMethod_get_tensor_field
(self)
antmmf/structures/sample.py:254
↓ 3 callersMethod_init_db
(self)
antmmf/datasets/features/feature_readers.py:239
↓ 3 callersMethod_init_extras
(self, config, *args, **kwargs)
antmmf/datasets/processors/text_processors.py:150
↓ 3 callersMethod_init_process_group
(self)
antmmf/trainers/base_trainer.py:184
↓ 3 callersMethod_is_main_process
(self)
antmmf/datasets/processors/text_processors.py:410
↓ 3 callersMethod_load
(self, file, force=False, resume_state=False)
antmmf/common/checkpoint.py:246
↓ 3 callersMethod_logistics
(self)
antmmf/trainers/base_trainer.py:719
↓ 3 callersMethod_random_word
(self, tokens, probability=0.15)
antmmf/datasets/processors/text_processors.py:694
↓ 3 callersMethod_run_scheduler
(self)
antmmf/trainers/base_trainer.py:604
↓ 3 callersMethod_should_log_tensorboard
(self)
antmmf/utils/logger.py:118
↓ 3 callersMethodadd_caption
(self, sample_info, sample)
prj/snps3_vtp/roi_univl/roi/dataset.py:252
↓ 3 callersMethodadd_caption
(self, sample_info, sample)
prj/base_vtp/roi_univl/roi/dataset.py:252
↓ 3 callersMethodadd_child
(self, node)
antmmf/modules/utils.py:172
↓ 3 callersMethodadd_scalars
(self, scalar_dict, iteration)
antmmf/utils/logger.py:133
↓ 3 callersMethodadd_to_report
(self, report: Report)
antmmf/common/data_updater.py:35
↓ 3 callersFunctionapply_rotary_pos_emb
Applies Rotary Position Embedding with Multimodal Sections to the query and key tensors (https://qwenlm.github.io/blog/qwen2-vl/). Explanation:
prj/M2_omni/models/modeling_llama_3d.py:197
↓ 3 callersFunctionbuild_classifier_layer
TODO: add document here.
antmmf/modules/build.py:30
↓ 3 callersMethodbuild_encoder_layer
(self, args, depth, attn=None, is_moe_layer=False, is_encoder_decoder=False)
prj/M2_Encoder/vlmo/torchscale/architecture/encoder.py:329
↓ 3 callersFunctionbuild_hier_tree
(label_schema)
antmmf/modules/utils.py:447
↓ 3 callersMethodbuild_sample_with_text_image
Args: text_sample_info(Dict): {'text': ''} image_sample_info(Dict): {'images': [image_tensor] }, with image_tensor's
antmmf/datasets/mm_dataset.py:50
↓ 3 callersFunctioncalculate_output_image_size
Calculates the output image size when using Conv2dSamePadding with a stride. Necessary for static padding. Thanks to mannatsingh for pointing t
antmmf/modules/utils.py:138
↓ 3 callersFunctionccorr
(a, b)
antmmf/modules/utils.py:68
↓ 3 callersMethodcollect
(self, sample_list, model_output, *args, **kwargs)
antmmf/modules/metrics/f1.py:65
↓ 3 callersMethodcompute_raw_att
(self, image_feat, question_embedding)
antmmf/modules/attention.py:68
↓ 3 callersMethodconfig_based_setup
(self)
antmmf/trainers/base_trainer.py:467
↓ 3 callersFunctionconv1x1
1x1 convolution
antmmf/modules/vision/backbone/cctt.py:642
↓ 3 callersFunctionconv3x3
3x3 convolution with padding
antmmf/modules/vision/backbone/cctt.py:626
↓ 3 callersFunctionconv3x3
(in_planes, out_planes, stride=1)
antmmf/models/spkResNet.py:28
↓ 3 callersMethodconvert
(self)
antmmf/scripts/features/lmdb_conversion.py:49
↓ 3 callersFunctionconvert_to_unicode
Converts `text` to Unicode (if it's not already), assuming utf-8 input.
antmmf/modules/vision/backbone/clip/cn_tokenizer.py:98
↓ 3 callersMethodcosine_sim
Cosine similarity between all the image and sentence pairs
antmmf/models/concat_bert.py:189
↓ 3 callersMethoddecode
This method forwards all its arguments to LlamaTokenizerFast's [`~PreTrainedTokenizer.decode`]. Please refer to the docstring of this
prj/M2_omni/models/processing_m2omni.py:383
↓ 3 callersMethoddecode
(self, t, data, scores)
antmmf/utils/text_utils.py:489
↓ 3 callersMethoddistribute
(self, func_name, kwargs: Dict[str, Any])
antmmf/utils/inspector.py:146
↓ 3 callersFunctiondownload_on_attribute
(resources, download_path, version, attribute)
antmmf/utils/download.py:440
↓ 3 callersFunctiondownload_resources
(resources, download_path, version)
antmmf/utils/download.py:333
↓ 3 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
antmmf/modules/vision/backbone/cctt.py:70
↓ 3 callersMethodfinalize
(self)
antmmf/trainers/base_trainer.py:683
↓ 3 callersFunctionfloor_by_factor
Returns the largest integer less than or equal to 'number' that is divisible by 'factor'.
prj/M2_omni/models/m2omni_utils.py:54
↓ 3 callersMethodforward_base
(self, sub, rel, drop1, drop2)
antmmf/modules/graph.py:622
← previousnext →201–300 of 4,004, ranked by callers