MCPcopy Create free account

hub / github.com/boheumd/MA-LMM / functions

Functions1,238 in github.com/boheumd/MA-LMM

↓ 335 callersMethodget
r"""Get an item from registry with key 'name' Args: name (string): Key whose value needs to be retrieved. default: If
lavis/common/registry.py:284
↓ 100 callersMethodinfo
Print information about the VQA annotation file. :return:
lavis/common/vqa_tools/vqa.py:71
↓ 91 callersFunctionprint
(*args, **kwargs)
lavis/common/dist_utils.py:25
↓ 38 callersMethodadd_argument
Assume the first argument is the name of the argument.
lavis/common/config.py:221
↓ 30 callersMethodmaybe_autocast
(self, dtype=torch.float16)
lavis/models/blip2_models/blip2.py:195
↓ 30 callersMethodupdate
(self, **kwargs)
lavis/common/logger.py:89
↓ 26 callersFunction_n2p
(w, t=True)
lavis/models/vit.py:293
↓ 26 callersMethodget_path
(cls, name)
lavis/common/registry.py:280
↓ 24 callersMethodfrom_pretrained
Build a pretrained model from default configuration file, specified by model_type. Args: - model_type (str): model type,
lavis/models/base_model.py:58
↓ 23 callersMethodgenerate
Args: samples (dict): A dictionary containing the following keys: - image (torch.Tensor): A tensor of shape (batc
lavis/models/blip2_models/blip2_t5.py:159
↓ 20 callersFunctionget_abs_path
(rel_path)
lavis/common/utils.py:50
↓ 20 callersFunctionget_cache_path
(rel_path)
lavis/common/utils.py:46
↓ 18 callersFunctionload_model_and_preprocess
Load model and its related preprocessors. List all available models and types in registry: >>> from lavis.models import model_zoo >>
lavis/models/__init__.py:176
↓ 18 callersMethodmax
(self)
lavis/common/logger.py:67
↓ 17 callersFunctioncleanup_dir
Utility for deleting a directory. Useful for cleaning the storage space that contains various training artifacts like checkpoints, data etc.
lavis/common/utils.py:408
↓ 16 callersMethodforward_features
(self, samples, **kwargs)
lavis/models/base_model.py:134
↓ 16 callersMethodtranspose_for_scores
(self, x)
lavis/models/blip2_models/Qformer.py:161
↓ 14 callersMethod__init__
(self, config, layer_num)
lavis/models/med.py:392
↓ 14 callersMethod__init__
(self, config, layer_num)
lavis/models/blip2_models/Qformer.py:379
↓ 13 callersMethodload_checkpoint_from_config
Load checkpoint as specified in the config file. If load_finetuned is True, load the finetuned model; otherwise, load the pretrained
lavis/models/base_model.py:82
↓ 13 callersFunctionload_model
Load supported models. To list all available models and types in registry: >>> from lavis.models import model_zoo >>> print(model_zo
lavis/models/__init__.py:90
↓ 13 callersMethodvalue
(self)
lavis/common/logger.py:71
↓ 12 callersMethod__init__
(self, config, layer_num)
lavis/models/blip_models/nlvr_encoder.py:412
↓ 12 callersMethodbuild_processors
(self)
lavis/datasets/builders/base_dataset_builder.py:59
↓ 12 callersFunctionconcat_all_gather
Performs all_gather operation on the provided tensors. *** Warning ***: torch.distributed.all_gather has no gradient.
lavis/models/base_model.py:226
↓ 12 callersMethoddevice
(self)
lavis/models/base_model.py:26
↓ 12 callersFunctionload_processor
Example >>> processor = load_processor("alpro_video_train", cfg=None)
lavis/processors/__init__.py:49
↓ 11 callersMethod__init__
(self, config, has_relative_attention_bias=False)
lavis/models/blip2_models/modeling_t5.py:698
↓ 10 callersMethodbuild
(self, **kwargs)
lavis/processors/base_processor.py:23
↓ 10 callersFunctiondownload_cached_file
Download a file from a URL and cache it locally. If the file already exists, it is not downloaded again. If distributed, only the main proces
lavis/common/dist_utils.py:117
↓ 10 callersMethodpadding
(self, seq, pad_token=-1)
lavis/processors/gpt_processors.py:77
↓ 10 callersMethodpredict_answers
Args: samples (dict): A dictionary containing the following keys: - image (torch.Tensor): A tensor of shape (batc
lavis/models/blip_models/blip_vqa.py:162
↓ 9 callersMethodapply
(answer)
lavis/models/blip2_models/blip2.py:314
↓ 9 callersMethodcopy_params
(self)
lavis/models/base_model.py:168
↓ 9 callersMethodextract_features
Extract features from the model for samples. Keys allowed are "image" and "text_input" in samples. If either key is missing,
lavis/models/clip_models/model.py:603
↓ 9 callersMethodinit_tokenizer
(cls)
lavis/models/blip_models/blip.py:27
↓ 9 callersMethodpre_caption
(self, caption)
lavis/processors/blip_processors.py:51
↓ 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
lavis/models/clip_models/timm_model.py:544
↓ 8 callersMethod_momentum_update
(self)
lavis/models/base_model.py:177
↓ 8 callersMethodforward_text
(self, text_tokens)
lavis/models/blip2_models/blip2_qformer.py:339
↓ 8 callersFunctionget_rank
()
lavis/common/dist_utils.py:47
↓ 8 callersFunctioninterpolate_pos_embed
(pos_embed_checkpoint, visual_encoder)
lavis/models/vit.py:426
↓ 8 callersFunctionis_dist_avail_and_initialized
()
lavis/common/dist_utils.py:33
↓ 8 callersFunctionis_url
(url_or_filename)
lavis/common/utils.py:41
↓ 7 callersMethod__init__
( self, hidden_size: int, intermediate_size: int, hidden_act: str, )
lavis/models/blip2_models/modeling_llama.py:145
↓ 7 callersMethod_add_instance_ids
(self, key="instance_id")
lavis/datasets/datasets/base_dataset.py:44
↓ 7 callersMethodencode_image
(self, image)
lavis/models/clip_models/model.py:552
↓ 7 callersMethodencode_text
(self, text)
lavis/models/clip_models/model.py:555
↓ 7 callersMethodforward_automask
(self, tokenized_text, visual_embeds, **kwargs)
lavis/models/med.py:1388
↓ 7 callersFunctionis_main_process
()
lavis/common/dist_utils.py:53
↓ 7 callersMethodlog_every
(self, iterable, print_freq, header=None)
lavis/common/logger.py:124
↓ 7 callersMethodtranspose_for_scores
(self, x)
lavis/models/med.py:176
↓ 7 callersMethodtranspose_for_scores
(self, x)
lavis/models/blip_models/nlvr_encoder.py:140
↓ 6 callersMethod__init__
(self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU, drop=0.)
lavis/models/eva_vit.py:46
↓ 6 callersMethod__init__
( self, embed_dim: int, vision_cfg: CLIPVisionCfg, text_cfg: CLIPTextCfg,
lavis/models/clip_models/model.py:418
↓ 6 callersMethodadd_page
Class Method to Add pages to the project Args: title ([str]): The title of page which we are adding to the list of apps
app/multipage.py:24
↓ 6 callersFunctiondownload_and_extract_archive
( url: str, download_root: str, extract_root: Optional[str] = None, filename: Optional[str] =
lavis/common/utils.py:221
↓ 6 callersMethodencode
(self, text)
lavis/models/clip_models/tokenizer.py:152
↓ 6 callersMethodevaluate
(self, cur_epoch="best", skip_reload=False)
lavis/runners/runner_base.py:433
↓ 6 callersMethodinit_tokenizer
(cls)
lavis/models/albef_models/__init__.py:27
↓ 6 callersMethodsave_result
(result, result_dir, filename, remove_duplicate="")
lavis/tasks/base_task.py:256
↓ 5 callersMethod__init__
(self)
lavis/processors/blip_processors.py:365
↓ 5 callersFunction_is_tensor_video_clip
(clip)
lavis/processors/functional_video.py:13
↓ 5 callersMethoddeparallelize
(self)
lavis/models/blip2_models/modeling_t5.py:1004
↓ 5 callersFunctiondownload_url
Download a file from a url and place it in root. Args: url (str): URL to download file from root (str): Directory to place downloa
lavis/common/utils.py:167
↓ 5 callersFunctionload_model_cache
(model_type, device)
app/classification.py:38
↓ 5 callersMethodlog_stats
(self, stats, split_name)
lavis/runners/runner_base.py:655
↓ 5 callersMethodparallelize
(self, device_map=None)
lavis/models/blip2_models/modeling_t5.py:977
↓ 5 callersMethodregister_path
r"""Register a path to registry with key 'name' Args: name: Key with which the path will be registered. Usage:
lavis/common/registry.py:189
↓ 5 callersMethodset_input_embeddings
(self, new_embeddings)
lavis/models/blip2_models/modeling_t5.py:1018
↓ 5 callersMethodunwrap_dist_model
(self, model)
lavis/runners/runner_base.py:494
↓ 4 callersMethod__init__
(self, inplanes, planes, stride=1)
lavis/models/clip_vit.py:18
↓ 4 callersMethod__init__
( self, model_name, embed_dim, image_size=224, pool="avg", pro
lavis/models/clip_models/timm_model.py:42
↓ 4 callersMethod_build_class_labels
(self)
lavis/datasets/datasets/nlvr_datasets.py:40
↓ 4 callersFunction_build_proc_from_cfg
(cfg)
lavis/models/__init__.py:140
↓ 4 callersMethod_build_proc_from_cfg
(cfg)
lavis/datasets/builders/base_dataset_builder.py:78
↓ 4 callersMethod_dequeue_and_enqueue
(self, image_feat, text_feat, idxs=None)
lavis/models/base_model.py:144
↓ 4 callersMethod_make_layer
(self, planes, blocks, stride=1)
lavis/models/clip_models/model.py:195
↓ 4 callersMethodbackward
(ctx, *grads)
lavis/models/base_model.py:202
↓ 4 callersMethoddecode
(self, tokens)
lavis/models/clip_models/tokenizer.py:162
↓ 4 callersMethoddefault_config_path
(cls, model_type)
lavis/models/base_model.py:76
↓ 4 callersFunctiondownload_file
(url, filename)
lavis/datasets/download_scripts/download_nocaps.py:39
↓ 4 callersFunctionenhance_level_to_args
(MAX_LEVEL)
lavis/processors/randaugment.py:223
↓ 4 callersMethodfrom_config
(cls, cfg, from_pretrained=False)
lavis/models/med.py:1376
↓ 4 callersFunctiongetAttMap
(img, attMap, blur=True, overlap=True)
app/utils.py:49
↓ 4 callersMethodget_attention_mask
(self, seq, pad_token=-1)
lavis/processors/gpt_processors.py:85
↓ 4 callersMethodget_model_class
(cls, name)
lavis/common/registry.py:236
↓ 4 callersMethodinit_Qformer
(cls, num_query_token, vision_width, cross_attention_freq=2, memory_bank_length=0, num_frames=0)
lavis/models/blip2_models/blip2.py:206
↓ 4 callersMethodinit_tokenizer
(cls, truncation_side="right")
lavis/models/blip2_models/blip2.py:190
↓ 4 callersMethodinit_vision_encoder
( self, model_name, img_size, drop_path_rate, use_grad_checkpoint, precision )
lavis/models/blip2_models/blip2.py:224
↓ 4 callersMethodloadRes
Load result file and return a result object. :param resFile (str) : file name of result file :return: res (obj)
lavis/common/vqa_tools/vqa.py:173
↓ 4 callersFunctionload_blip_itm_model
(device, model_type="base")
app/utils.py:77
↓ 4 callersFunctionload_demo_image
()
app/__init__.py:16
↓ 4 callersMethodload_from_pretrained
(self, url_or_filename)
lavis/models/blip_models/blip.py:34
↓ 4 callersMethodprocessPunctuation
(self, inText)
lavis/common/vqa_tools/vqa_eval.py:249
↓ 4 callersFunctiontile
(x, dim, n_tile)
lavis/models/base_model.py:244
↓ 3 callersMethod__init__
vis_root (string): Root directory of images (e.g. coco/images/) ann_root (string): directory to store the annotation file
lavis/datasets/datasets/retrieval_datasets.py:30
↓ 3 callersMethod__init__
( self, in_features, hidden_features=None, out_features=None, act_laye
lavis/models/vit.py:29
↓ 3 callersMethod_convert_node_to_json
(self, node)
lavis/common/config.py:162
↓ 3 callersMethod_save_checkpoint
Save the checkpoint at the current epoch.
lavis/runners/runner_base.py:582
next →1–100 of 1,238, ranked by callers