MCPcopy Create free account

hub / github.com/Vision-CAIR/MiniGPT-4 / functions

Functions587 in github.com/Vision-CAIR/MiniGPT-4

↓ 104 callersMethodget
r"""Get an item from registry with key 'name' Args: name (string): Key whose value needs to be retrieved. default: If
minigpt4/common/registry.py:284
↓ 61 callersFunctionprint
(*args, **kwargs)
minigpt4/common/dist_utils.py:25
↓ 58 callersMethodinfo
Print information about the VQA annotation file. :return:
minigpt4/common/vqa_tools/vqa.py:71
↓ 55 callersMethodadd_argument
Assume the first argument is the name of the argument.
minigpt4/common/config.py:248
↓ 18 callersMethodupdate
(self, **kwargs)
minigpt4/common/logger.py:87
↓ 16 callersMethodbuild_processors
(self)
minigpt4/datasets/builders/base_dataset_builder.py:61
↓ 14 callersMethod__init__
(self, config, layer_num)
minigpt4/models/Qformer.py:379
↓ 10 callersMethodfrom_config
(cls, cfg)
minigpt4/models/minigpt4.py:148
↓ 8 callersMethodcopy
(self)
minigpt4/conversation/conversation.py:71
↓ 8 callersMethodgenerate
function for generate test use
minigpt4/models/minigpt_base.py:318
↓ 7 callersMethodembed_tokens
(self, token_ids)
minigpt4/models/minigpt_base.py:310
↓ 7 callersMethodget_model_class
(cls, name)
minigpt4/common/registry.py:236
↓ 7 callersFunctionprepare_texts
(texts, conv_temp)
minigpt4/common/eval_utils.py:37
↓ 7 callersMethodtranspose_for_scores
(self, x)
minigpt4/models/Qformer.py:161
↓ 6 callersMethod__init__
(self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU, drop=0.)
minigpt4/models/eva_vit.py:45
↓ 6 callersMethodfrom_pretrained
Build a pretrained model from default configuration file, specified by model_type. Args: - model_type (str): model type,
minigpt4/models/base_model.py:70
↓ 6 callersMethodget_processor_class
(cls, name)
minigpt4/common/registry.py:244
↓ 6 callersFunctionget_rank
()
minigpt4/common/dist_utils.py:47
↓ 6 callersFunctionis_dist_avail_and_initialized
()
minigpt4/common/dist_utils.py:33
↓ 5 callersMethodappend_message
(self, role, message)
minigpt4/conversation/conversation.py:59
↓ 5 callersMethodgetQuesIds
Get question ids that satisfy given filter conditions. default skips that filter :param imgIds (int array) : get question ids f
minigpt4/common/vqa_tools/VQA/PythonHelperTools/vqaTools/vqa.py:72
↓ 5 callersMethodloadQA
Load questions and answers with the specified question ids. :param ids (int array) : integer ids specifying question ids
minigpt4/common/vqa_tools/VQA/PythonHelperTools/vqaTools/vqa.py:120
↓ 5 callersMethodmaybe_autocast
(self, dtype=torch.float16)
minigpt4/models/base_model.py:131
↓ 5 callersMethodregister_path
r"""Register a path to registry with key 'name' Args: name: Key with which the path will be registered. Usage:
minigpt4/common/registry.py:189
↓ 4 callersFunction_build_proc_from_cfg
(cfg)
minigpt4/models/__init__.py:79
↓ 4 callersMethod_build_proc_from_cfg
(cfg)
minigpt4/datasets/builders/base_dataset_builder.py:80
↓ 4 callersMethoddefault_config_path
(cls, model_type)
minigpt4/models/base_model.py:86
↓ 4 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
minigpt4/common/dist_utils.py:120
↓ 4 callersMethodencode_img
(self, image)
minigpt4/models/minigpt4.py:118
↓ 4 callersFunctionenhance_level_to_args
(MAX_LEVEL)
minigpt4/processors/randaugment.py:223
↓ 4 callersMethodget_builder_class
(cls, name)
minigpt4/common/registry.py:232
↓ 4 callersMethodget_path
(cls, name)
minigpt4/common/registry.py:280
↓ 4 callersFunctionis_main_process
()
minigpt4/common/dist_utils.py:53
↓ 4 callersMethodmax
(self)
minigpt4/common/logger.py:65
↓ 4 callersMethodshowQA
Display the specified annotations. :param anns (array of object): annotations to display :return: None
minigpt4/common/vqa_tools/VQA/PythonHelperTools/vqaTools/vqa.py:131
↓ 3 callersMethod_convert_node_to_json
(self, node)
minigpt4/common/config.py:189
↓ 3 callersFunctionis_url
(url_or_filename)
minigpt4/common/utils.py:41
↓ 3 callersFunctionload_dataset_config
(cfg_path)
minigpt4/datasets/builders/base_dataset_builder.py:232
↓ 3 callersFunctionmakedir
Create the directory if it does not exist.
minigpt4/common/utils.py:64
↓ 3 callersMethodprompt_wrap
(self, img_embeds, atts_img, prompts, lengths=None)
minigpt4/models/minigpt_base.py:83
↓ 3 callersMethodregister
r"""Register an item to registry with key 'name' Args: name: Key with which the item will be registered. Usage::
minigpt4/common/registry.py:205
↓ 3 callersMethodstep
(self, cur_epoch, cur_step)
minigpt4/common/optims.py:37
↓ 3 callersMethodunwrap_dist_model
(self, model)
minigpt4/runners/runner_base.py:484
↓ 3 callersMethodvalue
(self)
minigpt4/common/logger.py:69
↓ 2 callersMethod__init__
(self, loaded_data, vis_processor, root_path)
minigpt4/datasets/datasets/coco_caption.py:79
↓ 2 callersMethod__init__
vis_root (string): Root directory of images (e.g. coco/images/) ann_root (string): directory to store the annotation file
minigpt4/datasets/datasets/caption_datasets.py:30
↓ 2 callersMethod__init__
(self, prompt="", max_words=50)
minigpt4/processors/blip_processors.py:30
↓ 2 callersMethod_add_instance_ids
(self, key="instance_id")
minigpt4/datasets/datasets/base_dataset.py:53
↓ 2 callersMethod_save_checkpoint
Save the checkpoint at the current epoch.
minigpt4/runners/runner_base.py:575
↓ 2 callersMethod_train_inner_loop
An inner training loop compatible with both epoch-based and iter-based training. When using epoch-based, training stops after one ep
minigpt4/tasks/base_task.py:157
↓ 2 callersFunction_urlretrieve
(url: str, filename: str, chunk_size: int = 1024)
minigpt4/common/utils.py:154
↓ 2 callersMethodadd_meter
(self, name, meter)
minigpt4/common/logger.py:119
↓ 2 callersMethodanswer
(self, conv, img_list, **kargs)
minigpt4/conversation/conversation.py:185
↓ 2 callersMethodanswer_prepare
(self, conv, img_list, max_new_tokens=300, num_beams=1, min_length=1, top_p=0.9, repeti
minigpt4/conversation/conversation.py:158
↓ 2 callersMethodask
(self, text, conv)
minigpt4/conversation/conversation.py:151
↓ 2 callersMethodcreateIndex
(self)
minigpt4/common/vqa_tools/vqa.py:53
↓ 2 callersMethodcreateIndex
(self)
minigpt4/common/vqa_tools/VQA/PythonHelperTools/vqaTools/vqa.py:47
↓ 2 callersMethoddevice
(self)
minigpt4/models/base_model.py:37
↓ 2 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
minigpt4/common/utils.py:167
↓ 2 callersMethodeval_epoch
Evaluate the model on a given split. Args: split_name (str): name of the split to evaluate on. cur_epoch (in
minigpt4/runners/runner_base.py:450
↓ 2 callersFunctioneval_parser
()
minigpt4/common/eval_utils.py:17
↓ 2 callersMethodevaluate
(self, cur_epoch="best", skip_reload=False)
minigpt4/runners/runner_base.py:422
↓ 2 callersMethodformat_arguments
(self)
minigpt4/common/config.py:276
↓ 2 callersMethodformat_help
(self)
minigpt4/common/config.py:279
↓ 2 callersMethodfrom_config
(cls, cfg=None)
minigpt4/processors/base_processor.py:20
↓ 2 callersMethodgetQuesIds
Get question ids that satisfy given filter conditions. default skips that filter :param imgIds (int array) : get question ids f
minigpt4/common/vqa_tools/vqa.py:79
↓ 2 callersMethodgetRefBox
(self, ref_id)
minigpt4/datasets/datasets/coco_dataset.py:308
↓ 2 callersMethodget_context_emb
(self, prompt, img_list)
minigpt4/models/minigpt_base.py:68
↓ 2 callersMethodget_data
(self, index)
minigpt4/datasets/datasets/aok_vqa_datasets.py:51
↓ 2 callersMethodget_extended_attention_mask
Makes broadcastable attention and causal masks so that future and masked tokens are ignored. Arguments: attention_mask (
minigpt4/models/Qformer.py:713
↓ 2 callersMethodget_prompt
(self)
minigpt4/conversation/conversation.py:38
↓ 2 callersFunctionget_world_size
()
minigpt4/common/dist_utils.py:41
↓ 2 callersFunctioninit_model
(args)
minigpt4/common/eval_utils.py:46
↓ 2 callersMethodload_checkpoint
Load from a finetuned checkpoint. This should expect no mismatch in the model keys and the checkpoint keys.
minigpt4/models/base_model.py:40
↓ 2 callersMethodload_from_pretrained
(self, url_or_filename)
minigpt4/models/base_model.py:210
↓ 2 callersMethodlog_every
(self, iterable, print_freq, header=None)
minigpt4/common/logger.py:122
↓ 2 callersMethodlog_stats
(self, stats, split_name)
minigpt4/runners/runner_base.py:648
↓ 2 callersFunctionmove_to_cuda
(sample)
minigpt4/datasets/data_utils.py:83
↓ 2 callersMethodnext
(self, it)
minigpt4/datasets/datasets/dataloader_utils.py:101
↓ 2 callersMethodpreload
(self, it)
minigpt4/datasets/datasets/dataloader_utils.py:76
↓ 2 callersFunctionprepare_sample
(samples, cuda_enabled=True)
minigpt4/datasets/data_utils.py:90
↓ 2 callersMethodpreprocess
(self, index)
minigpt4/datasets/datasets/coco_dataset.py:49
↓ 2 callersMethodprocessDigitArticle
(self, inText)
minigpt4/common/vqa_tools/VQA/PythonEvaluationTools/vqaEvaluation/vqaEval.py:142
↓ 2 callersMethodprocessPunctuation
(self, inText)
minigpt4/common/vqa_tools/vqa_eval.py:249
↓ 2 callersMethodprocessPunctuation
(self, inText)
minigpt4/common/vqa_tools/VQA/PythonEvaluationTools/vqaEvaluation/vqaEval.py:130
↓ 2 callersFunctionsave_tmp_img
(visual_img)
demo_v2.py:115
↓ 2 callersMethodsetup_task
(cls, **kwargs)
minigpt4/tasks/base_task.py:27
↓ 2 callersFunctionshear_level_to_args
(MAX_LEVEL, replace_value)
minigpt4/processors/randaugment.py:230
↓ 2 callersMethodto_dict
(self)
minigpt4/common/config.py:193
↓ 2 callersMethodtrain
(self)
minigpt4/runners/runner_base.py:362
↓ 2 callersFunctiontranslate_level_to_args
(translate_const, MAX_LEVEL, replace_value)
minigpt4/processors/randaugment.py:240
↓ 2 callersFunctiontune_channel
(ch)
minigpt4/processors/randaugment.py:25
↓ 2 callersMethodupdate
(self, value, n=1)
minigpt4/common/logger.py:32
↓ 2 callersMethodupload_img
(self, image, conv, img_list)
minigpt4/conversation/conversation.py:227
↓ 2 callersFunctionvisualize_all_bbox_together
(image, generation)
demo_v2.py:189
↓ 2 callersFunctionwarmup_lr_schedule
Warmup the learning rate
minigpt4/common/optims.py:108
↓ 1 callersMethod__getitem__
(self, index)
minigpt4/datasets/datasets/gqa_datasets.py:41
↓ 1 callersMethod__getitem__
(self, index)
minigpt4/datasets/datasets/coco_vqa_datasets.py:81
↓ 1 callersMethod__getitem__
(self, index)
minigpt4/datasets/datasets/caption_datasets.py:45
↓ 1 callersMethod__getitem__
(self, index)
minigpt4/datasets/datasets/aok_vqa_datasets.py:80
next →1–100 of 587, ranked by callers